pict-docuserve 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,60 +1,60 @@
1
- "use strict";function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==typeof e?e:e+""}function _toPrimitive(t,e){if("object"!=typeof t||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PictDocuserve=t()}}(function(){return function t(e,o,n){function r(a,s){if(!o[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[a]={exports:{}};e[a][0].call(d.exports,function(t){return r(e[a][1][t]||t)},d,d.exports,t,e,o,n)}return o[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(t,e,o){e.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],2:[function(t,e,o){const n=t("../package.json");class r{constructor(t,e,o){this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"==typeof t&&t.isFable?this.connectFable(t):this.fable=!1,this._PackageFableServiceProvider=n,this.fable?(this.UUID=t.getUUID(),this.options="object"==typeof e?e:{}):(this.options="object"!=typeof t||t.isFable?"object"==typeof e?e:{}:t,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof o?o:this.fable||"string"!=typeof e?"".concat(this.UUID):e}connectFable(t){if("object"!=typeof t||!t.isFable){let e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(typeof t,"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}_defineProperty(r,"isFableService",!0),e.exports=r,e.exports.CoreServiceProviderBase=r},{"../package.json":1}],3:[function(t,e,o){!function(){var t,n,r,i,a,s,l,c,d,p,h,u,m,g,f,b,v,y,w,D,x,C,S,T,A,k,P,F,L,_,B,M=function(t){var e=new M.Builder;return e.pipeline.add(M.trimmer,M.stopWordFilter,M.stemmer),e.searchPipeline.add(M.stemmer),t.call(e,e),e.build()};M.version="2.3.9",
1
+ "use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty2(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty2(e,t,r){return(t=_toPropertyKey2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey2(e){var t=_toPrimitive2(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive2(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PictDocuserve=e()}}(function(){return function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=r[a]={exports:{}};t[a][0].call(d.exports,function(e){return o(t[a][1][e]||e)},d,d.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,r){var n=e("async.util.eachoflimit"),o=e("async.util.withoutindex");t.exports=function(e,t,r,i){return n(t)(e,o(r),i)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(e,t,r){t.exports=function(e){return function t(r){function n(){return e.length&&e[r].apply(null,arguments),n.next()}return n.next=function(){return r<e.length-1?t(r+1):null},n}(0)}},{}],3:[function(e,t,r){var n=e("async.util.once"),o=e("async.util.noop"),i=e("async.util.onlyonce"),a=e("async.util.keyiterator");t.exports=function(e){return function(t,r,s){s=n(s||o);var l=a(t=t||[]);if(e<=0)return s(null);var c=!1,d=0,h=!1;!function n(){if(c&&d<=0)return s(null);for(;d<e&&!h;){var o=l();if(null===o)return c=!0,void(d<=0&&s(null));d+=1,r(t[o],o,i(function(e){d-=1,e?(s(e),h=!0):n()}))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(e,t,r){var n=e("async.util.setimmediate"),o=e("async.util.restparam");t.exports=function(e){return o(function(t){var r=t.pop();t.push(function(){var e=arguments;o?n(function(){r.apply(null,e)}):r.apply(null,e)});var o=!0;e.apply(this,t),o=!1})}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],6:[function(e,t,r){var n=e("async.util.isarray");t.exports=function(e){return n(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}},{"async.util.isarray":5}],7:[function(e,t,r){var n=e("async.util.keys"),o=e("async.util.isarraylike");t.exports=function(e){var t,r,i=-1;return o(e)?(t=e.length,function(){return++i<t?i:null}):(r=n(e),t=r.length,function(){return++i<t?r[i]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(e,t,r){t.exports=Object.keys||function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}},{}],9:[function(e,t,r){t.exports=function(){}},{}],10:[function(e,t,r){t.exports=function(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}},{}],11:[function(e,t,r){t.exports=function(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}},{}],12:[function(e,t,r){t.exports=function(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=new Array(r),o=0;o<r;o++)n[o]=arguments[o+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n)}}}},{}],13:[function(e,t,r){(function(e){(function(){var r="function"==typeof e&&e,n=function(e){setTimeout(e,0)};t.exports=function(e){return(r||n)(e)}}).call(this)}).call(this,e("timers").setImmediate)},{timers:324}],14:[function(e,t,r){t.exports=function(e){return function(t,r,n){return e(t,n)}}},{}],15:[function(e,t,r){var n=e("async.util.once"),o=e("async.util.noop"),i=e("async.util.isarray"),a=e("async.util.restparam"),s=e("async.util.ensureasync"),l=e("async.iterator");t.exports=function(e,t){if(t=n(t||o),!i(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();!function e(r){return a(function(n,o){if(n)t.apply(null,[n].concat(o));else{var i=r.next();i?o.push(e(i)):o.push(t),s(r).apply(null,o)}})}(l(e))()}},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(e,t,r){r.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=l(e),a=n[0],s=n[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),d=0,h=s>0?a-4:a;for(r=0;r<h;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;2===s&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,c[d++]=255&t);1===s&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t);return c},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,l=r-o;s<l;s+=a)i.push(d(e,s,s+a>l?l:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function d(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(c(n));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],17:[function(e,t,r){!function(e){var r,n=1e6,o=1e6,i="[big.js] ",a=i+"Invalid ",s=a+"decimal places",l=a+"rounding mode",c=i+"Division by zero",d={},h=void 0,p=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function u(e,t,r,n){var o=e.c;if(r===h&&(r=e.constructor.RM),0!==r&&1!==r&&2!==r&&3!==r)throw Error(l);if(t<1)n=3===r&&(n||!!o[0])||0===t&&(1===r&&o[0]>=5||2===r&&(o[0]>5||5===o[0]&&(n||o[1]!==h))),o.length=1,n?(e.e=e.e-t+1,o[0]=1):o[0]=e.e=0;else if(t<o.length){if(n=1===r&&o[t]>=5||2===r&&(o[t]>5||5===o[t]&&(n||o[t+1]!==h||1&o[t-1]))||3===r&&(n||!!o[0]),o.length=t,n)for(;++o[--t]>9;)if(o[t]=0,0===t){++e.e,o.unshift(1);break}for(t=o.length;!o[--t];)o.pop()}return e}function f(e,t,r){var n=e.e,o=e.c.join(""),i=o.length;if(t)o=o.charAt(0)+(i>1?"."+o.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)o="0"+o;o="0."+o}else if(n>0)if(++n>i)for(n-=i;n--;)o+="0";else n<i&&(o=o.slice(0,n)+"."+o.slice(n));else i>1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&r?"-"+o:o}d.abs=function(){var e=new this.constructor(this);return e.s=1,e},d.cmp=function(e){var t,r=this,n=r.c,o=(e=new r.constructor(e)).c,i=r.s,a=e.s,s=r.e,l=e.e;if(!n[0]||!o[0])return n[0]?i:o[0]?-a:0;if(i!=a)return i;if(t=i<0,s!=l)return s>l^t?1:-1;for(a=(s=n.length)<(l=o.length)?s:l,i=-1;++i<a;)if(n[i]!=o[i])return n[i]>o[i]^t?1:-1;return s==l?0:s>l^t?1:-1},d.div=function(e){var t=this,r=t.constructor,o=t.c,i=(e=new r(e)).c,a=t.s==e.s?1:-1,l=r.DP;if(l!==~~l||l<0||l>n)throw Error(s);if(!i[0])throw Error(c);if(!o[0])return e.s=a,e.c=[e.e=0],e;var d,p,f,m,g,y=i.slice(),b=d=i.length,v=o.length,S=o.slice(0,d),T=S.length,w=e,x=w.c=[],P=0,A=l+(w.e=t.e-e.e)+1;for(w.s=a,a=A<0?0:A,y.unshift(0);T++<d;)S.push(0);do{for(f=0;f<10;f++){if(d!=(T=S.length))m=d>T?1:-1;else for(g=-1,m=0;++g<d;)if(i[g]!=S[g]){m=i[g]>S[g]?1:-1;break}if(!(m<0))break;for(p=T==d?i:y;T;){if(S[--T]<p[T]){for(g=T;g&&!S[--g];)S[g]=9;--S[g],S[T]+=10}S[T]-=p[T]}for(;!S[0];)S.shift()}x[P++]=m?f:++f,S[0]&&m?S[T]=o[b]||0:S=[o[b]]}while((b++<v||S[0]!==h)&&a--);return x[0]||1==P||(x.shift(),w.e--,A--),P>A&&u(w,A,r.RM,S[0]!==h),w},d.eq=function(e){return 0===this.cmp(e)},d.gt=function(e){return this.cmp(e)>0},d.gte=function(e){return this.cmp(e)>-1},d.lt=function(e){return this.cmp(e)<0},d.lte=function(e){return this.cmp(e)<1},d.minus=d.sub=function(e){var t,r,n,o,i=this,a=i.constructor,s=i.s,l=(e=new a(e)).s;if(s!=l)return e.s=-l,i.plus(e);var c=i.c.slice(),d=i.e,h=e.c,p=e.e;if(!c[0]||!h[0])return h[0]?e.s=-l:c[0]?e=new a(i):e.s=1,e;if(s=d-p){for((o=s<0)?(s=-s,n=c):(p=d,n=h),n.reverse(),l=s;l--;)n.push(0);n.reverse()}else for(r=((o=c.length<h.length)?c:h).length,s=l=0;l<r;l++)if(c[l]!=h[l]){o=c[l]<h[l];break}if(o&&(n=c,c=h,h=n,e.s=-e.s),(l=(r=h.length)-(t=c.length))>0)for(;l--;)c[t++]=0;for(l=t;r>s;){if(c[--r]<h[r]){for(t=r;t&&!c[--t];)c[t]=9;--c[t],c[r]+=10}c[r]-=h[r]}for(;0===c[--l];)c.pop();for(;0===c[0];)c.shift(),--p;return c[0]||(e.s=1,c=[p=0]),e.c=c,e.e=p,e},d.mod=function(e){var t,r=this,n=r.constructor,o=r.s,i=(e=new n(e)).s;if(!e.c[0])throw Error(c);return r.s=e.s=1,t=1==e.cmp(r),r.s=o,e.s=i,t?new n(r):(o=n.DP,i=n.RM,n.DP=n.RM=0,r=r.div(e),n.DP=o,n.RM=i,this.minus(r.times(e)))},d.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},d.plus=d.add=function(e){var t,r,n,o=this,i=o.constructor;if(e=new i(e),o.s!=e.s)return e.s=-e.s,o.minus(e);var a=o.e,s=o.c,l=e.e,c=e.c;if(!s[0]||!c[0])return c[0]||(s[0]?e=new i(o):e.s=o.s),e;if(s=s.slice(),t=a-l){for(t>0?(l=a,n=c):(t=-t,n=s),n.reverse();t--;)n.push(0);n.reverse()}for(s.length-c.length<0&&(n=c,c=s,s=n),t=c.length,r=0;t;s[t]%=10)r=(s[--t]=s[t]+c[t]+r)/10|0;for(r&&(s.unshift(r),++l),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=l,e},d.pow=function(e){var t=this,r=new t.constructor("1"),n=r,i=e<0;if(e!==~~e||e<-1e6||e>o)throw Error(a+"exponent");for(i&&(e=-e);1&e&&(n=n.times(t)),e>>=1;)t=t.times(t);return i?r.div(n):n},d.prec=function(e,t){if(e!==~~e||e<1||e>n)throw Error(a+"precision");return u(new this.constructor(this),e,t)},d.round=function(e,t){if(e===h)e=0;else if(e!==~~e||e<-n||e>n)throw Error(s);return u(new this.constructor(this),e+this.e+1,t)},d.sqrt=function(){var e,t,r,n=this,o=n.constructor,a=n.s,s=n.e,l=new o("0.5");if(!n.c[0])return new o(n);if(a<0)throw Error(i+"No square root");0===(a=Math.sqrt(+f(n,!0,!0)))||a===1/0?((t=n.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new o(((a=Math.sqrt(t))==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+s)):e=new o(a+""),s=e.e+(o.DP+=4);do{r=e,e=l.times(r.plus(n.div(r)))}while(r.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return u(e,(o.DP-=4)+e.e+1,o.RM)},d.times=d.mul=function(e){var t,r=this,n=r.constructor,o=r.c,i=(e=new n(e)).c,a=o.length,s=i.length,l=r.e,c=e.e;if(e.s=r.s==e.s?1:-1,!o[0]||!i[0])return e.c=[e.e=0],e;for(e.e=l+c,a<s&&(t=o,o=i,i=t,c=a,a=s,s=c),t=new Array(c=a+s);c--;)t[c]=0;for(l=s;l--;){for(s=0,c=a+l;c>l;)s=t[c]+i[l]*o[c-l-1]+s,t[c--]=s%10,s=s/10|0;t[c]=s}for(s?++e.e:t.shift(),l=t.length;!t[--l];)t.pop();return e.c=t,e},d.toExponential=function(e,t){var r=this,o=r.c[0];if(e!==h){if(e!==~~e||e<0||e>n)throw Error(s);for(r=u(new r.constructor(r),++e,t);r.c.length<e;)r.c.push(0)}return f(r,!0,!!o)},d.toFixed=function(e,t){var r=this,o=r.c[0];if(e!==h){if(e!==~~e||e<0||e>n)throw Error(s);for(e=e+(r=u(new r.constructor(r),e+r.e+1,t)).e+1;r.c.length<e;)r.c.push(0)}return f(r,!1,!!o)},d.toJSON=d.toString=function(){var e=this,t=e.constructor;return f(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},d.toNumber=function(){var e=+f(this,!0,!0);if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(i+"Imprecise conversion");return e},d.toPrecision=function(e,t){var r=this,o=r.constructor,i=r.c[0];if(e!==h){if(e!==~~e||e<1||e>n)throw Error(a+"precision");for(r=u(new o(r),e,t);r.c.length<e;)r.c.push(0)}return f(r,e<=r.e||r.e<=o.NE||r.e>=o.PE,!!i)},d.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(i+"valueOf disallowed");return f(e,e.e<=t.NE||e.e>=t.PE,!0)},r=function e(){function t(r){var n=this;if(!(n instanceof t))return r===h&&0===arguments.length?e():new t(r);if(r instanceof t)n.s=r.s,n.e=r.e,n.c=r.c.slice();else{if("string"!=typeof r){if(!0===t.strict&&"bigint"!=typeof r)throw TypeError(a+"value");r=0===r&&1/r<0?"-0":String(r)}!function(e,t){var r,n,o;if(!p.test(t))throw Error(a+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".",""));(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length);for(o=t.length,n=0;n<o&&"0"==t.charAt(n);)++n;if(n==o)e.c=[e.e=0];else{for(;o>0&&"0"==t.charAt(--o););for(e.e=r-n-1,e.c=[],r=0;n<=o;)e.c[r++]=+t.charAt(n++)}}(n,r)}n.constructor=t}return t.prototype=d,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=false,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),r.default=r.Big=r,void 0!==t&&t.exports?t.exports=r:e.Big=r}(this)},{}],18:[function(e,t,r){},{}],19:[function(e,t,r){arguments[4][18][0].apply(r,arguments)},{dup:18}],20:[function(e,t,r){(function(t){(function(){var t=e("base64-js"),n=e("ieee754");r.Buffer=a,r.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function i(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=i(r),o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=a.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var o=function(e){if(a.isBuffer(e)){var t=0|h(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||H(e.length)?i(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),i(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(e).length;default:if(o)return n?-1:I(e).length;t=(""+t).toLowerCase(),o=!0}}function u(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return D(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function f(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var d=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===d?0:i-d)){if(-1===d&&(d=i),i-d+1===l)return d*a}else-1!==d&&(i-=i-d),d=-1}else for(r+l>s&&(r=s-l),i=r;i>=0;i--){for(var h=!0,p=0;p<l;p++)if(c(e,i+p)!==c(t,p)){h=!1;break}if(h)return i}return-1}function y(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(H(s))return a;e[r+a]=s}return a}function b(e,t,r,n){return O(I(t,e.length-r),e,r,n)}function v(e,t,r,n){return O(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return v(e,t,r,n)}function T(e,t,r,n){return O(j(t),e,r,n)}function w(e,t,r,n){return O(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function x(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,l,c=e[o],d=null,h=c>239?4:c>223?3:c>191?2:1;if(o+h<=r)switch(h){case 1:c<128&&(d=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(d=l);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(l=(15&c)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(d=l)}null===d?(d=65533,h=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|1023&d),n.push(d),o+=h}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=A));return r}(n)}r.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(V(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),V(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(V(i,Uint8Array)&&(i=a.from(i)),!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):u.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a.prototype.compare=function(e,t,r,n,o){if(V(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(i,s),c=this.slice(n,o),d=e.slice(t,r),h=0;h<l;++h)if(c[h]!==d[h]){i=c[h],s=d[h];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function D(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function k(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=N(e[i]);return o}function E(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function F(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,o,i){return t=+t,r>>>=0,i||L(e,0,r,4),n.write(e,t,r,o,23,4),r+4}function _(e,t,r,o,i){return t=+t,r>>>=0,i||L(e,0,r,8),n.write(e,t,r,o,52,8),r+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=a.prototype,n},a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=o-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%l]}return this};var B=/[^+/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function I(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function j(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":16,buffer:20,ieee754:114}],21:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],22:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("./LinkedList.js");t.exports=class extends n{constructor(e,t,r){void 0===e?super({}):super(e,t,r),this.serviceType="ObjectCache",this._HashMap={},this._RecordMap={},this._List=new o,this.maxLength=0,this.maxAge=0}get RecordMap(){return this._RecordMap}put(e,t){if(this._HashMap.hasOwnProperty(t))return this._HashMap[t].Datum=e,this._RecordMap[t]=e,this._HashMap[t].Datum;let r=this._List.push(e,t);return this._HashMap[r.Hash]=r,this._RecordMap[t]=e,this.maxLength>0&&this._List.length>this.maxLength&&(r=this._List.pop(),delete this._RecordMap[r.Hash],delete this._HashMap[r.Hash]),r.Metadata.Created=+new Date,r.Datum}read(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e].Datum}touch(e){if(!this._HashMap.hasOwnProperty(e))return!1;let t=this._List.remove(this._HashMap[e]);return delete this._RecordMap[e],delete this._HashMap[e],this.put(t.Datum,t.Hash)}expire(e){if(!this._HashMap.hasOwnProperty(e))return!1;let t=this._HashMap[e];return t=this._List.remove(t),delete this._RecordMap[t.Hash],delete this._HashMap[t.Hash],t}pruneBasedOnExpiration(e,t){let r=void 0===t?[]:t;if(this.maxAge<1)return e(r);let n=+new Date,o=Object.keys(this._HashMap);for(let e=0;e<o.length;e++)n-this._HashMap[o[e]].Metadata.Created>=this.maxAge&&r.push(this.expire(o[e]));e(r)}pruneBasedOnLength(e,t){let r=void 0===t?[]:t;if(this.maxLength>0)for(;this._List.length>this.maxLength;)r.push(this._List.pop());return e(r)}pruneCustom(e,t,r){let n=void 0===r?[]:r,o=Object.keys(this._HashMap);for(let e=0;e<o.length;e++){let r=this._HashMap[o[e]];t(r.Datum,r.Hash,r)&&n.push(this.expire(o[e]))}e(n)}prune(e){let t=[];if(this._List.length<1)return e(t);this.pruneBasedOnExpiration(r=>{this.pruneBasedOnLength(e,t)},t)}getNode(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e]}}},{"./LinkedList.js":24,"fable-serviceproviderbase":59}],23:[function(e,t,r){t.exports=class{constructor(){this.Hash=!1,this.Datum=!1,this.Metadata={},this.LeftNode=!1,this.RightNode=!1,this.__ISNODE=!0}}},{}],24:[function(e,t,r){const n=e("./LinkedList-Node.js");t.exports=class{constructor(){this.totalNodes=0,this.length=0,this.head=!1,this.tail=!1}initializeNode(e,t){if(void 0===e)return!1;this.totalNodes++;let r=void 0!==t?t:"NODE[".concat(this.totalNodes,"]"),o=new n;return o.Hash=r,o.Datum=e,o}append(e,t){let r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.tail.RightNode=r,r.LeftNode=this.tail,this.tail=r,r))}push(e,t){return this.append(e,t)}prepend(e,t){let r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.head.LeftNode=r,r.RightNode=this.head,this.head=r,r))}remove(e){return void 0!==e&&(!!e.__ISNODE&&(this.length--,this.length<1?(this.head=!1,this.tail=!1,e):e.LeftNode&&e.RightNode?(e.LeftNode.RightNode=e.RightNode,e.RightNode.LeftNode=e.LeftNode,e.RightNode=!1,e.LeftNode=!1,e):e.LeftNode?(e.LeftNode.RightNode=!1,this.tail=e.LeftNode,e.LeftNode=!1,e):(e.RightNode.LeftNode=!1,this.head=e.RightNode,e.RightNode=!1,e)))}pop(){return this.remove(this.head)}each(e,t){if(this.length<1)return t();let r=!1,n=o=>{if(o)return t(o);if(r){if(!r.RightNode)return t();r=r.RightNode}else r=this.head;e(r.Datum,r.Hash,n)};return n()}seek(e){if(!e)return!1;if(this.length<1)return!1;if(e>=this.length)return!1;let t=this.head;for(let r=0;r<e;r++)t=t.RightNode;return t}}},{"./LinkedList-Node.js":23}],25:[function(e,t,r){var n=e("function-bind"),o=e("./functionApply"),i=e("./functionCall"),a=e("./reflectApply");t.exports=a||n.call(i,o)},{"./functionApply":26,"./functionCall":27,"./reflectApply":29,"function-bind":103}],26:[function(e,t,r){t.exports=Function.prototype.apply},{}],27:[function(e,t,r){t.exports=Function.prototype.call},{}],28:[function(e,t,r){var n=e("function-bind"),o=e("es-errors/type"),i=e("./functionCall"),a=e("./actualApply");t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(n,i,e)}},{"./actualApply":25,"./functionCall":27,"es-errors/type":47,"function-bind":103}],29:[function(e,t,r){t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},{}],30:[function(e,t,r){var n=e("get-intrinsic"),o=e("call-bind-apply-helpers"),i=o([n("%String.prototype.indexOf%")]);t.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o([r]):r}},{"call-bind-apply-helpers":28,"get-intrinsic":104}],31:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.parseCookie=d,r.parse=d,r.stringifyCookie=function(e,t){const r=(null==t?void 0:t.encode)||encodeURIComponent,i=[];for(const t of Object.keys(e)){const a=e[t];if(void 0===a)continue;if(!n.test(t))throw new TypeError("cookie name is invalid: ".concat(t));const s=r(a);if(!o.test(s))throw new TypeError("cookie val is invalid: ".concat(a));i.push("".concat(t,"=").concat(s))}return i.join("; ")},r.stringifySetCookie=h,r.serialize=h,r.parseSetCookie=function(e,t){const r=(null==t?void 0:t.decode)||m,n=e.length,o=p(e,0,n),i=u(e,0,o),a=-1===i?{name:"",value:r(f(e,0,o))}:{name:f(e,0,i),value:r(f(e,i+1,o))};let l=o+1;for(;l<n;){const t=p(e,l,n),r=u(e,l,t),o=f(e,l,-1===r?t:r),i=-1===r?void 0:f(e,r+1,t);switch(o.toLowerCase()){case"httponly":a.httpOnly=!0;break;case"secure":a.secure=!0;break;case"partitioned":a.partitioned=!0;break;case"domain":a.domain=i;break;case"path":a.path=i;break;case"max-age":i&&s.test(i)&&(a.maxAge=Number(i));break;case"expires":if(!i)break;const e=new Date(i);Number.isFinite(e.valueOf())&&(a.expires=e);break;case"priority":if(!i)break;const t=i.toLowerCase();"low"!==t&&"medium"!==t&&"high"!==t||(a.priority=t);break;case"samesite":if(!i)break;const r=i.toLowerCase();"lax"!==r&&"strict"!==r&&"none"!==r||(a.sameSite=r)}l=t+1}return a},r.stringifySetCookie=h,r.serialize=h;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,o=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,s=/^-?\d+$/,l=Object.prototype.toString,c=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function d(e,t){const r=new c,n=e.length;if(n<2)return r;const o=(null==t?void 0:t.decode)||m;let i=0;do{const t=u(e,i,n);if(-1===t)break;const a=p(e,i,n);if(t>a){i=e.lastIndexOf(";",t-1)+1;continue}const s=f(e,i,t);void 0===r[s]&&(r[s]=o(f(e,t+1,a))),i=a+1}while(i<n);return r}function h(e,t,r){const s="object"==typeof e?e:_objectSpread2(_objectSpread2({},r),{},{name:e,value:String(t)}),c="object"==typeof t?t:r,d=(null==c?void 0:c.encode)||encodeURIComponent;if(!n.test(s.name))throw new TypeError("argument name is invalid: ".concat(s.name));const h=s.value?d(s.value):"";if(!o.test(h))throw new TypeError("argument val is invalid: ".concat(s.value));let p=s.name+"="+h;if(void 0!==s.maxAge){if(!Number.isInteger(s.maxAge))throw new TypeError("option maxAge is invalid: ".concat(s.maxAge));p+="; Max-Age="+s.maxAge}if(s.domain){if(!i.test(s.domain))throw new TypeError("option domain is invalid: ".concat(s.domain));p+="; Domain="+s.domain}if(s.path){if(!a.test(s.path))throw new TypeError("option path is invalid: ".concat(s.path));p+="; Path="+s.path}if(s.expires){if(u=s.expires,"[object Date]"!==l.call(u)||!Number.isFinite(s.expires.valueOf()))throw new TypeError("option expires is invalid: ".concat(s.expires));p+="; Expires="+s.expires.toUTCString()}var u;if(s.httpOnly&&(p+="; HttpOnly"),s.secure&&(p+="; Secure"),s.partitioned&&(p+="; Partitioned"),s.priority){switch("string"==typeof s.priority?s.priority.toLowerCase():void 0){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError("option priority is invalid: ".concat(s.priority))}}if(s.sameSite){switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid: ".concat(s.sameSite))}}return p}function p(e,t,r){const n=e.indexOf(";",t);return-1===n?r:n}function u(e,t,r){const n=e.indexOf("=",t);return n<r?n:-1}function f(e,t,r){let n=t,o=r;do{const t=e.charCodeAt(n);if(32!==t&&9!==t)break}while(++n<o);for(;o>n;){const t=e.charCodeAt(o-1);if(32!==t&&9!==t)break;o--}return e.slice(n,o)}function m(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},{}],32:[function(e,t,r){var n,o;n=this,o=function(){var e=6e4,t=36e5,r="millisecond",n="second",o="minute",i="hour",a="day",s="week",l="month",c="quarter",d="year",h="date",p="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,l),i=r-o<0,a=t.clone().add(n+(i?-1:1),l);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:s,d:a,D:h,h:i,m:o,s:n,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",v={};v[b]=m;var S="$isDayjsObject",T=function(e){return e instanceof A||!(!e||!e[S])},w=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();v[i]&&(o=i),r&&(v[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;v[s]=t,o=s}return!n&&o&&(b=o),o||!n&&b},x=function(e,t){if(T(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new A(r)},P=y;P.l=w,P.i=T,P.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(P.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(u);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return P},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var r=x(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,r){return P.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,c=!!P.u(t)||t,p=P.p(e),u=function(e,t){var n=P.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return c?n:n.endOf(a)},f=function(e,t){return P.w(r.toDate()[e].apply(r.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,g=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(p){case d:return c?u(1,0):u(31,11);case l:return c?u(1,g):u(0,g+1);case s:var v=this.$locale().weekStart||0,S=(m<v?m+7:m)-v;return u(c?y-S:y+(6-S),g);case a:case h:return f(b+"Hours",0);case i:return f(b+"Minutes",1);case o:return f(b+"Seconds",2);case n:return f(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,c=P.p(e),p="set"+(this.$u?"UTC":""),u=(s={},s[a]=p+"Date",s[h]=p+"Date",s[l]=p+"Month",s[d]=p+"FullYear",s[i]=p+"Hours",s[o]=p+"Minutes",s[n]=p+"Seconds",s[r]=p+"Milliseconds",s)[c],f=c===a?this.$D+(t-this.$W):t;if(c===l||c===d){var m=this.clone().set(h,1);m.$d[u](f),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else u&&this.$d[u](f);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[P.p(e)]()},g.add=function(r,c){var h,p=this;r=Number(r);var u=P.p(c),f=function(e){var t=x(p);return P.w(t.date(t.date()+Math.round(e*r)),p)};if(u===l)return this.set(l,this.$M+r);if(u===d)return this.set(d,this.$y+r);if(u===a)return f(1);if(u===s)return f(7);var m=(h={},h[o]=e,h[i]=t,h[n]=1e3,h)[u]||1,g=this.$d.getTime()+r*m;return P.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=P.z(this),i=this.$H,a=this.$m,s=this.$M,l=r.weekdays,c=r.months,d=r.meridiem,h=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},u=function(e){return P.s(i%12||12,e,"0")},m=d||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(f,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return P.s(t.$y,4,"0");case"M":return s+1;case"MM":return P.s(s+1,2,"0");case"MMM":return h(r.monthsShort,s,c,3);case"MMMM":return h(c,s);case"D":return t.$D;case"DD":return P.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,l,2);case"ddd":return h(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(i);case"HH":return P.s(i,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return P.s(a,2,"0");case"s":return String(t.$s);case"ss":return P.s(t.$s,2,"0");case"SSS":return P.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,h,p){var u,f=this,m=P.p(h),g=x(r),y=(g.utcOffset()-this.utcOffset())*e,b=this-g,v=function(){return P.m(f,g)};switch(m){case d:u=v()/12;break;case l:u=v();break;case c:u=v()/3;break;case s:u=(b-y)/6048e5;break;case a:u=(b-y)/864e5;break;case i:u=b/t;break;case o:u=b/e;break;case n:u=b/1e3;break;default:u=b}return p?u:P.a(u)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return v[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=w(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return P.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),C=A.prototype;return x.prototype=C,[["$ms",r],["$s",n],["$m",o],["$H",i],["$W",a],["$M",l],["$y",d],["$D",h]].forEach(function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),x.extend=function(e,t){return e.$i||(e(t,A,x),e.$i=!0),x},x.locale=w,x.isDayjs=T,x.unix=function(e){return x(1e3*e)},x.en=v[b],x.Ls=v,x.p={},x},"object"==typeof r&&void 0!==t?t.exports=o():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs=o()},{}],33:[function(e,t,r){var n,o;n=this,o=function(){return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var o=this.$utils(),i=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return o.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return o.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return o.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return n.bind(this)(i)}}},"object"==typeof r&&void 0!==t?t.exports=o():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_advancedFormat=o()},{}],34:[function(e,t,r){var n,o;n=this,o=function(){var e="day";return function(t,r,n){var o=function(t){return t.add(4-t.isoWeekday(),e)},i=r.prototype;i.isoWeekYear=function(){return o(this).year()},i.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var r,i,a,s=o(this),l=(r=this.isoWeekYear(),a=4-(i=(this.$u?n.utc:n)().year(r).startOf("year")).isoWeekday(),i.isoWeekday()>4&&(a+=7),i.add(a,e));return s.diff(l,"week")+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=i.startOf;i.startOf=function(e,t){var r=this.$utils(),n=!!r.u(t)||t;return"isoweek"===r.p(e)?n?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(e,t)}}},"object"==typeof r&&void 0!==t?t.exports=o():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_isoWeek=o()},{}],35:[function(e,t,r){var n,o;n=this,o=function(){return function(e,t,r){e=e||{};var n=t.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(e,t,r,o){return n.fromToBase(e,t,r,o)}r.en.relativeTime=o,n.fromToBase=function(t,n,i,a,s){for(var l,c,d,h=i.$locale().relativeTime||o,p=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],u=p.length,f=0;f<u;f+=1){var m=p[f];m.d&&(l=a?r(t).diff(i,m.d,!0):i.diff(t,m.d,!0));var g=(e.rounding||Math.round)(Math.abs(l));if(d=l>0,g<=m.r||!m.r){g<=1&&f>0&&(m=p[f-1]);var y=h[m.l];s&&(g=s(""+g)),c="string"==typeof y?y.replace("%d",g):y(g,n,m.l,d);break}}if(n)return c;var b=d?h.future:h.past;return"function"==typeof b?b(c):b.replace("%s",c)},n.to=function(e,t){return i(e,t,this,!0)},n.from=function(e,t){return i(e,t,this)};var a=function(e){return e.$u?r.utc():r()};n.toNow=function(e){return this.to(a(this),e)},n.fromNow=function(e){return this.from(a(this),e)}}},"object"==typeof r&&void 0!==t?t.exports=o():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_relativeTime=o()},{}],36:[function(e,t,r){var n,o;n=this,o=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(e,r,n){void 0===n&&(n={});var o=new Date(e),i=function(e,r){void 0===r&&(r={});var n=r.timeZoneName||"short",o=e+"|"+n,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),t[o]=i),i}(r,n);return i.formatToParts(o)},s=function(t,r){for(var n=a(t,r),i=[],s=0;s<n.length;s+=1){var l=n[s],c=l.type,d=l.value,h=e[c];h>=0&&(i[h]=parseInt(d,10))}var p=i[3],u=24===p?0:p,f=i[0]+"-"+i[1]+"-"+i[2]+" "+u+":"+i[4]+":"+i[5]+":000",m=+t;return(o.utc(f).valueOf()-(m-=m%1e3))/6e4},l=n.prototype;l.tz=function(e,t){void 0===e&&(e=i);var r,n=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),l=Math.round((a-new Date(s))/1e3/60),c=15*-Math.round(a.getTimezoneOffset()/15)-l;if(Number(c)){if(r=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var d=r.utcOffset();r=r.add(n-d,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),r=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var r=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(r,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,r){var n=r&&t,a=r||t||i,l=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var c=function(e,t,r){var n=e-60*t*1e3,o=s(n,r);if(t===o)return[n,t];var i=s(n-=60*(o-t)*1e3,r);return o===i?[n,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,n).valueOf(),l,a),d=c[0],h=c[1],p=o(d).utcOffset(h);return p.$x.$timezone=a,p},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}},"object"==typeof r&&void 0!==t?t.exports=o():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_timezone=o()},{}],37:[function(e,t,r){var n,o;n=this,o=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof n&&(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n),null===n))return this;var a=Math.abs(n)<=16?60*n:n;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l,s};var d=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var p=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=i(e).local();return p.call(n,o,t,r)}}},"object"==typeof r&&void 0!==t?t.exports=o():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_utc=o()},{}],38:[function(e,t,r){var n,o;n=this,o=function(){var e="week",t="year";return function(r,n,o){var i=n.prototype;i.week=function(r){if(void 0===r&&(r=null),null!==r)return this.add(7*(r-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var i=o(this).startOf(t).add(1,t).date(n),a=o(this).endOf(e);if(i.isBefore(a))return 1}var s=o(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),l=this.diff(s,e,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},i.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}},"object"==typeof r&&void 0!==t?t.exports=o():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_weekOfYear=o()},{}],39:[function(e,t,r){var n;n=this,"object"==typeof r&&void 0!==t?t.exports=function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,r=this.$W,n=(r<t?r+7:r)-t;return this.$utils().u(e)?n:this.subtract(n,"day").add(e,"day")}}:(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_weekday=function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,r=this.$W,n=(r<t?r+7:r)-t;return this.$utils().u(e)?n:this.subtract(n,"day").add(e,"day")}}},{}],40:[function(e,t,r){var n,o=e("call-bind-apply-helpers"),i=e("gopd");try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&i&&i(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;t.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof l&&function(e){return l(null==e?e:s(e))}},{"call-bind-apply-helpers":28,gopd:109}],41:[function(e,t,r){var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}t.exports=n},{}],42:[function(e,t,r){t.exports=EvalError},{}],43:[function(e,t,r){t.exports=Error},{}],44:[function(e,t,r){t.exports=RangeError},{}],45:[function(e,t,r){t.exports=ReferenceError},{}],46:[function(e,t,r){t.exports=SyntaxError},{}],47:[function(e,t,r){t.exports=TypeError},{}],48:[function(e,t,r){t.exports=URIError},{}],49:[function(e,t,r){t.exports=Object},{}],50:[function(e,t,r){var n,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(e,t){return new Promise(function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,r)}(e,o,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,r,n){var o,i,a,s;if(c(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=d(e))>0&&a.length>o&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=p.bind(n);return o.listener=r,n.wrapFn=o,o}function f(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):g(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return d(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,d=g(l,c);for(r=0;r<c;++r)i(d[r],this,t)}return!0},s.prototype.addListener=function(e,t){return h(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return h(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,u(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,u(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,o,i,a;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],51:[function(e,t,r){t.exports={name:"fable-log",version:"3.0.18",description:"A simple logging wrapper.",main:"source/Fable-Log.js",scripts:{start:"node source/Fable-Log.js",coverage:"npx quack coverage",test:"npx quack test",tests:"npx quack test -g"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},browser:{"./source/Fable-Log-DefaultProviders-Node.js":"./source/Fable-Log-DefaultProviders-Web.js"},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-log.git"},keywords:["logging"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-log/issues"},homepage:"https://github.com/stevenvelozo/fable-log",devDependencies:{quackage:"^1.0.58"},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],52:[function(e,t,r){const n=e("fable-serviceproviderbase").CoreServiceProviderBase;t.exports=class extends n{constructor(e,t){super(e,t),this._Settings="object"==typeof e?e:{},this.serviceType="Logging-Provider",this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}generateInsecureUUID(){let e=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,t=>{let r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?r:3&r|8).toString(16)})}initialize(){}trace(e,t){this.write("trace",e,t)}debug(e,t){this.write("debug",e,t)}info(e,t){this.write("info",e,t)}warn(e,t){this.write("warn",e,t)}error(e,t){this.write("error",e,t)}fatal(e,t){this.write("fatal",e,t)}write(e,t,r){return!0}}},{"fable-serviceproviderbase":59}],53:[function(e,t,r){t.exports=(()=>{let t={};return t.console=e("./Fable-Log-Logger-Console.js"),t.default=t.console,t})()},{"./Fable-Log-Logger-Console.js":55}],54:[function(e,t,r){t.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],55:[function(e,t,r){let n=e("./Fable-Log-BaseLogger.js");t.exports=class extends n{constructor(e,t){super(e),this._ShowTimeStamps=!("showtimestamps"in this._Settings)||1==this._Settings.showtimestamps,this._FormattedTimeStamps=!("formattedtimestamps"in this._Settings)||1==this._Settings.formattedtimestamps,this._ContextMessage="Context"in this._Settings?"(".concat(this._Settings.Context,")"):"Product"in t._Settings?"(".concat(t._Settings.Product,")"):"Unnamed_Log_Context",this._OutputLogLinesToConsole=!("outputloglinestoconsole"in this._Settings)||this._Settings.outputloglinestoconsole,this._OutputObjectsToConsole=!("outputobjectstoconsole"in this._Settings)||this._Settings.outputobjectstoconsole,this.prefixCache={};for(let e=0;e<=this.levels.length;e++)this.prefixCache[this.levels[e]]="[".concat(this.levels[e],"] ").concat(this._ContextMessage,": "),this._ShowTimeStamps&&(this.prefixCache[this.levels[e]]=" "+this.prefixCache[this.levels[e]])}write(e,t,r){let n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);let o="".concat(n).concat(this.prefixCache[e]).concat(t);return this._OutputLogLinesToConsole&&console.log(o),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),o}}},{"./Fable-Log-BaseLogger.js":52}],56:[function(e,t,r){const n=e("./Fable-Log-Logger-Console.js"),o=e("fs"),i=e("path");t.exports=class extends n{constructor(e,t){super(e,t),this.logFileRawPath=this._Settings.hasOwnProperty("path")?this._Settings.path:"./".concat(this._ContextMessage,".log"),this.logFilePath=i.normalize(this.logFileRawPath),this.logFileStreamOptions=this._Settings.hasOwnProperty("fileStreamoptions")?this._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},this.fileWriter=o.createWriteStream(this.logFilePath,this.logFileStreamOptions),this.activelyWriting=!1,this.logLineStrings=[],this.logObjectStrings=[],this.defaultWriteCompleteCallback=()=>{},this.defaultBufferFlushCallback=()=>{}}closeWriter(e){let t="function"==typeof e?e:()=>{};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",t.bind(this))}completeBufferFlushToLogFile(e){this.activelyWriting=!1;let t="function"==typeof e?e:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return t();this.flushBufferToLogFile(t)}flushBufferToLogFile(e){if(!this.activelyWriting){this.activelyWriting=!0;let t="function"==typeof e?e:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];let o="";for(let e=0;e<r.length;e++)o+="".concat(r[e],"\n"),!1!==n[e]&&(o+="".concat(n[e],"\n"));if(this.fileWriter.write(o,"utf8"))return this.completeBufferFlushToLogFile(t);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,t))}}write(e,t,r){let n=super.write(e,t,r);this.logLineStrings.push(n),void 0!==r?this.logObjectStrings.push(JSON.stringify(r,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}},{"./Fable-Log-Logger-Console.js":55,fs:19,path:139}],57:[function(e,t,r){const n=e("fable-serviceproviderbase").CoreServiceProviderBase,o=e("../package.json");t.exports=class extends n{constructor(t,r){super(t,r),this.serviceType="Logging",this._Package=o;let n="object"==typeof t?t:{};this._Settings=n,this._Providers=e("./Fable-Log-DefaultProviders-Node.js"),this._StreamDefinitions="LogStreams"in n?n.LogStreams:e("./Fable-Log-DefaultStreams.json"),this.logStreams=[],this.logProviders={},this.activeLogStreams={},this.logStreamsTrace=[],this.logStreamsDebug=[],this.logStreamsInfo=[],this.logStreamsWarn=[],this.logStreamsError=[],this.logStreamsFatal=[],this.datumDecorator=e=>e,this.uuid="string"==typeof n.Product?n.Product:"Default"}addLogger(e,t){if(e.loggerUUID in this.activeLogStreams)return!1;switch(this.logStreams.push(e),this.activeLogStreams[e.loggerUUID]=!0,t){case"trace":this.logStreamsTrace.push(e);case"debug":this.logStreamsDebug.push(e);case"info":this.logStreamsInfo.push(e);case"warn":this.logStreamsWarn.push(e);case"error":this.logStreamsError.push(e);case"fatal":this.logStreamsFatal.push(e)}return!0}setDatumDecorator(e){this.datumDecorator="function"==typeof e?e:e=>e}trace(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsTrace.length;t++)this.logStreamsTrace[t].trace(e,r)}debug(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsDebug.length;t++)this.logStreamsDebug[t].debug(e,r)}info(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsInfo.length;t++)this.logStreamsInfo[t].info(e,r)}warn(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsWarn.length;t++)this.logStreamsWarn[t].warn(e,r)}error(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsError.length;t++)this.logStreamsError[t].error(e,r)}fatal(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsFatal.length;t++)this.logStreamsFatal[t].fatal(e,r)}initialize(){for(let e=0;e<this._StreamDefinitions.length;e++){let t=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[e]);t.loggertype in this._Providers?this.addLogger(new this._Providers[t.loggertype](t,this),t.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(t)))}for(let e=0;e<this.logStreams.length;e++)this.logStreams[e].initialize()}logTime(e,t){let r=void 0!==e?e:"Time",n=new Date;this.info("".concat(r," ").concat(n," (epoch ").concat(+n,")"),t)}getTimeStamp(){return+new Date}getTimeDelta(e){return+new Date-e}logTimeDelta(e,t,r){let n=void 0!==t?t:"Time Measurement",o=+new Date;this.info("".concat(n," logged at (epoch ").concat(+o,") took (").concat(e,"ms)"),r)}logTimeDeltaHuman(e,t,r){let n=void 0!==t?t:"Time Measurement",o=+new Date,i=parseInt(e%1e3),a=parseInt(e/1e3%60),s=parseInt(e/6e4%60),l=parseInt(e/36e5);i=i<10?"00"+i:i<100?"0"+i:i,a=a<10?"0"+a:a,s=s<10?"0"+s:s,l=l<10?"0"+l:l,this.info("".concat(n," logged at (epoch ").concat(+o,") took (").concat(e,"ms) or (").concat(l,":").concat(s,":").concat(a,".").concat(i,")"),r)}logTimeDeltaRelative(e,t,r){this.logTimeDelta(this.getTimeDelta(e),t,r)}logTimeDeltaRelativeHuman(e,t,r){this.logTimeDeltaHuman(this.getTimeDelta(e),t,r)}},t.exports.LogProviderBase=e("./Fable-Log-BaseLogger.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-Console.js"),t.exports.LogProviderFlatfile=e("./Fable-Log-Logger-SimpleFlatFile.js")},{"../package.json":51,"./Fable-Log-BaseLogger.js":52,"./Fable-Log-DefaultProviders-Node.js":53,"./Fable-Log-DefaultStreams.json":54,"./Fable-Log-Logger-Console.js":55,"./Fable-Log-Logger-SimpleFlatFile.js":56,"fable-serviceproviderbase":59}],58:[function(e,t,r){t.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],59:[function(e,t,r){const n=e("../package.json");class o{constructor(e,t,r){this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"==typeof e&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=n,this.fable?(this.UUID=e.getUUID(),this.options="object"==typeof t?t:{}):(this.options="object"!=typeof e||e.isFable?"object"==typeof t?t:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof r?r:this.fable||"string"!=typeof t?"".concat(this.UUID):t}connectFable(e){if("object"!=typeof e||!e.isFable){let t="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(typeof e,"].}");return console.log(t),new Error(t)}return this.fable||(this.fable=e),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}_defineProperty2(o,"isFableService",!0),t.exports=o,t.exports.CoreServiceProviderBase=o},{"../package.json":58}],60:[function(e,t,r){t.exports={name:"fable-settings",version:"3.0.16",description:"A simple, tolerant configuration chain.",main:"source/Fable-Settings.js",scripts:{start:"node source/Fable-Settings.js",coverage:"npx quack coverage",test:"npx quack test",build:"npx quack build","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-settings:local","docker-dev-run":'docker run -it -d --name retold-fable-settings-dev -p 30003:8080 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/fable-settings" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" retold/fable-settings:local'},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-settings.git"},keywords:["configuration"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-settings/issues"},homepage:"https://github.com/stevenvelozo/fable-settings",devDependencies:{quackage:"^1.0.58"},dependencies:{"fable-serviceproviderbase":"^3.0.19",precedent:"^1.0.17"}}},{}],61:[function(e,t,r){t.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],62:[function(e,t,r){(function(r){(function(){const n=e("precedent");t.exports=class{constructor(e){this.templateProcessor=new n,this.templateProcessor.addPattern("${","}",e=>{let t=e.trim(),n=t.indexOf("|");const o=n>=0?t.substring(n+1):"";let i=n>-1?t.substring(0,n):t;return i in r.env?r.env[i]:o})}parseSetting(e){return this.templateProcessor.parseString(e)}}}).call(this)}).call(this,e("_process"))},{_process:287,precedent:284}],63:[function(e,t,r){const n=e("fable-serviceproviderbase").CoreServiceProviderBase,o=e("./Fable-Settings-TemplateProcessor.js");class i extends n{constructor(t,r){super(t,r),this.serviceType="SettingsManager",this._Package=e("../package.json"),this.settingsTemplateProcessor=new o,this._configureEnvTemplating(t),this.default=this.buildDefaultSettings();let n=this.merge(t,this.buildDefaultSettings());if(this.base=JSON.parse(JSON.stringify(n)),n.DefaultConfigFile)try{n=this.merge(e(n.DefaultConfigFile),n)}catch(e){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}if(n.ConfigFile)try{n=this.merge(e(n.ConfigFile),n)}catch(e){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}this.settings=n}buildDefaultSettings(){return JSON.parse(JSON.stringify(e("./Fable-Settings-Default")))}_configureEnvTemplating(e){this._PerformEnvTemplating=!e||!0!==e.NoEnvReplacement}_resolveEnv(e){for(const t in e)"object"==typeof e[t]?this._resolveEnv(e[t]):"string"==typeof e[t]&&(e[t]=this.settingsTemplateProcessor.parseSetting(e[t]))}_isObject(e){return"object"==typeof e&&!Array.isArray(e)}_deepMergeObjects(e,t){if(t&&this._isObject(t))return Object.keys(t).forEach(r=>{const n=t[r];if(this._isObject(n)){const t=e[r];if(t&&this._isObject(t))return void this._deepMergeObjects(t,n)}e[r]=n}),e}merge(e,t){let r="object"==typeof e?e:{},n="object"==typeof t?t:this.settings,o=JSON.parse(JSON.stringify(r));return n=this._deepMergeObjects(n,o),this._PerformEnvTemplating&&this._resolveEnv(n),this._configureEnvTemplating(n),n}fill(e){let t="object"==typeof e?e:{},r=JSON.parse(JSON.stringify(t));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}t.exports=i,t.exports.new=function(e){return new i(e)}},{"../package.json":60,"./Fable-Settings-Default":61,"./Fable-Settings-TemplateProcessor.js":62,"fable-serviceproviderbase":59}],64:[function(e,t,r){t.exports={name:"fable-uuid",version:"3.0.14",description:"A simple UUID Generator.",main:"source/Fable-UUID.js",scripts:{start:"node source/Fable-UUID.js",coverage:"npx quack coverage",test:"npx quack test",build:"npx quack build","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-uuid:local","docker-dev-run":'docker run -it -d --name retold-fable-uuid-dev -p 30002:8080 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/fable-uuid" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" retold/fable-uuid:local'},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-uuid.git"},keywords:["logging"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-uuid/issues"},browser:{"./source/Fable-UUID-Random.js":"./source/Fable-UUID-Random-Browser.js"},homepage:"https://github.com/stevenvelozo/fable-uuid",devDependencies:{"pict-docuserve":"^0.1.5",quackage:"^1.1.2"},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],65:[function(e,t,r){t.exports=class{constructor(){this.getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)}generateWhatWGBytes(){let e=new Uint8Array(16);return this.getRandomValues(e),e}generateRandomBytes(){let e=new Uint8Array(16);for(let t,r=0;r<16;r++)3&r||(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;return e}generate(){return this.getRandomValues?this.generateWhatWGBytes():this.generateRandomBytes()}}},{}],66:[function(e,t,r){const n=e("fable-serviceproviderbase").CoreServiceProviderBase,o=e("./Fable-UUID-Random.js"),i=e("../package.json");class a extends n{constructor(e,t){super(e,t),this.serviceType="UUID",this._Package=i,this._UUIDModeRandom="object"==typeof e&&"UUIDModeRandom"in e&&1==e.UUIDModeRandom,this._UUIDLength="object"==typeof e&&"UUIDLength"in e?e.UUIDLength+0:8,this._UUIDRandomDictionary="object"==typeof e&&"UUIDDictionary"in e?e.UUIDDictionary+0:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.randomByteGenerator=new o,this._HexLookup=[];for(let e=0;e<256;++e)this._HexLookup[e]=(e+256).toString(16).substr(1)}bytesToUUID(e){let t=0;return[this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]]].join("")}generateUUIDv4(){new Array(16);var e=this.randomByteGenerator.generate();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,this.bytesToUUID(e)}generateRandom(){let e="";for(let t=0;t<this._UUIDLength;t++)e+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return e}getUUID(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}t.exports=a,t.exports.new=function(e){return new a(e)}},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(e,t,r){t.exports={name:"fable",version:"3.1.72",description:"A service dependency injection, configuration and logging library.",main:"source/Fable.js",scripts:{start:"node source/Fable.js",coverage:"npx quack coverage",test:"npx quack test",build:"npx quack build",prepublishOnly:"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:"npx quack test -g"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},browser:{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},repository:{type:"git",url:"https://github.com/stevenvelozo/fable.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable/issues"},homepage:"https://github.com/stevenvelozo/fable",devDependencies:{"pict-docuserve":"^0.1.5",quackage:"^1.2.3"},dependencies:{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1",cachetrax:"^1.0.6",cookie:"^1.1.1","data-arithmatic":"^1.0.7",dayjs:"^1.11.19","fable-log":"^3.0.18","fable-serviceproviderbase":"^3.0.19","fable-settings":"^3.0.16","fable-uuid":"^3.0.14",manyfest:"^1.0.49","simple-get":"^4.0.1"}}},{}],68:[function(e,t,r){const n=e("fable-settings"),o=e("fable-uuid"),i=e("fable-log"),a=e("../package.json"),s=e("fable-serviceproviderbase");class l extends s.CoreServiceProviderBase{constructor(t){super(t),this.serviceType="ServiceManager",this._Package=a,this.serviceTypes=[],this.servicesMap={},this.services={},this.serviceClasses={},this.extraServiceInitialization=!1,this.LogNoisiness=0,this.SettingsManager=new n(t),this.SettingsManager=this.SettingsManager,this.UUID=new o(this.SettingsManager.settings),this.Logging=new i(this.SettingsManager.settings),this.Logging.initialize(),this.ServiceManager=this,this.serviceManager=this,this.connectFable(this),this.connectPreinitServiceProviderInstance(this.UUID),this.connectPreinitServiceProviderInstance(this.Logging),this.connectPreinitServiceProviderInstance(this.SettingsManager),this.addAndInstantiateServiceType("EnvironmentData",e("./services/Fable-Service-EnvironmentData.js")),this.addServiceType("Template",e("./services/Fable-Service-Template.js")),this.addServiceType("MetaTemplate",e("./services/Fable-Service-MetaTemplate.js")),this.addServiceType("Anticipate",e("./services/Fable-Service-Anticipate.js")),this.addAndInstantiateServiceType("Dates",e("./services/Fable-Service-DateManipulation.js")),this.addAndInstantiateServiceType("DataFormat",e("./services/Fable-Service-DataFormat.js")),this.addAndInstantiateServiceType("DataGeneration",e("./services/Fable-Service-DataGeneration.js")),this.addAndInstantiateServiceType("Utility",e("./services/Fable-Service-Utility.js")),this.addAndInstantiateServiceType("Logic",e("./services/Fable-Service-Logic.js")),this.addAndInstantiateServiceType("Math",e("./services/Fable-Service-Math.js")),this.addServiceType("ExpressionParser",e("./services/Fable-Service-ExpressionParser.js")),this.addServiceType("RestClient",e("./services/Fable-Service-RestClient.js")),this.addServiceType("Manifest",e("manyfest")),this.addServiceType("ObjectCache",e("cachetrax")),this.addAndInstantiateServiceType("ProgressTime",e("./services/Fable-Service-ProgressTime.js")),this.addServiceType("ProgressTrackerSet",e("./services/Fable-Service-ProgressTrackerSet.js")),this.addServiceType("Operation",e("./services/Fable-Service-Operation.js")),this.addServiceType("CSVParser",e("./services/Fable-Service-CSVParser.js")),this.addServiceType("FilePersistence",e("./services/Fable-Service-FilePersistence.js"))}get isFable(){return!0}get settings(){return this.SettingsManager.settings}get settingsManager(){return this.SettingsManager}getUUID(){return this.UUID.getUUID()}newAnticipate(){return this.instantiateServiceProviderWithoutRegistration("Anticipate")}newManyfest(e){return this.instantiateServiceProviderWithoutRegistration("Manifest",e)}addServiceType(e,t){return e in this.servicesMap||(this.servicesMap[e]={},this.serviceTypes.push(e)),"function"==typeof t&&t.isFableService?this.serviceClasses[e]=t:(this.log.error("Attempted to add service type [".concat(e,"] with an invalid class. Using base service class, which will not crash but won't provide meaningful services.")),this.serviceClasses[e]=s),this.serviceClasses[e]}addServiceTypeIfNotExists(e,t){return e in this.servicesMap?this.serviceClasses[e]:this.addServiceType(e,t)}addAndInstantiateServiceType(e,t){return this.addServiceType(e,t),this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}addAndInstantiateServiceTypeIfNotExists(e,t){return this.addServiceTypeIfNotExists(e,t),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}addAndInstantiateSingletonService(e,t,r){return this.addServiceTypeIfNotExists(e,r),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}instantiateServiceProviderFromPrototype(e,t,r,n){let o=new n(this,t,r);return this.extraServiceInitialization&&(o=this.extraServiceInitialization(o)),this.servicesMap[e][o.Hash]=o,e in this.services||this.setDefaultServiceInstantiation(e,o.Hash),o}instantiateServiceProvider(e,t,r){let n=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.servicesMap[e][n.Hash]=n,e in this.services||this.setDefaultServiceInstantiation(e,n.Hash),n}instantiateServiceProviderIfNotExists(e,t,r){return e in this.services?this.services[e]:this.instantiateServiceProvider(e,t,r)}instantiateServiceProviderWithoutRegistration(e,t,r){let n=new this.serviceClasses[e](this,t,r);return this.extraServiceInitialization&&(n=this.extraServiceInitialization(n)),n}connectPreinitServiceProviderInstance(e){let t=e.serviceType,r=e.Hash;return e.connectFable(this),t in this.servicesMap||(this.servicesMap[t]={}),this.servicesMap[t][r]=e,t in this.services||this.setDefaultServiceInstantiation(t,r,!1),e}setDefaultServiceInstantiation(e,t,r){let n=void 0===r||r;return t in this.servicesMap[e]&&(e in this&&!n||(this[e]=this.servicesMap[e][t]),e in this.services&&!n||(this.services[e]=this.servicesMap[e][t]),!0)}static generateFileNameDateStamp(e){const t=e||new Date,r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0"),s=String(t.getSeconds()).padStart(2,"0");return"".concat(r,"-").concat(n,"-").concat(o,"-").concat(i,"-").concat(a,"-").concat(s)}}t.exports=l,t.exports.new=function(e){return new l(e)},t.exports.LogProviderBase=i.LogProviderBase,t.exports.ServiceProviderBase=s,t.exports.CoreServiceProviderBase=s.CoreServiceProviderBase,t.exports.precedent=n.precedent},{"../package.json":67,"./services/Fable-Service-Anticipate.js":69,"./services/Fable-Service-CSVParser.js":70,"./services/Fable-Service-DataFormat.js":71,"./services/Fable-Service-DataGeneration.js":73,"./services/Fable-Service-DateManipulation.js":74,"./services/Fable-Service-EnvironmentData.js":75,"./services/Fable-Service-ExpressionParser.js":76,"./services/Fable-Service-FilePersistence.js":87,"./services/Fable-Service-Logic.js":88,"./services/Fable-Service-Math.js":89,"./services/Fable-Service-MetaTemplate.js":90,"./services/Fable-Service-Operation.js":94,"./services/Fable-Service-ProgressTime.js":95,"./services/Fable-Service-ProgressTrackerSet.js":97,"./services/Fable-Service-RestClient.js":98,"./services/Fable-Service-Template.js":99,"./services/Fable-Service-Utility.js":100,cachetrax:22,"fable-log":57,"fable-serviceproviderbase":59,"fable-settings":63,"fable-uuid":66,manyfest:128}],69:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="AsyncAnticipate",this.operationQueue=[],this.erroredOperations=[],this.executingOperationCount=0,this.completedOperationCount=0,this.callDepth=0,this.maxOperations=1,this.lastError=void 0,this.waitingFunctions=[]}checkQueue(){if(this.lastError){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}else if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){let e=this.operationQueue.shift();this.executingOperationCount+=1,e(this.buildAnticipatorCallback())}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}}anticipate(e){this.operationQueue.push(e),this.checkQueue()}buildAnticipatorCallback(){let e={Called:!1,Error:void 0,OperationSet:this};return function(t){if(e.Called)throw new Error("Anticipation async callback called twice...");e.Called=!0,this.lastError=t,e.OperationSet.executingOperationCount-=1,e.OperationSet.completedOperationCount+=1,e.OperationSet.callDepth++,e.OperationSet.callDepth>400?(e.OperationSet.callDepth=0,setTimeout(e.OperationSet.checkQueue.bind(this),0)):e.OperationSet.checkQueue()}.bind(this)}wait(e){this.waitingFunctions.push(e),this.checkQueue()}}},{"fable-serviceproviderbase":59}],70:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="CSVParser",this.Header=[],this.HeaderFieldNames=[],this.Delimiter=",",this.QuoteCharacter='"',this.CleanCharacters=["\r"],this.HeaderLineIndex=0,this.HasHeader=!0,this.HasSetHeader=!1,this.EmitHeader=!1,this.EmitJSON=!0,this.EscapedQuoteString="&quot;",this.CurrentLine="",this.CurrentRecord=[],this.InQuote=!1,this.InEscapedQuote=!1,this.LinesParsed=0,this.RowsEmitted=0}marshalRowToJSON(e){if(!Array.isArray(e))return!1;for(let t=this.HeaderFieldNames.length;t<e.length;t++)this.HeaderFieldNames[t]="".concat(t);let t={};for(let r=0;r<e.length;r++)t[this.HeaderFieldNames[r]]=e[r];return t}setHeader(e){this.Header=e;for(let e=0;e<this.Header.length;e++)void 0===this.Header[e]?this.HeaderFieldNames[e]="".concat(e):this.HeaderFieldNames[e]=this.Header[e].toString().trim()}resetRowState(){this.CurrentRecord=[]}pushLine(){for(let e=0;e<this.CleanCharacters.length;e++)this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[e],"");this.CurrentRecord.push(this.CurrentLine),this.CurrentLine=""}emitRow(e){let t=void 0===e?this.EmitJSON:e;this.RowsEmitted++;let r=this.CurrentRecord;return this.CurrentRecord=[],t?this.marshalRowToJSON(r):r}parseCSVLine(e){this.LinesParsed++;for(let t=0;t<e.length;t++)this.InQuote||e[t]!=this.Delimiter?e[t]==this.QuoteCharacter?this.InEscapedQuote?this.InEscapedQuote=!1:this.InQuote?t<e.length&&e[t+1]==this.QuoteCharacter?(this.CurrentLine+=this.EscapedQuoteString,this.InEscapedQuote=!0):this.InQuote=!1:this.InQuote=!0:this.CurrentLine+=e[t]:this.pushLine();return!this.InQuote&&(this.pushLine(),this.HasHeader&&!this.HasSetHeader&&this.RowsEmitted==this.HeaderLineIndex?(this.HasSetHeader=!0,this.setHeader(this.emitRow(!1)),!!this.EmitHeader&&this.Header):this.emitRow())}}},{"fable-serviceproviderbase":59}],71:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"stringPadStart",function(e,t,r){let n=e.toString();return this.stringGeneratePaddingString(n,t,r)+n}),_defineProperty2(this,"stringPadEnd",function(e,t,r){let n=e.toString();return n+this.stringGeneratePaddingString(n,t,r)}),this.serviceType="DataArithmatic",this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,this._Regex_formatterDollarsRemoveCommas=/,/gi,this._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi,this._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g,this._Regex_matcherHTMLEntities=/&(#?[a-zA-Z0-9]+);/g,this._Value_MoneySign_Currency="$",this._Value_NaN_Currency="--",this._Value_GroupSeparator_Number=",",this._Value_Prefix_StringHash="HSH",this._Value_Clean_formatterCleanNonAlpha="",this._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,this._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith,this._SanitizeObjectKeyRegex=/[^a-zA-Z0-9_]/gi,this._SanitizeObjectKeyReplacement="_",this._SanitizeObjectKeyInvalid="INVALID"}stringReverse(e){return e.split("").reverse().join("")}stringStartsWith(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}stringStartsWith_Polyfill(e,t){return this.slice(t||0,e.length)===e}stringEndsWith(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}stringEndsWith_Polyfill(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}insecureStringHash(e){let t=0,r=e.length,n=0;for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(t)}capitalizeEachWord(e){return e.replace(this._Regex_formatterCapitalizeEachWord,e=>e.charAt(0).toUpperCase()+e.substr(1))}resolveHtmlEntities(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherHTMLEntities,(e,t)=>{switch(t){case"comma":return",";case"amp":return"&";case"lt":return"<";case"gt":return">";case"times":return"×";case"divide":return"÷";case"plus":return"+";case"minus":return"-";case"infin":return"∞";case"ang":return"∠";case"quot":return'"';case"apos":return"'";case"nbsp":return" ";case"copy":return"©";case"reg":return"®";case"trade":return"™";case"euro":return"€";default:if(!t.startsWith("#"))return e}const r=parseInt(t.substring(1),10);return String.fromCharCode(r)})}concatenateStrings(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStrings("",...t)}concatenateStringsInternal(){const e=[...arguments],t=this.fable.Utility.flattenArrayOfSolverInputs(e);return this.concatenateStrings(...t)}joinStrings(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.filter(e=>"string"==typeof e||"number"==typeof e).join(e)}joinStringsInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStrings(e,...r)}concatenateStringsRaw(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStringsRaw("",...t)}concatenateStringsRawInternal(e){const t=[...arguments],r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.concatenateStringsRaw(...r)}joinStringsRaw(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.map(String).join(e)}joinStringsRawInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStringsRaw(e,...r)}cleanEnclosureWrapCharacters(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}cleanNonAlphaCharacters(e){return"string"==typeof e&&""!=e?e.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha):""}sanitizeObjectKey(e){return"string"!=typeof e||e.length<1?this._SanitizeObjectKeyInvalid:e.replace(this._SanitizeObjectKeyRegex,this._SanitizeObjectKeyReplacement)}formatterInsertCommas(e){let t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}processAddCommasToNumberRegex(e,t,r,n,o,i){return t+(o?this.formatterInsertCommas(n)+o+i:this.formatterInsertCommas(n+i))}formatterAddCommasToNumber(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}formatterDollars(e,t,r){if(isNaN(e))return this._Value_NaN_Currency;if(null==e)return this._Value_NaN_Currency;let n=this.fable.Math.parsePrecise(e),o=void 0===t?2:t,i=this.fable.Math.toFixedPrecise(n,o,r);return"$".concat(this.formatterAddCommasToNumber(i))}formatterRoundNumber(e,t){let r=void 0===t?2:t;if(isNaN(e)){return(0).toFixed(r)}if(null==e)return"";let n=this.fable.Utility.bigNumber(e).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}stringGeneratePaddingString(e,t,r){let n=t|0,o=String(void 0!==r?r:" ");if(e.length>t)return"";{let r=t-e.length;return r>o.length&&(o+=o.repeat(n/o.length)),o.slice(0,r)}}formatTimeSpan(e){if("number"!=typeof e)return"";let t=parseInt(e%1e3),r=parseInt(e/1e3%60),n=parseInt(e/6e4%60),o=parseInt(e/36e5);return"".concat(this.stringPadStart(o,2,"0"),":").concat(this.stringPadStart(n,2,"0"),":").concat(this.stringPadStart(r,2,"0"),".").concat(this.stringPadStart(t,3,"0"))}formatTimeDelta(e,t){return"number"!=typeof e||"number"!=typeof t?"":this.formatTimeSpan(t-e)}getMonthFromDate(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]}getMonthAbbreviatedFromDate(e){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]}formatMonthDayYearFromDate(e,t){let r=void 0!==t&&t,n=e.getMonth()+1,o=e.getDate(),i=e.getFullYear();return r&&(n=this.stringPadStart(n,2,"0"),o=this.stringPadStart(o,2,"0"),i=this.stringPadStart(i,4,"0")),"".concat(n,"/").concat(o,"/").concat(i)}formatSortableStringFromDate(e){return e.getFullYear()+this.stringPadStart(e.getMonth(),2,"0")+this.stringPadStart(e.getDate(),2,"0")}stringBeforeMatch(e,t){return e.split(t)[0]}stringAfterMatch(e,t){let r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}stringCountSegments(e,t,r,n){let o="string"==typeof e?e:"",i="string"==typeof t?t:".",a="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},s="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let l=1,c=[];for(let e=0;e<o.length;e++)o[e]==i&&0==c.length?l++:o[e]in a?c.push(a[o[e]]):o[e]in s&&s[o[e]]==c[c.length-1]&&c.pop();return l}stringGetSegments(e,t,r,n){let o="string"==typeof e?e:"",i="string"==typeof t?t:".",a="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2,'"':3,"'":4},s="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2,'"':3,"'":4},l=0,c=[];if(e.length<1)return c;let d=[];for(let e=0;e<o.length;e++)o[e]==i&&0==d.length?(c.push(o.substring(l,e)),l=e+1):o[e]in a?d.push(a[o[e]]):o[e]in s&&s[o[e]]==d[d.length-1]&&d.pop();return l<o.length&&c.push(o.substring(l)),c}stringGetFirstSegment(e,t,r,n){let o="string"==typeof e?e:"",i="string"==typeof t?t:".",a="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},s="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let l=[];for(let e=0;e<o.length;e++){if(o[e]==i&&0==l.length)return o.substring(0,e);o[e]in a?l.push(a[o[e]]):o[e]in s&&s[o[e]]==l[l.length-1]&&l.pop()}return o}stringEncodeURIComponent(e){return"string"!=typeof e?e:encodeURIComponent(e)}stringDecodeURIComponent(e){if("string"!=typeof e)return e;try{return decodeURIComponent(e)}catch(t){return this.fable.Log.error("Failed to decode URI component: ".concat(e),t),e}}stringEncodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptEncode,e=>{switch(e){case'"':return'\\"';case"'":return"\\'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";default:return e}})}stringDecodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptDecode,e=>{switch(e){case'\\"':return'"';case"\\'":return"'";case"\\\\":return"\\";case"\\n":return"\n";case"\\r":return"\r";default:return e}})}stringCountEnclosures(e,t,r){let n="string"==typeof e?e:"",o="string"==typeof t?t:"(",i="string"==typeof r?r:")",a=0,s=0;for(let e=0;e<n.length;e++)n[e]==o?(0==s&&a++,s++):n[e]==i&&s--;return a}stringGetEnclosureValueByIndex(e,t,r,n){let o="string"==typeof e?e:"",i="number"==typeof t?t:0,a="string"==typeof r?r:"(",s="string"==typeof n?n:")",l=0,c=0,d=!1,h=0,p=0;for(let e=0;e<o.length;e++)o[e]==a?(c++,1==c&&(l++,i==l-1&&(d=!0,h=e))):o[e]==s&&(c--,0==c&&d&&p<=h&&(p=e,d=!1));return l<=i?"":p>0&&p>h?o.substring(h+1,p):o.substring(h+1)}stringRemoveEnclosureByIndex(e,t,r,n){let o="string"==typeof e?e:"",i="number"==typeof t?t:0,a="string"==typeof r?r:"(",s="string"==typeof n?n:")",l=0,c=0,d=!1,h=0,p=0;for(let e=0;e<o.length;e++)o[e]==a?(c++,1==c&&(l++,i==l-1&&(d=!0,h=e))):o[e]==s&&(c--,0==c&&d&&p<=h&&(p=e,d=!1));if(l<=i)return o;let u="";return h>1&&(u=o.substring(0,h)),o.length>p+1&&p>h&&(u+=o.substring(p+1)),u}}},{"fable-serviceproviderbase":59}],72:[function(e,t,r){t.exports={DefaultIntegerMinimum:0,DefaultIntegerMaximum:9999999,DefaultNumericStringLength:10,MonthSet:["January","February","March","April","May","June","July","August","September","October","November","December"],WeekDaySet:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ColorSet:["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],SurNameSet:["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],NameSet:["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]}},{}],73:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(t,r,n){super(t,r,n),this.serviceType="DataGeneration",this.defaultData=e("./Fable-Service-DataGeneration-DefaultValues.json")}randomIntegerBetween(e,t){try{let r=parseInt(e,10),n=parseInt(t,10);return Math.floor(Math.random()*(n-r))+r}catch(r){return this.fable.log.error("Error in randomIntegerBetween",r,{Minimum:e,Maximum:t}),NaN}}randomIntegerUpTo(e){return this.randomIntegerBetween(0,e)}randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum)}randomFloatBetween(e,t){try{let r=parseFloat(e),n=parseFloat(t);return this.fable.Math.addPrecise(this.fable.Math.multiplyPrecise(Math.random(),this.fable.Math.subtractPrecise(n,r)),r)}catch(r){return this.fable.log.error("Error in randomFloatBetween",r,{Minimum:e,Maximum:t}),NaN}}randomFloatUpTo(e){return this.randomFloatBetween(0,e)}randomFloat(){return Math.random()}randomNumericString(e,t){let r=void 0===t?9999999999:t;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(r),e,"0")}randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)]}randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)]}randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)]}randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)]}randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)]}}},{"./Fable-Service-DataGeneration-DefaultValues.json":72,"fable-serviceproviderbase":59}],74:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(t,r,n){super(t,r,n),this.serviceType="Dates",this.dayJS=e("dayjs"),this.plugin_weekOfYear=e("dayjs/plugin/weekOfYear"),this.dayJS.extend(this.plugin_weekOfYear),this.plugin_weekday=e("dayjs/plugin/weekday"),this.dayJS.extend(this.plugin_weekday),this.plugin_isoWeek=e("dayjs/plugin/isoWeek"),this.dayJS.extend(this.plugin_isoWeek),this.plugin_timezone=e("dayjs/plugin/timezone"),this.dayJS.extend(this.plugin_timezone),this.plugin_relativetime=e("dayjs/plugin/relativeTime"),this.dayJS.extend(this.plugin_relativetime),this.plugin_utc=e("dayjs/plugin/utc"),this.dayJS.extend(this.plugin_utc),this.plugin_advancedFormat=e("dayjs/plugin/advancedFormat"),this.dayJS.extend(this.plugin_advancedFormat)}dateMillisecondDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"millisecond")}dateSecondDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"second")}dateMinuteDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"minute")}dateHourDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"hour")}dateDayDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"day")}dateWeekDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"week")}dateMonthDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"month")}dateYearDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let n=this.dayJS(e);return this.dayJS(t).diff(n,"year")}dateAddMilliseconds(e,t){return this.dateMath(e,t,"millisecond","add")}dateAddSeconds(e,t){return this.dateMath(e,t,"second","add")}dateAddMinutes(e,t){return this.dateMath(e,t,"minute","add")}dateAddHours(e,t){return this.dateMath(e,t,"hour","add")}dateAddDays(e,t){return this.dateMath(e,t,"day","add")}dateAddWeeks(e,t){return this.dateMath(e,t,"week","add")}dateAddMonths(e,t){return this.dateMath(e,t,"month","add")}dateAddYears(e,t){return this.dateMath(e,t,"year","add")}dateMath(e,t,r,n){try{let o=this.dayJS.utc(e);return"add"===n?o=o.add(t,r):"subtract"===n&&(o=o.subtract(t,r)),this.dayJS.utc(o).toISOString()}catch(e){return}}dateFromParts(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;try{return this.dayJS.utc().year(e).month(t-1).date(r).hour(n).minute(o).second(i).millisecond(a).toISOString()}catch(e){return}}}},{dayjs:32,"dayjs/plugin/advancedFormat":33,"dayjs/plugin/isoWeek":34,"dayjs/plugin/relativeTime":35,"dayjs/plugin/timezone":36,"dayjs/plugin/utc":37,"dayjs/plugin/weekOfYear":38,"dayjs/plugin/weekday":39,"fable-serviceproviderbase":59}],75:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="EnvironmentData",this.Environment="node.js"}}},{"fable-serviceproviderbase":59}],76:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(t,r,n){super(t,r,n),this.fable,this.log,this.tokenMap=JSON.parse(JSON.stringify(e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json"))),this.tokenMaxPrecedence=4,this.tokenRadix={};let o=Object.keys(this.tokenMap);for(let e=0;e<o.length;e++){let t=o[e],r=this.tokenMap[t];r.Token=t,r.Length=t.length;let n=r.Token[0];n in this.tokenRadix||(this.tokenRadix[n]={TokenCount:0,Literal:!1,TokenKeys:[],TokenMap:{}}),this.tokenRadix[n].TokenCount++,t==n&&(this.tokenRadix[n].Literal=!0),this.tokenRadix[n].TokenMap[r.Token]=r,this.tokenRadix[n].TokenKeys.push(t),this.tokenRadix[n].TokenKeys.sort((e,t)=>t.length-e.length),this.tokenMaxPrecedence<r.Precedence&&(this.tokenMaxPrecedence=r.Precedence)}this.functionMap=JSON.parse(JSON.stringify(e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json"))),this.serviceType="ExpressionParser",this.fable.addServiceTypeIfNotExists("ExpressionParser-Tokenizer",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-TokenizerDirectiveMutation",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer-DirectiveMutation.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Linter",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Postfix",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-ValueMarshal",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Solver",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Messaging",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js")),this.Tokenizer=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Tokenizer"),this.Tokenizer.TokenizerDirectiveMutation=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-TokenizerDirectiveMutation"),this.Linter=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Linter"),this.Postfix=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Postfix"),this.ValueMarshal=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-ValueMarshal"),this.Solver=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Solver"),this.Messaging=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Messaging"),this.Tokenizer.connectExpressionParser(this),this.Tokenizer.TokenizerDirectiveMutation.connectExpressionParser(this),this.Linter.connectExpressionParser(this),this.Postfix.connectExpressionParser(this),this.ValueMarshal.connectExpressionParser(this),this.Solver.connectExpressionParser(this),this.Messaging.connectExpressionParser(this),this.GenericManifest=this.fable.newManyfest(),this.LogNoisiness="LogNoisiness"in this.fable?this.fable.LogNoisiness:0}tokenize(e,t){return this.Tokenizer.tokenize(e,t)}recompose(e){return this.Tokenizer.recompose(e)}lintTokenizedExpression(e,t){return this.Linter.lintTokenizedExpression(e,t)}buildPostfixedSolveList(e,t){return this.Postfix.buildPostfixedSolveList(e,t)}substituteValuesInTokenizedObjects(e,t,r,n){return this.ValueMarshal.substituteValuesInTokenizedObjects(e,t,r,n)}solvePostfixedExpression(e,t,r,n){return this.Solver.solvePostfixedExpression(e,t,r,n)}addSolverFunction(e,t,r,n){let o=(e||"").trim().toLowerCase();this.functionMap.hasOwnProperty(o)&&this.log.warn("PictDynamicFormsInformary: Function ".concat(o," already exists in the solver, overwriting with address [").concat(t,"]."));let i={Name:r||"Autogenerated function ".concat(o),Address:t};Array.isArray(n)&&n.length>0&&(i.AddressParameterIndices=n),this.functionMap[o]=i}_prepareDirectiveParameters(e,t,r,n,o){const i=[];for(let a=0;a<e.length;a++){const s=e[a];let l=this.fable.Math.parsePrecise(s,NaN);if(isNaN(l)&&"string"==typeof s&&s.length>0){const e=this.fable.ExpressionParser.Postfix.getTokenContainerObject(s,"Token.Symbol");this.substituteValuesInTokenizedObjects([e],n,r,o),e.Resolved&&(l=e.Value)}isNaN(l)&&t.length>a&&(l=t[a]),i.push(l)}return i}solve(e,t,r,n,o){let i="object"==typeof r?r:{},a="object"==typeof t?t:{},s="object"==typeof o?o:{};this.tokenize(e,i),this.lintTokenizedExpression(i.RawTokens,i),this.buildPostfixedSolveList(i.RawTokens,i);const l="object"==typeof n?n:this.fable.newManyfest();if("SERIES"==i.SolverDirectives.Code){const[e,t,r]=this._prepareDirectiveParameters([i.SolverDirectives.Step,i.SolverDirectives.From,i.SolverDirectives.To],["1"],i,a,l);if(isNaN(t)||isNaN(r))return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. FROM, TO must be numeric."),this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),null;if(0==this.fable.Math.comparePrecise(t,r))return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. FROM and TO cannot be equal."),this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),null;if(0==this.fable.Math.comparePrecise(e,"0"))return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. STEP cannot be zero."),this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),null;if(this.fable.Math.comparePrecise(t,r)<0){if(this.fable.Math.comparePrecise(e,"0")<0)return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. STEP must be positive when FROM < TO."),this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),null}else if(this.fable.Math.comparePrecise(e,"0")>0)return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. STEP must be negative when FROM >= TO."),this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),null;let n=parseInt(this.fable.Math.floorPrecise(this.fable.Math.dividePrecise(this.fable.Math.subtractPrecise(r,t),e))),o=[];for(let r=0;r<=n;r++){const n=this.fable.Math.addPrecise(t,this.fable.Math.multiplyPrecise(e,r.toString())),c=0==r?"false":this.fable.Math.addPrecise(t,this.fable.Math.multiplyPrecise(e,(r-1).toString()));let d=Object.assign({},a);d.n=n,d.prev_n=c,d.stepIndex=r;let h=this.substituteValuesInTokenizedObjects(i.PostfixTokenObjects,d,i,l);o.push(this.solvePostfixedExpression(i.PostfixSolveList,s,i,l));for(let e=0;e<h.length;e++)h[e].Resolved=!1}let c=i.PostfixedAssignmentAddress;return"="===i.OriginalRawTokens[1]&&"string"==typeof i.OriginalRawTokens[0]&&i.OriginalRawTokens[0].length>0&&(c=i.OriginalRawTokens[0]),l.setValueByHash(s,c,o),o}if("MAP"==i.SolverDirectives.Code){const e=i.SolverDirectives.Values,t=i.SolverDirectives.ValueKeys;let r=[];for(let r=0;r<t.length;r++){const n=e[t[r]];n.Value=l.getValueByHash(a,n.Address)}if(t.length<1||null==e[t[0]].Value||!Array.isArray(e[t[0]].Value))return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid MAP directive parameters. The first variable's address must resolve to an array."),void this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]);let n=e[t[0]].Value;for(let o=0;o<n.length;o++){let n=Object.assign({},a);n.stepIndex=o;for(let r=0;r<t.length;r++){const i=t[r];!Array.isArray(e[i].Value)||e[i].Value.length<=o?n[i]=0:n[i]=e[i].Value[o];const a="prev_".concat(i);!Array.isArray(e[i].Value)||e[i].Value.length<=o?n[a]=0:n[a]=0==o?"false":e[i].Value[o-1]}let c=this.substituteValuesInTokenizedObjects(i.PostfixTokenObjects,n,i,l);r.push(this.solvePostfixedExpression(i.PostfixSolveList,s,i,l));for(let e=0;e<c.length;e++)c[e].Resolved=!1}let o=i.PostfixedAssignmentAddress;return"="===i.OriginalRawTokens[1]&&"string"==typeof i.OriginalRawTokens[0]&&i.OriginalRawTokens[0].length>0&&(o=i.OriginalRawTokens[0]),l.setValueByHash(s,o,r),r}if("MULTIROWMAP"==i.SolverDirectives.Code){const e=i.SolverDirectives.Values,t=i.SolverDirectives.ValueKeys,r=i.SolverDirectives.RowsAddress;let n=[],o=null;if(r&&(o=l.getValueByHash(a,r)),!Array.isArray(o)||o.length<1)return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid MULTIROWMAP directive parameters. ROWS FROM address must resolve to a non-empty array."),void this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]);let c=0;if(null!==i.SolverDirectives.SeriesStart&&(c=parseInt(i.SolverDirectives.SeriesStart),isNaN(c))){let e=this.fable.ExpressionParser.Postfix.getTokenContainerObject(i.SolverDirectives.SeriesStart,"Token.Symbol");this.substituteValuesInTokenizedObjects([e],a,i,l),e.Resolved&&(c=parseInt(e.Value)),isNaN(c)&&(c=0)}c<0&&(c=o.length+c),c=Math.max(0,Math.min(c,o.length-1));let d=1;if(null!==i.SolverDirectives.SeriesStep&&(d=parseInt(i.SolverDirectives.SeriesStep),isNaN(d))){let e=this.fable.ExpressionParser.Postfix.getTokenContainerObject(i.SolverDirectives.SeriesStep,"Token.Symbol");this.substituteValuesInTokenizedObjects([e],a,i,l),e.Resolved&&(d=parseInt(e.Value)),isNaN(d)&&(d=1)}if(0===d)return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid MULTIROWMAP directive parameters. SERIESSTEP cannot be zero."),void this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]);let h=0;for(let r=c;d>0?r<o.length:r>=0;r+=d){let c=Object.assign({},a);c.stepIndex=h,c.rowIndex=r;for(let n=0;n<t.length;n++){const i=t[n],a=e[i],s=r+a.RowOffset;if(s<0||s>=o.length)c[i]=a.Default;else{const e=o[s];if(null===a.Property)c[i]=e;else{let t=l.getValueByHash(e,a.Property);null==t&&(t=a.Default),c[i]=t}}}let d=this.substituteValuesInTokenizedObjects(i.PostfixTokenObjects,c,i,l);n.push(this.solvePostfixedExpression(i.PostfixSolveList,s,i,l));for(let e=0;e<d.length;e++)d[e].Resolved=!1;h++}let p=i.PostfixedAssignmentAddress;return"="===i.OriginalRawTokens[1]&&"string"==typeof i.OriginalRawTokens[0]&&i.OriginalRawTokens[0].length>0&&(p=i.OriginalRawTokens[0]),l.setValueByHash(s,p,n),n}if("MONTECARLO"==i.SolverDirectives.Code){const[e]=this._prepareDirectiveParameters([i.SolverDirectives.SampleCount],["1"],i,a,l);if(isNaN(e))return i.ExpressionParserLog.push("ExpressionParser.solve detected invalid MONTECARLO directive parameters. SAMPLECOUNT must be numeric."),this.log.warn(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),null;let t=JSON.parse(JSON.stringify(i.SolverDirectives));t.Samples=[];let r=Object.keys(t.Values);for(let e=0;e<r.length;e++){let n=r[e],o=t.Values[n];o.Distribution={},o.ValueSequence=[];const i=[];for(let e=0;e<o.Points.length;e++){let t=o.Points[e],r=this.fable.Math.parsePrecise(t,NaN);isNaN(r)&&"string"==typeof t&&t.length>0?(r=l.getValueByHash(a,t),r&&null!=r&&i.push(r)):i.push(t)}i.sort((e,t)=>this.fable.Math.comparePrecise(e,t)),o.ResolvedPoints=i,o.FirstPoint=o.ResolvedPoints[0],o.DomainRangeStart=o.FirstPoint,o.ResolvedPoints.length<2?o.LastPoint=o.FirstPoint:(o.LastPoint=this.fable.Math.parsePrecise(o.ResolvedPoints[o.ResolvedPoints.length-1],NaN),isNaN(o.LastPoint)&&(o.LastPoint=o.FirstPoint)),o.DomainLength=this.fable.Math.subtractPrecise(o.LastPoint,o.FirstPoint)}for(let n=0;n<=Number(e)-1;n++){let e=Object.assign({},a);e.stepIndex=n;for(let n=0;n<r.length;n++){let o=r[n],i=t.Values[o],a=this.fable.Math.generateValueFromEasingDescription(i);e[r[n]]=a,i.ValueSequence.push(a);let s=i.DistributionRoundPrecision||0,l=this.fable.Math.roundPrecise(a,s);l in i.Distribution||(i.Distribution[l]=0),i.Distribution[l]=i.Distribution[l]+1}let o=this.substituteValuesInTokenizedObjects(i.PostfixTokenObjects,e,i,l);t.Samples.push(this.solvePostfixedExpression(i.PostfixSolveList,s,i,l));for(let e=0;e<o.length;e++)o[e].Resolved=!1}let n=i.PostfixedAssignmentAddress;return"="===i.OriginalRawTokens[1]&&"string"==typeof i.OriginalRawTokens[0]&&i.OriginalRawTokens[0].length>0&&(n=i.OriginalRawTokens[0]),l.setValueByHash(s,n,t),t}return this.substituteValuesInTokenizedObjects(i.PostfixTokenObjects,a,i,n),this.solvePostfixedExpression(i.PostfixSolveList,s,i,n)}}},{"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer-DirectiveMutation.js":78,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js":79,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json":80,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js":81,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js":82,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js":83,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js":84,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json":85,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js":86,"fable-serviceproviderbase":59}],77:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParserOperationBase",this.numberTest=/^-{0,1}\d*\.{0,1}\d+$/,this.ExpressionParser=!1}connectExpressionParser(e){this.ExpressionParser=e}getTokenType(e){return e in this.ExpressionParser.tokenMap?"Token.".concat(this.ExpressionParser.tokenMap[e].Type):e.length>2&&"{"===e[0]&&"}"===e[e.length-1]?"Token.StateAddress":e.length>1&&'"'===e[0]&&'"'===e[e.length-1]?"Token.String":this.numberTest.test(e)?"Token.Constant":"Token.Symbol"}getTokenContainerObject(e,t){return{Token:e,Type:void 0===t?this.getTokenType(e):t,Descriptor:e in this.ExpressionParser.tokenMap&&this.ExpressionParser.tokenMap[e]}}}},{"fable-serviceproviderbase":59}],78:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-TokenizerDirectiveMutation",this.directiveTypes={SOLVE:{Name:"Solve Expression",Code:"SOLVE"},SERIES:{Name:"Series",Code:"SERIES",From:null,To:null,Step:null},MONTECARLO:{Name:"Monte Carlo Simulation",SampleCount:"1",Code:"MONTECARLO",Values:{}},MAP:{Name:"Map",Code:"MAP",Values:{},ValueKeys:[]},MULTIROWMAP:{Name:"Multi-Row Map",Code:"MULTIROWMAP",RowsAddress:null,SeriesStart:null,SeriesStep:null,Values:{},ValueKeys:[]}},this.defaultDirective=this.directiveTypes.SOLVE}parseSeriesDirective(e){let t=JSON.parse(JSON.stringify(this.directiveTypes.SERIES));for(let r=0;r<e.length;r++){switch(e[r].toUpperCase()){case"FROM":r+1<e.length&&(t.From=e[r+1]);break;case"TO":r+1<e.length&&(t.To=e[r+1]);break;case"STEP":r+1<e.length&&(t.Step=e[r+1])}}return t}parseMonteCarloDirective(e){let t=JSON.parse(JSON.stringify(this.directiveTypes.MONTECARLO));for(let r=0;r<e.length;r++){switch(e[r].toUpperCase()){case"SAMPLECOUNT":r+1<e.length&&(t.SampleCount=e[r+1]),r+=1;break;case"VARIABLE":case"VAR":case"V":if(r+1<e.length){let n=e[r+1];"string"==typeof n&&n.length>0&&(t.Values[n]={Token:n,Easing:"Linear",Points:[]})}r+=1;break;case"POINT":case"PT":case"P":if(e.length<r+2)continue;let n=2,o=e[r+1];if(o in t.Values){let i=e[r+2];if("-"==i||"+"==i){if(e.length<r+3)continue;i+=e[r+3],n=3}let a=this.fable.Math.parsePrecise(i,NaN);isNaN(a)||t.Values[o].Points.push(a)}r+=n;break;case"EASING":if(e.length<r+2)continue;o=e[r+1];let i=e[r+2].toUpperCase();o in t.Values&&(t.Values[o].Easing=i),r+=2}}return t}parseMapDirective(e){let t=JSON.parse(JSON.stringify(this.directiveTypes.MAP));for(let r=0;r<e.length;r++){switch(e[r].toUpperCase()){case"VARIABLE":case"VAR":case"V":if(r+3<e.length&&"FROM"==e[r+2].toUpperCase()){let n=e[r+1];"string"==typeof n&&n.length>0&&(t.ValueKeys.push(n),t.Values[n]={Token:n,Address:e[r+3]}),r+=3}}}return t}parseMultiRowMapDirective(e){let t=JSON.parse(JSON.stringify(this.directiveTypes.MULTIROWMAP));for(let r=0;r<e.length;r++){switch(e[r].toUpperCase()){case"ROWS":r+2<e.length&&"FROM"===e[r+1].toUpperCase()&&(t.RowsAddress=e[r+2],r+=2);break;case"SERIESSTART":if(r+1<e.length){let n=e[r+1];"-"===n&&r+2<e.length?(n="-"+e[r+2],r+=2):r+=1,t.SeriesStart=n}break;case"SERIESSTEP":if(r+1<e.length){let n=e[r+1];"-"===n&&r+2<e.length?(n="-"+e[r+2],r+=2):r+=1,t.SeriesStep=n}break;case"VARIABLE":case"VAR":case"V":if(r+3<e.length&&"FROM"===e[r+2].toUpperCase()){let n=e[r+1],o=e[r+3];if("string"==typeof n&&n.length>0){let i={Token:n,Property:o,RowOffset:0,Default:"0"},a=r+3;for(;a+1<e.length;){let t=e[a+1].toUpperCase();if("OFFSET"===t){if(a+2<e.length){let t=e[a+2];"-"===t&&a+3<e.length?(t="-"+e[a+3],a+=3):a+=2,i.RowOffset=parseInt(t),isNaN(i.RowOffset)&&(i.RowOffset=0)}}else{if("DEFAULT"!==t)break;if(a+2<e.length){let t=e[a+2];"-"===t&&a+3<e.length?(t="-"+e[a+3],a+=3):a+=2,i.Default=t}}}r=a,t.ValueKeys.push(n),t.Values[n]=i}}}}return t}rewriteTernaryOperators(e){let t=e.RawTokens;for(let r=t.length-1;r>=0;r--){if("?"!==t[r])continue;let n=0,o=0;for(let e=r-1;e>=0;e--)if(")"===t[e])o++;else if("("===t[e]){if(!(o>0)){n=e+1;break}o--}else if(0===o){let r=this.ExpressionParser.tokenMap[t[e]];if(r&&("Assignment"===r.Type||","===t[e])){n=e+1;break}}let i=-1;o=0;for(let e=r+1;e<t.length;e++)if("("===t[e])o++;else if(")"===t[e]){if(!(o>0))break;o--}else if("::"===t[e]&&0===o){i=e;break}if(-1===i){e.ExpressionParserLog.push("ExpressionParser.rewriteTernaryOperators found a ? at token index ".concat(r," with no matching :: separator.")),this.log.warn(e.ExpressionParserLog[e.ExpressionParserLog.length-1]);continue}let a=t.length;o=0;for(let e=i+1;e<t.length;e++)if("("===t[e])o++;else if(")"===t[e]){if(!(o>0)){a=e;break}o--}else if(0===o&&","===t[e]){a=e;break}let s=t.slice(n,r),l=t.slice(r+1,i),c=t.slice(i+1,a),d=["ternary","(","("];d=d.concat(s),d.push(")"),d.push(","),d=d.concat(l),d.push(","),d=d.concat(c),d.push(")"),t.splice(n,a-n,...d),r=n}}parseDirectives(e){let t="object"==typeof e?e:{ExpressionParserLog:[]};if(this.rewriteTernaryOperators(t),t.SolverDirectives=this.defaultDirective,t.SolverDirectiveTokens=[],t.RawTokens.length<2)return t.ExpressionParserLog.push("ExpressionParser.tokenizeDirectiveMutation postprocessor received insufficient tokens to process directives."),this.log.warn(t.ExpressionParserLog[t.ExpressionParserLog.length-1]),t.SolverDirectives;for(let e=0;e<t.RawTokens.length;e++){let r=t.RawTokens[e].toUpperCase();if(r in this.directiveTypes&&(0===e||"="===t.RawTokens[e-1]||"?="===t.RawTokens[e-1])){t.SolverDirectives.Type=this.directiveTypes[r],t.ExpressionParserLog.push("ExpressionParser.tokenizeDirectiveMutation identified solver directive: ".concat(r));let n=e,o=-1;for(let e=n+1;e<t.RawTokens.length;e++)if(":"===t.RawTokens[e]){o=e;break}if(-1===o){t.ExpressionParserLog.push("ExpressionParser.tokenizeDirectiveMutation could not find the end of the directive token set for directive: ".concat(r)),this.log.warn(t.ExpressionParserLog[t.ExpressionParserLog.length-1]);continue}switch(t.SolverDirectiveTokens=t.RawTokens.slice(n,o),t.RawTokens.splice(0,o+1),r){case"SERIES":t.SolverDirectives=this.parseSeriesDirective(t.SolverDirectiveTokens);break;case"MONTECARLO":t.SolverDirectives=this.parseMonteCarloDirective(t.SolverDirectiveTokens);break;case"MAP":t.SolverDirectives=this.parseMapDirective(t.SolverDirectiveTokens);break;case"MULTIROWMAP":t.SolverDirectives=this.parseMultiRowMapDirective(t.SolverDirectiveTokens)}}}return t.SolverDirectives}}},{"./Fable-Service-ExpressionParser-Base.js":77}],79:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Tokenizer"}recompose(e){if(!Array.isArray(e)||0===e.length)return"";let t="";for(let r=0;r<e.length;r++){let n=e[r];if(r>0){let o=e[r-1],i=!0;"("===o&&(i=!1),")"===n&&(i=!1),"("!==n||o in this.ExpressionParser.tokenMap||(i=!1),","===n&&(i=!1),i&&(t+=" ")}t+=n}return t}tokenize(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.RawExpression=e,r.SolverDirectives={},r.RawTokens=[],r.ExpressionParserLog=[],"string"!=typeof e)return this.log.warn("ExpressionParser.tokenize was passed a non-string expression."),r.RawTokens;let n=!1,o="";for(let t=0;t<e.length;t++){let i=e[t];if(" "!==i&&"\t"!==i||"StateAddress"===n||"String"===n)if("StateAddress"!==n||"}"===i)if("String"!==n||'"'===i)if("StateAddress"!==n||"}"!==i)if("String"!==n||'"'!==i)if("}"!=i)if("{"!=i)if("String"===n||'"'!=i){if(i in this.ExpressionParser.tokenRadix){let a=this.ExpressionParser.tokenRadix[i];if(1==a.TokenCount&&a.Literal){o.length>0&&r.RawTokens.push(o),o="",n=!1,r.RawTokens.push(i);continue}for(let i=0;i<a.TokenKeys.length;i++){let s=a.TokenKeys[i];if(e.substr(t,s.length)==s){o.length>0&&r.RawTokens.push(o),o="",n=!1,r.RawTokens.push(s),t+=s.length-1;break}}continue}n="Value",o+=i}else o.length>0&&r.RawTokens.push(o),o="",n="String",o=i;else o.length>0&&r.RawTokens.push(o),o="",n="StateAddress",o=i;else o.length>0&&r.RawTokens.push(o),o="",n=!1,r.ExpressionParserLog.push("ExpressionParser.tokenize found a closing brace without an opening brace in the expression: ".concat(e," at character index ").concat(t)),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]);else o+=i,r.RawTokens.push(o),o="",n=!1;else o+=i,r.RawTokens.push(o),o="",n=!1;else o+=i;else o+=i;else o.length>0&&r.RawTokens.push(o),o="",n=!1}return n&&o.length>0&&r.RawTokens.push(o),r.OriginalRawTokens=Array.from(r.RawTokens),this.TokenizerDirectiveMutation.parseDirectives(r),r.RawTokens}}},{"./Fable-Service-ExpressionParser-Base.js":77}],80:[function(e,t,r){t.exports={sqrt:{Name:"Square Root",Address:"fable.Math.sqrtPrecise"},percent:{Name:"Compute Percent (in IS over OF format)",Address:"fable.Math.percentagePrecise"},compare:{Name:"Compare",Address:"fable.Math.comparePrecise"},abs:{Name:"Absolute Value",Address:"fable.Math.absPrecise"},floor:{Name:"Floor Value",Address:"fable.Math.floorPrecise"},ceil:{Name:"Ceiling Value",Address:"fable.Math.ceilPrecise"},rad:{Name:"Degrees to Radians",Address:"fable.Math.radPrecise"},pi:{Name:"Pi",Address:"fable.Math.piPrecise"},euler:{Name:"Euler",Address:"fable.Math.eulerPrecise"},log:{Name:"Logarithm",Address:"fable.Math.logPrecise"},exp:{Name:"Eulers Number to the Power Of N",Address:"fable.Math.expPrecise"},sin:{Name:"Sine",Address:"fable.Math.sin"},cos:{Name:"Cosine",Address:"fable.Math.cos"},tan:{Name:"Tangent",Address:"fable.Math.tan"},count:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},countset:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},sortset:{Name:"Sort Set",Address:"fable.Math.sortSetPrecise"},bucketset:{Name:"Bucket Set",Address:"fable.Math.bucketSetPrecise"},sorthistogram:{Name:"Sort Histogram",Address:"fable.Math.sortHistogramPrecise"},sorthistogrambykeys:{Name:"Sort Histogram by Keys",Address:"fable.Math.sortHistogramByKeys"},max:{Name:"Maximum",Address:"fable.Math.maxPrecise"},min:{Name:"Minimum",Address:"fable.Math.minPrecise"},sum:{Name:"Sum",Address:"fable.Math.sumPrecise"},avg:{Name:"Average",Address:"fable.Math.averagePrecise"},mean:{Name:"Mean",Address:"fable.Math.meanPrecise"},median:{Name:"Median",Address:"fable.Math.medianPrecise"},mode:{Name:"Mode",Address:"fable.Math.modePrecise"},var:{Name:"Variance (Sample)",Address:"fable.Math.variancePrecise"},vara:{Name:"Variance (Sample)",Address:"fable.Math.variancePrecise"},varp:{Name:"Variance (Population)",Address:"fable.Math.populationVariancePrecise"},stdev:{Name:"Standard Deviation (Sample)",Address:"fable.Math.standardDeviationPrecise"},stdeva:{Name:"Standard Deviation (Sample)",Address:"fable.Math.standardDeviationPrecise"},stdevp:{Name:"Standard Deviation (Population)",Address:"fable.Math.populationStandardDeviationPrecise"},round:{Name:"Round",Address:"fable.Math.roundPrecise"},tofixed:{Name:"To Fixed",Address:"fable.Math.toFixedPrecise"},cumulativesummation:{Name:"Sum each value in a Histogram or Value Map cumulatively, creating or setting a property with the result on each row",Address:"fable.Math.cumulativeSummation"},subtractingsummation:{Name:"Subtract each subsequent value in a Histogram or Value Map cumulatively (by default from the first row), creating or setting a property with the result on each row.",Address:"fable.Math.subtractingSummation"},iterativeseries:{Name:"Perform an Iterative Series of Mathematical Operations on Set Elements",Address:"fable.Math.iterativeSeries"},countsetelements:{Name:"Count Set Elements in a Histogram or Value Map",Address:"fable.Math.countSetElements"},getvalue:{Name:"Get Value from Application State or Services (AppData, etc.)",Address:"fable.Utility.getInternalValueByHash",AddressParameterIndices:[0]},setvalue:{Name:"Set Value to Application State or Services (AppData, etc.)",Address:"fable.Utility.setInternalValueByHash",AddressParameterIndices:[0]},objectkeystoarray:{Name:"Get Array of an Object's keys",Address:"fable.Utility.objectKeysToArray"},objectvaluestoarray:{Name:"Get Array of an Object's values",Address:"fable.Utility.objectValuesToArray"},generatearrayofobjectsfromsets:{Name:"Generate Array of Objects from Sets",Address:"fable.Utility.generateArrayOfObjectsFromSets"},objectvaluessortbyexternalobjectarray:{Name:"Get Array of an Object's values sorted by an external array",Address:"fable.Utility.objectValuesSortByExternalArray"},setkeystoarray:{Name:"Get Array of an Object's keys",Address:"fable.Utility.objectKeysToArray"},setvaluestoarray:{Name:"Get Array of an Object's values",Address:"fable.Utility.objectValuesToArray"},histogramkeystoarray:{Name:"Get Array of an Object's keys",Address:"fable.Utility.objectKeysToArray"},histogramvaluestoarray:{Name:"Get Array of an Object's values",Address:"fable.Utility.objectValuesToArray"},createarrayfromabsolutevalues:{Name:"Create Array from Absolute Values",Address:"fable.Utility.createArrayFromAbsoluteValues"},flatten:{Name:"flatten an array of values",Address:"fable.Utility.flattenArrayOfSolverInputs"},findfirstvaluebyexactmatch:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByExactMatchInternal",AddressParameterIndices:[0,1,3]},findfirstvaluebystringincludes:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByStringIncludesInternal",AddressParameterIndices:[0,1,3]},match:{Name:"Implementation of sheets MATCH() function",Address:"fable.Utility.findIndexInternal",AddressParameterIndices:[1]},resolvehtmlentities:{Name:"resolve HTML entities",Address:"fable.DataFormat.resolveHtmlEntities"},concat:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsInternal"},concatraw:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsRawInternal"},arrayconcat:{Name:"concatenate two or more arrays generating a single output array",Address:"fable.Utility.concatenateArrays"},join:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsInternal"},joinraw:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsRawInternal"},if:{Name:"perform a conditional operator on two values, and choose one of two outcomes based on the result",Address:"fable.Logic.checkIf"},when:{Name:"perform a 'truthy' check on one value, and return one of two outcomes based on the result",Address:"fable.Logic.when"},ternary:{Name:"numeric-aware ternary selection (used by ? :: operator desugaring)",Address:"fable.Logic.ternary"},entryinset:{Name:"Entry in Set",Address:"fable.Math.entryInSet"},smallestinset:{Name:"Smallest in Set",Address:"fable.Math.smallestInSet"},largestinset:{Name:"Largest in Set",Address:"fable.Math.largestInSet"},aggregationhistogram:{Name:"Generate a Histogram by Exact Value Aggregation",Address:"fable.Math.histogramAggregationByExactValueFromInternalState"},aggregationhistogrambyobject:{Name:"Generate a Histogram by Exact Value Aggregation from Object Property",Address:"fable.Math.histogramAggregationByExactValue"},distributionhistogram:{Name:"Generate a Histogram Based on Value Distribution",Address:"fable.Math.histogramDistributionByExactValueFromInternalState"},distributionhistogrambyobject:{Name:"Generate a Histogram Based on Value Distribution from Object Property",Address:"fable.Math.histogramDistributionByExactValue"},setconcatenate:{Name:"Set Concatenate",Address:"fable.Math.setConcatenate"},getvaluearray:{Name:"Get Value Array from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueArrayByHashParametersFromInternal",AddressParameterIndices:[0,1,2,3,4,5,6,7,8,9]},getvalueobject:{Name:"Get Value Object from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueObjectByHashParametersFromInternal",AddressParameterIndices:[0,1,2,3,4,5,6,7,8,9]},cleanvaluearray:{Name:"Clean Value Array",Address:"fable.Math.cleanValueArray"},cleanvalueobject:{Name:"Clean Value Object",Address:"fable.Math.cleanValueObject"},polynomialregression:{Name:"Perform an nth degree Polynomial Regression on a Set of X and Y Values",Address:"fable.Math.polynomialRegression"},randominteger:{Name:"Random Integer",Address:"fable.DataGeneration.randomInteger"},randomintegerbetween:{Name:"Random Integer Between Two Numbers",Address:"fable.DataGeneration.randomIntegerBetween"},randomintegerupto:{Name:"Random Integer",Address:"fable.DataGeneration.randomIntegerUpTo"},randomfloat:{Name:"Random Float",Address:"fable.DataGeneration.randomFloat"},randomfloatbetween:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatBetween"},randomfloatupto:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatUpTo"},datemilliseconddifference:{Name:"Date Difference in Milliseconds",Address:"fable.Dates.dateMillisecondDifference"},dateseconddifference:{Name:"Date Difference in Seconds",Address:"fable.Dates.dateSecondDifference"},dateminutedifference:{Name:"Date Difference in Minutes",Address:"fable.Dates.dateMinuteDifference"},datehourdifference:{Name:"Date Difference in Hours",Address:"fable.Dates.dateHourDifference"},datedaydifference:{Name:"Date Difference in Days",Address:"fable.Dates.dateDayDifference"},dateweekdifference:{Name:"Date Difference in Weeks",Address:"fable.Dates.dateWeekDifference"},datemonthdifference:{Name:"Date Difference in Months",Address:"fable.Dates.dateMonthDifference"},dateyeardifference:{Name:"Date Difference in Years",Address:"fable.Dates.dateYearDifference"},datemathadd:{Name:"Date Math Add",Address:"fable.Dates.dateMath"},dateaddmilliseconds:{Name:"Date Add Milliseconds",Address:"fable.Dates.dateAddMilliseconds"},dateaddseconds:{Name:"Date Add Seconds",Address:"fable.Dates.dateAddSeconds"},dateaddminutes:{Name:"Date Add Minutes",Address:"fable.Dates.dateAddMinutes"},dateaddhours:{Name:"Date Add Hours",Address:"fable.Dates.dateAddHours"},dateadddays:{Name:"Date Add Days",Address:"fable.Dates.dateAddDays"},dateaddweeks:{Name:"Date Add Weeks",Address:"fable.Dates.dateAddWeeks"},dateaddmonths:{Name:"Date Add Months",Address:"fable.Dates.dateAddMonths"},dateaddyears:{Name:"Date Add Years",Address:"fable.Dates.dateAddYears"},datefromparts:{Name:"Date From Parts",Address:"fable.Dates.dateFromParts"},slice:{Name:"Slice Array",Address:"fable.Utility.slice"},createvalueobjectbyhashes:{Name:"Create Value Object by Hashes",Address:"fable.Utility.createValueObjectByHashes",AddressParameterIndices:[0,1,2,3,4,5,6,7,8,9]},slope:{Name:"Slope of Linear Regression Line (Excel SLOPE equivalent)",Address:"fable.Math.slopePrecise"},intercept:{Name:"Y-Intercept of Linear Regression Line (Excel INTERCEPT equivalent)",Address:"fable.Math.interceptPrecise"},leastsquares:{Name:"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector",Address:"fable.Math.leastSquares"},linest:{Name:"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector",Address:"fable.Math.leastSquares"},matrixtranspose:{Name:"Transpose a Matrix",Address:"fable.Math.matrixTranspose"},matrixmultiply:{Name:"Multiply Two Matrices",Address:"fable.Math.matrixMultiply"},matrixvectormultiply:{Name:"Multiply a Matrix by a Vector",Address:"fable.Math.matrixVectorMultiply"},matrixinverse:{Name:"Inverse a Matrix",Address:"fable.Math.matrixInverse"},gaussianelimination:{Name:"Solve a System of Linear Equations using Gaussian Elimination",Address:"fable.Math.gaussianElimination"},predict:{Name:"Predict Y Values from X Values using a Regression Model",Address:"fable.Math.predictFromRegressionModel"},stringcountsegments:{Name:"Count Segments in a String",Address:"fable.DataFormat.stringCountSegments"},stringgetsegments:{Name:"Get Segments from a String",Address:"fable.DataFormat.stringGetSegments"},bezierpoint:{Name:"Evaluate a Point on a Cubic Bezier Curve at Parameter t",Address:"fable.Math.bezierPoint"},beziercurvefit:{Name:"Fit a Cubic Bezier Curve to a Set of Data Points",Address:"fable.Math.bezierCurveFit"}}},{}],81:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Linter"}lintTokenizedExpression(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.LinterResults=[],!Array.isArray(e))return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed a non-array tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;if(e.length<1)return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed an empty tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;let n=0,o=!1;for(let t=0;t<e.length;t++)"("!==e[t]||o||n++,")"!==e[t]||o||n--,"{"===e[t]&&(o=!0),"}"===e[t]&&(o=!1),n<0&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression at token index ".concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));n>0&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression (ended without closing last set of parenthesis) -- appropriate closing parenthesis will be added."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),o=!1;for(let t=0;t<e.length;t++)"{"===e[t]&&(o=!0),"}"===e[t]&&o&&(o=!1),"}"!==e[t]||o||(r.ExpressionParserLog.push('ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced closing squiggly brace "}" in the tokenized expression at token index '.concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),o&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found an open squiggly brace in the tokenized expression at index ".concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));let i=0,a=!1;for(let t=0;t<e.length;t++)this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type&&(i++,a=t,i>1&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression found multiple equality assignments in the tokenized expression; equality assignment #".concat(i," operator '").concat(e[t],"' at token index ").concat(t,".")),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));i<1&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found no equality assignment in the tokenized expression. One called Result will be added automatically."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),1===i&&3===e.length&&("Token.StateAddress"!==this.getTokenType(e[0])&&"Token.Symbol"!==this.getTokenType(e[2])||(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found a single equality assignment in the tokenized expression with no assignable address on the left side of the assignment."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));let s=!1;for(let t=0;t<e.length-1;t++)e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type&&!s?s=!0:e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type?"+"!==e[t]&&"-"!==e[t]&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression found an ".concat(e[t]," operator adjacent to another operator in the tokenized expression at token index ").concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):s=!1;return r.LinterResults}}},{"./Fable-Service-ExpressionParser-Base.js":77}],82:[function(e,t,r){const{PE:n}=e("big.js"),o=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends o{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Messaging"}getOperationVirtualSymbolName(e){return e&&"VirtualSymbolName"in e?e.VirtualSymbolName:"Token.VirtualSymbol"===e.Type?e.Token:"NO_VIRTUAL_SYMBOL_NAME_FOUND"}getVirtualTokenValue(e,t){let r=this.getOperationVirtualSymbolName(e);if(("Token.Symbol"==e.Type||"Token.Constant"==e.Type)&&e.Value)return e.Value.toString();let n="VirtualSymbols"in t?t.VirtualSymbols:{};if(this.ExpressionParser.GenericManifest.checkAddressExists(n,r)){let e=this.ExpressionParser.GenericManifest.getValueAtAddress(n,r);return"object"==typeof e?"{".concat(Object.keys(e).length," values}"):Array.isArray(e)?"[".concat(Object.keys(e).length," values]"):e}return"NO_VALUE_FOUND"}getTokenAddressString(e){return pExpression.Token}getTokenSymbolString(e){return e.Token}getOperationSymbolMessage(e){if(!e)return"INVALID_OPERATION";let t=this.getOperationVirtualSymbolName(e),r=this.getTokenSymbolString(e.LeftValue),n=this.getTokenSymbolString(e.Operation),o=this.getTokenSymbolString(e.RightValue),i=t.substring(0,3);return"="===n?"".concat(t," = ").concat(r):"VFE"===i?"".concat(t," = ").concat(n,"(").concat(r,")"):"".concat(t," = ").concat(r," ").concat(n," ").concat(o)}getOperationValueMessage(e,t){if(!e)return"INVALID_OPERATION";let r=this.getOperationVirtualSymbolName(e),n=this.getVirtualTokenValue(e.LeftValue,t),o=this.getTokenSymbolString(e.Operation),i=this.getVirtualTokenValue(e.RightValue,t),a=r.substring(0,3);return"="===o?"".concat(r," = ").concat(n):"VFE"===a?"".concat(r," = ").concat(o,"(").concat(n,")"):"".concat(r," = ").concat(n," ").concat(o," ").concat(i)}getOperationOutcomeMessage(e,t){if(!e)return"INVALID_TOKEN";let r=this.getOperationVirtualSymbolName(e),n=this.getVirtualTokenValue(e,t);return"".concat(r," = ").concat(n)}logFunctionOutcome(e){if("object"!=typeof e)return void this.log.error("Solver results object was not an object. Cannot log outcome.");let t="PostfixedAssignmentAddress"in e?e.PostfixedAssignmentAddress:"NO_ASSIGNMENT_ADDRESS_FOUND",r="RawExpression"in e?e.RawExpression:"NO_EXPRESSION_FOUND",n="RawResult"in e?e.RawResult:"NO_RESULT_FOUND";this.log.info("Solved f(".concat(t,") = {").concat(r,"}"));for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t],n=this.getOperationSymbolMessage(r);this.log.info("".concat(t," Symbols: ").concat(n));let o=this.getOperationValueMessage(r,e);this.log.info("".concat(t," Values: ").concat(o));let i=this.getOperationOutcomeMessage(r,e);this.log.info("".concat(t," Outcome: ").concat(i))}this.log.info("{".concat(r,"} = ").concat(n))}logFunctionSolve(e){if("object"==typeof e)if("PostfixSolveList"in e&&Array.isArray(e.PostfixSolveList)){for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t];console.log("".concat(t,": ").concat(r.VirtualSymbolName," = (").concat(r.LeftValue.Token,"::").concat(r.LeftValue.Value,") ").concat(r.Operation.Token," (").concat(r.RightValue.Token,"::").concat(r.RightValue.Value,") "))}this.logFunctionOutcome(e)}else this.log.error("Solver results object did not contain a PostfixSolveList array. Cannot log the solve.");else this.log.error("Solver results object was not an object. Cannot log the solve.")}}},{"./Fable-Service-ExpressionParser-Base.js":77,"big.js":17}],83:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Postfix"}getPosfixSolveListOperation(e,t,r,n,o){let i={VirtualSymbolName:e.VirtualSymbolName,Operation:e,LeftValue:t,RightValue:r};Array.isArray(n);return i.LeftValue.VirtualSymbolName?"LeftVirtualSymbolName"in i.Operation?i.LeftValue=this.getTokenContainerObject(i.Operation.LeftVirtualSymbolName,"Token.VirtualSymbol"):i.LeftValue=this.getTokenContainerObject(i.LeftValue.VirtualSymbolName,"Token.VirtualSymbol"):i.LeftValue.VirtualSymbolName=i.VirtualSymbolName,i.RightValue.VirtualSymbolName?"RightVirtualSymbolName"in i.Operation?i.RightValue=this.getTokenContainerObject(i.Operation.RightVirtualSymbolName,"Token.VirtualSymbol"):i.RightValue=this.getTokenContainerObject(i.RightValue.VirtualSymbolName,"Token.VirtualSymbol"):i.RightValue.VirtualSymbolName=i.VirtualSymbolName,i.Operation.Parsed=!0,i}buildPostfixedSolveList(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.PostfixedAssignmentAddress="Result",r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap["="],r.PostfixTokenObjects=[],r.PostfixSolveList=[],e.length<3)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList was passed a tokenized expression with less than three tokens."),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;let n=-1;for(let t=0;t<e.length;t++)if(this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type){if(!(n<0))return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found multiple assignment operators in the tokenized expression; assignment operator '".concat(e[t],"' #").concat(n," at token index ").concat(t,".")),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;n=t,r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap[e[t]]}-1==n?r.ExpressionParserLog.push("WARNING: ExpressionParser.buildPostfixedSolveList found no equality assignment in the tokenized expression; defaulting to Result"):n>1?(r.ExpressionParserLog.push("WARNING: ExpressionParser.buildPostfixedSolveList found an equality assignment in the tokenized expression at an unexpected location (token index ".concat(n,"); the expression cannot be parsed.")),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):0===n||(r.PostfixedAssignmentAddress=e[0]);for(let t=n+1;t<e.length;t++)r.PostfixTokenObjects.push(this.getTokenContainerObject(e[t]));let o=0,i=0,a=[];a.push("SolveSet_".concat(i,"_D_").concat(o));for(let e=0;e<r.PostfixTokenObjects.length;e++)"("===r.PostfixTokenObjects[e].Token?(r.PostfixTokenObjects[e].Depth=o,r.PostfixTokenObjects[e].VirtualSymbolName="Pr_".concat(i,"_D_").concat(o),e>0&&"Token.Symbol"===r.PostfixTokenObjects[e-1].Type&&(r.PostfixTokenObjects[e-1].Type="Token.Function"),r.PostfixTokenObjects[e].SolveLayerStack=a[a.length-1],a.push(r.PostfixTokenObjects[e].VirtualSymbolName),i++,o++):")"===r.PostfixTokenObjects[e].Token?(o--,r.PostfixTokenObjects[e].Depth=o,o<0&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ".concat(e," with no corresponding opening parenthesis.")),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),r.PostfixTokenObjects[e].VirtualSymbolName=a.pop(),r.PostfixTokenObjects[e].SolveLayerStack=a[a.length-1]):(r.PostfixTokenObjects[e].Depth=o,r.PostfixTokenObjects[e].SolveLayerStack=a[a.length-1]);let s={},l=0;for(let e=0;e<r.PostfixTokenObjects.length;e++)r.PostfixTokenObjects[e].SolveLayerStack in s||(s[r.PostfixTokenObjects[e].SolveLayerStack]=[]),s[r.PostfixTokenObjects[e].SolveLayerStack].push(r.PostfixTokenObjects[e]),r.PostfixTokenObjects[e].Depth>l&&(l=r.PostfixTokenObjects[e].Depth);let c=Object.keys(s),d=0;c.sort((e,t)=>s[e][0].Depth<s[t][0].Depth?1:s[e][0].Depth>s[t][0].Depth?-1:0),r.PostfixLayerstackMap={};const h=["+","-"],p=["Token.Operator","Token.Assignment"];for(let e=0;e<c.length;e++){let t=s[c[e]];for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let n=0;n<t.length;n++){const o=t[n];if(h.includes(o.Token)&&(0==n||p.includes(t[n-1].Type))&&(o.Descriptor=JSON.parse(JSON.stringify(o.Descriptor)),o.Descriptor.Precedence=1),"Token.Operator"===t[n].Type&&o.Descriptor.Precedence===e){if(1===t.length)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a single operator in a solve layer expression at token index ".concat(n)),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(0!=n||"-"!=o.Token&&"+"!=o.Token){if(0==n&&("+"!=o.Token||"-"!=o.Token))return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the beginning of a solve layer expression at token index ".concat(n)),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(n==t.length-1)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the end of a solve layer expression at token index ".concat(n)),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(n>0&&"-"==o.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))o.VirtualSymbolName="VNLO_".concat(d),d++;else{if(0==n&&"+"==o.Token)continue;if(n>0&&"+"==o.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))continue;if(("Token.Operator"===t[n-1].Type||"Token.Operator"===t[n+1].Type)&&"-"!=t[n+1].Token&&"+"!=t[n+1].Token)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found an operator at token index ".concat(n," that is not surrounded by two values.")),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;o.VirtualSymbolName="V_".concat(d),r.PostfixLayerstackMap[o.SolveLayerStack]=o.VirtualSymbolName,d++}}else o.VirtualSymbolName="VNLO_".concat(d),r.PostfixLayerstackMap[o.SolveLayerStack]=o.VirtualSymbolName,d++}else if("Token.Function"===t[n].Type&&0===e){let e=t[n];e.VirtualSymbolName="VFE_".concat(d),d++,r.PostfixLayerstackMap[e.SolveLayerStack]=e.VirtualSymbolName}}}let u=[];for(let e=0;e<r.PostfixTokenObjects.length;e++){let t=r.PostfixTokenObjects[e];if("Token.Parenthesis"===t.Type)if(t.ParenthesisStack=t.VirtualSymbolName,0==e){t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e="VP_".concat(d),d++),t.VirtualSymbolName=e,u.push(t)}else if("("===t.Token){if("Token.Function"===r.PostfixTokenObjects[e-1].Type){t.IsFunction=!0,t.Function=r.PostfixTokenObjects[e-1];let n=r.PostfixLayerstackMap[t.VirtualSymbolName];n||(n="VFP_".concat(d),d++),t.VirtualSymbolName=n}else{t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e="VP_".concat(d),d++),t.VirtualSymbolName=e}u.push(t)}else if(")"===t.Token){let n=u.pop();if(!n){r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ".concat(e," with no corresponding opening parenthesis."));continue}n.IsFunction?(t.IsFunction=!0,t.VirtualSymbolName=n.Function.VirtualSymbolName):(t.IsFunction=!1,t.VirtualSymbolName=n.VirtualSymbolName)}}for(let e=0;e<c.length;e++){let t=[],n=!1,o=s[c[e]];for(let e=0;e<o.length;e++){let i=o[e];if("Token.Operator"===i.Type&&(n=i),"Token.Function"===i.Type)i.PreviousOperator=n;else if("Token.Parenthesis"===i.Type&&"("===i.Token&&i.IsFunction)t.push(i),i.Function.PreviousOperator&&(i.PreviousOperator=i.Function.PreviousOperator);else if("Token.Parenthesis"===i.Type&&"("===i.Token)i.PreviousOperator=n,t.push(i);else if("Token.Parenthesis"===i.Type&&")"===i.Token){let n=t.pop();if(e<o.length-1)for(let t=e+1;t<o.length;t++)if("Token.Operator"===o[t].Type){n.NextOperator=o[t];break}if(!n){r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ".concat(e," with no corresponding opening parenthesis."));continue}n.PreviousOperator&&n.NextOperator&&(n.PreviousOperator.Descriptor.Precedence<=n.NextOperator.Descriptor.Precedence?n.NextOperator.LeftVirtualSymbolName=n.PreviousOperator.VirtualSymbolName:n.PreviousOperator.RightVirtualSymbolName=n.NextOperator.VirtualSymbolName)}else"SolveLayerStack"in i||(t.length>0?i.SolveLayerStack=t[t.length-1].SolveLayerStack:i.SolveLayerStack="Expression_Root")}}for(let e=0;e<c.length;e++){let t=!1,r=!1,n=s[c[e]];for(let e=n.length-1;e>=0;e--){let o=n[e];"Token.Operator"===o.Type&&(r?o.Descriptor.Precedence>t?(o.RightVirtualSymbolName=r.VirtualSymbolName,r=o):o.Descriptor.Precedence<t&&(r=o):r=o,t=o.Descriptor.Precedence)}let o=[],i=!1;for(let e=n.length-1;e>=0;e--){let r=n[e];if("Token.Operator"===r.Type){if(i)if(r.Descriptor.Precedence>t){if(o.length>0)for(let e=o.length-1;e>=0;e--)if(o[e].Descriptor.Precedence>=r.Descriptor.Precedence){o[e].LeftVirtualSymbolName=r.VirtualSymbolName,o.slice(e,1);break}i=r}else r.Descriptor.Precedence<t&&(o.push(i),i=r);else i=r;t=r.Descriptor.Precedence}}}for(let e=0;e<c.length;e++){let t=s[c[e]];if(1===t.length){let e=this.getTokenContainerObject("=");if(e.VirtualSymbolName=r.PostfixLayerstackMap[t[0].SolveLayerStack],!e.VirtualSymbolName)for(let n=0;n<r.PostfixTokenObjects.length;n++)if(r.PostfixTokenObjects[n].ParenthesisStack===t[0].SolveLayerStack){e.VirtualSymbolName=r.PostfixTokenObjects[n].VirtualSymbolName;break}e.VirtualSymbolName||(e.VirtualSymbolName="V_SingleValue_".concat(d),d++),r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[0],this.getTokenContainerObject("0.0")));continue}for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let n=0;n<t.length;n++)if("Token.Operator"===t[n].Type&&t[n].Descriptor.Precedence===e){let e=t[n];if(0==n&&"-"==e.Token){let o=this.getTokenContainerObject("*");o.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(o,this.getTokenContainerObject("-1.0"),t[n+1]))}else if(n>0&&"-"==e.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token)){let o=this.getTokenContainerObject("*");o.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(o,this.getTokenContainerObject("-1.0"),t[n+1]))}else{if(0==n&&"+"==e.Token)continue;if(n>0&&"+"==e.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))continue;r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[n-1],t[n+1],t,n))}}else if("Token.Function"===t[n].Type&&0===e){let e=t[n];r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[n+1],this.getTokenContainerObject("0.0")))}}let f="PostfixedAssignmentOperator"in r?this.getTokenContainerObject(r.PostfixedAssignmentOperator.Token):this.getTokenContainerObject("=");f.VirtualSymbolName=r.PostfixedAssignmentAddress;let m=this.getTokenContainerObject("Result","Token.LastResult"),g=this.getPosfixSolveListOperation(f,m,this.getTokenContainerObject("SolverMarshal","Token.SolverMarshal"));return r.PostfixSolveList.push(g),r.PostfixSolveList}}},{"./Fable-Service-ExpressionParser-Base.js":77}],84:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js"),o=e("../Fable-SetConcatArray.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Solver"}solvePostfixedExpression(e,t,r,n){let i="object"==typeof r?r:{ExpressionParserLog:[]},a="object"==typeof n?n:this.fable.newManyfest(),s="object"==typeof t?t:{},l="fable"in i;if(l||(i.fable=this.fable),!Array.isArray(e))return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed a non-array postfixed expression."),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1;if(e.length<1)return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed an empty postfixed expression."),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1;i.VirtualSymbols={};for(let t=0;t<e.length;t++){if("Token.SolverInstruction"===e[t].Operation.Type)continue;let r={ExpressionStep:e[t],ExpressionStepIndex:t,ResultsObject:i,Manifest:a};if("Token.LastResult"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=i.LastResult),"Token.LastResult"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=i.LastResult),"Token.VirtualSymbol"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=a.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.LeftValue.Token)),"Token.VirtualSymbol"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=a.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.RightValue.Token)),"Token.Parenthesis"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=a.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.LeftValue.VirtualSymbolName)),"Token.Parenthesis"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=a.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.RightValue.VirtualSymbolName)),"Token.Constant"!==r.ExpressionStep.LeftValue.Type||"Value"in r.ExpressionStep.LeftValue||(r.ExpressionStep.LeftValue.Value=r.ExpressionStep.LeftValue.Token),"Token.Constant"!==r.ExpressionStep.RightValue.Type||"Value"in r.ExpressionStep.RightValue||(r.ExpressionStep.RightValue.Value=r.ExpressionStep.RightValue.Token),r.ExpressionStep.Operation.Type="Operator"){let e,n=!1;if(r.ExpressionStep.Operation.Token in this.ExpressionParser.tokenMap?e="ResultsObject.".concat(r.ExpressionStep.Operation.Descriptor.Function):r.ExpressionStep.Operation.Token.toLowerCase()in this.ExpressionParser.functionMap&&(n=!0,e="ResultsObject.".concat(this.ExpressionParser.functionMap[r.ExpressionStep.Operation.Token.toLowerCase()].Address)),n)try{let t;const n=a.getValueAtAddress(r,e);if("function"==typeof n){let i=null;e.includes(".")&&(i=a.getValueAtAddress(r,e.split(".").slice(0,-1).join(".")));let s=r.ExpressionStep.LeftValue.Value;s=s instanceof o?s.values:[s],t=n.apply(i,s)}a.setValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,t),i.LastResult=a.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ".concat(t," with function ").concat(r.ExpressionStep.Operation.Token,": ").concat(e)),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1],{Stack:e.stack}),!1}else try{a.setValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,a.getValueAtAddress(r,"".concat(e,"(ExpressionStep.LeftValue.Value,ExpressionStep.RightValue.Value)"))),i.LastResult=a.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ".concat(t," with function ").concat(r.ExpressionStep.Operation.Token,": ").concat(e)),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1],{Stack:e.stack}),!1}i.SolverFinalVirtualSymbol=r.ExpressionStep.VirtualSymbolName}}let c=a.getValueAtAddress(i,"VirtualSymbols.".concat(i.SolverFinalVirtualSymbol));for(let t=0;t<e.length;t++)"Token.SolverMarshal"===e[t].RightValue.Type&&(a.setValueAtAddress(i.VirtualSymbols,e[t].VirtualSymbolName,c),e[t].Operation.Descriptor.OnlyEmpty?this.fable.Utility.addressIsNullOrEmpty(s,e[t].VirtualSymbolName)&&a.setValueByHash(s,e[t].VirtualSymbolName,c):a.setValueByHash(s,e[t].VirtualSymbolName,c));return i.RawResult=c,l||delete i.fable,"object"==typeof c?c:void 0!==c?c.toString():c}}},{"../Fable-SetConcatArray.js":101,"./Fable-Service-ExpressionParser-Base.js":77}],85:[function(e,t,r){t.exports={"=":{Name:"Assign Value",Token:"=",Function:"fable.Math.assignValue",Precedence:0,Type:"Assignment"},":":{Name:"Expression Begin",Token:":",Function:"fable.Math.expressionBegin",Precedence:0,Type:"Assignment"},"?=":{Name:"Null or Empty Coalescing Assign Value",Token:"?=",Function:"fable.Math.assignValue",OnlyEmpty:!0,Precedence:0,Type:"Assignment"},"(":{Name:"Left Parenthesis",Token:"(",Precedence:0,Type:"Parenthesis"},")":{Name:"Right Parenthesis",Token:")",Precedence:0,Type:"Parenthesis"},",":{Name:"Set Concatenate",Token:",",Function:"fable.Math.setConcatenate",Precedence:6,Type:"Operator"},"*":{Name:"Multiply",Token:"*",Function:"fable.Math.multiplyPrecise",Precedence:3,Type:"Operator"},"/":{Name:"Divide",Token:"/",Function:"fable.Math.dividePrecise",Precedence:3,Type:"Operator"},"^":{Name:"Exponent",Token:"^",Function:"fable.Math.powerPrecise",Precedence:2,Type:"Operator"},"%":{Name:"Modulus",Token:"%",Function:"fable.Math.modPrecise",Precedence:3,Type:"Operator"},"+":{Name:"Add",Token:"+",Function:"fable.Math.addPrecise",Precedence:4,Type:"Operator"},"-":{Name:"Subtract",Token:"-",Function:"fable.Math.subtractPrecise",Precedence:4,Type:"Operator"},">":{Name:"Greater Than",Token:">",Function:"fable.Math.greaterThanOperator",Precedence:5,Type:"Operator"},">=":{Name:"Greater Than or Equal",Token:">=",Function:"fable.Math.greaterThanOrEqualOperator",Precedence:5,Type:"Operator"},"<":{Name:"Less Than",Token:"<",Function:"fable.Math.lessThanOperator",Precedence:5,Type:"Operator"},"<=":{Name:"Less Than or Equal",Token:"<=",Function:"fable.Math.lessThanOrEqualOperator",Precedence:5,Type:"Operator"},"==":{Name:"Equal",Token:"==",Function:"fable.Math.equalOperator",Precedence:5,Type:"Operator"},"!=":{Name:"Not Equal",Token:"!=",Function:"fable.Math.notEqualOperator",Precedence:5,Type:"Operator"},"?":{Name:"Ternary Condition",Token:"?",Precedence:0,Type:"Ternary"},"::":{Name:"Ternary Separator",Token:"::",Precedence:0,Type:"Ternary"}}},{}],86:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-ValueMarshal"}substituteValuesInTokenizedObjects(e,t,r,n){let o="object"==typeof r?r:{ExpressionParserLog:[]};if(!Array.isArray(e))return o.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects was passed a non-array tokenized object list."),this.log.error(o.ExpressionParserLog[o.ExpressionParserLog.length-1]),e;if("object"!=typeof t)return o.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects either was passed no data source, or was passed a non-object data source."),this.log.error(o.ExpressionParserLog[o.ExpressionParserLog.length-1]),e;let i=t,a="object"==typeof n?n:this.fable.newManyfest(n);for(let t=0;t<e.length;t++){if("object"!=typeof e[t]){o.ExpressionParserLog.push("WARNING: ExpressionParser.substituteValuesInTokenizedObjects found a non-object tokenized object at index ".concat(t)),this.log.warn(o.ExpressionParserLog[o.ExpressionParserLog.length-1]);continue}let r=e[t];if("Token.Symbol"===e[t].Type&&!r.Resolved){let e=a.getValueByHash(i,r.Token);if(null==e){r.Value=e,r.Resolve=!0,o.ExpressionParserLog.push("WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the symbol hash or address ".concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.warn(o.ExpressionParserLog[o.ExpressionParserLog.length-1]);continue}if(o.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [".concat(e,"] for the state address ").concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.info(o.ExpressionParserLog[o.ExpressionParserLog.length-1]),"object"==typeof e)r.Resolved=!0,r.Value=e;else try{const t=new this.fable.Utility.bigNumber(e);r.Resolved=!0,r.Value=t.toString()}catch(n){r.Resolved=!0,r.Value=e,o.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ".concat(r.Token," at index ").concat(t,"; using raw value."))}}if("Token.StateAddress"===e[t].Type&&!r.Resolved){let e=r.Token;e.startsWith("{")&&e.endsWith("}")&&(e=e.substring(1,e.length-1));let n=a.getValueAtAddress(i,e);if(null==n){o.ExpressionParserLog.push("WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the state address ".concat(r.Token," at index ").concat(t));continue}try{let e=new this.fable.Utility.bigNumber(n);r.Resolved=!0,r.Value=e.toString()}catch(e){r.Resolved=!0,r.Value=n,o.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ".concat(r.Token," at index ").concat(t,"; using raw value."))}}if("Token.String"!==e[t].Type||r.Resolved||(o.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [".concat(r.Token,"] for the string ").concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.info(o.ExpressionParserLog[o.ExpressionParserLog.length-1]),r.Resolved=!0,r.Value=r.Token.substring(1,r.Token.length-1)),"Token.Constant"===e[t].Type&&!r.Resolved){o.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [".concat(r.Token,"] for the constant ").concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.info(o.ExpressionParserLog[o.ExpressionParserLog.length-1]);try{let e=new this.fable.Utility.bigNumber(r.Token);r.Resolved=!0,r.Value=e.toString()}catch(e){o.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ".concat(r.Token," at index ").concat(t)),r.Resolved=!1}}}return e}}},{"./Fable-Service-ExpressionParser-Base.js":77}],87:[function(e,t,r){(function(r){(function(){const n=e("fable-serviceproviderbase"),o=e("fs"),i=e("path"),a=e("readline");t.exports=class extends n{constructor(e,t,n){super(e,t,n),this.serviceType="FilePersistence","Mode"in this.options||(this.options.Mode=parseInt("0777",8)&~r.umask()),this.libFS=o,this.libPath=i,this.libReadline=a}joinPath(){return i.resolve(...arguments)}resolvePath(){return i.resolve(...arguments)}existsSync(e){return o.existsSync(e)}exists(e,t){return t(null,this.existsSync(e))}deleteFileSync(e){return o.unlinkSync(e)}deleteFolderSync(e){return o.rmdirSync(e)}readFileSync(e,t){let r=void 0===t?"utf8":t;return o.readFileSync(e,r)}readFile(e,t,r){let n=void 0===t?"utf8":t;return o.readFile(e,n,r)}readFileCSV(e,t,r,n,o){let i=this.fable.instantiateServiceProviderWithoutRegistration("CSVParser",t),a="function"==typeof r?r:e=>{this.fable.log.trace("CSV Reader received line ".concat(e))},s="function"==typeof n?n:()=>{this.fable.log.info("CSV Read of ".concat(e," complete."))},l="function"==typeof o?o:t=>{this.fable.log.error("CSV Read of ".concat(e," Error: ").concat(t),t)};return this.lineReaderFactory(e,e=>{let t=i.parseCSVLine(e);t&&a(t,e)},s,l)}appendFileSync(e,t,r){let n=void 0===r?"utf8":r;return o.appendFileSync(e,t,n)}writeFileSync(e,t,r){let n=void 0===r?"utf8":r;return o.writeFileSync(e,t,n)}writeFileSyncFromObject(e,t){return this.writeFileSync(e,JSON.stringify(t,null,4))}writeFileSyncFromArray(e,t){if(!Array.isArray(t))return this.log.error("File Persistence Service attempted to write ".concat(e," from array but the expected array was not an array (it was a ").concat(typeof t,").")),Error("Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).");for(let r=0;r<t.length;r++)return this.appendFileSync(e,"".concat(t[r],"\n"))}writeFile(e,t,r,n){let i=void 0===r?"utf8":r;return o.writeFile(e,t,i,n)}lineReaderFactory(e,t,r,n){let i={};return"string"==typeof e&&(i.filePath=e,i.fileStream=o.createReadStream(i.filePath),i.reader=a.createInterface({input:i.fileStream,crlfDelay:1/0}),"function"==typeof n&&i.reader.on("error",n),i.reader.on("line","function"==typeof t?t:()=>{}),"function"==typeof r&&i.reader.on("close",r),i)}makeFolderRecursive(e,t){let r=e;if("string"==typeof e)r={Path:e};else if("object"!=typeof e)return t(new Error("Parameters object or string not properly passed to recursive folder create.")),!1;return"string"!=typeof r.Path?(t(new Error("Parameters object needs a path to run the folder create operation.")),!1):("Mode"in r||(r.Mode=this.options.Mode),void 0===r.CurrentPathIndex?(r.ActualPath=i.normalize(r.Path),r.ActualPathParts=r.ActualPath.split(i.sep),r.CurrentPathIndex=0,r.CurrentPath=""):(r.CurrentPath==i.sep?r.CurrentPath=r.CurrentPath+r.ActualPathParts[r.CurrentPathIndex]:r.CurrentPath=r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],r.CurrentPathIndex++),r.CurrentPathIndex>=r.ActualPathParts.length?t(null):void o.open(r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],"r",(e,n)=>{if(n&&o.closeSync(n),!e||"ENOENT"!=e.code)return this.makeFolderRecursive(r,t);o.mkdir(r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],r.Mode,e=>e?"EEXIST"==e.code?this.makeFolderRecursive(r,t):(console.log(e.code),t(e)):this.makeFolderRecursive(r,t))}))}}}).call(this)}).call(this,e("_process"))},{_process:287,"fable-serviceproviderbase":59,fs:19,path:139,readline:19}],88:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}checkIf(e,t,r,n,o){let i=this.fable.Math.parsePrecise(e,null),a=this.fable.Math.parsePrecise(r,null),s=!1;if(null===i||null===a)switch(void 0===o&&(o=""),t){case"<":case"LT":s=e<r;break;case"<=":case"LTE":s=e<=r;break;case">":case"GT":s=e>r;break;case">=":case"GTE":s=e>=r;break;case"==":s=e==r;break;case"===":s=e===r;break;default:this.fable.log.warn("[FableServiceLogic.checkIf] Invalid comparison operator: ".concat(t)),s=e==r}else switch(void 0===o&&(o="0"),t){case"<":case"LT":s=this.fable.Math.ltPrecise(i,a);break;case"<=":case"LTE":s=this.fable.Math.ltePrecise(i,a);break;case">":case"GT":s=this.fable.Math.gtPrecise(i,a);break;case">=":case"GTE":s=this.fable.Math.gtePrecise(i,a);break;case"==":s=0==this.fable.Math.comparePreciseWithin(i,a,"0.000001");break;case"===":s=0==this.fable.Math.comparePrecise(i,a);break;default:this.fable.log.warn("[FableServiceLogic.checkIf] Invalid comparison operator: ".concat(t)),s=e==r?n:o}return s?n:o}when(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?Array.isArray(e)&&e.length<1||"object"==typeof e&&Object.keys(e).length<1?r:t:r}ternary(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?"0"===e||Array.isArray(e)&&e.length<1||"object"==typeof e&&Object.keys(e).length<1?r:t:r}}},{"fable-serviceproviderbase":59}],89:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("./Fable-SetConcatArray.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="Math",this.pi="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679",this.euler="2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664",this.errorReturnValue=NaN,this.bigNumber=this.fable.Utility.bigNumber,this.ln2Cache=new Map}get roundDown(){return this.bigNumber.roundDown}get roundHalfUp(){return this.bigNumber.roundHalfUp}get roundHalfEven(){return this.bigNumber.roundHalfEven}get roundUp(){return this.bigNumber.roundUp}parsePrecise(e,t){let r;try{r=new this.bigNumber(e)}catch(e){r=void 0===t?"0.0":t}return r?r.toString():r}assignValue(e){return e}expressionBegin(e){return e}percentagePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;if(0==n)return"0";let o=new this.bigNumber(r).div(n);return o=o.times(100),o.toString()}setConcatenate(e,t){return new o(e,t)}roundPrecise(e,t,r){let n=!1===e||isNaN(e)?0:e,o=isNaN(t)?0:parseInt(t,10),i=void 0===r?this.roundHalfUp:parseInt(r,10);try{return new this.bigNumber(n).round(o,i).toString()}catch(e){return this.errorReturnValue}}toFixedPrecise(e,t,r){let n=!1===e||isNaN(e)?0:e,o=isNaN(t)?0:parseInt(t,10),i=void 0===r?this.roundHalfUp:r;try{return new this.bigNumber(n).toFixed(o,i).toString()}catch(e){return this.errorReturnValue}}addPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).plus(n).toString()}subtractPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).minus(n).toString()}powerPrecise(e,t){let r,n=isNaN(e)?0:e,o=isNaN(t)?0:parseInt(t);if(o==Number(t)){r=new this.bigNumber(n).pow(o)}else r=Math.pow(n,Number(t));return r.toString()}multiplyPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).times(n).toString()}dividePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).div(n).toString()}modPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).mod(n).toString()}sqrtPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).sqrt().toString()}absPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).abs().toString()}floorPrecise(e){let t=isNaN(e)?0:e;return Math.floor(t).toString()}ceilPrecise(e){let t=isNaN(e)?0:e;return Math.ceil(t).toString()}comparePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).cmp(n)}comparePreciseWithin(e,t,r){let n=isNaN(e)?0:e,o=isNaN(t)?0:t,i=new this.bigNumber(n);return i.minus(o).abs().lte(r)?0:i.lt(o)?-1:1}gtPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).gt(n)}gtePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).gte(n)}ltPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).lt(n)}ltePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).lte(n)}greaterThanOperator(e,t){return this.gtPrecise(e,t)?"1":"0"}greaterThanOrEqualOperator(e,t){return this.gtePrecise(e,t)?"1":"0"}lessThanOperator(e,t){return this.ltPrecise(e,t)?"1":"0"}lessThanOrEqualOperator(e,t){return this.ltePrecise(e,t)?"1":"0"}equalOperator(e,t){return 0==this.comparePrecise(e,t)?"1":"0"}notEqualOperator(e,t){return 0!=this.comparePrecise(e,t)?"1":"0"}radPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).times(Math.PI).div(180).toString()}piPrecise(e){return void 0===e?this.pi:this.roundPrecise(this.pi,e)}eulerPrecise(e){return void 0===e?this.euler:this.roundPrecise(this.euler,e)}sin(e){let t=isNaN(e)?0:e;return Math.sin(t)}cos(e){let t=isNaN(e)?0:e;return Math.cos(t)}tan(e){let t=isNaN(e)?0:e;return Math.tan(t)}countSetElements(e){return Array.isArray(e)?e.length:"object"==typeof e?Object.keys(e).length:e?1:0}sortSetPrecise(e){let t=[];if(Array.isArray(e))for(let r=0;r<e.length;r++)t.push(this.parsePrecise(e[r],NaN));else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)t.push(this.parsePrecise(e[r[n]],NaN))}return t.sort((e,t)=>this.comparePrecise(e,t)),t}bucketSetPrecise(e,t){let r={},n=this.parsePrecise(t,NaN);if(Array.isArray(e))for(let t=0;t<e.length;t++){let o=this.parsePrecise(e[t],NaN).toString();isNaN(n)||(o=this.dividePrecise(e[t],n)),o in r||(r[o]=0),r[o]=r[o]+1}else if("object"==typeof e){let t=Object.keys(e);for(let o=0;o<t.length;o++){let i=this.parsePrecise(e[t[o]],NaN).toString();isNaN(n)||(i=this.dividePrecise(e[o],n)),i in r||(r[i]=0),r[i]=r[i]+1}}return r}histogramPrecise(e){return this.bucketSetPrecise(e)}sortHistogramPrecise(e){let t={},r=Object.keys(e);r.sort((t,r)=>e[t]-e[r]);for(let n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}sortHistogramByKeys(e,t){let r={},n=Object.keys(e),o=void 0!==t&&t;n.sort(),o&&(n=n.reverse());for(let t=0;t<n.length;t++)r[n[t]]=e[n[t]];return r}cleanValueArray(e,t){let r=void 0!==t&&t;if(!Array.isArray(e))return[];let n=[];for(let t=0;t<e.length;t++){let o=this.parsePrecise(e[t],NaN);isNaN(o)||r&&"0"==o||n.push(o)}return n}arbitraryNaturalLogOfTwo(e){const t=0|e,r=new this.bigNumber(t);if(this.ln2Cache.has(t))return this.ln2Cache.get(t);const n=new this.bigNumber(2),o=n.minus(1).div(n.plus(1)),i=o.mul(o);let a=new this.bigNumber(0),s=o,l=1;const c=this.powerPrecise(10,-r.add(8));for(let e=0;e<2e5&&(a=a.plus(s.div(l)),s=s.mul(i),l+=2,!s.abs().div(l).lt(c));e++);const d=a.mul(2);return this.ln2Cache.set(t,d),d}arbitraryNaturalLog(e,t){let r=new this.bigNumber(e),n=new this.bigNumber(t);if(r.lte(0))throw new Error("ln undefined for non-positive values.");if(r.eq(1))return new this.bigNumber(0);const o=new this.bigNumber(2);let i=0,a=r;const s=new this.bigNumber("1.5"),l=new this.bigNumber("0.75");for(;a.gt(s);)a=a.div(o),i+=1;for(;a.lt(l);)a=a.mul(o),i-=1;const c=a.minus(1).div(a.plus(1)),d=c.mul(c);let h=new this.bigNumber(0),p=c,u=1;const f=this.powerPrecise(10,-n.add(6));for(let e=0;e<2e5&&(h=h.plus(p.div(u)),p=p.mul(d),u+=2,!p.abs().div(u).lt(f));e++);const m=h.mul(2),g=this.arbitraryNaturalLogOfTwo(n);return m.plus(g.mul(i))}logPrecise(e,t,r){let n=void 0===t?this.bigNumber(10):this.bigNumber(t);const o=void 0===r?9:r,i=o+8,a=this.bigNumber.DP,s=this.bigNumber.RM;this.bigNumber.DP=i,this.bigNumber.RM=1;const l=this.bigNumber(e),c=this.bigNumber(n);if(l.lte(0))return this.log.error("Fable logPrecise Error: Number must be greater than 0; number was ".concat(e,".")),NaN;if(c.lte(0)||c.eq(1))return this.log.error("Fable logPrecise Error: Base must be greater than 0 and not equal to 1 -- base ".concat(Base," was passed in.")),NaN;const d=this.arbitraryNaturalLog(l,o),h=this.arbitraryNaturalLog(c,o);let p=d.div(h).toFixed(o);return this.bigNumber.DP=a,this.bigNumber.RM=s,p}expPrecise(e,t){let r=isNaN(e)?this.bigNumber(1):this.bigNumber(e);const n=void 0===t?9:parseInt(t,10),o=this.bigNumber.DP;this.bigNumber.DP=n+10;const i=new this.bigNumber("0.693147180559945309417232121458176568"),a=new this.bigNumber("709.782712893384"),s=new this.bigNumber("-744.4400719213812");if(r.gt(a))return this.bigNumber.DP=o,NaN;if(r.lt(s))return this.bigNumber.DP=o,new this.bigNumber(0);let l;try{l=r.div(i).round(0,0)}catch(t){return this.log.error("Fable expPrecise Error: Rounding error during range reduction for value of ".concat(e,". Error: ").concat(t)),this.bigNumber.DP=o,NaN}const c=r.minus(l.times(i)),d=new this.bigNumber(10).pow(-(n+2));let h=new this.bigNumber(1),p=new this.bigNumber(1),u=1;for(;h=h.times(c).div(u),!h.abs().lt(d);)if(p=p.plus(h),u++,u>2e3){this.log.warn("Fable expPrecise warning: Taylor series failed to converge after 2000 iterations for value of ".concat(e,"."));break}const f=new this.bigNumber(2),m=l.abs().toNumber();let g=0===m?new this.bigNumber(1):f.pow(m);const y=l.gte(0)?p.times(g):p.div(g);return this.bigNumber.DP=o,y.round(n).toString()}cleanValueObject(e){if("object"!=typeof e)return{};let t={},r=Object.keys(e);for(let n=0;n<r.length;n++){let o=this.parsePrecise(e[r[n]],NaN);isNaN(o)||(t[r[n]]=o)}return t}histogramDistributionByExactValue(e,t,r){if(!Array.isArray(e))return e;if(!t)return{};let n={};for(let o=0;o<e.length;o++){let i=this.fable.Utility.getValueByHash(e[o],t,r).toString();i in n||(n[i]=0),n[i]=n[i]+1}return n}histogramDistributionByExactValueFromInternalState(e,t){if(!e)return{};let r=this.fable.Utility.getInternalValueByHash(e);return this.histogramDistributionByExactValue(r,t)}histogramAggregationByExactValue(e,t,r,n){if(!Array.isArray(e))return e;if(!t||!r)return{};let o={};for(let i=0;i<e.length;i++){let a=this.fable.Utility.getValueByHash(e[i],t,n);if(void 0===typeof a)continue;let s=this.parsePrecise(this.fable.Utility.getValueByHash(e[i],r,n),NaN);a in o||(o[a]=0),isNaN(s)||(o[a]=this.addPrecise(o[a],s))}return o}histogramAggregationByExactValueFromInternalState(e,t,r){if(!e)return{};let n=this.fable.Utility.getInternalValueByHash(e);return this.histogramAggregationByExactValue(n,t,r)}entryInSet(e,t,r){const n="number"==typeof r?r:parseInt(r);if(!Array.isArray(e))return e;if(!t)return!1;if(isNaN(n)||n>=e.length)return!1;let o=e.toSorted((e,r)=>this.comparePrecise(e[t],r[t]));return o[n<0?o.length+n:n]}smallestInSet(e,t){return this.entryInSet(e,t,0)}largestInSet(e,t){return this.entryInSet(e,t,-1)}cumulativeSummation(e,t,r,n){return this.iterativeSeries(e,t,r,"1.0","add","0.0",!0,n)}subtractingSummation(e,t,r,n,o){let i=!0;return null==n&&(i=!1),this.iterativeSeries(e,t,r,"1.0","subtract",n,i,o)}iterativeSeries(e,t,r,n,o,i,a,s){if(!Array.isArray(e))return e;if(!t||!r)return e;let l,c,d=void 0!==a&&a;n&&""!==n&&(l=this.parsePrecise(n)),isNaN(l)&&(l=this.parsePrecise("1.0")),(i||""!==i)&&(c=this.parsePrecise(i)),(isNaN(c)||null==i)&&(c="");for(let n=0;n<e.length;n++){let i=this.parsePrecise(this.fable.Utility.getValueByHash(e[n],t,s)),a=!1;if(""===c&&i&&!isNaN(c)&&(c=i,a=!0),isNaN(i))this.fable.Utility.setValueByHash(e[n],r,c,s);else{if(i=this.multiplyPrecise(i,l),!a||d)switch(o){case"+":case"add":case"plus":case"addition":c=this.addPrecise(c,i);break;case"-":case"sub":case"minus":case"subtract":c=this.subtractPrecise(c,i);break;case"*":case"mul":case"times":case"multiply":c=this.multiplyPrecise(c,i);break;case"-":case"div":case"over":case"divide":c=this.dividePrecise(c,i)}this.fable.Utility.setValueByHash(e[n],r,c,s)}}return e}maxPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let n=this.parsePrecise(e[r],NaN);this.gtPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)if(t){let o=this.parsePrecise(e[r[n]],NaN);this.gtPrecise(o,t)&&(t=o)}else t=this.parsePrecise(e[r[n]],NaN)}return t}minPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let n=this.parsePrecise(e[r],NaN);!isNaN(n)&&this.ltPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)if(t){let o=this.parsePrecise(e[r[n]],NaN);!isNaN(o)&&this.ltPrecise(o,t)&&(t=o)}else t=this.parsePrecise(e[r[n]],NaN)}return t}sumPrecise(e){let t="0.0";if(Array.isArray(e))for(let r=0;r<e.length;r++){let n=this.parsePrecise(e[r],NaN);isNaN(n)||(t=this.addPrecise(t,n))}else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++){let o=this.parsePrecise(e[r[n]],NaN);isNaN(o)||(t=this.addPrecise(t,o))}}return t}meanPrecise(e){let t=this.sumPrecise(e),r=this.countSetElements(e);return 0==r?"0.0":this.dividePrecise(t,r)}averagePrecise(e){return this.meanPrecise(e)}medianPrecise(e){let t=this.countSetElements(e);if(0==t)return"0.0";let r=this.sortSetPrecise(e),n=Math.floor(t/2);if(t%2==1)return r[n];{let e=r[n-1],t=r[n];return this.dividePrecise(this.addPrecise(e,t),2)}}modePrecise(e){let t=this.bucketSetPrecise(e),r=0,n=Object.keys(t),o=[];for(let e=0;e<n.length;e++)t[n[e]]>r?(r=t[n[e]],o=[n[e]]):t[n[e]]==r&&o.push(n[e]);return o}variancePrecise(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e;Array.isArray(r)||"object"!=typeof r||(r=Object.keys(r).map(e=>r[e]));const n=this.meanPrecise(r),o=r.reduce((e,t)=>{const r=this.subtractPrecise(t,n),o=this.multiplyPrecise(r,r);return this.addPrecise(e,o)},"0.0");return this.dividePrecise(o,t?r.length:r.length-1)}populationVariancePrecise(e){return this.variancePrecise(e,!0)}standardDeviationPrecise(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.sqrtPrecise(this.variancePrecise(e,t))}populationStandardDeviationPrecise(e){return this.standardDeviationPrecise(e,!0)}polynomialRegression(e,t){const r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=[],o=t;for(let t=0;t<e.length;++t){const o=[];for(let n=0;n<=r;n++)o.push(this.powerPrecise(e[t],n));n.push(o)}const i=this.matrixTranspose(n),a=this.matrixMultiply(i,n),s=this.matrixMultiply(i,o.map(e=>[e])),l=this.matrixInverse(a);return this.matrixMultiply(l,s).map(e=>e[0])}leastSquares(e,t){const r=Array.isArray(e)?Array.isArray(e[0])?this.matrixTranspose(e):e.map(e=>[e]):[[e]],n=Array.isArray(t)?t:[t];if(1===r.length)return[n[0],"0.0"];const o=r.map(e=>[1,...e]),i=this.matrixTranspose(o),a=this.matrixMultiply(i,o),s=this.matrixVectorMultiply(i,n);return this.gaussianElimination(a,s)}matrixTranspose(e){return e[0].map((t,r)=>e.map(e=>e[r]))}matrixMultiply(e,t){const r=Array(e.length).fill(0).map(()=>Array(t[0].length).fill(0));for(let n=0;n<e.length;++n)for(let o=0;o<t[0].length;++o)for(let i=0;i<t.length;++i)r[n][o]=this.addPrecise(r[n][o],this.multiplyPrecise(e[n][i],t[i][o]));return r}matrixVectorMultiply(e,t){const r=Array(e.length).fill(0);for(let n=0;n<e.length;++n)for(let o=0;o<e[0].length;++o)r[n]=this.addPrecise(r[n],this.multiplyPrecise(e[n][o],t[o]));return r}matrixInverse(e){const t=e.length,r=e.map((e,t)=>e.map((e,r)=>t===r?1:0)),n=e.map((e,t)=>e.concat(r[t]));for(let e=0;e<t;++e){let r=e;for(let o=e+1;o<t;++o)this.gtPrecise(this.absPrecise(n[o][e]),this.absPrecise(n[r][e]))&&(r=o);[n[e],n[r]]=[n[r],n[e]];const o=n[e][e];for(let r=0;r<2*t;++r)n[e][r]=this.dividePrecise(n[e][r],o);for(let r=0;r<t;++r){if(r===e)continue;const o=n[r][e];for(let i=0;i<2*t;++i)n[r][i]=this.subtractPrecise(n[r][i],this.multiplyPrecise(o,n[e][i]))}}return n.map(e=>e.slice(t))}gaussianElimination(e,t){const r=e.length,n=e.map((e,r)=>[...e,t[r]]);for(let e=0;e<r;++e){let t=e;for(let o=e+1;o<r;++o)this.gtPrecise(this.absPrecise(n[o][e]),this.absPrecise(n[t][e]))&&(t=o);const o=n[e];n[e]=n[t],n[t]=o;const i=n[e][e];if(0==this.comparePrecise(i,0))throw new Error("Matrix not invertible");for(let t=e;t<=r;++t)n[e][t]=this.dividePrecise(n[e][t],i);for(let t=0;t<r;++t){if(t===e)continue;const o=n[t][e];for(let i=e;i<=r;++i)n[t][i]=this.subtractPrecise(n[t][i],this.multiplyPrecise(o,n[e][i]))}}return n.map(e=>e[r])}generateValueFromEasingDescription(e){e.Easing;{let t=e.DomainLength;if(0==this.comparePrecise(t,0))return this.parsePrecise(e.DomainRangeStart);let r=Math.random(),n=this.multiplyPrecise(r,t);return this.addPrecise(e.DomainRangeStart,n)}}predictFromRegressionModel(e,t){let r=t;return Array.isArray(t)||(r=[t]),e.slice(1).reduce((e,t,n)=>this.addPrecise(e,this.multiplyPrecise(t,r[n])),e[0])}cleanPairedValues(){let e,t;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];if(2===n.length&&Array.isArray(n[0])&&Array.isArray(n[1]))e=n[0],t=n[1];else if(1===n.length&&Array.isArray(n[0])){let r=n[0],o=Math.floor(r.length/2);e=r.slice(0,o),t=r.slice(o)}else if(n.length>2){let r=Math.floor(n.length/2);e=n.slice(0,r),t=n.slice(r)}else e=Array.isArray(n[0])?n[0]:[n[0]],t=Array.isArray(n[1])?n[1]:[n[1]];let i=Math.min(e.length,t.length),a=[],s=[];for(let r=0;r<i;r++){let n=this.parsePrecise(t[r],NaN),o=this.parsePrecise(e[r],NaN);isNaN(n)||isNaN(o)||(a.push(n),s.push(o))}return{cleanX:a,cleanY:s,n:a.length}}slopePrecise(){let e=this.cleanPairedValues(...arguments);if(e.n<2)return"0";let t="0",r="0",n="0",o="0";for(let i=0;i<e.n;i++)t=this.addPrecise(t,e.cleanX[i]),r=this.addPrecise(r,e.cleanY[i]),n=this.addPrecise(n,this.multiplyPrecise(e.cleanX[i],e.cleanY[i])),o=this.addPrecise(o,this.multiplyPrecise(e.cleanX[i],e.cleanX[i]));let i=this.subtractPrecise(this.multiplyPrecise(e.n,n),this.multiplyPrecise(t,r)),a=this.subtractPrecise(this.multiplyPrecise(e.n,o),this.multiplyPrecise(t,t));return 0==this.comparePrecise(a,0)?"0":this.dividePrecise(i,a)}interceptPrecise(){let e=this.cleanPairedValues(...arguments),t=this.slopePrecise(e.cleanY,e.cleanX),r=this.meanPrecise(e.cleanY),n=this.meanPrecise(e.cleanX);return this.subtractPrecise(r,this.multiplyPrecise(t,n))}bezierPoint(e,t,r,n,o){let i=this.parsePrecise(o,0),a=this.subtractPrecise(1,i),s=this.multiplyPrecise(this.powerPrecise(a,3),e),l=this.multiplyPrecise(this.multiplyPrecise(this.multiplyPrecise(3,this.powerPrecise(a,2)),i),t),c=this.multiplyPrecise(this.multiplyPrecise(this.multiplyPrecise(3,a),this.powerPrecise(i,2)),r),d=this.multiplyPrecise(this.powerPrecise(i,3),n);return this.addPrecise(this.addPrecise(s,l),this.addPrecise(c,d))}bezierCurveFit(e,t){if(!Array.isArray(e)||!Array.isArray(t))return this.log.warn("bezierCurveFit: pXValues and pYValues must be arrays"),[[0,0],[0,0],[0,0],[0,0]];let r=Math.min(e.length,t.length);if(r<2)return this.log.warn("bezierCurveFit: need at least 2 data points"),[[0,0],[0,0],[0,0],[0,0]];let n=this.parsePrecise(e[0],0),o=this.parsePrecise(t[0],0),i=this.parsePrecise(e[r-1],0),a=this.parsePrecise(t[r-1],0);if(2===r){let e=this.addPrecise(n,this.dividePrecise(this.subtractPrecise(i,n),3)),t=this.addPrecise(o,this.dividePrecise(this.subtractPrecise(a,o),3)),r=this.addPrecise(n,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(i,n),3),2)),s=this.addPrecise(o,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(a,o),3),2));return[[n.toString(),o.toString()],[e.toString(),t.toString()],[r.toString(),s.toString()],[i.toString(),a.toString()]]}let s=[0];for(let n=1;n<r;n++){let r=this.subtractPrecise(e[n],e[n-1]),o=this.subtractPrecise(t[n],t[n-1]),i=this.sqrtPrecise(this.addPrecise(this.multiplyPrecise(r,r),this.multiplyPrecise(o,o)));s.push(this.addPrecise(s[n-1],i))}let l=s[r-1],c=[];for(let e=0;e<r;e++)0==this.comparePrecise(l,0)?c.push(this.dividePrecise(e,r-1)):c.push(this.dividePrecise(s[e],l));let d=0,h=0,p=0,u=0,f=0,m=0,g=0;for(let s=0;s<r;s++){let r=c[s],l=this.subtractPrecise(1,r),y=this.multiplyPrecise(this.multiplyPrecise(3,this.powerPrecise(l,2)),r),b=this.multiplyPrecise(this.multiplyPrecise(3,l),this.powerPrecise(r,2));d=this.addPrecise(d,this.multiplyPrecise(y,y)),h=this.addPrecise(h,this.multiplyPrecise(y,b)),p=this.addPrecise(p,this.multiplyPrecise(b,b));let v=this.powerPrecise(l,3),S=this.powerPrecise(r,3),T=this.subtractPrecise(this.subtractPrecise(e[s],this.multiplyPrecise(v,n)),this.multiplyPrecise(S,i)),w=this.subtractPrecise(this.subtractPrecise(t[s],this.multiplyPrecise(v,o)),this.multiplyPrecise(S,a));u=this.addPrecise(u,this.multiplyPrecise(y,T)),f=this.addPrecise(f,this.multiplyPrecise(b,T)),m=this.addPrecise(m,this.multiplyPrecise(y,w)),g=this.addPrecise(g,this.multiplyPrecise(b,w))}let y,b,v,S,T=this.subtractPrecise(this.multiplyPrecise(d,p),this.multiplyPrecise(h,h));return this.comparePrecise(this.absPrecise(T),"1e-20")<0?(y=this.addPrecise(n,this.dividePrecise(this.subtractPrecise(i,n),3)),b=this.addPrecise(o,this.dividePrecise(this.subtractPrecise(a,o),3)),v=this.addPrecise(n,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(i,n),3),2)),S=this.addPrecise(o,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(a,o),3),2))):(y=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(p,u),this.multiplyPrecise(h,f)),T),b=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(p,m),this.multiplyPrecise(h,g)),T),v=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(d,f),this.multiplyPrecise(h,u)),T),S=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(d,g),this.multiplyPrecise(h,m)),T)),[[n.toString(),o.toString()],[y.toString(),b.toString()],[v.toString(),S.toString()],[i.toString(),a.toString()]]}}},{"./Fable-SetConcatArray.js":101,"fable-serviceproviderbase":59}],90:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js"),i=e("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="MetaTemplate",this.WordTree=new o,this.StringParser=new i(this.fable),this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r,n){return this.WordTree.addPattern(e,t,r,n)}addPatternBoth(e,t,r,n,o){return this.WordTree.addPatternBoth(e,t,r,n,o)}parseString(e,t,r,n,o,i){return this.LogNoisiness>4&&this.fable.log.trace("Metatemplate parsing template string [".concat(e,"] where the callback is a ").concat(typeof r),{TemplateData:t}),this.StringParser.parseString(e,this.ParseTree,t,r,n,o,i)}}},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":91,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":92,"fable-serviceproviderbase":59}],91:[function(e,t,r){t.exports=class{constructor(e){this.fable=e}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r,n,o,i){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan){if(e in t.Pattern.PatternEnd){t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t);let a="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=a?t.Pattern.Parse.call(a,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,o,i):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,o,i),this.resetOutputBuffer(t)}e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t))}else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern)){let e="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=e?t.Pattern.Parse.call(e,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,o,i):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,o,i),this.resetOutputBuffer(t)}}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(e in t.ParseTree)return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}executePatternAsync(e,t,r,n,o,i){if(e.Pattern.isAsync){let a="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return a?e.Pattern.ParseAsync.call(a,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,(t,n)=>(t&&this.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(e.Pattern.PatternStart," ... ").concat(e.Pattern.PatternEnd,": ").concat(t)),e.OutputBuffer=n,this.resetOutputBuffer(e),r()),n,o,i):e.Pattern.ParseAsync(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,(t,n)=>(t&&this.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(e.Pattern.PatternStart," ... ").concat(e.Pattern.PatternEnd,": ").concat(t)),e.OutputBuffer=n,this.resetOutputBuffer(e),r()),n,o,i)}{let a="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return e.OutputBuffer=a?e.Pattern.Parse.call(a,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,n,o,i):e.Pattern.Parse(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,n,o,i),this.resetOutputBuffer(e),r()}}parseCharacterAsync(e,t,r,n,o,i,a){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(e in t.Pattern.PatternEnd){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),"Parse"in t.Pattern)return this.executePatternAsync(t,r,n,o,i,a)}else e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern))return this.executePatternAsync(t,r,n,o,i,a)}else this.resetOutputBuffer(t);else e in t.ParseTree?(this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0):this.appendOutputBuffer(e,t);return n()}parseString(e,t,r,n,o,i,a){let s=Array.isArray(o)?o:[],l=Array.from(s);if(l.push(r),"function"!=typeof n){let n=this.newParserState(t);for(var c=0;c<e.length;c++)this.parseCharacter(e[c],n,r,l,i,a);return this.flushOutputBuffer(n),n.Output}{let o=this.newParserState(t);o.Asynchronous=!0;let s=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");for(let t=0;t<e.length;t++)s.anticipate(n=>{this.parseCharacterAsync(e[t],o,r,n,l,i,a)});s.wait(e=>(this.flushOutputBuffer(o),n(e,o.Output)))}}}},{}],92:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return t in e||(e[t]={}),e[t]}addEndChild(e,t){return"PatternEnd"in e||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPatternBoth(e,t,r,n,o){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let i=this.ParseTree;for(var a=0;a<e.length;a++)i=this.addChild(i,e[a],a);"PatternEnd"in i||(i.PatternEnd={});let s="string"==typeof t?t:e;for(let e=0;e<s.length;e++)i=this.addEndChild(i,s[e],e);return i.PatternStartString=e,i.PatternEndString=s,i.Parse="function"==typeof r?r:"string"==typeof r?(e,t)=>r:(e,t)=>e,i.ParseAsync="function"==typeof n?n:"string"==typeof n?(e,t,r)=>r(null,n):(e,t,r)=>r(null,i.Parse(e,t)),o&&(i.ParserContext=o),i.isAsync=!0,i}addPattern(e,t,r,n){return this.addPatternBoth(e,t,r,null,n)}}},{}],93:[function(e,t,r){t.exports={Metadata:{UUID:!1,Hash:!1,Name:"",Summary:"",Version:0},Status:{Completed:!1,StepCount:1},Steps:[],Errors:[],Log:[]}},{}],94:[function(e,t,r){const{PE:n}=e("big.js"),o=e("fable-serviceproviderbase"),i=JSON.stringify(e("./Fable-Service-Operation-DefaultSettings.js"));t.exports=class extends o{constructor(e,t,r){super(e,t,r),this.timeStamps={},this.serviceType="PhasedOperation",this.state=JSON.parse(i),this.stepMap={},this.stepFunctions={},this.state.Metadata.Hash=this.Hash,this.state.Metadata.UUID=this.UUID,this.state.Metadata.Name="string"==typeof this.options.Name?this.options.Name:"Unnamed Operation ".concat(this.state.Metadata.UUID),this.name=this.state.Metadata.Name,this.progressTrackerSet=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTrackerSet"),this.state.OverallProgressTracker=this.progressTrackerSet.createProgressTracker("Overall-".concat(this.state.Metadata.UUID)),this.log=this}execute(e){if(this.state.OverallProgressTracker.StartTimeStamp>0)return e(new Error("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," has already been executed!")));let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");this.progressTrackerSet.setProgressTrackerTotalOperations(this.state.OverallProgressTracker.Hash,this.state.Status.StepCount),this.progressTrackerSet.startProgressTracker(this.state.OverallProgressTracker.Hash),this.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," starting..."));for(let e=0;e<this.state.Steps.length;e++)t.anticipate(function(t){return this.fable.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"] ").concat(this.state.Steps[e].Name," starting...")),this.progressTrackerSet.startProgressTracker(this.state.Steps[e].ProgressTracker.Hash),t()}.bind(this)),t.anticipate(this.stepFunctions[this.state.Steps[e].GUIDStep].bind({log:this,fable:this.fable,options:this.state.Steps[e].Metadata,metadata:this.state.Steps[e].Metadata,ProgressTracker:this.progressTrackerSet.getProgressTracker(this.state.Steps[e].ProgressTracker.Hash),logProgressTrackerStatus:function(){return this.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"]: ").concat(this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash)))}.bind(this),OperationState:this.state,StepState:this.state.Steps[e]})),t.anticipate(function(t){this.progressTrackerSet.endProgressTracker(this.state.Steps[e].ProgressTracker.Hash);let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash);this.fable.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"] ").concat(this.state.Steps[e].Name," complete.")),this.fable.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"] ").concat(this.state.Steps[e].Name," ").concat(r,".")),this.progressTrackerSet.incrementProgressTracker(this.state.OverallProgressTracker.Hash,1);let n=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.fable.log.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(n,".")),t()}.bind(this));t.wait(t=>{if(t)return this.fable.log.error("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," had an error: ").concat(t),t),e(t);this.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," complete."));let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.progressTrackerSet.endProgressTracker(this.state.OverallProgressTracker.Hash),this.fable.log.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(r,".")),e()})}addStep(e,t,r,n,o){let i={};return i.GUIDStep=void 0!==o?o:"STEP-".concat(this.state.Steps.length,"-").concat(this.fable.DataGeneration.randomNumericString()),i.Name=void 0!==r?r:"Step [".concat(i.GUIDStep,"]"),i.Description=void 0!==n?n:"Step execution of ".concat(i.Name,"."),i.ProgressTracker=this.progressTrackerSet.createProgressTracker(i.GUIDStep),i.Metadata="object"==typeof t?t:{},this.state.Steps.push(i),this.stepMap[i.GUIDStep]=i,this.stepFunctions[i.GUIDStep]="function"==typeof e?e:function(e){return e()},this.state.Status.StepCount++,i}setStepTotalOperations(e,t){if(!(e in this.stepMap))return new Error("Step [".concat(e,"] does not exist in operation [").concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," when attempting to set total operations to ").concat(t,"."));this.progressTrackerSet.setProgressTrackerTotalOperations(this.stepMap[e].ProgressTracker.Hash,t)}writeOperationLog(e,t,r){this.state.Log.push("[".concat((new Date).toUTCString(),"]-[").concat(e,"]: ").concat(t)),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(e,t){this.state.Errors.push("".concat(e)),"object"==typeof t&&this.state.Errors.push(JSON.stringify(t))}trace(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}debug(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}info(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}warn(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}error(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}fatal(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}},{"./Fable-Service-Operation-DefaultSettings.js":93,"big.js":17,"fable-serviceproviderbase":59}],95:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTime",this.timeStamps={}}formatTimeDuration(e){let t="number"==typeof e?e:0;if(e<0)return"unknown";let r="";return t>36e5&&(r+=Math.floor(t/36e5)+"h ",t%=36e5),t>6e4&&(r+=Math.floor(t/6e4)+"m ",t%=6e4),t>1e3&&(r+=Math.floor(t/1e3)+"s ",t%=1e3),r+=Math.round(t)+"ms",r}createTimeStamp(e){let t="string"==typeof e?e:"Default";return this.timeStamps[t]=+new Date,this.timeStamps[t]}getTimeStampValue(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps?this.timeStamps[t]:-1}updateTimeStampValue(e,t){let r="string"==typeof e?e:"Default",n=!1;return n="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&n?(this.timeStamps[r]=n,this.timeStamps[r]):-1}removeTimeStamp(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps&&(delete this.timeStamps[t],!0)}getTimeStampDelta(e,t){let r="string"==typeof e?e:"Default",n=!1;return n="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&n?n-this.timeStamps[r]:-1}getDurationBetweenTimestamps(e,t){let r="string"==typeof e?e:"Default",n="string"==typeof t?t:"Default";return r in this.timeStamps&&n in this.timeStamps?this.timeStamps[n]-this.timeStamps[r]:-1}getTimeStampDeltaMessage(e,t,r){let n="string"==typeof e?e:"Default",o=void 0!==t?t:"Elapsed for ".concat(n,": "),i=this.getTimeStampDelta(n,r);return"".concat(o," ").concat(this.formatTimeDuration(i))}logTimeStampDelta(e,t,r){this.fable.log.info(this.getTimeStampDeltaMessage(e,t,r))}}},{"fable-serviceproviderbase":59}],96:[function(e,t,r){t.exports=class{constructor(e,t){this.progressTrackerSet=e,this.progressTrackerHash=t,this.data=this.progressTrackerSet.getProgressTrackerData(this.progressTrackerHash)}updateProgressTracker(e){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,e)}incrementProgressTracker(e){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,e)}setProgressTrackerTotalOperations(e){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,e)}getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash)}}},{}],97:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("./Fable-Service-ProgressTracker/ProgressTracker.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTrackerSet",this.progressTrackers={},this.progressTimes=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTime"),this.progressTimes.createTimeStamp("CurrentTime")}getProgressTracker(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn("ProgressTracker ".concat(t," does not exist! Creating a new tracker...")),this.createProgressTracker(t,100)),new o(this,e)}getProgressTrackerData(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn("ProgressTracker ".concat(t," does not exist! Creating a new tracker...")),this.createProgressTracker(t,100)),this.progressTrackers[t]}createProgressTracker(e,t){let r="string"==typeof e?e:"Default",n="number"==typeof t?t:100,o={Hash:r,StartTimeHash:"".concat(r,"-Start"),StartTimeStamp:-1,CurrentTimeStamp:-1,EndTimeHash:"".concat(r,"-End"),EndTimeStamp:-1,PercentComplete:-1,AllowTruePercentComplete:!1,ElapsedTime:-1,AverageOperationTime:-1,EstimatedCompletionTime:-1,TotalCount:n,CurrentCount:-1};return r in this.progressTrackers&&(this.fable.log.warn("ProgressTracker ".concat(r," already exists! Overwriting with a new tracker...")),this.progressTimes.removeTimeStamp(o.StartTimeHash),this.progressTimes.removeTimeStamp(o.EndTimeHash)),this.progressTrackers[r]=o,o}setProgressTrackerTotalOperations(e,t){let r="string"==typeof e?e:"Default",n="number"==typeof t?t:100;return r in this.progressTrackers||(this.fable.log.warn("Attempted to set the total operations of ProgressTracker ".concat(r," but it does not exist! Creating a new tracker...")),this.createProgressTracker(r,n)),this.progressTrackers[r].TotalCount=n,this.progressTrackers[r]}startProgressTracker(e){let t="string"==typeof e?e:"Default";t in this.progressTrackers||this.createProgressTracker(t,100);let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].StartTimeHash),r.StartTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].StartTimeHash),r.CurrentCount<0&&(r.CurrentCount=0),this.solveProgressTrackerStatus(t)}endProgressTracker(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error("Attempted to end ProgressTracker ".concat(t," that does not exist!")),!1;let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].EndTimeHash),r.EndTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].EndTimeHash),this.solveProgressTrackerStatus(t)}solveProgressTrackerStatus(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error("Attempted to solve ProgressTracker ".concat(t," that does not exist!")),!1;let r=this.progressTrackers[t];return(r.TotalCount<1||isNaN(r.TotalCount))&&(this.fable.log.error("ProgressTracker ".concat(r.Hash," has an invalid total count of operations (").concat(r.TotalCount,"! Setting it to the default of 100...")),r.TotalCount=100),r.CurrentCount<1?r.PercentComplete=0:r.PercentComplete=r.CurrentCount/r.TotalCount*100,!r.AllowTruePercentComplete&&r.PercentComplete>100&&(r.PercentComplete=100),this.progressTimes.updateTimeStampValue("CurrentTime"),r.CurrentTimeStamp=this.progressTimes.getTimeStampValue("CurrentTime"),r.ElapsedTime=r.CurrentTimeStamp-r.StartTimeStamp,r.EndTimeStamp>0&&(r.ElapsedTime=r.EndTimeStamp-r.StartTimeStamp),r.CurrentCount>0?r.AverageOperationTime=(r.CurrentTimeStamp-r.StartTimeStamp)/r.CurrentCount:r.AverageOperationTime=-1,r.AverageOperationTime>0?r.EstimatedCompletionTime=Math.max(r.TotalCount-r.CurrentCount,0)*r.AverageOperationTime:r.EstimatedCompletionTime=-1,r}updateProgressTracker(e,t){let r="string"==typeof e?e:"Default",n=parseInt(t);return isNaN(n)?(this.fable.log.warn("Attempted to update ProgressTracker ".concat(r," with an invalid number of operations!")),!1):(r in this.progressTrackers||this.createProgressTracker(100,r),this.progressTrackers[r].CurrentCount=n,this.solveProgressTrackerStatus(r))}incrementProgressTracker(e,t){let r="string"==typeof e?e:"Default",n=parseInt(t);return isNaN(n)&&(n=1),r in this.progressTrackers?(this.progressTrackers[r].StartTimeStamp<1&&(this.fable.log.warn("Attempted to increment ProgressTracker ".concat(r," but it was not started.. starting now.")),this.startProgressTracker(r)),this.progressTrackers[r].CurrentCount=this.progressTrackers[r].CurrentCount+n,this.solveProgressTrackerStatus(r)):(this.fable.log.warn("Attempted to increment ProgressTracker ".concat(r," but it did not exist.")),!1)}getProgressTrackerCompletedOperationCountString(e){let t="string"==typeof e?e:"Default";const r=this.progressTrackers[t];return r.CurrentCount<0?"none":r.CurrentCount<1?"0":"".concat(r.CurrentCount)}getProgressTrackerPercentCompleteString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1||e.CurrentCount<1?"0%":(e.EndTimeStamp,"".concat(e.PercentComplete.toFixed(3),"%"))}return"ProgressTracker ".concat(t," does not exist! No stats to display.")}getProgressTrackerStatusString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1?"ProgressTracker ".concat(e.Hash," has not been started yet."):e.CurrentCount<1&&e.EndTimeStamp<1?"ProgressTracker ".concat(e.Hash," has no completed operations. ").concat(this.progressTimes.formatTimeDuration(e.ElapsedTime)," have elapsed since it was started."):e.EndTimeStamp<1?"ProgressTracker ".concat(e.Hash," is ").concat(e.PercentComplete.toFixed(3),"% completed - ").concat(e.CurrentCount," / ").concat(e.TotalCount," operations over ").concat(this.progressTimes.formatTimeDuration(e.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(e.AverageOperationTime)," per). Estimated completion: ").concat(this.progressTimes.formatTimeDuration(e.EstimatedCompletionTime)):"ProgressTracker ".concat(e.Hash," is done. ").concat(e.CurrentCount," / ").concat(e.TotalCount," operations were completed in ").concat(this.progressTimes.formatTimeDuration(e.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(e.AverageOperationTime)," per).")}return"ProgressTracker ".concat(t," does not exist! No stats to display.")}logProgressTrackerStatus(e){this.fable.log.info(this.getProgressTrackerStatusString(e))}}},{"./Fable-Service-ProgressTracker/ProgressTracker.js":96,"fable-serviceproviderbase":59}],98:[function(e,t,r){(function(r){(function(){const n=e("fable-serviceproviderbase"),o=e("simple-get"),i=e("cookie"),a=e("http"),s=e("https");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.TraceLog=!1,(this.options.TraceLog||this.fable.TraceLog)&&(this.TraceLog=!0),this.dataFormat=this.fable.services.DataFormat,this.serviceType="RestClient",this.cookie=!1,this.prepareRequestOptions=e=>e,"number"==typeof this.options.RequestTimeout?this.defaultRequestTimeout=this.options.RequestTimeout:"number"==typeof this.fable.settings.RestClientRequestTimeout?this.defaultRequestTimeout=this.fable.settings.RestClientRequestTimeout:this.defaultRequestTimeout=6e4;let n=Boolean(this.options.KeepAlive||this.fable.settings.RestClientKeepAlive),o=Object.assign({},this.options.KeepAliveAgentOptions);n&&(o.keepAlive=!0),this._installHttpAgents(o)}initializeKeepAliveAgent(e){let t=Object.assign({keepAlive:!0},e);this._installHttpAgents(t)}_installHttpAgents(e){this.httpAgent=new a.Agent(e),this.httpsAgent=new s.Agent(e);let t=this.prepareRequestOptions;this.prepareRequestOptions=e=>("string"==typeof e.url&&e.url.startsWith("https:")?e.agent=this.httpsAgent:e.agent=this.httpAgent,t(e))}get simpleGet(){return o}prepareCookies(e){if(this.cookie){let t=this.cookie;"headers"in e||(e.headers={});let r=Object.keys(t);r.length>0&&(e.headers.cookie=i.serialize(r[0],t[r[0]]))}return e}preRequest(e){let t=this.prepareCookies(e);return"RestClientURLPrefix"in this.fable.settings&&(t.url=this.fable.settings.RestClientURLPrefix+t.url),"number"!=typeof t.timeout&&(t.timeout=this.defaultRequestTimeout),this.prepareRequestOptions(t)}_parseHostname(e){if("string"!=typeof e)return null;try{return new URL(e).hostname||null}catch(e){return null}}_resolveRedirectURL(e,t){if("string"!=typeof t||0===t.length)return t;try{return new URL(t,e).toString()}catch(e){return t}}_buildRedirectedOptions(e,t,r,n){const o=Object.assign({},e);o.url=this._resolveRedirectURL(r,t.headers.location),delete o.protocol,delete o.hostname,delete o.port,delete o.path,delete o.auth,delete o.followRedirects,o.headers&&(o.headers=Object.assign({},o.headers),delete o.headers.host);const i=this._parseHostname(o.url);return null!==i&&i!==n&&o.headers&&(delete o.headers.cookie,delete o.headers.authorization),"POST"!==o.method||301!==t.statusCode&&302!==t.statusCode||(o.method="GET",o.headers&&(delete o.headers["content-length"],delete o.headers["content-type"]),delete o.body,delete o.form),o}_executeWithRedirects(e,t){if(!1===e.followRedirects)return o(e,t);e.followRedirects=!1;const r=e.url,n=this._parseHostname(r);return o(e,(o,i)=>{if(o)return t(o,i);if(i.statusCode<300||i.statusCode>=400||!i.headers.location)return t(null,i);i.resume();let a="number"==typeof e.maxRedirects?e.maxRedirects:10;if(a<=0)return t(new Error("too many redirects"));const s=this._buildRedirectedOptions(e,i,r,n);s.maxRedirects=a-1;const l=this.prepareRequestOptions(s);return this.TraceLog&&this.fable.log.debug("--\x3e redirect ".concat(i.statusCode," to ").concat(l.url)),this._executeWithRedirects(l,t)})}executeChunkedRequest(e,t){let r=this.preRequest(e);return r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(r.method," request to ").concat(r.url," at ").concat(r.RequestStartTime)),this._executeWithRedirects(r,(e,n)=>{if(e)return t(e,n);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(r.method," connected in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms code ").concat(n.statusCode))}let o="";n.on("data",e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(r.method," data chunk size ").concat(e.length,"b received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,t),"ms"))}o+=e}),n.on("end",()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("==> ".concat(r.method," completed data size ").concat(o.length,"b received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms"))}return t(e,n,o)})})}executeChunkedRequestBinary(e,t){let n=this.preRequest(e);return n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(n.method," request to ").concat(n.url," at ").concat(n.RequestStartTime)),n.json=!1,n.encoding=null,this._executeWithRedirects(n,(e,o)=>{if(e)return t(e,o);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(n.method," connected in ").concat(this.dataFormat.formatTimeDelta(n.RequestStartTime,e),"ms code ").concat(o.statusCode))}let i=!1;o.on("data",e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(n.method," data chunk size ").concat(e.length,"b received in ").concat(this.dataFormat.formatTimeDelta(n.RequestStartTime,t),"ms"))}i=i?r.concat([i,e]):r.from(e)}),o.on("end",()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("==> ".concat(n.method," completed data size ").concat(i.length,"b received in ").concat(this.dataFormat.formatTimeDelta(n.RequestStartTime,e),"ms"))}return t(e,o,i)})})}executeJSONRequest(e,t){e.json=!0;let r=this.preRequest(e);return"headers"in r||(r.headers={}),r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(r.method," JSON request to ").concat(r.url," at ").concat(r.RequestStartTime)),this._executeWithRedirects(r,(e,n)=>{if(e)return t(e,n);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e JSON ".concat(r.method," connected in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms code ").concat(n.statusCode))}let o="";n.on("data",e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e JSON ".concat(r.method," data chunk size ").concat(e.length,"b received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,t),"ms"))}o+=e}),n.on("end",()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("==> JSON ".concat(r.method," completed - received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms"))}let i;try{i=JSON.parse(o)}catch(e){let r=n?n.statusCode:"unknown";return t(new Error("JSON parse failed (HTTP ".concat(r,"): ").concat(o.substring(0,200))),n,null)}return t(e,n,i)})})}getJSON(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeJSONRequest(r,t)}putJSON(e,t){return"object"!=typeof e.body?t(new Error("PUT JSON Error Invalid options object")):(e.method="PUT",this.executeJSONRequest(e,t))}postJSON(e,t){return"object"!=typeof e.body?t(new Error("POST JSON Error Invalid options object")):(e.method="POST",this.executeJSONRequest(e,t))}patchJSON(e,t){return"object"!=typeof e.body?t(new Error("PATCH JSON Error Invalid options object")):(e.method="PATCH",this.executeJSONRequest(e,t))}headJSON(e,t){return"object"!=typeof e.body?t(new Error("HEAD JSON Error Invalid options object")):(e.method="HEAD",this.executeJSONRequest(e,t))}delJSON(e,t){return e.method="DELETE",this.executeJSONRequest(e,t)}executeBinaryUpload(e,t,n){let o=e.body;if("undefined"!=typeof Blob&&o instanceof Blob){let i=this;return void o.arrayBuffer().then(o=>{e.body=r.from(o),i._executeBinaryUploadInternal(e,t,n)}).catch(e=>t(e))}return this._executeBinaryUploadInternal(e,t,n)}_executeBinaryUploadInternal(e,t,r){let n=this.preRequest(e);return n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(n.method," binary upload to ").concat(n.url," at ").concat(n.RequestStartTime)),n.json=!1,this._executeWithRedirects(n,(e,o)=>{if(e)return t(e,o);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e Binary upload ".concat(n.method," connected in ").concat(this.dataFormat.formatTimeDelta(n.RequestStartTime,e),"ms code ").concat(o.statusCode))}let i="";o.on("data",e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e Binary upload ".concat(n.method," response chunk size ").concat(e.length,"b received in ").concat(this.dataFormat.formatTimeDelta(n.RequestStartTime,t),"ms"))}i+=e}),o.on("end",()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("==> Binary upload ".concat(n.method," completed in ").concat(this.dataFormat.formatTimeDelta(n.RequestStartTime,e),"ms"))}return"function"==typeof r&&r(1),t(e,o,i)})})}getRawText(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeChunkedRequest(r,t)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,cookie:31,"fable-serviceproviderbase":59,http:304,https:113,"simple-get":303}],99:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="Template",this.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},this.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},this.renderFunction=!1,this.templateString=!1}renderTemplate(e){return this.renderFunction(e)}templateFunction(){return this.renderTemplate.bind(this)}buildTemplateFunction(e,t){return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,e=>"\\".concat(this.templateEscapes[e])).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,(e,t)=>"'+\n(".concat(decodeURIComponent(t),")+\n'")).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,(e,t)=>"';\n".concat(decodeURIComponent(t),"\n;__p+='"))+"';\n",this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n"),this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n"),this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}},{"fable-serviceproviderbase":59}],100:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("async.waterfall"),i=e("async.eachlimit"),a=e("big.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.templates={},this.waterfall=o,this.eachLimit=i,this.bigNumber=a}extend(e){for(let t=0;t<(arguments.length<=1?0:arguments.length-1);t++){let r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if("object"==typeof r){let t=Object.keys(r);for(let n=0;n<t.length;n++)e[t[n]]=r[t[n]]}}return e}template(e,t){return this.fable.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}buildHashedTemplate(e,t,r){let n=this.fable.instantiateServiceProvider("Template",{},e);return this.templates[e]=n.buildTemplateFunction(t,r),this.templates[e]}chunk(e,t,r){let n=[...e],o="number"==typeof t?t:0,i=void 0!==r?r:[];if(o<=0)return i;for(;n.length;)i.push(n.splice(0,o));return i}getInternalValueByHash(e){return this.getValueByHash(this.fable,e)}setInternalValueByHash(e,t){return this.setValueByHash(this.fable,e,t)}getValueByHash(e,t,r){let n=r;return void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),n.getValueByHash(e,t)}setValueByHash(e,t,r,n){let o=n;return void 0===o&&(this.manifest||(this.manifest=this.fable.newManyfest()),o=this.manifest),o.setValueByHash(e,t,r)}createValueArrayByHashes(e,t,r){let n=r;if(void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),!Array.isArray(t))return[];let o=[];for(let r=0;r<t.length;r++)o.push(n.getValueByHash(e,t[r]));return o}slice(e,t,r){if(!Array.isArray(e))return this.fable.log.error("Fable.Math.slice called with non-array value",{pValueArray:e}),[];const n=Number(this.fable.Math.parsePrecise(t,"0")),o=Number(this.fable.Math.parsePrecise(r,e.length.toString()));return e.slice(n,o)}createValueArrayByHashesFromInternal(e,t){return this.createValueArrayByHashes(this.fable,e,t)}createValueArrayByHashParametersFromInternal(){if(arguments.length<2)return[];let e=Array.prototype.slice.call(arguments);return this.createValueArrayByHashes(this.fable,e)}createValueObjectByHashes(e,t,r){let n=r;if(void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),!Array.isArray(t))return{};let o={};for(let r=0;r<t.length;r++)o[t[r]]=n.getValueByHash(e,t[r]);return o}createValueObjectByHashesFromInternal(e,t){return this.createValueObjectByHashes(this.fable,e,t)}createValueObjectByHashParametersFromInternal(){let e=Array.prototype.slice.call(arguments);return this.createValueObjectByHashes(this.fable,e)}addressIsNullOrEmpty(e,t){if(this.manifest||(this.manifest=this.fable.newManyfest()),!this.manifest.checkAddressExists(e,t))return!0;let r=this.manifest.getValueByHash(e,t);return null===r||""===r}objectKeysToArray(e){return Object.keys(e)}objectValuesToArray(e){if("object"!=typeof e||null===e)return[];let t=Object.keys(e),r=[];for(let n=0;n<t.length;n++)r.push(e[t[n]]);return r}objectValuesSortByExternalArray(e,t,r,n){let o="boolean"==typeof r?r:"number"==typeof r&&1==r||"string"==typeof r&&"1"==r,i=this.fable.newManyfest(),a=n;"string"!=typeof a&&(a="label");let s=[];for(let r=0;r<e.length;r++)s.push({Value:e[r],SortValue:i.getValueByHash(t[r],a),SortObject:t[r]});return s.sort((e,t)=>e.SortValue<t.SortValue?o?1:-1:e.SortValue>t.SortValue?o?-1:1:0).map(e=>e.Value)}isoStringToDate(e){"Dates"in this.fable||this.fable.instantiateServiceProvider("Dates");let t=!1;try{t=this.fable.Dates.dayJS.utc(e)}catch(t){return this.fable.log.error("Could not parse date string ".concat(e," with dayJS.")),!1}return!!t&&t.toDate()}findFirstValueByStringIncludes(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let o=0;o<e.length;o++){let i=this.manifest.getValueByHash(e[o],t);if(i&&i.includes(r))return this.manifest.getValueByHash(e[o],n)}}findFirstValueByStringIncludesInternal(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let o=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByStringIncludes(o,t,r,n)}findFirstValueByExactMatch(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let o=0;o<e.length;o++){let i=this.manifest.getValueByHash(e[o],t);if(i&&i==r)return this.manifest.getValueByHash(e[o],n)}}findFirstValueByExactMatchInternal(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let o=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByExactMatch(o,t,r,n)}findIndexInternal(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"1",n=t;if("string"==typeof t&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest.getValueByHash(this.fable,t)),!Array.isArray(n))return this.fable.log.error("findIndexInternal called with non-array search array."),-1;const o=null!==this.fable.Math.parsePrecise(e,null);let i;i=0===Number(r)?o?t=>0===this.fable.Math.comparePrecise(t,e):t=>t===e:-1===Number(r)?o?t=>this.fable.Math.ltePrecise(t,e):t=>t<=e:o?t=>this.fable.Math.gtePrecise(t,e):t=>t>=e;for(let e=0;e<n.length;e++)if(i(n[e]))return e;return-1}flattenArrayOfSolverInputs(e){if(!Array.isArray(e)&&("object"==typeof e&&(e=Object.values(e)),!e))return[];return e.flatMap(e=>Array.isArray(e)?e:"object"==typeof e?Object.values(e):[e])}generateArrayOfObjectsFromSets(){let e=[];if(arguments.length%2!=0)return e;let t=[],r=[];for(let e=0;e<arguments.length;e+=2)t.push(arguments[e]),r.push(this.objectValuesToArray(arguments[e+1]));for(let n=0;n<r.length;n++){let o=r[n],i=t[n];if(Array.isArray(o))for(let t=0;t<o.length;t++){e.length<=t&&e.push({});let r=e[t];r&&(r[i]=o[t])}}return e}createArrayFromAbsoluteValues(){let e=[];for(let t=0;t<arguments.length;t++)e.push(arguments[t]);return e}concatenateArrays(){let e=[];for(let t=0;t<arguments.length;++t){let r=arguments[t];Array.isArray(r)?e=e.concat(r):this.fable.log.error("Fable.Service.Utility.concatenateArrays called with non-array argument",{index:t,value:r})}return e}}},{"async.eachlimit":1,"async.waterfall":15,"big.js":17,"fable-serviceproviderbase":59}],101:[function(e,t,r){class n{constructor(e,t){this.values=e instanceof n?e.values.concat([t]):t instanceof n?[e].concat(t.values):[e,t]}}t.exports=n},{}],102:[function(e,t,r){var n=Object.prototype.toString,o=Math.max,i=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};t.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==n.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),s=o(0,t.length-a.length),l=[],c=0;c<s;c++)l[c]="$"+c;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var n=t.apply(this,i(a,arguments));return Object(n)===n?n:this}return t.apply(e,i(a,arguments))}),t.prototype){var d=function(){};d.prototype=t.prototype,r.prototype=new d,d.prototype=null}return r}},{}],103:[function(e,t,r){var n=e("./implementation");t.exports=Function.prototype.bind||n},{"./implementation":102}],104:[function(e,t,r){var n,o=e("es-object-atoms"),i=e("es-errors"),a=e("es-errors/eval"),s=e("es-errors/range"),l=e("es-errors/ref"),c=e("es-errors/syntax"),d=e("es-errors/type"),h=e("es-errors/uri"),p=e("math-intrinsics/abs"),u=e("math-intrinsics/floor"),f=e("math-intrinsics/max"),m=e("math-intrinsics/min"),g=e("math-intrinsics/pow"),y=e("math-intrinsics/round"),b=e("math-intrinsics/sign"),v=Function,S=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},T=e("gopd"),w=e("es-define-property"),x=function(){throw new d},P=T?function(){try{return x}catch(e){try{return T(arguments,"callee").get}catch(e){return x}}}():x,A=e("has-symbols")(),C=e("get-proto"),D=e("get-proto/Object.getPrototypeOf"),k=e("get-proto/Reflect.getPrototypeOf"),E=e("call-bind-apply-helpers/functionApply"),F=e("call-bind-apply-helpers/functionCall"),M={},L="undefined"!=typeof Uint8Array&&C?C(Uint8Array):n,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&C?C([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":M,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&C?C(C([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&C?C((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":T,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&C?C((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&C?C(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":P,"%TypedArray%":L,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":h,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":E,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":D,"%Math.abs%":p,"%Math.floor%":u,"%Math.max%":f,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":b,"%Reflect.getPrototypeOf%":k};if(C)try{null.error}catch(e){var _=C(C(e));R["%Error.prototype%"]=_}var B=function e(t){var r;if("%AsyncFunction%"===t)r=S("async function () {}");else if("%GeneratorFunction%"===t)r=S("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=S("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&C&&(r=C(o.prototype))}return R[t]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},I=e("function-bind"),j=e("hasown"),O=I.call(F,Array.prototype.concat),V=I.call(E,Array.prototype.splice),H=I.call(F,String.prototype.replace),U=I.call(F,String.prototype.slice),z=I.call(F,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J=/\\(\\)?/g,q=function(e,t){var r,n=e;if(j(N,n)&&(n="%"+(r=N[n])[0]+"%"),j(R,n)){var o=R[n];if(o===M&&(o=B(n)),void 0===o&&!t)throw new d("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new d('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return H(e,W,function(e,t,r,o){n[n.length]=r?H(o,J,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=q("%"+n+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],V(r,O([0,1],l)));for(var h=1,p=!0;h<r.length;h+=1){var u=r[h],f=U(u,0,1),m=U(u,-1);if(('"'===f||"'"===f||"`"===f||'"'===m||"'"===m||"`"===m)&&f!==m)throw new c("property names with quotes must have matching quotes");if("constructor"!==u&&p||(s=!0),j(R,i="%"+(n+="."+u)+"%"))a=R[i];else if(null!=a){if(!(u in a)){if(!t)throw new d("base intrinsic for "+e+" exists, but the property is not available.");return}if(T&&h+1>=r.length){var g=T(a,u);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[u]}else p=j(a,u),a=a[u];p&&!s&&(R[i]=a)}}return a}},{"call-bind-apply-helpers/functionApply":26,"call-bind-apply-helpers/functionCall":27,"es-define-property":41,"es-errors":43,"es-errors/eval":42,"es-errors/range":44,"es-errors/ref":45,"es-errors/syntax":46,"es-errors/type":47,"es-errors/uri":48,"es-object-atoms":49,"function-bind":103,"get-proto":107,"get-proto/Object.getPrototypeOf":105,"get-proto/Reflect.getPrototypeOf":106,gopd:109,"has-symbols":110,hasown:112,"math-intrinsics/abs":129,"math-intrinsics/floor":130,"math-intrinsics/max":132,"math-intrinsics/min":133,"math-intrinsics/pow":134,"math-intrinsics/round":135,"math-intrinsics/sign":136}],105:[function(e,t,r){var n=e("es-object-atoms");t.exports=n.getPrototypeOf||null},{"es-object-atoms":49}],106:[function(e,t,r){t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},{}],107:[function(e,t,r){var n=e("./Reflect.getPrototypeOf"),o=e("./Object.getPrototypeOf"),i=e("dunder-proto/get");t.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},{"./Object.getPrototypeOf":105,"./Reflect.getPrototypeOf":106,"dunder-proto/get":40}],108:[function(e,t,r){t.exports=Object.getOwnPropertyDescriptor},{}],109:[function(e,t,r){var n=e("./gOPD");if(n)try{n([],"length")}catch(e){n=null}t.exports=n},{"./gOPD":108}],110:[function(e,t,r){var n="undefined"!=typeof Symbol&&Symbol,o=e("./shams");t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},{"./shams":111}],111:[function(e,t,r){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},{}],112:[function(e,t,r){var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=e("function-bind");t.exports=i.call(n,o)},{"function-bind":103}],113:[function(e,t,r){var n=e("http"),o=e("url"),i=t.exports;for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);function s(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=s(e),n.request.call(this,e,t)},i.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},{http:304,url:325}],114:[function(e,t,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */r.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<<s)-1,c=l>>1,d=-7,h=r?o-1:0,p=r?-1:1,u=e[t+h];for(h+=p,i=u&(1<<-d)-1,u>>=-d,d+=s;d>0;i=256*i+e[t+h],h+=p,d-=8);for(a=i&(1<<-d)-1,i>>=-d,d+=n;d>0;a=256*a+e[t+h],h+=p,d-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(u?-1:1);a+=Math.pow(2,n),i-=c}return(u?-1:1)*a*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var a,s,l,c=8*i-o-1,d=(1<<c)-1,h=d>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,u=n?0:i-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=d?(s=0,a=d):a+h>=1?(s=(t*l-1)*Math.pow(2,o),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;e[r+u]=255&s,u+=f,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+u]=255&a,u+=f,a/=256,c-=8);e[r+u-f]|=128*m}},{}],115:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],116:[function(e,t,r){!function(){var e,n,o,i,a,s,l,c,d,h,p,u,f,m,g,y,b,v,S,T,w,x,P,A,C,D,k,E,F,M,L,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.9",
2
2
  /*!
3
3
  * lunr.utils
4
4
  * Copyright (C) 2020 Oliver Nightingale
5
5
  */
6
- M.utils={},M.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),M.utils.asString=function(t){return null==t?"":t.toString()},M.utils.clone=function(t){if(null==t)return t;for(var e=Object.create(null),o=Object.keys(t),n=0;n<o.length;n++){var r=o[n],i=t[r];if(Array.isArray(i))e[r]=i.slice();else{if("string"!=typeof i&&"number"!=typeof i&&"boolean"!=typeof i)throw new TypeError("clone is not deep and does not support nested objects");e[r]=i}}return e},M.FieldRef=function(t,e,o){this.docRef=t,this.fieldName=e,this._stringValue=o},M.FieldRef.joiner="/",M.FieldRef.fromString=function(t){var e=t.indexOf(M.FieldRef.joiner);if(-1===e)throw"malformed field ref string";var o=t.slice(0,e),n=t.slice(e+1);return new M.FieldRef(n,o,t)},M.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+M.FieldRef.joiner+this.docRef),this._stringValue},
6
+ R.utils={},R.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n<r.length;n++){var o=r[n],i=e[o];if(Array.isArray(i))t[o]=i.slice();else{if("string"!=typeof i&&"number"!=typeof i&&"boolean"!=typeof i)throw new TypeError("clone is not deep and does not support nested objects");t[o]=i}}return t},R.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},R.FieldRef.joiner="/",R.FieldRef.fromString=function(e){var t=e.indexOf(R.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var r=e.slice(0,t),n=e.slice(t+1);return new R.FieldRef(n,r,e)},R.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+R.FieldRef.joiner+this.docRef),this._stringValue},
7
7
  /*!
8
8
  * lunr.Set
9
9
  * Copyright (C) 2020 Oliver Nightingale
10
10
  */
11
- M.Set=function(t){if(this.elements=Object.create(null),t){this.length=t.length;for(var e=0;e<this.length;e++)this.elements[t[e]]=!0}else this.length=0},M.Set.complete={intersect:function(t){return t},union:function(){return this},contains:function(){return!0}},M.Set.empty={intersect:function(){return this},union:function(t){return t},contains:function(){return!1}},M.Set.prototype.contains=function(t){return!!this.elements[t]},M.Set.prototype.intersect=function(t){var e,o,n,r=[];if(t===M.Set.complete)return this;if(t===M.Set.empty)return t;this.length<t.length?(e=this,o=t):(e=t,o=this),n=Object.keys(e.elements);for(var i=0;i<n.length;i++){var a=n[i];a in o.elements&&r.push(a)}return new M.Set(r)},M.Set.prototype.union=function(t){return t===M.Set.complete?M.Set.complete:t===M.Set.empty?this:new M.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},M.idf=function(t,e){var o=0;for(var n in t)"_index"!=n&&(o+=Object.keys(t[n]).length);var r=(e-o+.5)/(o+.5);return Math.log(1+Math.abs(r))},M.Token=function(t,e){this.str=t||"",this.metadata=e||{}},M.Token.prototype.toString=function(){return this.str},M.Token.prototype.update=function(t){return this.str=t(this.str,this.metadata),this},M.Token.prototype.clone=function(t){return t=t||function(t){return t},new M.Token(t(this.str,this.metadata),this.metadata)},
11
+ R.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},R.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},R.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},R.Set.prototype.contains=function(e){return!!this.elements[e]},R.Set.prototype.intersect=function(e){var t,r,n,o=[];if(e===R.Set.complete)return this;if(e===R.Set.empty)return e;this.length<e.length?(t=this,r=e):(t=e,r=this),n=Object.keys(t.elements);for(var i=0;i<n.length;i++){var a=n[i];a in r.elements&&o.push(a)}return new R.Set(o)},R.Set.prototype.union=function(e){return e===R.Set.complete?R.Set.complete:e===R.Set.empty?this:new R.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},R.idf=function(e,t){var r=0;for(var n in e)"_index"!=n&&(r+=Object.keys(e[n]).length);var o=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(o))},R.Token=function(e,t){this.str=e||"",this.metadata=t||{}},R.Token.prototype.toString=function(){return this.str},R.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},R.Token.prototype.clone=function(e){return e=e||function(e){return e},new R.Token(e(this.str,this.metadata),this.metadata)},
12
12
  /*!
13
13
  * lunr.tokenizer
14
14
  * Copyright (C) 2020 Oliver Nightingale
15
15
  */
16
- M.tokenizer=function(t,e){if(null==t||null==t)return[];if(Array.isArray(t))return t.map(function(t){return new M.Token(M.utils.asString(t).toLowerCase(),M.utils.clone(e))});for(var o=t.toString().toLowerCase(),n=o.length,r=[],i=0,a=0;i<=n;i++){var s=i-a;if(o.charAt(i).match(M.tokenizer.separator)||i==n){if(s>0){var l=M.utils.clone(e)||{};l.position=[a,s],l.index=r.length,r.push(new M.Token(o.slice(a,i),l))}a=i+1}}return r},M.tokenizer.separator=/[\s\-]+/,
16
+ R.tokenizer=function(e,t){if(null==e||null==e)return[];if(Array.isArray(e))return e.map(function(e){return new R.Token(R.utils.asString(e).toLowerCase(),R.utils.clone(t))});for(var r=e.toString().toLowerCase(),n=r.length,o=[],i=0,a=0;i<=n;i++){var s=i-a;if(r.charAt(i).match(R.tokenizer.separator)||i==n){if(s>0){var l=R.utils.clone(t)||{};l.position=[a,s],l.index=o.length,o.push(new R.Token(r.slice(a,i),l))}a=i+1}}return o},R.tokenizer.separator=/[\s\-]+/,
17
17
  /*!
18
18
  * lunr.Pipeline
19
19
  * Copyright (C) 2020 Oliver Nightingale
20
20
  */
21
- M.Pipeline=function(){this._stack=[]},M.Pipeline.registeredFunctions=Object.create(null),M.Pipeline.registerFunction=function(t,e){e in this.registeredFunctions&&M.utils.warn("Overwriting existing registered function: "+e),t.label=e,M.Pipeline.registeredFunctions[t.label]=t},M.Pipeline.warnIfFunctionNotRegistered=function(t){t.label&&t.label in this.registeredFunctions||M.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},M.Pipeline.load=function(t){var e=new M.Pipeline;return t.forEach(function(t){var o=M.Pipeline.registeredFunctions[t];if(!o)throw new Error("Cannot load unregistered function: "+t);e.add(o)}),e},M.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(t){M.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},M.Pipeline.prototype.after=function(t,e){M.Pipeline.warnIfFunctionNotRegistered(e);var o=this._stack.indexOf(t);if(-1==o)throw new Error("Cannot find existingFn");o+=1,this._stack.splice(o,0,e)},M.Pipeline.prototype.before=function(t,e){M.Pipeline.warnIfFunctionNotRegistered(e);var o=this._stack.indexOf(t);if(-1==o)throw new Error("Cannot find existingFn");this._stack.splice(o,0,e)},M.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},M.Pipeline.prototype.run=function(t){for(var e=this._stack.length,o=0;o<e;o++){for(var n=this._stack[o],r=[],i=0;i<t.length;i++){var a=n(t[i],i,t);if(null!=a&&""!==a)if(Array.isArray(a))for(var s=0;s<a.length;s++)r.push(a[s]);else r.push(a)}t=r}return t},M.Pipeline.prototype.runString=function(t,e){var o=new M.Token(t,e);return this.run([o]).map(function(t){return t.toString()})},M.Pipeline.prototype.reset=function(){this._stack=[]},M.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return M.Pipeline.warnIfFunctionNotRegistered(t),t.label})},
21
+ R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach(function(e){var r=R.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)}),t},R.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var n=this._stack[r],o=[],i=0;i<e.length;i++){var a=n(e[i],i,e);if(null!=a&&""!==a)if(Array.isArray(a))for(var s=0;s<a.length;s++)o.push(a[s]);else o.push(a)}e=o}return e},R.Pipeline.prototype.runString=function(e,t){var r=new R.Token(e,t);return this.run([r]).map(function(e){return e.toString()})},R.Pipeline.prototype.reset=function(){this._stack=[]},R.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return R.Pipeline.warnIfFunctionNotRegistered(e),e.label})},
22
22
  /*!
23
23
  * lunr.Vector
24
24
  * Copyright (C) 2020 Oliver Nightingale
25
25
  */
26
- M.Vector=function(t){this._magnitude=0,this.elements=t||[]},M.Vector.prototype.positionForIndex=function(t){if(0==this.elements.length)return 0;for(var e=0,o=this.elements.length/2,n=o-e,r=Math.floor(n/2),i=this.elements[2*r];n>1&&(i<t&&(e=r),i>t&&(o=r),i!=t);)n=o-e,r=e+Math.floor(n/2),i=this.elements[2*r];return i==t||i>t?2*r:i<t?2*(r+1):void 0},M.Vector.prototype.insert=function(t,e){this.upsert(t,e,function(){throw"duplicate index"})},M.Vector.prototype.upsert=function(t,e,o){this._magnitude=0;var n=this.positionForIndex(t);this.elements[n]==t?this.elements[n+1]=o(this.elements[n+1],e):this.elements.splice(n,0,t,e)},M.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t=0,e=this.elements.length,o=1;o<e;o+=2){var n=this.elements[o];t+=n*n}return this._magnitude=Math.sqrt(t)},M.Vector.prototype.dot=function(t){for(var e=0,o=this.elements,n=t.elements,r=o.length,i=n.length,a=0,s=0,l=0,c=0;l<r&&c<i;)(a=o[l])<(s=n[c])?l+=2:a>s?c+=2:a==s&&(e+=o[l+1]*n[c+1],l+=2,c+=2);return e},M.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},M.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),e=1,o=0;e<this.elements.length;e+=2,o++)t[o]=this.elements[e];return t},M.Vector.prototype.toJSON=function(){return this.elements},
26
+ R.Vector=function(e){this._magnitude=0,this.elements=e||[]},R.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,n=r-t,o=Math.floor(n/2),i=this.elements[2*o];n>1&&(i<e&&(t=o),i>e&&(r=o),i!=e);)n=r-t,o=t+Math.floor(n/2),i=this.elements[2*o];return i==e||i>e?2*o:i<e?2*(o+1):void 0},R.Vector.prototype.insert=function(e,t){this.upsert(e,t,function(){throw"duplicate index"})},R.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var n=this.positionForIndex(e);this.elements[n]==e?this.elements[n+1]=r(this.elements[n+1],t):this.elements.splice(n,0,e,t)},R.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;r<t;r+=2){var n=this.elements[r];e+=n*n}return this._magnitude=Math.sqrt(e)},R.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,n=e.elements,o=r.length,i=n.length,a=0,s=0,l=0,c=0;l<o&&c<i;)(a=r[l])<(s=n[c])?l+=2:a>s?c+=2:a==s&&(t+=r[l+1]*n[c+1],l+=2,c+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t<this.elements.length;t+=2,r++)e[r]=this.elements[t];return e},R.Vector.prototype.toJSON=function(){return this.elements},
27
27
  /*!
28
28
  * lunr.stemmer
29
29
  * Copyright (C) 2020 Oliver Nightingale
30
30
  * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
31
31
  */
32
- M.stemmer=(t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},s="^("+(i="[^aeiou][^aeiouy]*")+")?"+(a=(r="[aeiouy]")+"[aeiou]*")+i+"("+a+")?$",l="^("+i+")?"+a+i+a+i,c="^("+i+")?"+r,d=new RegExp("^("+i+")?"+a+i),p=new RegExp(l),h=new RegExp(s),u=new RegExp(c),m=/^(.+?)(ss|i)es$/,g=/^(.+?)([^s])s$/,f=/^(.+?)eed$/,b=/^(.+?)(ed|ing)$/,v=/.$/,y=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),D=new RegExp("^"+i+r+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,C=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,S=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,T=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,A=/^(.+?)(s|t)(ion)$/,k=/^(.+?)e$/,P=/ll$/,F=new RegExp("^"+i+r+"[^aeiouwxy]$"),L=function(e){var o,r,i,a,s,l,c;if(e.length<3)return e;if("y"==(i=e.substr(0,1))&&(e=i.toUpperCase()+e.substr(1)),s=g,(a=m).test(e)?e=e.replace(a,"$1$2"):s.test(e)&&(e=e.replace(s,"$1$2")),s=b,(a=f).test(e)){var L=a.exec(e);(a=d).test(L[1])&&(a=v,e=e.replace(a,""))}else s.test(e)&&(o=(L=s.exec(e))[1],(s=u).test(o)&&(l=w,c=D,(s=y).test(e=o)?e+="e":l.test(e)?(a=v,e=e.replace(a,"")):c.test(e)&&(e+="e")));return(a=x).test(e)&&(e=(o=(L=a.exec(e))[1])+"i"),(a=C).test(e)&&(o=(L=a.exec(e))[1],r=L[2],(a=d).test(o)&&(e=o+t[r])),(a=S).test(e)&&(o=(L=a.exec(e))[1],r=L[2],(a=d).test(o)&&(e=o+n[r])),s=A,(a=T).test(e)?(o=(L=a.exec(e))[1],(a=p).test(o)&&(e=o)):s.test(e)&&(o=(L=s.exec(e))[1]+L[2],(s=p).test(o)&&(e=o)),(a=k).test(e)&&(o=(L=a.exec(e))[1],s=h,l=F,((a=p).test(o)||s.test(o)&&!l.test(o))&&(e=o)),s=p,(a=P).test(e)&&s.test(e)&&(a=v,e=e.replace(a,"")),"y"==i&&(e=i.toLowerCase()+e.substr(1)),e},function(t){return t.update(L)}),M.Pipeline.registerFunction(M.stemmer,"stemmer"),
32
+ R.stemmer=(e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},s="^("+(i="[^aeiou][^aeiouy]*")+")?"+(a=(o="[aeiouy]")+"[aeiou]*")+i+"("+a+")?$",l="^("+i+")?"+a+i+a+i,c="^("+i+")?"+o,d=new RegExp("^("+i+")?"+a+i),h=new RegExp(l),p=new RegExp(s),u=new RegExp(c),f=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,b=/.$/,v=/(at|bl|iz)$/,S=new RegExp("([^aeiouylsz])\\1$"),T=new RegExp("^"+i+o+"[^aeiouwxy]$"),w=/^(.+?[^aeiou])y$/,x=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,P=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,A=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,C=/^(.+?)(s|t)(ion)$/,D=/^(.+?)e$/,k=/ll$/,E=new RegExp("^"+i+o+"[^aeiouwxy]$"),F=function(t){var r,o,i,a,s,l,c;if(t.length<3)return t;if("y"==(i=t.substr(0,1))&&(t=i.toUpperCase()+t.substr(1)),s=m,(a=f).test(t)?t=t.replace(a,"$1$2"):s.test(t)&&(t=t.replace(s,"$1$2")),s=y,(a=g).test(t)){var F=a.exec(t);(a=d).test(F[1])&&(a=b,t=t.replace(a,""))}else s.test(t)&&(r=(F=s.exec(t))[1],(s=u).test(r)&&(l=S,c=T,(s=v).test(t=r)?t+="e":l.test(t)?(a=b,t=t.replace(a,"")):c.test(t)&&(t+="e")));return(a=w).test(t)&&(t=(r=(F=a.exec(t))[1])+"i"),(a=x).test(t)&&(r=(F=a.exec(t))[1],o=F[2],(a=d).test(r)&&(t=r+e[o])),(a=P).test(t)&&(r=(F=a.exec(t))[1],o=F[2],(a=d).test(r)&&(t=r+n[o])),s=C,(a=A).test(t)?(r=(F=a.exec(t))[1],(a=h).test(r)&&(t=r)):s.test(t)&&(r=(F=s.exec(t))[1]+F[2],(s=h).test(r)&&(t=r)),(a=D).test(t)&&(r=(F=a.exec(t))[1],s=p,l=E,((a=h).test(r)||s.test(r)&&!l.test(r))&&(t=r)),s=h,(a=k).test(t)&&s.test(t)&&(a=b,t=t.replace(a,"")),"y"==i&&(t=i.toLowerCase()+t.substr(1)),t},function(e){return e.update(F)}),R.Pipeline.registerFunction(R.stemmer,"stemmer"),
33
33
  /*!
34
34
  * lunr.stopWordFilter
35
35
  * Copyright (C) 2020 Oliver Nightingale
36
36
  */
37
- M.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){if(t&&e[t.toString()]!==t.toString())return t}},M.stopWordFilter=M.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),M.Pipeline.registerFunction(M.stopWordFilter,"stopWordFilter"),
37
+ R.generateStopWordFilter=function(e){var t=e.reduce(function(e,t){return e[t]=t,e},{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},R.stopWordFilter=R.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),R.Pipeline.registerFunction(R.stopWordFilter,"stopWordFilter"),
38
38
  /*!
39
39
  * lunr.trimmer
40
40
  * Copyright (C) 2020 Oliver Nightingale
41
41
  */
42
- M.trimmer=function(t){return t.update(function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")})},M.Pipeline.registerFunction(M.trimmer,"trimmer"),
42
+ R.trimmer=function(e){return e.update(function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")})},R.Pipeline.registerFunction(R.trimmer,"trimmer"),
43
43
  /*!
44
44
  * lunr.TokenSet
45
45
  * Copyright (C) 2020 Oliver Nightingale
46
46
  */
47
- M.TokenSet=function(){this.final=!1,this.edges={},this.id=M.TokenSet._nextId,M.TokenSet._nextId+=1},M.TokenSet._nextId=1,M.TokenSet.fromArray=function(t){for(var e=new M.TokenSet.Builder,o=0,n=t.length;o<n;o++)e.insert(t[o]);return e.finish(),e.root},M.TokenSet.fromClause=function(t){return"editDistance"in t?M.TokenSet.fromFuzzyString(t.term,t.editDistance):M.TokenSet.fromString(t.term)},M.TokenSet.fromFuzzyString=function(t,e){for(var o=new M.TokenSet,n=[{node:o,editsRemaining:e,str:t}];n.length;){var r=n.pop();if(r.str.length>0){var i,a=r.str.charAt(0);a in r.node.edges?i=r.node.edges[a]:(i=new M.TokenSet,r.node.edges[a]=i),1==r.str.length&&(i.final=!0),n.push({node:i,editsRemaining:r.editsRemaining,str:r.str.slice(1)})}if(0!=r.editsRemaining){if("*"in r.node.edges)var s=r.node.edges["*"];else{s=new M.TokenSet;r.node.edges["*"]=s}if(0==r.str.length&&(s.final=!0),n.push({node:s,editsRemaining:r.editsRemaining-1,str:r.str}),r.str.length>1&&n.push({node:r.node,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)}),1==r.str.length&&(r.node.final=!0),r.str.length>=1){if("*"in r.node.edges)var l=r.node.edges["*"];else{l=new M.TokenSet;r.node.edges["*"]=l}1==r.str.length&&(l.final=!0),n.push({node:l,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)})}if(r.str.length>1){var c,d=r.str.charAt(0),p=r.str.charAt(1);p in r.node.edges?c=r.node.edges[p]:(c=new M.TokenSet,r.node.edges[p]=c),1==r.str.length&&(c.final=!0),n.push({node:c,editsRemaining:r.editsRemaining-1,str:d+r.str.slice(2)})}}}return o},M.TokenSet.fromString=function(t){for(var e=new M.TokenSet,o=e,n=0,r=t.length;n<r;n++){var i=t[n],a=n==r-1;if("*"==i)e.edges[i]=e,e.final=a;else{var s=new M.TokenSet;s.final=a,e.edges[i]=s,e=s}}return o},M.TokenSet.prototype.toArray=function(){for(var t=[],e=[{prefix:"",node:this}];e.length;){var o=e.pop(),n=Object.keys(o.node.edges),r=n.length;o.node.final&&(o.prefix.charAt(0),t.push(o.prefix));for(var i=0;i<r;i++){var a=n[i];e.push({prefix:o.prefix.concat(a),node:o.node.edges[a]})}}return t},M.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var t=this.final?"1":"0",e=Object.keys(this.edges).sort(),o=e.length,n=0;n<o;n++){var r=e[n];t=t+r+this.edges[r].id}return t},M.TokenSet.prototype.intersect=function(t){for(var e=new M.TokenSet,o=void 0,n=[{qNode:t,output:e,node:this}];n.length;){o=n.pop();for(var r=Object.keys(o.qNode.edges),i=r.length,a=Object.keys(o.node.edges),s=a.length,l=0;l<i;l++)for(var c=r[l],d=0;d<s;d++){var p=a[d];if(p==c||"*"==c){var h=o.node.edges[p],u=o.qNode.edges[c],m=h.final&&u.final,g=void 0;p in o.output.edges?(g=o.output.edges[p]).final=g.final||m:((g=new M.TokenSet).final=m,o.output.edges[p]=g),n.push({qNode:u,output:g,node:h})}}}return e},M.TokenSet.Builder=function(){this.previousWord="",this.root=new M.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},M.TokenSet.Builder.prototype.insert=function(t){var e,o=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var n=0;n<t.length&&n<this.previousWord.length&&t[n]==this.previousWord[n];n++)o++;this.minimize(o),e=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(n=o;n<t.length;n++){var r=new M.TokenSet,i=t[n];e.edges[i]=r,this.uncheckedNodes.push({parent:e,char:i,child:r}),e=r}e.final=!0,this.previousWord=t},M.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},M.TokenSet.Builder.prototype.minimize=function(t){for(var e=this.uncheckedNodes.length-1;e>=t;e--){var o=this.uncheckedNodes[e],n=o.child.toString();n in this.minimizedNodes?o.parent.edges[o.char]=this.minimizedNodes[n]:(o.child._str=n,this.minimizedNodes[n]=o.child),this.uncheckedNodes.pop()}},
47
+ R.TokenSet=function(){this.final=!1,this.edges={},this.id=R.TokenSet._nextId,R.TokenSet._nextId+=1},R.TokenSet._nextId=1,R.TokenSet.fromArray=function(e){for(var t=new R.TokenSet.Builder,r=0,n=e.length;r<n;r++)t.insert(e[r]);return t.finish(),t.root},R.TokenSet.fromClause=function(e){return"editDistance"in e?R.TokenSet.fromFuzzyString(e.term,e.editDistance):R.TokenSet.fromString(e.term)},R.TokenSet.fromFuzzyString=function(e,t){for(var r=new R.TokenSet,n=[{node:r,editsRemaining:t,str:e}];n.length;){var o=n.pop();if(o.str.length>0){var i,a=o.str.charAt(0);a in o.node.edges?i=o.node.edges[a]:(i=new R.TokenSet,o.node.edges[a]=i),1==o.str.length&&(i.final=!0),n.push({node:i,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(0!=o.editsRemaining){if("*"in o.node.edges)var s=o.node.edges["*"];else{s=new R.TokenSet;o.node.edges["*"]=s}if(0==o.str.length&&(s.final=!0),n.push({node:s,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&n.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),1==o.str.length&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var l=o.node.edges["*"];else{l=new R.TokenSet;o.node.edges["*"]=l}1==o.str.length&&(l.final=!0),n.push({node:l,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var c,d=o.str.charAt(0),h=o.str.charAt(1);h in o.node.edges?c=o.node.edges[h]:(c=new R.TokenSet,o.node.edges[h]=c),1==o.str.length&&(c.final=!0),n.push({node:c,editsRemaining:o.editsRemaining-1,str:d+o.str.slice(2)})}}}return r},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,r=t,n=0,o=e.length;n<o;n++){var i=e[n],a=n==o-1;if("*"==i)t.edges[i]=t,t.final=a;else{var s=new R.TokenSet;s.final=a,t.edges[i]=s,t=s}}return r},R.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),n=Object.keys(r.node.edges),o=n.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var i=0;i<o;i++){var a=n[i];t.push({prefix:r.prefix.concat(a),node:r.node.edges[a]})}}return e},R.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,n=0;n<r;n++){var o=t[n];e=e+o+this.edges[o].id}return e},R.TokenSet.prototype.intersect=function(e){for(var t=new R.TokenSet,r=void 0,n=[{qNode:e,output:t,node:this}];n.length;){r=n.pop();for(var o=Object.keys(r.qNode.edges),i=o.length,a=Object.keys(r.node.edges),s=a.length,l=0;l<i;l++)for(var c=o[l],d=0;d<s;d++){var h=a[d];if(h==c||"*"==c){var p=r.node.edges[h],u=r.qNode.edges[c],f=p.final&&u.final,m=void 0;h in r.output.edges?(m=r.output.edges[h]).final=m.final||f:((m=new R.TokenSet).final=f,r.output.edges[h]=m),n.push({qNode:u,output:m,node:p})}}}return t},R.TokenSet.Builder=function(){this.previousWord="",this.root=new R.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},R.TokenSet.Builder.prototype.insert=function(e){var t,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var n=0;n<e.length&&n<this.previousWord.length&&e[n]==this.previousWord[n];n++)r++;this.minimize(r),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(n=r;n<e.length;n++){var o=new R.TokenSet,i=e[n];t.edges[i]=o,this.uncheckedNodes.push({parent:t,char:i,child:o}),t=o}t.final=!0,this.previousWord=e},R.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},R.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}},
48
48
  /*!
49
49
  * lunr.Index
50
50
  * Copyright (C) 2020 Oliver Nightingale
51
51
  */
52
- M.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},M.Index.prototype.search=function(t){return this.query(function(e){new M.QueryParser(t,e).parse()})},M.Index.prototype.query=function(t){for(var e=new M.Query(this.fields),o=Object.create(null),n=Object.create(null),r=Object.create(null),i=Object.create(null),a=Object.create(null),s=0;s<this.fields.length;s++)n[this.fields[s]]=new M.Vector;t.call(e,e);for(s=0;s<e.clauses.length;s++){var l=e.clauses[s],c=null,d=M.Set.empty;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var p=0;p<c.length;p++){var h=c[p];l.term=h;var u=M.TokenSet.fromClause(l),m=this.tokenSet.intersect(u).toArray();if(0===m.length&&l.presence===M.Query.presence.REQUIRED){for(var g=0;g<l.fields.length;g++){i[_=l.fields[g]]=M.Set.empty}break}for(var f=0;f<m.length;f++){var b=m[f],v=this.invertedIndex[b],y=v._index;for(g=0;g<l.fields.length;g++){var w=v[_=l.fields[g]],D=Object.keys(w),x=b+"/"+_,C=new M.Set(D);if(l.presence==M.Query.presence.REQUIRED&&(d=d.union(C),void 0===i[_]&&(i[_]=M.Set.complete)),l.presence!=M.Query.presence.PROHIBITED){if(n[_].upsert(y,l.boost,function(t,e){return t+e}),!r[x]){for(var S=0;S<D.length;S++){var T,A=D[S],k=new M.FieldRef(A,_),P=w[A];void 0===(T=o[k])?o[k]=new M.MatchData(b,_,P):T.add(b,_,P)}r[x]=!0}}else void 0===a[_]&&(a[_]=M.Set.empty),a[_]=a[_].union(C)}}}if(l.presence===M.Query.presence.REQUIRED)for(g=0;g<l.fields.length;g++){i[_=l.fields[g]]=i[_].intersect(d)}}var F=M.Set.complete,L=M.Set.empty;for(s=0;s<this.fields.length;s++){var _;i[_=this.fields[s]]&&(F=F.intersect(i[_])),a[_]&&(L=L.union(a[_]))}var B=Object.keys(o),E=[],H=Object.create(null);if(e.isNegated()){B=Object.keys(this.fieldVectors);for(s=0;s<B.length;s++){k=B[s];var I=M.FieldRef.fromString(k);o[k]=new M.MatchData}}for(s=0;s<B.length;s++){var R=(I=M.FieldRef.fromString(B[s])).docRef;if(F.contains(R)&&!L.contains(R)){var V,N=this.fieldVectors[I],z=n[I.fieldName].similarity(N);if(void 0!==(V=H[R]))V.score+=z,V.matchData.combine(o[I]);else{var j={ref:R,score:z,matchData:o[I]};H[R]=j,E.push(j)}}}return E.sort(function(t,e){return e.score-t.score})},M.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(t){return[t,this.invertedIndex[t]]},this),e=Object.keys(this.fieldVectors).map(function(t){return[t,this.fieldVectors[t].toJSON()]},this);return{version:M.version,fields:this.fields,fieldVectors:e,invertedIndex:t,pipeline:this.pipeline.toJSON()}},M.Index.load=function(t){var e={},o={},n=t.fieldVectors,r=Object.create(null),i=t.invertedIndex,a=new M.TokenSet.Builder,s=M.Pipeline.load(t.pipeline);t.version!=M.version&&M.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+M.version+"' does not match serialized index '"+t.version+"'");for(var l=0;l<n.length;l++){var c=(p=n[l])[0],d=p[1];o[c]=new M.Vector(d)}for(l=0;l<i.length;l++){var p,h=(p=i[l])[0],u=p[1];a.insert(h),r[h]=u}return a.finish(),e.fields=t.fields,e.fieldVectors=o,e.invertedIndex=r,e.tokenSet=a.root,e.pipeline=s,new M.Index(e)},
52
+ R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query(function(t){new R.QueryParser(e,t).parse()})},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),r=Object.create(null),n=Object.create(null),o=Object.create(null),i=Object.create(null),a=Object.create(null),s=0;s<this.fields.length;s++)n[this.fields[s]]=new R.Vector;e.call(t,t);for(s=0;s<t.clauses.length;s++){var l=t.clauses[s],c=null,d=R.Set.empty;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var h=0;h<c.length;h++){var p=c[h];l.term=p;var u=R.TokenSet.fromClause(l),f=this.tokenSet.intersect(u).toArray();if(0===f.length&&l.presence===R.Query.presence.REQUIRED){for(var m=0;m<l.fields.length;m++){i[M=l.fields[m]]=R.Set.empty}break}for(var g=0;g<f.length;g++){var y=f[g],b=this.invertedIndex[y],v=b._index;for(m=0;m<l.fields.length;m++){var S=b[M=l.fields[m]],T=Object.keys(S),w=y+"/"+M,x=new R.Set(T);if(l.presence==R.Query.presence.REQUIRED&&(d=d.union(x),void 0===i[M]&&(i[M]=R.Set.complete)),l.presence!=R.Query.presence.PROHIBITED){if(n[M].upsert(v,l.boost,function(e,t){return e+t}),!o[w]){for(var P=0;P<T.length;P++){var A,C=T[P],D=new R.FieldRef(C,M),k=S[C];void 0===(A=r[D])?r[D]=new R.MatchData(y,M,k):A.add(y,M,k)}o[w]=!0}}else void 0===a[M]&&(a[M]=R.Set.empty),a[M]=a[M].union(x)}}}if(l.presence===R.Query.presence.REQUIRED)for(m=0;m<l.fields.length;m++){i[M=l.fields[m]]=i[M].intersect(d)}}var E=R.Set.complete,F=R.Set.empty;for(s=0;s<this.fields.length;s++){var M;i[M=this.fields[s]]&&(E=E.intersect(i[M])),a[M]&&(F=F.union(a[M]))}var L=Object.keys(r),_=[],B=Object.create(null);if(t.isNegated()){L=Object.keys(this.fieldVectors);for(s=0;s<L.length;s++){D=L[s];var N=R.FieldRef.fromString(D);r[D]=new R.MatchData}}for(s=0;s<L.length;s++){var I=(N=R.FieldRef.fromString(L[s])).docRef;if(E.contains(I)&&!F.contains(I)){var j,O=this.fieldVectors[N],V=n[N.fieldName].similarity(O);if(void 0!==(j=B[I]))j.score+=V,j.matchData.combine(r[N]);else{var H={ref:I,score:V,matchData:r[N]};B[I]=H,_.push(H)}}}return _.sort(function(e,t){return t.score-e.score})},R.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map(function(e){return[e,this.invertedIndex[e]]},this),t=Object.keys(this.fieldVectors).map(function(e){return[e,this.fieldVectors[e].toJSON()]},this);return{version:R.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},R.Index.load=function(e){var t={},r={},n=e.fieldVectors,o=Object.create(null),i=e.invertedIndex,a=new R.TokenSet.Builder,s=R.Pipeline.load(e.pipeline);e.version!=R.version&&R.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+R.version+"' does not match serialized index '"+e.version+"'");for(var l=0;l<n.length;l++){var c=(h=n[l])[0],d=h[1];r[c]=new R.Vector(d)}for(l=0;l<i.length;l++){var h,p=(h=i[l])[0],u=h[1];a.insert(p),o[p]=u}return a.finish(),t.fields=e.fields,t.fieldVectors=r,t.invertedIndex=o,t.tokenSet=a.root,t.pipeline=s,new R.Index(t)},
53
53
  /*!
54
54
  * lunr.Builder
55
55
  * Copyright (C) 2020 Oliver Nightingale
56
56
  */
57
- M.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=M.tokenizer,this.pipeline=new M.Pipeline,this.searchPipeline=new M.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},M.Builder.prototype.ref=function(t){this._ref=t},M.Builder.prototype.field=function(t,e){if(/\//.test(t))throw new RangeError("Field '"+t+"' contains illegal character '/'");this._fields[t]=e||{}},M.Builder.prototype.b=function(t){this._b=t<0?0:t>1?1:t},M.Builder.prototype.k1=function(t){this._k1=t},M.Builder.prototype.add=function(t,e){var o=t[this._ref],n=Object.keys(this._fields);this._documents[o]=e||{},this.documentCount+=1;for(var r=0;r<n.length;r++){var i=n[r],a=this._fields[i].extractor,s=a?a(t):t[i],l=this.tokenizer(s,{fields:[i]}),c=this.pipeline.run(l),d=new M.FieldRef(o,i),p=Object.create(null);this.fieldTermFrequencies[d]=p,this.fieldLengths[d]=0,this.fieldLengths[d]+=c.length;for(var h=0;h<c.length;h++){var u=c[h];if(null==p[u]&&(p[u]=0),p[u]+=1,null==this.invertedIndex[u]){var m=Object.create(null);m._index=this.termIndex,this.termIndex+=1;for(var g=0;g<n.length;g++)m[n[g]]=Object.create(null);this.invertedIndex[u]=m}null==this.invertedIndex[u][i][o]&&(this.invertedIndex[u][i][o]=Object.create(null));for(var f=0;f<this.metadataWhitelist.length;f++){var b=this.metadataWhitelist[f],v=u.metadata[b];null==this.invertedIndex[u][i][o][b]&&(this.invertedIndex[u][i][o][b]=[]),this.invertedIndex[u][i][o][b].push(v)}}}},M.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),e=t.length,o={},n={},r=0;r<e;r++){var i=M.FieldRef.fromString(t[r]),a=i.fieldName;n[a]||(n[a]=0),n[a]+=1,o[a]||(o[a]=0),o[a]+=this.fieldLengths[i]}var s=Object.keys(this._fields);for(r=0;r<s.length;r++){var l=s[r];o[l]=o[l]/n[l]}this.averageFieldLength=o},M.Builder.prototype.createFieldVectors=function(){for(var t={},e=Object.keys(this.fieldTermFrequencies),o=e.length,n=Object.create(null),r=0;r<o;r++){for(var i=M.FieldRef.fromString(e[r]),a=i.fieldName,s=this.fieldLengths[i],l=new M.Vector,c=this.fieldTermFrequencies[i],d=Object.keys(c),p=d.length,h=this._fields[a].boost||1,u=this._documents[i.docRef].boost||1,m=0;m<p;m++){var g,f,b,v=d[m],y=c[v],w=this.invertedIndex[v]._index;void 0===n[v]?(g=M.idf(this.invertedIndex[v],this.documentCount),n[v]=g):g=n[v],f=g*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(s/this.averageFieldLength[a]))+y),f*=h,f*=u,b=Math.round(1e3*f)/1e3,l.insert(w,b)}t[i]=l}this.fieldVectors=t},M.Builder.prototype.createTokenSet=function(){this.tokenSet=M.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},M.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new M.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},M.Builder.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},M.MatchData=function(t,e,o){for(var n=Object.create(null),r=Object.keys(o||{}),i=0;i<r.length;i++){var a=r[i];n[a]=o[a].slice()}this.metadata=Object.create(null),void 0!==t&&(this.metadata[t]=Object.create(null),this.metadata[t][e]=n)},M.MatchData.prototype.combine=function(t){for(var e=Object.keys(t.metadata),o=0;o<e.length;o++){var n=e[o],r=Object.keys(t.metadata[n]);null==this.metadata[n]&&(this.metadata[n]=Object.create(null));for(var i=0;i<r.length;i++){var a=r[i],s=Object.keys(t.metadata[n][a]);null==this.metadata[n][a]&&(this.metadata[n][a]=Object.create(null));for(var l=0;l<s.length;l++){var c=s[l];null==this.metadata[n][a][c]?this.metadata[n][a][c]=t.metadata[n][a][c]:this.metadata[n][a][c]=this.metadata[n][a][c].concat(t.metadata[n][a][c])}}}},M.MatchData.prototype.add=function(t,e,o){if(!(t in this.metadata))return this.metadata[t]=Object.create(null),void(this.metadata[t][e]=o);if(e in this.metadata[t])for(var n=Object.keys(o),r=0;r<n.length;r++){var i=n[r];i in this.metadata[t][e]?this.metadata[t][e][i]=this.metadata[t][e][i].concat(o[i]):this.metadata[t][e][i]=o[i]}else this.metadata[t][e]=o},M.Query=function(t){this.clauses=[],this.allFields=t},M.Query.wildcard=new String("*"),M.Query.wildcard.NONE=0,M.Query.wildcard.LEADING=1,M.Query.wildcard.TRAILING=2,M.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},M.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=M.Query.wildcard.NONE),t.wildcard&M.Query.wildcard.LEADING&&t.term.charAt(0)!=M.Query.wildcard&&(t.term="*"+t.term),t.wildcard&M.Query.wildcard.TRAILING&&t.term.slice(-1)!=M.Query.wildcard&&(t.term=t.term+"*"),"presence"in t||(t.presence=M.Query.presence.OPTIONAL),this.clauses.push(t),this},M.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=M.Query.presence.PROHIBITED)return!1;return!0},M.Query.prototype.term=function(t,e){if(Array.isArray(t))return t.forEach(function(t){this.term(t,M.utils.clone(e))},this),this;var o=e||{};return o.term=t.toString(),this.clause(o),this},M.QueryParseError=function(t,e,o){this.name="QueryParseError",this.message=t,this.start=e,this.end=o},M.QueryParseError.prototype=new Error,M.QueryLexer=function(t){this.lexemes=[],this.str=t,this.length=t.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},M.QueryLexer.prototype.run=function(){for(var t=M.QueryLexer.lexText;t;)t=t(this)},M.QueryLexer.prototype.sliceString=function(){for(var t=[],e=this.start,o=this.pos,n=0;n<this.escapeCharPositions.length;n++)o=this.escapeCharPositions[n],t.push(this.str.slice(e,o)),e=o+1;return t.push(this.str.slice(e,this.pos)),this.escapeCharPositions.length=0,t.join("")},M.QueryLexer.prototype.emit=function(t){this.lexemes.push({type:t,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},M.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},M.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return M.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},M.QueryLexer.prototype.width=function(){return this.pos-this.start},M.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},M.QueryLexer.prototype.backup=function(){this.pos-=1},M.QueryLexer.prototype.acceptDigitRun=function(){var t,e;do{e=(t=this.next()).charCodeAt(0)}while(e>47&&e<58);t!=M.QueryLexer.EOS&&this.backup()},M.QueryLexer.prototype.more=function(){return this.pos<this.length},M.QueryLexer.EOS="EOS",M.QueryLexer.FIELD="FIELD",M.QueryLexer.TERM="TERM",M.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",M.QueryLexer.BOOST="BOOST",M.QueryLexer.PRESENCE="PRESENCE",M.QueryLexer.lexField=function(t){return t.backup(),t.emit(M.QueryLexer.FIELD),t.ignore(),M.QueryLexer.lexText},M.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(M.QueryLexer.TERM)),t.ignore(),t.more())return M.QueryLexer.lexText},M.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(M.QueryLexer.EDIT_DISTANCE),M.QueryLexer.lexText},M.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(M.QueryLexer.BOOST),M.QueryLexer.lexText},M.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(M.QueryLexer.TERM)},M.QueryLexer.termSeparator=M.tokenizer.separator,M.QueryLexer.lexText=function(t){for(;;){var e=t.next();if(e==M.QueryLexer.EOS)return M.QueryLexer.lexEOS;if(92!=e.charCodeAt(0)){if(":"==e)return M.QueryLexer.lexField;if("~"==e)return t.backup(),t.width()>0&&t.emit(M.QueryLexer.TERM),M.QueryLexer.lexEditDistance;if("^"==e)return t.backup(),t.width()>0&&t.emit(M.QueryLexer.TERM),M.QueryLexer.lexBoost;if("+"==e&&1===t.width())return t.emit(M.QueryLexer.PRESENCE),M.QueryLexer.lexText;if("-"==e&&1===t.width())return t.emit(M.QueryLexer.PRESENCE),M.QueryLexer.lexText;if(e.match(M.QueryLexer.termSeparator))return M.QueryLexer.lexTerm}else t.escapeCharacter()}},M.QueryParser=function(t,e){this.lexer=new M.QueryLexer(t),this.query=e,this.currentClause={},this.lexemeIdx=0},M.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=M.QueryParser.parseClause;t;)t=t(this);return this.query},M.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},M.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},M.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},M.QueryParser.parseClause=function(t){var e=t.peekLexeme();if(null!=e)switch(e.type){case M.QueryLexer.PRESENCE:return M.QueryParser.parsePresence;case M.QueryLexer.FIELD:return M.QueryParser.parseField;case M.QueryLexer.TERM:return M.QueryParser.parseTerm;default:var o="expected either a field or a term, found "+e.type;throw e.str.length>=1&&(o+=" with value '"+e.str+"'"),new M.QueryParseError(o,e.start,e.end)}},M.QueryParser.parsePresence=function(t){var e=t.consumeLexeme();if(null!=e){switch(e.str){case"-":t.currentClause.presence=M.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=M.Query.presence.REQUIRED;break;default:var o="unrecognised presence operator'"+e.str+"'";throw new M.QueryParseError(o,e.start,e.end)}var n=t.peekLexeme();if(null==n){o="expecting term or field, found nothing";throw new M.QueryParseError(o,e.start,e.end)}switch(n.type){case M.QueryLexer.FIELD:return M.QueryParser.parseField;case M.QueryLexer.TERM:return M.QueryParser.parseTerm;default:o="expecting term or field, found '"+n.type+"'";throw new M.QueryParseError(o,n.start,n.end)}}},M.QueryParser.parseField=function(t){var e=t.consumeLexeme();if(null!=e){if(-1==t.query.allFields.indexOf(e.str)){var o=t.query.allFields.map(function(t){return"'"+t+"'"}).join(", "),n="unrecognised field '"+e.str+"', possible fields: "+o;throw new M.QueryParseError(n,e.start,e.end)}t.currentClause.fields=[e.str];var r=t.peekLexeme();if(null==r){n="expecting term, found nothing";throw new M.QueryParseError(n,e.start,e.end)}if(r.type===M.QueryLexer.TERM)return M.QueryParser.parseTerm;n="expecting term, found '"+r.type+"'";throw new M.QueryParseError(n,r.start,r.end)}},M.QueryParser.parseTerm=function(t){var e=t.consumeLexeme();if(null!=e){t.currentClause.term=e.str.toLowerCase(),-1!=e.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var o=t.peekLexeme();if(null!=o)switch(o.type){case M.QueryLexer.TERM:return t.nextClause(),M.QueryParser.parseTerm;case M.QueryLexer.FIELD:return t.nextClause(),M.QueryParser.parseField;case M.QueryLexer.EDIT_DISTANCE:return M.QueryParser.parseEditDistance;case M.QueryLexer.BOOST:return M.QueryParser.parseBoost;case M.QueryLexer.PRESENCE:return t.nextClause(),M.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+o.type+"'";throw new M.QueryParseError(n,o.start,o.end)}else t.nextClause()}},M.QueryParser.parseEditDistance=function(t){var e=t.consumeLexeme();if(null!=e){var o=parseInt(e.str,10);if(isNaN(o)){var n="edit distance must be numeric";throw new M.QueryParseError(n,e.start,e.end)}t.currentClause.editDistance=o;var r=t.peekLexeme();if(null!=r)switch(r.type){case M.QueryLexer.TERM:return t.nextClause(),M.QueryParser.parseTerm;case M.QueryLexer.FIELD:return t.nextClause(),M.QueryParser.parseField;case M.QueryLexer.EDIT_DISTANCE:return M.QueryParser.parseEditDistance;case M.QueryLexer.BOOST:return M.QueryParser.parseBoost;case M.QueryLexer.PRESENCE:return t.nextClause(),M.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+r.type+"'";throw new M.QueryParseError(n,r.start,r.end)}else t.nextClause()}},M.QueryParser.parseBoost=function(t){var e=t.consumeLexeme();if(null!=e){var o=parseInt(e.str,10);if(isNaN(o)){var n="boost must be numeric";throw new M.QueryParseError(n,e.start,e.end)}t.currentClause.boost=o;var r=t.peekLexeme();if(null!=r)switch(r.type){case M.QueryLexer.TERM:return t.nextClause(),M.QueryParser.parseTerm;case M.QueryLexer.FIELD:return t.nextClause(),M.QueryParser.parseField;case M.QueryLexer.EDIT_DISTANCE:return M.QueryParser.parseEditDistance;case M.QueryLexer.BOOST:return M.QueryParser.parseBoost;case M.QueryLexer.PRESENCE:return t.nextClause(),M.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+r.type+"'";throw new M.QueryParseError(n,r.start,r.end)}else t.nextClause()}},_=this,B=function(){return M},"object"==typeof o?e.exports=B():_.lunr=B()}()},{}],4:[function(t,e,o){e.exports={name:"pict-application",version:"1.0.34",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-docuserve":"^0.1.5","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.1.0",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],5:[function(t,e,o){const n=t("fable-serviceproviderbase"),r=t("../package.json"),i={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"};e.exports=class extends n{constructor(t,e,o){let n="object"==typeof t.settings.PictApplicationConfiguration?t.settings.PictApplicationConfiguration:{};super(t,Object.assign({},JSON.parse(JSON.stringify(i)),n,e),o),this.options,this.log,this.fable,this.UUID,this.Hash,this.servicesMap,this.serviceType="PictApplication",this._Package=r,this.pict=this.fable,this.AppData=this.fable.AppData,this.Bundle=this.fable.Bundle,this.initializeTimestamp,this.lastSolvedTimestamp,this.lastLoginTimestamp,this.lastMarshalFromViewsTimestamp,this.lastMarshalToViewsTimestamp,this.lastAutoRenderTimestamp,this.lastLoadDataTimestamp;let a=Object.keys(this.options.Manifests);if(a.length>0)for(let t=0;t<a.length;t++){let e=a[t];this.fable.instantiateServiceProvider("Manifest",this.options.Manifests[e],e)}}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}onPreSolveAsync(t){return this.onPreSolve(),t()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}onBeforeSolveAsync(t){return this.onBeforeSolve(),t()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}onSolveAsync(t){return this.onSolve(),t()}solve(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));let t=Object.keys(this.pict.providers),e=[];for(let o=0;o<t.length;o++){let n=this.pict.providers[t[o]];n.options.AutoSolveWithApp&&e.push(n)}e.sort((t,e)=>t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal);for(let t=0;t<e.length;t++)e[t].solve(e[t]);this.onBeforeSolve();let o=Object.keys(this.pict.views),n=[];for(let t=0;t<o.length;t++){let e=this.pict.views[o[t]];e.options.AutoInitialize&&n.push(e)}n.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let t=0;t<n.length;t++)n[t].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}solveAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");e.anticipate(this.onBeforeSolveAsync.bind(this));let o="function"==typeof t&&t;o||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});let n=Object.keys(this.pict.providers),r=[];for(let t=0;t<n.length;t++){let e=this.pict.providers[n[t]];e.options.AutoSolveWithApp&&r.push(e)}r.sort((t,e)=>t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal);for(let t=0;t<r.length;t++)e.anticipate(r[t].solveAsync.bind(r[t]));let i=Object.keys(this.pict.views),a=[];for(let t=0;t<i.length;t++){let e=this.pict.views[i[t]];e.options.AutoSolveWithApp&&a.push(e)}a.sort((t,e)=>t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal);for(let t=0;t<a.length;t++)e.anticipate(a[t].solveAsync.bind(a[t]));e.anticipate(this.onSolveAsync.bind(this)),e.anticipate(this.onAfterSolveAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync() complete.")),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),o(t)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}onAfterSolveAsync(t){return this.onAfterSolve(),t()}onBeforeLoginAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}onLoginAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}loginAsync(t){const e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let o=t;"function"!=typeof o&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeLoginAsync.bind(this)),e.anticipate(this.onLoginAsync.bind(this)),e.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&e.anticipate(t=>{if(!this.isLoggedIn())return t();this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto loading data after login...")),this.loadDataAsync(e=>{t(e)})}),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync() complete.")),this.lastLoginTimestamp=this.fable.log.getTimeStamp(),o(t)))}isLoggedIn(){return!0}onAfterLoginAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}onBeforeLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}onLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}loadDataAsync(t){const e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let o=t;"function"!=typeof o&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeLoadDataAsync.bind(this));let n=Object.keys(this.pict.providers),r=[];for(let t=0;t<n.length;t++){let e=this.pict.providers[n[t]];e.options.AutoLoadDataWithApp&&r.push(e)}r.sort((t,e)=>t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal);for(const t of r)e.anticipate(t.onBeforeLoadDataAsync.bind(t));e.anticipate(this.onLoadDataAsync.bind(this));for(const t of r)e.anticipate(t.onLoadDataAsync.bind(t));e.anticipate(this.onAfterLoadDataAsync.bind(this));for(const t of r)e.anticipate(t.onAfterLoadDataAsync.bind(t));e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync() complete.")),this.lastLoadDataTimestamp=this.fable.log.getTimeStamp(),o(t)))}onAfterLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}onBeforeSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}onSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}saveDataAsync(t){const e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let o=t;"function"!=typeof o&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeSaveDataAsync.bind(this));let n=Object.keys(this.pict.providers),r=[];for(let t=0;t<n.length;t++){let e=this.pict.providers[n[t]];e.options.AutoSaveDataWithApp&&r.push(e)}r.sort((t,e)=>t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal);for(const t of r)e.anticipate(t.onBeforeSaveDataAsync.bind(t));e.anticipate(this.onSaveDataAsync.bind(this));for(const t of r)e.anticipate(t.onSaveDataAsync.bind(t));e.anticipate(this.onAfterSaveDataAsync.bind(this));for(const t of r)e.anticipate(t.onAfterSaveDataAsync.bind(t));e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync() complete.")),this.lastSaveDataTimestamp=this.fable.log.getTimeStamp(),o(t)))}onAfterSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}onBeforeInitializeAsync(t){return this.onBeforeInitialize(),t()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}onInitializeAsync(t){return this.onInitialize(),t()}initialize(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;{if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(let t=0;t<this.options.ConfigurationOnlyViews.length;t++){let e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();let t=Object.keys(this.pict.providers),e=[];for(let o=0;o<t.length;o++){let n=this.pict.providers[t[o]];n.options.AutoInitialize&&e.push(n)}e.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let t=0;t<e.length;t++)e[t].initialize();let o=Object.keys(this.pict.views),n=[];for(let t=0;t<o.length;t++){let e=this.pict.views[o[t]];e.options.AutoInitialize&&n.push(e)}n.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let t=0;t<n.length;t++)n[t].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}}initializeAsync(t){this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));let e="function"==typeof t&&t;if(e||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),e=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(e);{let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(let t=0;t<this.options.ConfigurationOnlyViews.length;t++){let e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}t.anticipate(this.onBeforeInitializeAsync.bind(this)),t.anticipate(this.onInitializeAsync.bind(this));let o=Object.keys(this.pict.providers),n=[];for(let t=0;t<o.length;t++){let e=this.pict.providers[o[t]];e.options.AutoInitialize&&n.push(e)}n.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let e=0;e<n.length;e++)t.anticipate(n[e].initializeAsync.bind(n[e]));let r=Object.keys(this.pict.views),i=[];for(let t=0;t<r.length;t++){let e=this.pict.views[r[t]];e.options.AutoInitialize&&i.push(e)}i.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let e=0;e<i.length;e++){let o=i[e];t.anticipate(o.initializeAsync.bind(o))}t.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),t.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),t.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),t.anticipate(this.renderMainViewportAsync.bind(this))),t.wait(t=>(t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialization complete.")),e()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}onAfterInitializeAsync(t){return this.onAfterInitialize(),t()}onCompletionOfInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}onCompletionOfInitializeAsync(t){return this.onCompletionOfInitialize(),t()}onBeforeMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}onBeforeMarshalFromViewsAsync(t){return this.onBeforeMarshalFromViews(),t()}onMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}onMarshalFromViewsAsync(t){return this.onMarshalFromViews(),t()}marshalFromViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();let t=Object.keys(this.pict.views),e=[];for(let o=0;o<t.length;o++){let n=this.pict.views[t[o]];e.push(n)}for(let t=0;t<e.length;t++)e[t].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalFromViewsAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),o="function"==typeof t&&t;o||(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.")),o=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));let n=Object.keys(this.pict.views),r=[];for(let t=0;t<n.length;t++){let e=this.pict.views[n[t]];r.push(e)}for(let t=0;t<r.length;t++)e.anticipate(r[t].marshalFromViewAsync.bind(r[t]));e.anticipate(this.onMarshalFromViewsAsync.bind(this)),e.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync() complete.")),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),o(t)))}onAfterMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}onAfterMarshalFromViewsAsync(t){return this.onAfterMarshalFromViews(),t()}onBeforeMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}onBeforeMarshalToViewsAsync(t){return this.onBeforeMarshalToViews(),t()}onMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}onMarshalToViewsAsync(t){return this.onMarshalToViews(),t()}marshalToViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();let t=Object.keys(this.pict.views),e=[];for(let o=0;o<t.length;o++){let n=this.pict.views[t[o]];e.push(n)}for(let t=0;t<e.length;t++)e[t].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalToViewsAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),o="function"==typeof t&&t;o||(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.")),o=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));let n=Object.keys(this.pict.views),r=[];for(let t=0;t<n.length;t++){let e=this.pict.views[n[t]];r.push(e)}for(let t=0;t<r.length;t++)e.anticipate(r[t].marshalToViewAsync.bind(r[t]));e.anticipate(this.onMarshalToViewsAsync.bind(this)),e.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync() complete.")),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),o(t)))}onAfterMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}onAfterMarshalToViewsAsync(t){return this.onAfterMarshalToViews(),t()}onBeforeRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}onBeforeRenderAsync(t){return this.onBeforeRender(),t()}render(t,e,o,n){let r="string"!=typeof t?this.options.MainViewportViewIdentifier:t,i="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof o?this.options.MainViewportDestinationAddress:o,s="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(i,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();let l="string"==typeof r&&this.servicesMap.PictView[r];return l?(this.onRender(),l.render(i,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(r," because it is not a valid view.")),!1)}onRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}onRenderAsync(t){return this.onRender(),t()}renderAsync(t,e,o,n,r){let i="string"!=typeof t?this.options.MainViewportViewIdentifier:t,a="string"!=typeof e?this.options.MainViewportRenderableHash:e,s="string"!=typeof o?this.options.MainViewportDestinationAddress:o,l="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n,c="function"==typeof r?r:"function"==typeof n?n:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof t&&t;c||(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.")),c=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(a,"] Destination[").concat(s,"] TemplateDataAddress[").concat(l,"] renderAsync:"));let d=this.fable.newAnticipate();d.anticipate(this.onBeforeRenderAsync.bind(this));let p="string"==typeof i&&this.servicesMap.PictView[i];if(!p){let t="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(i," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(t),c(new Error(t))}return d.anticipate(this.onRenderAsync.bind(this)),d.anticipate(t=>{p.renderAsync.call(p,a,s,l,t)}),d.anticipate(this.onAfterRenderAsync.bind(this)),d.wait(c)}onAfterRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}onAfterRenderAsync(t){return this.onAfterRender(),t()}renderMainViewport(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}renderMainViewportAsync(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}renderAutoViews(){this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));let t=Object.keys(this.pict.views);t.sort((t,e)=>this.pict.views[t].options.AutoRenderOrdinal-this.pict.views[e].options.AutoRenderOrdinal);for(let e=0;e<t.length;e++){let o=this.pict.views[t[e]];o.options.AutoRender&&o.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}renderAutoViewsAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),o="function"==typeof t&&t;o||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));let n=Object.keys(this.pict.views);n.sort((t,e)=>this.pict.views[t].options.AutoRenderOrdinal-this.pict.views[e].options.AutoRenderOrdinal);for(let t=0;t<n.length;t++){let o=this.pict.views[n[t]];o.options.AutoRender&&e.anticipate(o.renderAsync.bind(o))}e.wait(t=>(this.lastAutoRenderTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete.")),o(t)))}get isPictApplication(){return!0}}},{"../package.json":4,"fable-serviceproviderbase":2}],6:[function(t,e,o){e.exports={name:"pict-provider",version:"1.0.13",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351","pict-docuserve":"^0.1.5",quackage:"^1.1.0",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],7:[function(t,e,o){const n=t("fable-serviceproviderbase"),r=t("../package.json"),i={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]};e.exports=class extends n{constructor(t,e,o){super(t,Object.assign({},JSON.parse(JSON.stringify(i)),e),o),this.fable,this.pict,this.log,this.options,this.UUID,this.Hash,this.options.ProviderIdentifier||(this.options.ProviderIdentifier="AutoProviderID-".concat(this.fable.getUUID())),this.serviceType="PictProvider",this._Package=r,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1;for(let t=0;t<this.options.Templates.length;t++){let e=this.options.Templates[t];e.hasOwnProperty("Postfix")&&e.hasOwnProperty("Template")?(e.Source||(e.Source="PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(e.Prefix,e.Postfix,e.Template,e.Source)):this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," could not load Default Template ").concat(t," in the options array."),e)}}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(t){return this.onBeforeInitialize(),t()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}onInitializeAsync(t){return this.onInitialize(),t()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(t){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();{let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),e.anticipate(this.onBeforeInitializeAsync.bind(this)),e.anticipate(this.onInitializeAsync.bind(this)),e.anticipate(this.onAfterInitializeAsync.bind(this)),e.wait(e=>(this.initializeTimestamp=this.pict.log.getTimeStamp(),e?this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization failed: ").concat(e.message||e),{Stack:e.stack}):this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization complete.")),t()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(t){return this.onAfterInitialize(),t()}onPreRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}onPreRenderAsync(t){return this.onPreRender(),t()}render(){return this.onPreRender()}renderAsync(t){return this.onPreRender(),t()}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}onPreSolveAsync(t){return this.onPreSolve(),t()}solve(){return this.onPreSolve()}solveAsync(t){return this.onPreSolve(),t()}onBeforeLoadDataAsync(t){return t()}onLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}onAfterLoadDataAsync(t){return t()}onBeforeSaveDataAsync(t){return t()}onSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}onAfterSaveDataAsync(t){return t()}}},{"../package.json":6,"fable-serviceproviderbase":2}],8:[function(t,e,o){const n={javascript:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2|(`(?:[^`\\]|\\.)*?`)|(\/(?![/*])(?:\\.|\[(?:\\.|[^\]])*\]|[^/\\\n])+\/[gimsuvy]*)/g,keywords:/\b(async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|import|in|instanceof|let|new|of|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/g,builtins:/\b(true|false|null|undefined|NaN|Infinity|console|window|document|Math|JSON|Array|Object|String|Number|Boolean|Date|RegExp|Map|Set|Promise|Error|Symbol|parseInt|parseFloat|require|module|exports)\b/g,numbers:/\b(\d+\.?\d*(?:e[+-]?\d+)?|0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+)\b/g},json:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:[^"\\]|\\.)*")/g,keywords:/\b(true|false|null)\b/g,numbers:/-?\b\d+\.?\d*(?:e[+-]?\d+)?\b/g},html:{tokenizer:/(<!--[\s\S]*?-->)|(["'])(?:(?!\2|\\).|\\.)*?\2|(<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*\/?>)/g,tagGroupIndex:3},css:{tokenizer:/(\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,selectors:/([.#]?[a-zA-Z_][\w-]*(?:\s*[>+~]\s*[.#]?[a-zA-Z_][\w-]*)*)\s*\{/g,properties:/\b([a-zA-Z-]+)\s*:/g,numbers:/\b(\d+\.?\d*)(px|em|rem|%|vh|vw|s|ms|deg|fr)?\b/g,keywords:/\b(important|inherit|initial|unset|none|auto|block|inline|flex|grid)\b/g},sql:{tokenizer:/(--[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,keywords:/\b(SELECT|FROM|WHERE|AND|OR|INSERT|INTO|VALUES|UPDATE|SET|DELETE|CREATE|TABLE|DROP|ALTER|ADD|COLUMN|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|ALL|DISTINCT|COUNT|SUM|AVG|MIN|MAX|NOT|NULL|IS|IN|BETWEEN|LIKE|EXISTS|CASE|WHEN|THEN|ELSE|END|PRIMARY|KEY|FOREIGN|REFERENCES|CONSTRAINT|DEFAULT|CHECK|UNIQUE|CASCADE|GRANT|REVOKE|COMMIT|ROLLBACK|BEGIN|TRANSACTION|INT|VARCHAR|DATETIME|AUTO_INCREMENT|CURRENT_TIMESTAMP)\b/gi,numbers:/\b\d+\.?\d*\b/g}};function r(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function i(t,e){let o=t;return e.selectors&&(e.selectors.lastIndex=0,o=o.replace(e.selectors,'<span class="function-name">$1</span>{')),e.properties&&(e.properties.lastIndex=0,o=o.replace(e.properties,'<span class="property">$1</span>:')),e.keywords&&(e.keywords.lastIndex=0,o=o.replace(e.keywords,'<span class="keyword">$1</span>')),e.builtins&&(e.builtins.lastIndex=0,o=o.replace(e.builtins,'<span class="keyword">$1</span>')),e.numbers&&(e.numbers.lastIndex=0,o=o.replace(e.numbers,t=>'<span class="number">'.concat(t,"</span>"))),o}function a(t){let e="",o=t,n=o.match(/^(<\/?)([a-zA-Z][a-zA-Z0-9-]*)/);if(!n)return r(t);e+=r(n[1]),e+='<span class="tag">'+r(n[2])+"</span>",o=o.substring(n[0].length);let i,a=/^(\s+)([a-zA-Z-]+)(?:(\s*=\s*)(["'])([^"']*?)\4)?/;for(;null!==(i=o.match(a));)e+=i[1],e+='<span class="attr-name">'+r(i[2])+"</span>",i[3]&&(e+=r(i[3]),e+='<span class="attr-value">'+r(i[4])+r(i[5])+r(i[4])+"</span>"),o=o.substring(i[0].length);return e+=r(o),e}n.js=n.javascript,n.htm=n.html,e.exports=function(t){return function(e){let o=e.textContent,s="string"==typeof t?t.toLowerCase():"javascript",l=n[s];if(!l)return void(e.innerHTML=r(o));if(!l.tokenizer)return void(e.innerHTML=i(r(o),l));let c,d="",p=0,h=l.tagGroupIndex||0;for(l.tokenizer.lastIndex=0;null!==(c=l.tokenizer.exec(o));){if(c.index>p){d+=i(r(o.substring(p,c.index)),l)}let t=c[0];c[1]?d+='<span class="comment">'.concat(r(t),"</span>"):h>0&&c[h]?d+=a(t):d+='<span class="string">'.concat(r(t),"</span>"),p=l.tokenizer.lastIndex}if(p<o.length){d+=i(r(o.substring(p)),l)}e.innerHTML=d}},e.exports.LanguageDefinitions=n},{}],9:[function(t,e,o){e.exports={RenderOnLoad:!0,DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#CodeEditor-Container-Div",Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- CodeEditor-Container Rendering Soon --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#CodeEditor-Container-Div"}],TargetElementAddress:"#CodeEditor-Container-Div",CodeDataAddress:!1,Language:"javascript",ReadOnly:!1,Tab:"\t",IndentOn:/[({[]$/,MoveToNewLine:/^[)}\]]/,AddClosing:!0,CatchTab:!0,LineNumbers:!0,DefaultCode:"// Enter your code here\n",CSS:".pict-code-editor-wrap\n{\n\tdisplay: flex;\n\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace);\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tborder: 1px solid var(--theme-color-border-default, #D0D0D0);\n\tborder-radius: 4px;\n\toverflow: hidden;\n}\n.pict-code-editor-wrap .pict-code-line-numbers\n{\n\twidth: 40px;\n\tmin-width: 40px;\n\t/* padding-top/bottom are stamped at runtime from the editor's\n\t computed padding so row 1 of the gutter aligns with row 1 of\n\t the code; only horizontal padding is stylesheet-owned. */\n\tpadding: 0;\n\ttext-align: right;\n\tbackground: var(--theme-color-editor-linenumber-background, var(--theme-color-background-secondary, #F5F5F5));\n\tborder-right: 1px solid var(--theme-color-editor-gutter-border, var(--theme-color-border-default, #D0D0D0));\n\tcolor: var(--theme-color-editor-linenumber-text, var(--theme-color-text-muted, #999));\n\tfont-size: 13px;\n\t/* line-height, padding-top, padding-bottom, and font-family are\n\t intentionally NOT declared here. PictSectionCode._syncGutterMetrics()\n\t copies them from the editor's computed styles at init and on every\n\t editor resize, so the gutter is guaranteed to track the editor.\n\t Declaring them in CSS would either be redundant (when matching) or\n\t actively wrong (when the editor's metrics diverge — e.g. theme scale\n\t changes the editor's font-size). See codejar-linenumbers for the\n\t canonical version of this pattern. */\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-sizing: border-box;\n}\n.pict-code-editor-wrap .pict-code-line-numbers span\n{\n\tdisplay: block;\n\tpadding: 0 8px 0 0;\n}\n.pict-code-editor-wrap .pict-code-editor\n{\n\tmargin: 0;\n\tpadding: 10px 10px 10px 8px;\n\tmin-height: 100px;\n\tflex: 1;\n\tmin-width: 0;\n\toutline: none;\n\ttab-size: 4;\n\twhite-space: pre;\n\toverflow-wrap: normal;\n\tcolor: var(--theme-color-text-primary, #383A42);\n\tbackground: var(--theme-color-background-panel, #FAFAFA);\n\tcaret-color: var(--theme-color-brand-primary, #526FFF);\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-code-editor-wrap .pict-code-editor.pict-code-no-line-numbers\n{\n\tpadding-left: 10px;\n\tborder-radius: 4px;\n}\n.pict-code-editor-wrap .pict-code-editor::selection,\n.pict-code-editor-wrap .pict-code-editor *::selection\n{\n\tbackground: var(--theme-color-editor-selection-background, var(--theme-color-selection-background, #B3D4FC));\n}\n/* Syntax token colors — each class binds to a Color.Syntax.* token from\n pict-provider-theme. Fallback hexes match the One Light palette so apps\n that don't install the theme provider look the same as before. */\n.pict-code-editor-wrap .pict-code-editor .keyword { color: var(--theme-color-syntax-keyword, #A626A4); }\n.pict-code-editor-wrap .pict-code-editor .string { color: var(--theme-color-syntax-string, #50A14F); }\n.pict-code-editor-wrap .pict-code-editor .number { color: var(--theme-color-syntax-number, #986801); }\n.pict-code-editor-wrap .pict-code-editor .comment { color: var(--theme-color-syntax-comment, #A0A1A7); font-style: italic; }\n.pict-code-editor-wrap .pict-code-editor .operator { color: var(--theme-color-syntax-operator, #0184BC); }\n.pict-code-editor-wrap .pict-code-editor .punctuation { color: var(--theme-color-syntax-punctuation, #383A42); }\n.pict-code-editor-wrap .pict-code-editor .function-name { color: var(--theme-color-syntax-function, #4078F2); }\n.pict-code-editor-wrap .pict-code-editor .property { color: var(--theme-color-syntax-property, #E45649); }\n.pict-code-editor-wrap .pict-code-editor .tag { color: var(--theme-color-syntax-tag, #E45649); }\n.pict-code-editor-wrap .pict-code-editor .attr-name { color: var(--theme-color-syntax-attrname, #986801); }\n.pict-code-editor-wrap .pict-code-editor .attr-value { color: var(--theme-color-syntax-attrvalue, #50A14F); }\n.pict-code-editor-wrap .pict-code-editor .builtin { color: var(--theme-color-syntax-builtin, #986801); }\n.pict-code-editor-wrap .pict-code-editor .type { color: var(--theme-color-syntax-type, #C18401); }\n.pict-code-editor-wrap .pict-code-editor .variable { color: var(--theme-color-syntax-variable, #383A42); }\n\n/* highlight.js class aliases — when host apps render code blocks with\n highlight.js (e.g. markdown previews via CodeJar's hljs integration),\n the output uses .hljs / .hljs-* classes rather than the bare token\n classes pict-section-code emits. Mapping them here lets one stylesheet\n theme both editor surfaces (bare classes) and hljs-rendered surfaces\n without the host needing a separate per-app github.css. Rules are\n intentionally unscoped (no .pict-code-editor-wrap parent) so they\n apply globally wherever hljs paints. */\n.hljs { color: var(--theme-color-text-primary, #383A42); background: transparent; }\n.hljs-keyword,\n.hljs-keyword.hljs-typeof,\n.hljs-selector-tag,\n.hljs-literal { color: var(--theme-color-syntax-keyword, #A626A4); }\n.hljs-string,\n.hljs-regexp,\n.hljs-template-tag,\n.hljs-template-variable { color: var(--theme-color-syntax-string, #50A14F); }\n.hljs-number,\n.hljs-meta { color: var(--theme-color-syntax-number, #986801); }\n.hljs-comment,\n.hljs-quote { color: var(--theme-color-syntax-comment, #A0A1A7); font-style: italic; }\n.hljs-operator,\n.hljs-link { color: var(--theme-color-syntax-operator, #0184BC); }\n.hljs-punctuation { color: var(--theme-color-syntax-punctuation, #383A42); }\n.hljs-function .hljs-title,\n.hljs-title.function_,\n.hljs-title.class_ { color: var(--theme-color-syntax-function, #4078F2); }\n.hljs-variable,\n.hljs-variable.language_,\n.hljs-params { color: var(--theme-color-syntax-variable, #383A42); }\n.hljs-type,\n.hljs-class .hljs-title { color: var(--theme-color-syntax-type, #C18401); }\n.hljs-built_in,\n.hljs-builtin-name { color: var(--theme-color-syntax-builtin, #986801); }\n.hljs-attr,\n.hljs-property { color: var(--theme-color-syntax-property, #E45649); }\n.hljs-tag,\n.hljs-name { color: var(--theme-color-syntax-tag, #E45649); }\n.hljs-attribute { color: var(--theme-color-syntax-attrname, #986801); }\n.hljs-symbol { color: var(--theme-color-syntax-attrvalue, #50A14F); }\n.hljs-emphasis { font-style: italic; }\n.hljs-strong { font-weight: bold; }\n.hljs-deletion { color: var(--theme-color-status-error, #B62828); background: rgba(220, 50, 47, 0.08); }\n.hljs-addition { color: var(--theme-color-status-success, #2E7A3A); background: rgba(80, 161, 79, 0.10); }\n"}},{}],10:[function(t,e,o){const n=t("pict-view"),r=t("./Pict-Code-Highlighter.js"),i=t("./Pict-Section-Code-DefaultConfiguration.js");e.exports=class extends n{constructor(t,e,o){super(t,Object.assign({},i,e),o),this.initialRenderComplete=!1,this.codeJar=null,this._highlightFunction=null,this._language=this.options.Language||"javascript"}onBeforeInitialize(){return super.onBeforeInitialize(),this._codeJarPrototype=null,this.targetElement=!1,this._highlightFunction=r(this._language),super.onBeforeInitialize()}connectCodeJarPrototype(t){if("function"!=typeof t)return"undefined"!=typeof window&&"function"==typeof window.CodeJar?(this.log.trace("PICT-Code Found CodeJar in window.CodeJar."),void(this._codeJarPrototype=window.CodeJar)):(this.log.error("PICT-Code No CodeJar prototype found. Include codejar via script tag or call connectCodeJarPrototype(CodeJar) explicitly."),!1);this._codeJarPrototype=t}onAfterRender(t){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),super.onAfterRender(t)}onAfterInitialRender(){if(this._codeJarPrototype||this.connectCodeJarPrototype(),!this._codeJarPrototype)return this.log.error("PICT-Code Cannot initialize editor; no CodeJar prototype available."),!1;if(this.codeJar)return this.log.error("PICT-Code editor is already initialized!"),!1;let t=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!t||t.length<1)return this.log.error("PICT-Code Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=t[0],this._buildEditorDOM();let e=this._resolveCodeContent(),o={};this.options.Tab&&(o.tab=this.options.Tab),this.options.IndentOn&&(o.indentOn=this.options.IndentOn),this.options.MoveToNewLine&&(o.moveToNewLine=this.options.MoveToNewLine),void 0!==this.options.AddClosing&&(o.addClosing=this.options.AddClosing),void 0!==this.options.CatchTab&&(o.catchTab=this.options.CatchTab),this.customConfigureEditorOptions(o);let n=this._editorElement;if(this.codeJar=this._codeJarPrototype(n,this._highlightFunction,o),this._resetEditorWrapStyles(),e&&this.codeJar.updateCode(e),this.codeJar.onUpdate(t=>{this._updateLineNumbers(),this.onCodeChange(t)}),this._updateLineNumbers(),this._lineNumbersElement){let t=this._lineNumbersElement;n.addEventListener("scroll",function(){t.style.transform="translateY(-"+n.scrollTop+"px)"},{passive:!0})}if(this._syncGutterMetrics(),this._lineNumbersElement&&"function"==typeof ResizeObserver){let t=this;this._editorResizeObserver=new ResizeObserver(function(){t._syncGutterMetrics()}),this._editorResizeObserver.observe(n)}if(this._lineNumbersElement&&"function"==typeof MutationObserver){let t=this;this._editorStyleObserver=new MutationObserver(function(){t._syncGutterMetrics()}),this._editorStyleObserver.observe(n,{attributes:!0,attributeFilter:["style","class"]})}this.options.ReadOnly&&n.setAttribute("contenteditable","false")}_buildEditorDOM(){this.targetElement.innerHTML="";let t=document.createElement("div");if(t.className="pict-code-editor-wrap",this.options.LineNumbers){let e=document.createElement("div");e.className="pict-code-line-numbers",t.appendChild(e),this._lineNumbersElement=e}let e=document.createElement("div");e.className="pict-code-editor language-"+this._language,this.options.LineNumbers||(e.className+=" pict-code-no-line-numbers"),t.appendChild(e),this.targetElement.appendChild(t),this._editorElement=e,this._wrapElement=t}_updateLineNumbers(){if(!this.options.LineNumbers||!this._lineNumbersElement||!this._editorElement)return;let t=(this._editorElement.textContent||"").split("\n").length,e="";for(let o=1;o<=t;o++)e+="<span>".concat(o,"</span>");this._lineNumbersElement.innerHTML=e,this._syncGutterMetrics()}_syncGutterMetrics(){if(!this._lineNumbersElement||!this._editorElement)return;if("undefined"==typeof window||"function"!=typeof window.getComputedStyle)return;let t=window.getComputedStyle(this._editorElement),e=t.lineHeight;if(e&&"normal"!==e&&(this._lineNumbersElement.style.lineHeight=e),t.paddingTop&&(this._lineNumbersElement.style.paddingTop=t.paddingTop),t.paddingBottom&&(this._lineNumbersElement.style.paddingBottom=t.paddingBottom),t.fontFamily&&(this._lineNumbersElement.style.fontFamily=t.fontFamily),"undefined"!=typeof console&&console.warn){let t=this._lineNumbersElement.querySelector("span");if(t){let o=t.getBoundingClientRect().height,n=parseFloat(e);o&&n&&Math.abs(o-n)>.5&&console.warn("[pict-section-code] gutter/editor row-height mismatch: gutter "+o+"px vs editor "+n+"px — line numbers will drift. Check for CSS overriding .pict-code-line-numbers line-height.")}}}syncMetrics(){this._syncGutterMetrics()}_resetEditorWrapStyles(){this._editorElement&&(this._editorElement.style.whiteSpace="pre",this._editorElement.style.overflowWrap="normal")}_resolveCodeContent(){if(this.options.CodeDataAddress){const t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};let e=this.fable.manifest.getValueByHash(t,this.options.CodeDataAddress);if("string"==typeof e)return e;this.log.warn("PICT-Code Address [".concat(this.options.CodeDataAddress,"] did not return a string; it was ").concat(typeof e,"."))}return this.options.DefaultCode||""}customConfigureEditorOptions(t){}onCodeChange(t){if(this.options.CodeDataAddress){const e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.CodeDataAddress,t)}}getCode(){return this.codeJar?this.codeJar.toString():(this.log.warn("PICT-Code getCode called before editor initialized."),"")}setCode(t){this.codeJar?(this.codeJar.updateCode(t),this._updateLineNumbers()):this.log.warn("PICT-Code setCode called before editor initialized.")}setLanguage(t){if(this._language=t,this._highlightFunction=r(t),this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){let t=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(t),this.codeJar.onUpdate(t=>{this._updateLineNumbers(),this.onCodeChange(t)})}}setHighlightFunction(t){if("function"==typeof t){if(this._highlightFunction=t,this.codeJar){let t=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(t),this.codeJar.onUpdate(t=>{this._updateLineNumbers(),this.onCodeChange(t)})}}else this.log.error("PICT-Code setHighlightFunction requires a function.")}setReadOnly(t){this.options.ReadOnly=t,this._editorElement&&this._editorElement.setAttribute("contenteditable",t?"false":"true")}destroy(){this._editorResizeObserver&&(this._editorResizeObserver.disconnect(),this._editorResizeObserver=null),this._editorStyleObserver&&(this._editorStyleObserver.disconnect(),this._editorStyleObserver=null),this.codeJar&&(this.codeJar.destroy(),this.codeJar=null)}marshalToView(){if(super.marshalToView(),this.codeJar&&this.options.CodeDataAddress){let t=this._resolveCodeContent();"string"==typeof t&&(this.codeJar.updateCode(t),this._updateLineNumbers())}}marshalFromView(){super.marshalFromView(),this.codeJar&&this.options.CodeDataAddress&&this.onCodeChange(this.codeJar.toString())}},e.exports.default_configuration=i,e.exports.createHighlighter=r;const a=t("./demos");e.exports.demos=a.demos,e.exports.registerWithDocuserve=a.registerWithDocuserve},{"./Pict-Code-Highlighter.js":8,"./Pict-Section-Code-DefaultConfiguration.js":9,"./demos":11,"pict-view":75}],11:[function(t,e,o){const n=t("../Pict-Section-Code.js");function r(t,e,o){let r="demo-code-"+(o.Hash||"unnamed")+"-"+Date.now();e.innerHTML='<div id="'+r+'"></div>';let i={ViewIdentifier:"Demo-Code-"+r,DefaultDestinationAddress:"#"+r,Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- demo code editor renders here --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#"+r}],TargetElementAddress:"#"+r,Language:o.Language||"javascript",ReadOnly:!!o.ReadOnly,LineNumbers:!1!==o.LineNumbers,Tab:o.Tab||"\t",AddClosing:!1!==o.AddClosing,CatchTab:!1!==o.CatchTab,DefaultCode:o.Code||"// example code\n",AutoRender:!1,RenderOnLoad:!1},a=t.addView(i.ViewIdentifier,i,n);if(!a)return null;if("undefined"!=typeof window&&(window.CodeJarModules&&"function"==typeof window.CodeJarModules.CodeJar?a.connectCodeJarPrototype(window.CodeJarModules.CodeJar):"function"==typeof window.CodeJar&&a.connectCodeJarPrototype(window.CodeJar),window.CodeJarModules&&window.CodeJarModules.hljs)){let t=window.CodeJarModules.hljs,e=i.Language;a._highlightFunction=function(o){o.removeAttribute("data-highlighted"),delete o.dataset.highlighted,o.className=o.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),o.classList.add("language-"+e);try{t.highlightElement(o)}catch(t){}}}try{a.render()}catch(t){}return a}const i=[{DemoSchemaVersion:1,Hash:"javascript-editor",Group:"pict",Module:"pict-section-code",Name:"JavaScript editor",Description:"Default pict-section-code configuration — line numbers on, highlight.js for JavaScript, two-space tab.",Spec:{Hash:"javascript-editor",Language:"javascript",LineNumbers:!0,Tab:" ",Code:"// A small example — try editing me.\nfunction fibonacci(n) {\n if (n <= 1) return n;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\nfor (let i = 0; i < 10; i++) {\n console.log(`fib(${i}) =`, fibonacci(i));\n}\n"},Mount:r,Sources:[{Name:"spec.json",Language:"json",Content:'{\n "Language": "javascript",\n "LineNumbers": true,\n "Tab": " ",\n "Code": "function fibonacci(n) { … }"\n}'}]},{DemoSchemaVersion:1,Hash:"json-readonly",Group:"pict",Module:"pict-section-code",Name:"JSON viewer (read-only)",Description:'Read-only mode with line numbers off — useful for embedded "show me the payload" surfaces in dashboards.',Spec:{Hash:"json-readonly",Language:"json",ReadOnly:!0,LineNumbers:!1,Code:'{\n "version": "1.0.7",\n "syntax": {\n "keyword": "#A626A4",\n "string": "#50A14F",\n "number": "#986801",\n "function": "#4078F2"\n },\n "features": ["highlighting", "line-numbers", "readonly", "themed"]\n}\n'},Mount:r,Sources:[{Name:"spec.json",Language:"json",Content:'{\n "Language": "json",\n "ReadOnly": true,\n "LineNumbers": false\n}'}]},{DemoSchemaVersion:1,Hash:"css-editor",Group:"pict",Module:"pict-section-code",Name:"CSS editor (4-space tab)",Description:"CSS-flavoured highlighting with a 4-space tab and bracket auto-close turned off — leaner editing for stylesheet snippets.",Spec:{Hash:"css-editor",Language:"css",LineNumbers:!0,Tab:" ",AddClosing:!1,Code:"/* Theme-aware token usage */\n.docuserve-demo-title {\n color: var(--theme-color-text-primary, #3D3229);\n font-size: 1.5em;\n font-weight: 600;\n}\n\n.docuserve-demo-description {\n color: var(--theme-color-text-secondary, #5E5549);\n line-height: 1.55;\n}\n"},Mount:r,Sources:[{Name:"spec.json",Language:"json",Content:'{\n "Language": "css",\n "LineNumbers": true,\n "Tab": " ",\n "AddClosing": false\n}'}]}];e.exports=i,e.exports.demos=i,e.exports.registerWithDocuserve=function(t){return t&&t.providers&&t.providers["Docuserve-Demos"]?t.providers["Docuserve-Demos"].registerAll(i):0}},{"../Pict-Section-Code.js":10}],12:[function(t,e,o){e.exports=t("./views/Pict-View-Content.js"),e.exports.PictContentProvider=t("./providers/Pict-Provider-Content.js")},{"./providers/Pict-Provider-Content.js":13,"./views/Pict-View-Content.js":14}],13:[function(t,e,o){const n=t("pict-provider"),r=t("pict-section-code").createHighlighter;e.exports=class extends n{constructor(t,e,o){super(t,e,o)}highlightCode(t,e){if(!t)return"";let o={textContent:t,innerHTML:""};return r(e)(o),o.innerHTML}generateLineNumbers(t){if(!t)return"<span>1</span>";let e=t.split("\n").length,o="";for(let t=1;t<=e;t++)o+="<span>"+t+"</span>";return o}parseMarkdown(t,e,o,n){if(!t)return"";let r=t.split("\n"),i=[],a=!1,s=0,l="",c=[],d=!1,p="",h=!1,u=[],m=!1,g=[],f=[],b=()=>{f.length>0&&(i.push("<p>"+f.map(t=>this.parseInline(t,e,o,n)).join(" ")+"</p>"),f=[])};for(let t=0;t<r.length;t++){let v=r[t];if(!a&&v.trim().match(/^\$\$/)){m?(i.push('<div class="pict-content-katex-display">'+g.join("\n")+"</div>"),m=!1,g=[]):(b(),d&&(i.push("ul"===p?"</ul>":"</ol>"),d=!1),h&&(i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,o,n)+"</blockquote>"),h=!1,u=[]),m=!0);continue}if(m){g.push(v);continue}let y=v.match(/^(`{3,})/);if(y){let t=y[1].length;if(a){if(t>=s&&v.trim()===y[1]){if("mermaid"===l)i.push('<pre class="mermaid">'+c.join("\n")+"</pre>");else{let t=c.join("\n"),e=this.highlightCode(t,l),o=this.generateLineNumbers(t);i.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+o+'</div><pre><code class="language-'+this.escapeHTML(l)+'">'+e+"</code></pre></div>")}a=!1,s=0,l="",c=[];continue}c.push(v);continue}b(),d&&(i.push("ul"===p?"</ul>":"</ol>"),d=!1),h&&(i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,o,n)+"</blockquote>"),h=!1,u=[]),s=t,l=v.replace(/^`{3,}/,"").trim(),a=!0;continue}if(a){c.push(v);continue}if(v.match(/^>\s?/)){h||(b(),d&&(i.push("ul"===p?"</ul>":"</ol>"),d=!1),h=!0,u=[]),u.push(v.replace(/^>\s?/,""));continue}if(h&&(i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,o,n)+"</blockquote>"),h=!1,u=[]),v.match(/^(-{3,}|\*{3,}|_{3,})\s*$/)){b(),d&&(i.push("ul"===p?"</ul>":"</ol>"),d=!1),i.push("<hr>");continue}let w=v.match(/^(#{1,6})\s+(.+)/);if(w){b(),d&&(i.push("ul"===p?"</ul>":"</ol>"),d=!1);let t=w[1].length,r=this.parseInline(w[2],e,o,n),a=w[2].toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");i.push("<h"+t+' id="'+a+'">'+r+"</h"+t+">");continue}let D=v.match(/^(\s*)[-*+]\s+(.*)/);if(D){b(),d&&"ul"===p||(d&&i.push("ul"===p?"</ul>":"</ol>"),i.push("<ul>"),d=!0,p="ul"),i.push("<li>"+this.parseInline(D[2],e,o,n)+"</li>");continue}let x=v.match(/^(\s*)\d+\.\s+(.*)/);if(x)b(),d&&"ol"===p||(d&&i.push("ul"===p?"</ul>":"</ol>"),i.push("<ol>"),d=!0,p="ol"),i.push("<li>"+this.parseInline(x[2],e,o,n)+"</li>");else if(d&&""!==v.trim()&&(i.push("ul"===p?"</ul>":"</ol>"),d=!1),""!==v.trim()){if(v.match(/^\|/)&&t+1<r.length&&r[t+1].match(/^\|[\s-:|]+\|/)){b(),d&&(i.push("ul"===p?"</ul>":"</ol>"),d=!1);let a="<table>",s=v.split("|").filter(t=>""!==t.trim());a+="<thead><tr>";for(let t=0;t<s.length;t++)a+="<th>"+this.parseInline(s[t].trim(),e,o,n)+"</th>";for(a+="</tr></thead>",t++,a+="<tbody>";t+1<r.length&&r[t+1].match(/^\|/);){t++;let i=r[t].split("|").filter(t=>""!==t.trim());a+="<tr>";for(let t=0;t<i.length;t++)a+="<td>"+this.parseInline(i[t].trim(),e,o,n)+"</td>";a+="</tr>"}a+="</tbody></table>",i.push(a);continue}f.push(v)}else b()}if(b(),d&&i.push("ul"===p?"</ul>":"</ol>"),h&&i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,o,n)+"</blockquote>"),a){let t=c.join("\n"),e=this.highlightCode(t,l),o=this.generateLineNumbers(t);i.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+o+"</div><pre><code>"+e+"</code></pre></div>")}return i.join("\n")}parseInline(t,e,o,n){if(!t)return"";let r=t,i=[];return r=r.replace(/`([^`]+)`/g,(t,e)=>{let o=i.length;return i.push("<code>"+e+"</code>"),"\0CODEINLINE"+o+"\0"}),r=r.replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>'),r=r.replace(/\$([^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>'),r=r.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(t,e,n)=>{let r=n;if("function"==typeof o){let t=o(n,e);t&&(r=t)}return'<img src="'+r+'" alt="'+e+'">'}),r=r.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(t,o,n)=>{if("function"==typeof e){let t=e(n,o);if(t){let e=t.target?' target="'+t.target+'"':"",n=t.rel?' rel="'+t.rel+'"':"";return'<a href="'+t.href+'"'+e+n+">"+o+"</a>"}}return n.match(/^https?:\/\//)?'<a href="'+n+'" target="_blank" rel="noopener">'+o+"</a>":'<a href="'+n+'">'+o+"</a>"}),r=r.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),r=r.replace(/__([^_]+)__/g,"<strong>$1</strong>"),r=r.replace(/\*([^*]+)\*/g,"<em>$1</em>"),r=r.replace(/_([^_]+)_/g,"<em>$1</em>"),r=r.replace(/\x00CODEINLINE(\d+)\x00/g,(t,e)=>i[parseInt(e)]),"function"==typeof n&&(r=this._applyVocabularyLinks(r,n)),r}_applyVocabularyLinks(t,e){if(!t||"function"!=typeof e)return t;let o={},n=t.split(/(<[^>]+>)/g),r=0,i=["code","a","pre","span"];for(let t=0;t<n.length;t++){let a=n[t];if("<"===a.charAt(0)){let t=a.match(/^<(\w+)/);t&&-1!==i.indexOf(t[1].toLowerCase())&&r++;let e=a.match(/^<\/(\w+)/);e&&-1!==i.indexOf(e[1].toLowerCase())&&(r=Math.max(0,r-1));continue}r>0||(n[t]=a.replace(/\b([A-Za-z][A-Za-z0-9_-]{1,30})\b/g,(t,n)=>{if(n.length<3)return t;let r=n.toLowerCase();if(o[r])return t;let i=e(r);if(!i)return t;o[r]=!0;let a=(i.short||"").replace(/"/g,"&quot;");return'<span class="pict-vocab-term" data-vocab-slug="'+i.slug+'" data-vocab-title="'+(i.title||"").replace(/"/g,"&quot;")+'" data-vocab-short="'+a+'">'+t+"</span>"}))}return n.join("")}escapeHTML(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}},e.exports.default_configuration={ProviderIdentifier:"Pict-Content",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":7,"pict-section-code":10}],14:[function(t,e,o){const n=t("pict-view");class r extends n{constructor(t,e,o){super(t,e,o)}displayContent(t,e){let o=e||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+o,t);let n=document.getElementById(o);n&&n.parentElement&&(n.parentElement.scrollTop=0),n&&!n.classList.contains("pict-content")&&n.classList.add("pict-content"),this.enableFullscreenViewers(o,{skipMermaid:!0}),this.renderMermaidDiagrams(o),this.renderKaTeXEquations(o)}_initializeMermaidTheme(){if("undefined"==typeof mermaid||"undefined"==typeof window)return;let t=getComputedStyle(document.documentElement),e=(e,o)=>(t.getPropertyValue(e)||"").trim()||o;try{mermaid.initialize({startOnLoad:!1,theme:"base",securityLevel:"loose",themeVariables:{primaryColor:e("--theme-color-background-panel","#FAF8F4"),primaryTextColor:e("--theme-color-text-primary","#3D3229"),primaryBorderColor:e("--theme-color-brand-primary","#2E7D74"),secondaryColor:e("--theme-color-background-secondary","#F0EDE8"),secondaryTextColor:e("--theme-color-text-secondary","#5E5549"),secondaryBorderColor:e("--theme-color-border-default","#DDD6CA"),tertiaryColor:e("--theme-color-background-tertiary","#EDE9E3"),tertiaryTextColor:e("--theme-color-text-secondary","#5E5549"),tertiaryBorderColor:e("--theme-color-border-light","#E8E2D7"),background:e("--theme-color-background-panel","#FAF8F4"),mainBkg:e("--theme-color-background-panel","#FAF8F4"),secondBkg:e("--theme-color-background-secondary","#F0EDE8"),lineColor:e("--theme-color-text-secondary","#5E5549"),textColor:e("--theme-color-text-primary","#3D3229"),noteBkgColor:e("--theme-color-background-tertiary","#EDE9E3"),noteTextColor:e("--theme-color-text-primary","#3D3229"),noteBorderColor:e("--theme-color-border-default","#DDD6CA"),errorBkgColor:e("--theme-color-status-error","#D9534F"),errorTextColor:e("--theme-color-text-on-brand","#FFFFFF"),fontFamily:e("--theme-typography-family-sans","inherit")}})}catch(t){this.log&&this.log.warn&&this.log.warn("Mermaid theme init failed: "+t.message)}}_subscribeToThemeChanges(){if(this._mermaidThemeSubscribed)return;let t=this.pict&&this.pict.providers&&this.pict.providers.Theme;if(!t||"function"!=typeof t.onApply)return;let e=this;t.onApply(function(){e._initializeMermaidTheme(),e._refreshMermaidDiagrams()}),this._mermaidThemeSubscribed=!0}_refreshMermaidDiagrams(){if("undefined"==typeof mermaid||"undefined"==typeof document)return;let t=document.querySelectorAll("pre.mermaid[data-mermaid-source]");if(!(t.length<1)){for(let e=0;e<t.length;e++){let o=t[e];o.textContent=o.getAttribute("data-mermaid-source"),o.removeAttribute("data-processed"),o.classList.remove("mermaid-rendered")}try{let e=mermaid.run({nodes:t});e&&"function"==typeof e.catch&&e.catch(t=>{this.log&&this.log.warn&&this.log.warn("Mermaid re-render failed: "+(t&&t.message?t.message:t))})}catch(t){this.log&&this.log.warn&&this.log.warn("Mermaid re-render failed: "+t.message)}}}renderMermaidDiagrams(t){if("undefined"==typeof mermaid)return;let e=t||"Pict-Content-Body",o=document.getElementById(e);if(!o)return;let n=o.querySelectorAll("pre.mermaid");if(!(n.length<1)){this._initializeMermaidTheme(),this._subscribeToThemeChanges();for(let t=0;t<n.length;t++){let e=n[t];e.hasAttribute("data-mermaid-source")||e.setAttribute("data-mermaid-source",e.textContent)}try{let t=mermaid.run({nodes:n});t&&"function"==typeof t.then?t.then(()=>{this.enableFullscreenViewers(e,{onlyMermaid:!0})}).catch(t=>{this.log.error("Mermaid rendering error: "+(t&&t.message?t.message:t))}):this.enableFullscreenViewers(e,{onlyMermaid:!0})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}}renderKaTeXEquations(t){if("undefined"==typeof katex)return;let e=t||"Pict-Content-Body",o=document.getElementById(e);if(!o)return;let n=o.querySelectorAll(".pict-content-katex-inline");for(let t=0;t<n.length;t++)try{katex.render(n[t].textContent,n[t],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}let r=o.querySelectorAll(".pict-content-katex-display");for(let t=0;t<r.length;t++)try{katex.render(r[t].textContent,r[t],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}enableFullscreenViewers(t,e){let o=t||"Pict-Content-Body",n=document.getElementById(o);if(!n)return;let r=e||{};if(!r.onlyMermaid){let t=n.querySelectorAll("img:not([data-fullscreen-source])");for(let e=0;e<t.length;e++){let o=t[e];o.setAttribute("data-fullscreen-source","image");let n=o.getAttribute("alt");if(!n){n=(o.getAttribute("src")||"").split("/").pop().split("?")[0]||"Image"}o.setAttribute("data-fullscreen-title",n)}let e=n.querySelectorAll(".pict-content-code-wrap:not([data-code-actions-wired])");for(let t=0;t<e.length;t++)this._wireCodeActions(e[t])}if(!r.skipMermaid){let t=n.querySelectorAll("pre.mermaid:not([data-fullscreen-source])");for(let e=0;e<t.length;e++){let o=t[e];o.querySelector("svg")&&(o.setAttribute("data-fullscreen-source","mermaid"),o.setAttribute("data-fullscreen-title","Mermaid Diagram"))}}n.__pictFullscreenWired||(n.__pictFullscreenWired=!0,n.addEventListener("click",t=>{let e=t.target;for(;e&&e!==n&&!e.hasAttribute("data-fullscreen-source");)e=e.parentElement;e&&e!==n&&e.hasAttribute("data-fullscreen-source")&&(t.preventDefault(),this._openFullscreen(e))}))}_wireCodeActions(t){if(!t||t.hasAttribute("data-code-actions-wired"))return;t.setAttribute("data-code-actions-wired","true");let e=t.querySelector('code[class*="language-"]'),o="Code";if(e){let t=(e.getAttribute("class")||"").match(/language-(\S+)/);t&&(o=t[1]+" code")}t.setAttribute("data-code-language",o);let n=document.createElement("div");n.className="pict-content-code-container";let r=document.createElement("div");r.className="pict-content-code-actions",r.setAttribute("aria-hidden","false");let i=document.createElement("button");i.type="button",i.className="pict-content-code-action-btn",i.setAttribute("aria-label","Open code in fullscreen"),i.setAttribute("title","Open in fullscreen"),i.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true"><polyline points="3 6 3 3 6 3"></polyline><polyline points="13 6 13 3 10 3"></polyline><polyline points="3 10 3 13 6 13"></polyline><polyline points="13 10 13 13 10 13"></polyline></svg>';let a=document.createElement("button");a.type="button",a.className="pict-content-code-action-btn",a.setAttribute("aria-label","Copy code to clipboard"),a.setAttribute("title","Copy code"),a.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="5" y="5" width="9" height="9" rx="1.25"></rect><path d="M11 5V3.25A1.25 1.25 0 0 0 9.75 2H3.25A1.25 1.25 0 0 0 2 3.25v6.5A1.25 1.25 0 0 0 3.25 11H5"></path></svg>',r.appendChild(i),r.appendChild(a),t.parentNode.insertBefore(n,t),n.appendChild(t),n.appendChild(r),i.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this._openCodeFullscreen(t)}),a.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this._copyCodeToClipboard(t,a)})}_openCodeFullscreen(t){let e=this._buildFullscreenOverlay();t.setAttribute("data-fullscreen-source","code"),t.setAttribute("data-fullscreen-title",t.getAttribute("data-code-language")||"Code"),e.open(t)}_copyCodeToClipboard(t,e){let o=t.querySelector("code"),n=o?o.textContent:t.textContent,r=()=>{e.classList.add("is-copied"),e.setAttribute("title","Copied!"),setTimeout(()=>{e.classList.remove("is-copied"),e.setAttribute("title","Copy code")},1400)},i=()=>{e.classList.add("is-copy-failed"),e.setAttribute("title","Copy failed"),setTimeout(()=>{e.classList.remove("is-copy-failed"),e.setAttribute("title","Copy code")},1400)};try{if(navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText)return void navigator.clipboard.writeText(n).then(r).catch(i)}catch(t){}try{let t=document.createElement("textarea");t.value=n,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let e=document.execCommand("copy");document.body.removeChild(t),e?r():i()}catch(t){i()}}_buildFullscreenOverlay(){if(r._FullscreenOverlay)return r._FullscreenOverlay;let t=document.createElement("div");t.className="pict-fullscreen-overlay",t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-labelledby","pict-fullscreen-title"),t.setAttribute("hidden",""),t.innerHTML='<div class="pict-fullscreen-titlebar"><span class="pict-fullscreen-title" id="pict-fullscreen-title"></span><div class="pict-fullscreen-controls"><button type="button" class="pict-fullscreen-btn" data-action="zoom-out" aria-label="Zoom out" title="Zoom out"><svg viewBox="0 0 16 16" aria-hidden="true"><line x1="3" y1="8" x2="13" y2="8"></line></svg></button><button type="button" class="pict-fullscreen-btn" data-action="zoom-reset" aria-label="Reset zoom" title="Reset zoom"><svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5"></circle><line x1="8" y1="5" x2="8" y2="11"></line><line x1="5" y1="8" x2="11" y2="8"></line></svg></button><button type="button" class="pict-fullscreen-btn" data-action="zoom-in" aria-label="Zoom in" title="Zoom in"><svg viewBox="0 0 16 16" aria-hidden="true"><line x1="3" y1="8" x2="13" y2="8"></line><line x1="8" y1="3" x2="8" y2="13"></line></svg></button><button type="button" class="pict-fullscreen-btn pict-fullscreen-close" data-action="close" aria-label="Close" title="Close (Esc)"><svg viewBox="0 0 16 16" aria-hidden="true"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div></div><div class="pict-fullscreen-stage"><div class="pict-fullscreen-content"></div></div>',document.body.appendChild(t);let e={scale:1,translateX:0,translateY:0,isPanning:!1,didPan:!1,currentKind:"",panStartX:0,panStartY:0,panOrigX:0,panOrigY:0,pinchInitialDistance:0,pinchInitialScale:1},o=t.querySelector(".pict-fullscreen-stage"),n=t.querySelector(".pict-fullscreen-content"),i=t.querySelector(".pict-fullscreen-title"),a=()=>{n.style.transform="translate("+e.translateX+"px, "+e.translateY+"px) scale("+e.scale+")",o.classList.toggle("is-zoomed",e.scale>1.001)},s=(t,n,r)=>{let i=(s=t)<.5?.5:s>8?8:s;var s;let l=o.getBoundingClientRect(),c=void 0!==n?n:l.left+l.width/2,d=void 0!==r?r:l.top+l.height/2,p=c-(l.left+l.width/2),h=d-(l.top+l.height/2),u=i/e.scale;e.translateX=p-u*(p-e.translateX),e.translateY=h-u*(h-e.translateY),e.scale=i,a()},l=()=>{e.scale=1,e.translateX=0,e.translateY=0,a()},c=()=>{t.setAttribute("hidden",""),n.innerHTML="",l(),document.documentElement.style.removeProperty("overflow"),document.removeEventListener("keydown",d)},d=t=>{"Escape"===t.key?(t.preventDefault(),c()):"+"===t.key||"="===t.key?(t.preventDefault(),s(e.scale+.25)):"-"===t.key||"_"===t.key?(t.preventDefault(),s(e.scale-.25)):"0"===t.key&&(t.preventDefault(),l())};t.addEventListener("click",n=>{e.didPan?e.didPan=!1:n.target!==t&&n.target!==o||c()}),t.querySelectorAll("[data-action]").forEach(t=>{t.addEventListener("click",o=>{o.stopPropagation();let n=t.getAttribute("data-action");"close"===n?c():"zoom-in"===n?s(e.scale+.25):"zoom-out"===n?s(e.scale-.25):"zoom-reset"===n&&l()})}),o.addEventListener("wheel",t=>{if("code"===e.currentKind)return;t.preventDefault();let o=.15*(-t.deltaY>0?1:-1);s(e.scale+o,t.clientX,t.clientY)},{passive:!1}),o.addEventListener("pointerdown",t=>{"code"!==e.currentKind&&(e.scale<=1.001||t.target.closest(".pict-fullscreen-controls")||(e.isPanning=!0,e.panStartX=t.clientX,e.panStartY=t.clientY,e.panOrigX=e.translateX,e.panOrigY=e.translateY,o.setPointerCapture(t.pointerId),o.classList.add("is-panning")))}),o.addEventListener("pointermove",t=>{e.isPanning&&(e.translateX=e.panOrigX+(t.clientX-e.panStartX),e.translateY=e.panOrigY+(t.clientY-e.panStartY),a())});let p=t=>{if(e.isPanning){e.isPanning=!1,e.didPan=!0,o.classList.remove("is-panning");try{o.releasePointerCapture(t.pointerId)}catch(t){}}};o.addEventListener("pointerup",p),o.addEventListener("pointercancel",p);let h={};return o.addEventListener("touchstart",t=>{for(let e=0;e<t.touches.length;e++){let o=t.touches[e];h[o.identifier]={x:o.clientX,y:o.clientY}}if(2===t.touches.length){let o=t.touches[0],n=t.touches[1],r=n.clientX-o.clientX,i=n.clientY-o.clientY;e.pinchInitialDistance=Math.sqrt(r*r+i*i),e.pinchInitialScale=e.scale}},{passive:!0}),o.addEventListener("touchmove",t=>{if(2===t.touches.length&&e.pinchInitialDistance>0){t.preventDefault();let o=t.touches[0],n=t.touches[1],r=n.clientX-o.clientX,i=n.clientY-o.clientY,a=Math.sqrt(r*r+i*i)/e.pinchInitialDistance,l=(o.clientX+n.clientX)/2,c=(o.clientY+n.clientY)/2;s(e.pinchInitialScale*a,l,c)}},{passive:!1}),o.addEventListener("touchend",()=>{h={},e.pinchInitialDistance=0}),r._FullscreenOverlay={element:t,content:n,titleEl:i,state:e,open:o=>{let r=o.getAttribute("data-fullscreen-title")||"";i.textContent=r,n.innerHTML="";let a,s=o.getAttribute("data-fullscreen-source");if(e.currentKind=s||"","mermaid"===s){let t=o.querySelector("svg");t?(a=t.cloneNode(!0),a.classList.add("pict-fullscreen-mermaid-svg"),a.removeAttribute("style"),a.removeAttribute("width"),a.removeAttribute("height")):a=o.cloneNode(!0)}else"image"===s?(a=o.cloneNode(!0),a.classList.add("pict-fullscreen-img")):(a=o.cloneNode(!0),a.classList.add("pict-fullscreen-codewrap"));n.appendChild(a);let c=t.querySelectorAll('[data-action="zoom-in"], [data-action="zoom-out"], [data-action="zoom-reset"]');for(let t=0;t<c.length;t++)c[t].style.display="code"===s?"none":"";l(),t.removeAttribute("hidden"),document.documentElement.style.overflow="hidden",document.addEventListener("keydown",d)},close:c},r._FullscreenOverlay}_openFullscreen(t){this._buildFullscreenOverlay().open(t)}showLoading(t,e){let o=e||"Pict-Content-Body",n=t||"Loading content...";this.pict.ContentAssignment.assignContent("#"+o,'<div class="pict-content-loading">'+n+"</div>")}}e.exports=r,e.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* ─── Code blocks ─────────────────────────────────────\n\t\t Background, text color, line-number gutter, and every\n\t\t syntax token route through pict-provider-theme tokens —\n\t\t the same set pict-section-code (the live editor) uses.\n\t\t This way the rendered-preview code blocks look identical\n\t\t to the live editor and re-skin together when the theme\n\t\t switches. Previous version used the text-primary token\n\t\t as the code background (a TEXT token used as BACKGROUND),\n\t\t which broke in dark mode and any palette where text and\n\t\t background-tertiary diverge.\n\t\t*/\n\t\t.pict-content pre {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace);\n\t\t}\n\t\t/* Inline code (single backtick) — slightly differentiated\n\t\t from block code so it doesn't disappear into prose. */\n\t\t.pict-content code {\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF8F4);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', monospace);\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace);\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: hidden;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\twidth: 40px;\n\t\t\tmin-width: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF8F4);\n\t\t\tborder-right: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-family: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tline-height: inherit;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder: none;\n\t\t\tpadding: 1.25em 1.25em 1.25em 8px;\n\t\t\tborder-radius: 0 6px 6px 0;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t/* Syntax token colors — every class binds to a --theme-color-syntax-*\n\t\t variable, the same tokens pict-section-code (the live editor) uses.\n\t\t Each var() carries an Atom One Light hex as fallback for hosts\n\t\t without a theme provider; themes that DO ship syntax tokens\n\t\t (retold-default, retold-content-system, etc.) drive everything\n\t\t coherently. */\n\t\t.pict-content-code-wrap .keyword { color: var(--theme-color-syntax-keyword, #A626A4); }\n\t\t.pict-content-code-wrap .string { color: var(--theme-color-syntax-string, #50A14F); }\n\t\t.pict-content-code-wrap .number { color: var(--theme-color-syntax-number, #986801); }\n\t\t.pict-content-code-wrap .comment { color: var(--theme-color-syntax-comment, #A0A1A7); font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: var(--theme-color-syntax-operator, #0184BC); }\n\t\t.pict-content-code-wrap .punctuation { color: var(--theme-color-syntax-punctuation, #383A42); }\n\t\t.pict-content-code-wrap .function-name { color: var(--theme-color-syntax-function, #4078F2); }\n\t\t.pict-content-code-wrap .property { color: var(--theme-color-syntax-property, #E45649); }\n\t\t.pict-content-code-wrap .tag { color: var(--theme-color-syntax-tag, #E45649); }\n\t\t.pict-content-code-wrap .attr-name { color: var(--theme-color-syntax-attrname, #986801); }\n\t\t.pict-content-code-wrap .attr-value { color: var(--theme-color-syntax-attrvalue, #50A14F); }\n\t\t.pict-content-code-wrap .builtin { color: var(--theme-color-syntax-builtin, #986801); }\n\t\t.pict-content-code-wrap .type { color: var(--theme-color-syntax-type, #C18401); }\n\t\t.pict-content-code-wrap .variable { color: var(--theme-color-syntax-variable, #383A42); }\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: var(--theme-color-background-secondary, #F7F5F0);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: var(--theme-color-background-secondary, #F5F0E8);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: var(--theme-color-background-secondary, #F7F5F0);\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: var(--theme-color-background-panel, #fff);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content pre.mermaid text,\n\t\t.pict-content pre.mermaid .nodeLabel,\n\t\t.pict-content pre.mermaid .edgeLabel,\n\t\t.pict-content pre.mermaid .label,\n\t\t.pict-content pre.mermaid .cluster-label,\n\t\t.pict-content pre.mermaid span,\n\t\t.pict-content pre.mermaid foreignObject p,\n\t\t.pict-content pre.mermaid foreignObject div,\n\t\t.pict-content pre.mermaid foreignObject span {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E) !important;\n\t\t\tfill: var(--theme-color-text-primary, #2A241E) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .edgePath .path {\n\t\t\tstroke: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .arrowheadPath {\n\t\t\tfill: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\n\t\t/* Fullscreen viewer for images and mermaid diagrams (click-to-zoom) */\n\t\t.pict-content [data-fullscreen-source] {\n\t\t\tcursor: zoom-in;\n\t\t\toutline: 1px solid transparent;\n\t\t\toutline-offset: 3px;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: outline-color 0.15s ease;\n\t\t}\n\t\t.pict-content [data-fullscreen-source]:hover {\n\t\t\toutline-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t/* Code block container with hover-revealed action buttons */\n\t\t.pict-content-code-container {\n\t\t\tposition: relative;\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tgap: 8px;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content-code-container > .pict-content-code-wrap {\n\t\t\tmargin: 0;\n\t\t\tflex: 1 1 auto;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-actions {\n\t\t\tposition: sticky;\n\t\t\ttop: 64px;\n\t\t\talign-self: flex-start;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t\tflex: 0 0 auto;\n\t\t\tpadding-top: 6px;\n\t\t\topacity: 0;\n\t\t\ttransform: translateX(-4px);\n\t\t\ttransition: opacity 0.15s ease, transform 0.15s ease;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-content-code-container:hover .pict-content-code-actions,\n\t\t.pict-content-code-container:focus-within .pict-content-code-actions {\n\t\t\topacity: 1;\n\t\t\ttransform: translateX(0);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-content-code-action-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tpadding: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-muted, #5E5549);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\tcursor: pointer;\n\t\t\tbox-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;\n\t\t}\n\t\t.pict-content-code-action-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.6;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-content-code-action-btn:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t}\n\t\t.pict-content-code-action-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-content-code-action-btn.is-copied {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.pict-content-code-action-btn.is-copy-failed {\n\t\t\tbackground: var(--theme-color-status-error, #B23A3A);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-status-error, #B23A3A);\n\t\t}\n\t\t.pict-fullscreen-overlay {\n\t\t\tposition: fixed;\n\t\t\tinset: 0;\n\t\t\tz-index: 9999;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: rgba(0, 0, 0, 0.62);\n\t\t\tbackdrop-filter: blur(6px);\n\t\t\t-webkit-backdrop-filter: blur(6px);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-fullscreen-overlay[hidden] {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-fullscreen-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 1em;\n\t\t\theight: 48px;\n\t\t\tpadding: 0 1em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #1A1612);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t\tflex: 0 0 auto;\n\t\t}\n\t\t.pict-fullscreen-title {\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.01em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcolor: var(--theme-color-text-primary, #1A1612);\n\t\t}\n\t\t.pict-fullscreen-controls {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-fullscreen-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 6px;\n\t\t\tcolor: var(--theme-color-text-muted, #5E5549);\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n\t\t}\n\t\t.pict-fullscreen-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.75;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-fullscreen-btn:hover {\n\t\t\tbackground: var(--theme-color-border-light, #EAE3D8);\n\t\t\tcolor: var(--theme-color-text-primary, #1A1612);\n\t\t}\n\t\t.pict-fullscreen-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-fullscreen-close:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t}\n\t\t.pict-fullscreen-stage {\n\t\t\tflex: 1 1 auto;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 1.5em;\n\t\t\tcursor: zoom-in;\n\t\t\ttouch-action: none;\n\t\t}\n\t\t.pict-fullscreen-stage.is-zoomed {\n\t\t\tcursor: grab;\n\t\t}\n\t\t.pict-fullscreen-stage.is-panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-fullscreen-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 100%;\n\t\t\ttransform-origin: center center;\n\t\t\ttransition: transform 0.05s linear;\n\t\t\twill-change: transform;\n\t\t}\n\t\t.pict-fullscreen-content > * {\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-img {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tobject-fit: contain;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 12px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg {\n\t\t\twidth: min(90vw, 1400px);\n\t\t\theight: auto;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 16px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-codewrap {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tmargin: 0;\n\t\t\toverflow: auto;\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":75}],15:[function(t,e,o){e.exports=class{constructor(t){this._modal=t}confirm(t,e){let o=Object.assign({},this._modal.options.DefaultConfirmOptions,e);return new Promise(e=>{let n=this._buildDialog(o.title,t,e,o);this._showDialog(n,e)})}doubleConfirm(t,e){let o=Object.assign({},this._modal.options.DefaultDoubleConfirmOptions,e);return new Promise(e=>{let n=this._buildDoubleConfirmDialog(o.title,t,e,o);this._showDialog(n,e)})}_buildDialog(t,e,o,n){let r=this._modal._nextId(),i=n.dangerous?"danger":"primary",a=document.createElement("div");a.className="pict-modal-dialog",n.unbounded&&(a.className+=" pict-modal-dialog--unbounded"),a.id="pict-modal-"+r,a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.style.width="420px",a.innerHTML='<div class="pict-modal-dialog-header"><span class="pict-modal-dialog-title">'+this._escapeHTML(t)+'</span><button class="pict-modal-dialog-close" aria-label="Close">&times;</button></div><div class="pict-modal-dialog-body"><p>'+this._escapeHTML(e)+'</p></div><div class="pict-modal-dialog-footer"><button class="pict-modal-btn" data-action="cancel">'+this._escapeHTML(n.cancelLabel)+'</button><button class="pict-modal-btn pict-modal-btn--'+i+'" data-action="confirm">'+this._escapeHTML(n.confirmLabel)+"</button></div>";let s=a.querySelector(".pict-modal-dialog-close"),l=a.querySelector('[data-action="cancel"]'),c=a.querySelector('[data-action="confirm"]'),d=t=>{this._dismissDialog(a,t,o)};return s.addEventListener("click",()=>{d(!1)}),l.addEventListener("click",()=>{d(!1)}),c.addEventListener("click",()=>{d(!0)}),a._dismiss=d,a._focusTarget=l,a}_buildDoubleConfirmDialog(t,e,o,n){let r=this._modal._nextId(),i="string"==typeof n.confirmPhrase&&n.confirmPhrase.length>0,a=document.createElement("div");a.className="pict-modal-dialog",n.unbounded&&(a.className+=" pict-modal-dialog--unbounded"),a.id="pict-modal-"+r,a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.style.width="420px";let s="<p>"+this._escapeHTML(e)+"</p>";if(i){let t=n.phrasePrompt.replace("{phrase}",n.confirmPhrase);s+='<div class="pict-modal-confirm-prompt">'+this._escapeHTML(t)+'</div><input type="text" class="pict-modal-confirm-input" autocomplete="off" spellcheck="false" />'}a.innerHTML='<div class="pict-modal-dialog-header"><span class="pict-modal-dialog-title">'+this._escapeHTML(t)+'</span><button class="pict-modal-dialog-close" aria-label="Close">&times;</button></div><div class="pict-modal-dialog-body">'+s+'</div><div class="pict-modal-dialog-footer"><button class="pict-modal-btn" data-action="cancel">'+this._escapeHTML(n.cancelLabel)+'</button><button class="pict-modal-btn pict-modal-btn--danger" data-action="confirm" disabled>'+this._escapeHTML(n.confirmLabel)+"</button></div>";let l=a.querySelector(".pict-modal-dialog-close"),c=a.querySelector('[data-action="cancel"]'),d=a.querySelector('[data-action="confirm"]'),p=t=>{this._dismissDialog(a,t,o)};if(l.addEventListener("click",()=>{p(!1)}),c.addEventListener("click",()=>{p(!1)}),i){let t=a.querySelector(".pict-modal-confirm-input");t.addEventListener("input",()=>{d.disabled=t.value!==n.confirmPhrase}),d.addEventListener("click",()=>{d.disabled||p(!0)}),a._focusTarget=t}else{let t=0;n.confirmLabel;d.disabled=!1,d.addEventListener("click",()=>{t++,1===t?d.textContent="Click again to confirm":p(!0)}),a._focusTarget=c}return a._dismiss=p,a}_showDialog(t,e){let o={element:t,dismiss:t._dismiss,type:"confirm"},n=null;this._modal.options.OverlayClickDismisses&&(n=()=>{t._dismiss(!1)}),this._modal._overlay.show(n),document.body.appendChild(t),this._modal._activeModals.push(o),t.offsetHeight,t.classList.add("pict-modal-visible"),t._focusTarget&&t._focusTarget.focus(),t._keyHandler=e=>{"Escape"===e.key&&t._dismiss(!1)},document.addEventListener("keydown",t._keyHandler)}_dismissDialog(t,e,o){if(!t._dismissed){if(t._dismissed=!0,t._keyHandler&&document.removeEventListener("keydown",t._keyHandler),t.classList.remove("pict-modal-visible"),this._modal._activeModals=this._modal._activeModals.filter(e=>e.element!==t),this._modal._activeModals.length>0){let t=this._modal._activeModals[this._modal._activeModals.length-1];this._modal._overlay.updateClickHandler(this._modal.options.OverlayClickDismisses?t.dismiss:null)}this._modal._overlay.hide(),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},220),o(e)}}_escapeHTML(t){return"string"!=typeof t?"":t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],16:[function(t,e,o){e.exports=class{constructor(t){this._modal=t,this._activeMenu=null}dropdown(t,e){let o=Object.assign({align:"left",position:"auto",maxHeight:"60vh",closeOnSelect:!0},e||{}),n=this._resolveAnchor(t),r=this._anchorRect(t,n);if(!r)return Promise.resolve(null);if(this._activeMenu&&this._activeMenu.anchor===n)return this._activeMenu.promise;this.dismissAll();let i,a=Array.isArray(o.items)?o.items:[],s=new Promise(t=>{i=t}),l=this._buildMenu(a,o);document.body.appendChild(l),this._positionMenu(l,r,o),l.offsetHeight,l.classList.add("pict-modal-visible");let c=t=>{l._dismissed||(l._dismissed=!0,document.removeEventListener("mousedown",p,!0),document.removeEventListener("keydown",h,!0),window.removeEventListener("resize",u),window.removeEventListener("scroll",u,!0),l.classList.remove("pict-modal-visible"),setTimeout(()=>{l.parentNode&&l.parentNode.removeChild(l)},180),this._activeMenu&&this._activeMenu.element===l&&(this._activeMenu=null),"function"==typeof o.onClose&&o.onClose(t),i(t))},d=l.querySelectorAll("[data-pict-modal-dropdown-item]");for(let t=0;t<d.length;t++){let e=d[t];e.addEventListener("click",t=>{if(e.hasAttribute("data-disabled"))return;t.stopPropagation();let n=parseInt(e.getAttribute("data-index"),10),r=a[n],i=e.getAttribute("data-hash");"function"==typeof o.onSelect&&o.onSelect(i,r),!1!==o.closeOnSelect&&c({Hash:i,Item:r})})}let p=t=>{l.contains(t.target)||n&&n.contains&&n.contains(t.target)||c(null)};document.addEventListener("mousedown",p,!0);let h=t=>{if("Escape"===t.key)return t.stopPropagation(),void c(null);if("ArrowDown"===t.key||"ArrowUp"===t.key)t.preventDefault(),this._focusNeighbor(l,"ArrowDown"===t.key?1:-1);else if("Enter"===t.key||" "===t.key){let e=document.activeElement;e&&l.contains(e)&&e.hasAttribute("data-pict-modal-dropdown-item")&&(t.preventDefault(),e.click())}};document.addEventListener("keydown",h,!0);let u=()=>{let e=this._anchorRect(t,n);e&&this._positionMenu(l,e,o)};return window.addEventListener("resize",u),window.addEventListener("scroll",u,!0),setTimeout(()=>{this._focusFirstEnabled(l)},0),this._activeMenu={element:l,anchor:n,promise:s,dismiss:c},s}dismissAll(){if(this._activeMenu){let t=this._activeMenu.dismiss;this._activeMenu=null,t(null)}}_resolveAnchor(t){return t?"string"==typeof t?document.querySelector(t):1===t.nodeType?t:null:null}_anchorRect(t,e){return e&&"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():t&&"object"==typeof t&&"number"==typeof t.left&&"number"==typeof t.top?{left:t.left,top:t.top,width:t.width||0,height:t.height||0,right:t.left+(t.width||0),bottom:t.top+(t.height||0)}:null}_buildMenu(t,e){let o=this._modal._nextId(),n=document.createElement("div");n.className="pict-modal-dropdown",e.className&&(n.className+=" "+e.className),n.id="pict-modal-dropdown-"+o,n.setAttribute("role","menu"),n.style.maxHeight=e.maxHeight;let r="";for(let e=0;e<t.length;e++){let o=t[e];if(o.Separator){r+='<div class="pict-modal-dropdown-separator" role="separator"></div>';continue}if(o.Header){r+='<div class="pict-modal-dropdown-header">'+this._escapeHTML(o.Header)+"</div>";continue}let n="pict-modal-dropdown-item";o.Style&&(n+=" pict-modal-dropdown-item--"+o.Style),o.Disabled&&(n+=" pict-modal-dropdown-item--disabled");let i=' data-pict-modal-dropdown-item data-index="'+e+'" data-hash="'+this._escapeHTML(o.Hash||"")+'" role="menuitem" tabindex="-1"';o.Disabled&&(i+=' aria-disabled="true" data-disabled'),o.Tooltip&&(i+=' title="'+this._escapeHTML(o.Tooltip)+'"');let a=o.Icon?'<span class="pict-modal-dropdown-item-icon">'+o.Icon+"</span>":"",s=o.Hint?'<span class="pict-modal-dropdown-item-hint">'+this._escapeHTML(o.Hint)+"</span>":"";r+='<div class="'+n+'"'+i+">"+a+'<span class="pict-modal-dropdown-item-label">'+this._escapeHTML(o.Label||"")+"</span>"+s+"</div>"}return n.innerHTML=r,n}_positionMenu(t,e,o){let n=o.minWidth||(e.width>=80?Math.ceil(e.width)+"px":"160px");t.style.minWidth=n;let r,i=t.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth,s=(window.innerHeight||document.documentElement.clientHeight)-e.bottom-4,l=e.top-4;r="above"===o.position||"below"!==o.position&&(i.height>s&&l>s);let c,d,p=Math.max(80,(r?l:s)-8);t.style.maxHeight=p+"px",c="right"===o.align?e.right-i.width:"center"===o.align?e.left+(e.width-i.width)/2:e.left,c=Math.min(c,a-i.width-4),c=Math.max(4,c),r?(d=Math.max(4,e.top-i.height-4),t.classList.add("pict-modal-dropdown--above")):(d=e.bottom+4,t.classList.remove("pict-modal-dropdown--above")),t.style.left=Math.round(c)+"px",t.style.top=Math.round(d)+"px"}_focusFirstEnabled(t){let e=t.querySelectorAll("[data-pict-modal-dropdown-item]:not([data-disabled])");e.length&&e[0].focus()}_focusNeighbor(t,e){let o=Array.prototype.slice.call(t.querySelectorAll("[data-pict-modal-dropdown-item]:not([data-disabled])"));if(!o.length)return;let n=document.activeElement,r=o.indexOf(n);o[-1===r?e>0?0:o.length-1:(r+e+o.length)%o.length].focus()}_escapeHTML(t){return"string"!=typeof t?"":t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],17:[function(t,e,o){e.exports=class{constructor(t){this._modal=t,this._element=null,this._refCount=0}show(t){this._refCount++,this._element||(this._element=document.createElement("div"),this._element.className="pict-modal-overlay",document.body.appendChild(this._element),this._element.offsetHeight,this._element.classList.add("pict-modal-visible")),t&&(this._currentClickHandler=t,this._element.onclick=t=>{t.target===this._element&&this._currentClickHandler&&this._currentClickHandler()})}updateClickHandler(t){this._currentClickHandler=t||null}hide(){if(this._refCount--,this._refCount<=0&&(this._refCount=0,this._element)){this._element.classList.remove("pict-modal-visible");let t=this._element;setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},220),this._element=null,this._currentClickHandler=null}}destroy(){this._refCount=0,this._element&&this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null,this._currentClickHandler=null}}},{}],18:[function(t,e,o){e.exports=class{constructor(t){this._modal=t,this._panels=[]}create(t,e){let o=this._modal&&this._modal.options&&this._modal.options.DefaultPanelOptions||{},n=Object.assign({},{position:"right",width:340,minWidth:200,maxWidth:600,collapsible:!0,collapsed:!1,persist:!1,persistKey:"",onResize:null,onToggle:null},o,e);if("undefined"==typeof document)return this._nullHandle();let r=document.querySelector(t);if(!r)return this._nullHandle();let i=this._modal._nextId(),a="right"===n.position,s=!1,l=n.width,c=!1;if(n.persist&&n.persistKey)try{let t=localStorage.getItem("pict-panel-"+n.persistKey);if(t){let e=JSON.parse(t);"number"==typeof e.width&&(l=e.width),"boolean"==typeof e.collapsed&&(n.collapsed=e.collapsed)}}catch(t){}r.classList.add("pict-panel"),r.classList.add(a?"pict-panel-right":"pict-panel-left"),r.style.width=l+"px","none"===r.style.display&&(r.style.display="");let d=document.createElement("div");d.className="pict-panel-edge "+(a?"pict-panel-edge-right":"pict-panel-edge-left");let p=document.createElement("div");p.className="pict-panel-resize",d.appendChild(p);let h=null;n.collapsible&&(h=document.createElement("div"),h.className="pict-panel-tab",h.title="Toggle panel",d.appendChild(h)),r.parentNode?a?r.parentNode.insertBefore(d,r):r.parentNode.insertBefore(d,r.nextSibling):r.insertBefore(d,r.firstChild);let u="undefined"!=typeof window&&window.pict?window.pict:null,m=t=>u&&"function"==typeof u.icon?u.icon(t):"",g=()=>{if(!h)return;let t=m("ChevronRight"),e=m("ChevronLeft");h.innerHTML=a?s?e:t:s?t:e},f=()=>{if(n.persist&&n.persistKey)try{localStorage.setItem("pict-panel-"+n.persistKey,JSON.stringify({width:l,collapsed:s}))}catch(t){}},b=()=>{s||c||(s=!0,r.classList.add("pict-panel-collapsed"),d.classList.add("pict-panel-edge-collapsed"),g(),f(),"function"==typeof n.onToggle&&n.onToggle(!0))},v=()=>{s&&!c&&(s=!1,d.classList.remove("pict-panel-edge-collapsed"),r.classList.remove("pict-panel-collapsed"),r.style.width=l+"px",g(),f(),"function"==typeof n.onToggle&&n.onToggle(!1))},y=()=>{s?v():b()};h&&h.addEventListener("click",t=>{t.stopPropagation(),y()});let w=t=>{if(s)return;t.preventDefault();let e=t.clientX,o=r.offsetWidth;p.classList.add("dragging"),r.style.transition="none",document.body.style.userSelect="none",document.body.style.cursor="col-resize";let i=t=>{let i=a?e-t.clientX:t.clientX-e,s=Math.max(n.minWidth,Math.min(n.maxWidth,o+i));r.style.width=s+"px"},c=t=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),p.classList.remove("dragging"),r.style.transition="",document.body.style.userSelect="",document.body.style.cursor="",l=r.offsetWidth,f(),"function"==typeof n.onResize&&n.onResize(l)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",c)};p.addEventListener("mousedown",w),g(),n.collapsed&&(s=!0,r.classList.add("pict-panel-collapsed"),d.classList.add("pict-panel-edge-collapsed"),g());let D={id:i,collapse:b,expand:v,toggle:y,setWidth:t=>{if(c)return;let e=Math.max(n.minWidth,Math.min(n.maxWidth,t));l=e,s||(r.style.width=e+"px"),f(),"function"==typeof n.onResize&&n.onResize(e)},destroy:()=>{if(c)return;c=!0,p.removeEventListener("mousedown",w),d.parentNode&&d.remove(),r.classList.remove("pict-panel","pict-panel-right","pict-panel-left","pict-panel-collapsed"),r.style.width="",r.style.transition="";let t=this._panels.indexOf(D);t>=0&&this._panels.splice(t,1)}};return this._panels.push(D),D}_nullHandle(){return{id:0,collapse:()=>{},expand:()=>{},toggle:()=>{},setWidth:()=>{},destroy:()=>{}}}destroyAll(){let t=this._panels.slice();for(let e=0;e<t.length;e++)t[e].destroy()}}},{}],19:[function(t,e,o){const n="pict-modal-shell:";class r{constructor(t,e,o){_defineProperty(this,"_onDragMove",t=>{if(!this._activeDrag)return;let e=this._activeDrag,o=(("x"===e.Axis?t.clientX:t.clientY)-e.StartCoord)*e.Direction;if(e.PendingSize=e.StartSize+o,!e.RAFId){let t=this;e.RAFId="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){t._flushDrag()}):setTimeout(function(){t._flushDrag()},16)}}),_defineProperty(this,"_onDragEnd",()=>{if(!this._activeDrag)return;let t=this._activeDrag;null!==t.PendingSize&&this._flushDrag(),t.RAFId&&"undefined"!=typeof window&&window.cancelAnimationFrame&&window.cancelAnimationFrame(t.RAFId),document.body.classList.remove("pict-modal-shell-dragging-x"),document.body.classList.remove("pict-modal-shell-dragging-y"),t.Panel.El.classList.remove("pict-modal-shell-panel-resizing"),document.removeEventListener("pointermove",this._onDragMove),document.removeEventListener("pointerup",this._onDragEnd),t.Panel._persist(),this._activeDrag=null}),this._modal=t,this._viewport=e,this._options=o||{},this._panels=[],this._panelsByHash={},this._centerDestinationEl=null,this._idCounter=0,this._activeDrag=null,this._persistenceEnabled=!1!==this._options.Persistence,this._persistenceKey=this._persistenceEnabled?this._resolvePersistenceKey(this._options.PersistenceKey):null,this._buildSkeleton()}addPanel(t){let e=new i(this,t||{});return this._panels.push(e),this._panelsByHash[e.Hash]=e,this._mountPanel(e),e._renderContentView(),e}getPanel(t){return this._panelsByHash[t]||null}getPanels(){return this._panels.slice()}openPanel(t){let e=this._panelsByHash[t];return e&&e.popup(),e||null}center(t){if((t=t||{}).ContentDestinationId){this._centerDestinationEl&&this._centerDestinationEl.parentNode===this._centerEl&&this._centerEl.removeChild(this._centerDestinationEl);let e=document.createElement("div");e.id=t.ContentDestinationId,e.className="pict-modal-shell-center-content";let o=null,n=this._centerEl.children;for(let t=0;t<n.length;t++){let e=n[t];if(e.classList&&e.classList.contains("pict-modal-shell-panel-bottom")){o=e;break}}o?this._centerEl.insertBefore(e,o):this._centerEl.appendChild(e),this._centerDestinationEl=e}return this._centerEl}getCenterEl(){return this._centerEl}destroy(){for(let t=0;t<this._panels.length;t++)this._panels[t].destroy(!0);this._panels=[],this._panelsByHash={},this._wrapperEl&&this._wrapperEl.parentNode&&this._wrapperEl.parentNode.removeChild(this._wrapperEl),this._detachDragHandlers()}_resolvePersistenceKey(t){if("string"==typeof t&&t.length>0)return n+t;try{if("undefined"!=typeof window&&window.location&&window.location.hostname)return n+window.location.hostname}catch(t){}return n+"default"}_loadState(){if(!this._persistenceKey)return null;try{let t="undefined"!=typeof window?window.localStorage:null;if(!t)return null;let e=t.getItem(this._persistenceKey);if(!e)return null;let o=JSON.parse(e);return o&&1===o.Version?o.Panels&&"object"==typeof o.Panels?o.Panels:{}:null}catch(t){return null}}_loadPanelState(t){let e=this._loadState();return e&&e[t]||null}_savePanelState(t,e){if(this._persistenceKey)try{let o="undefined"!=typeof window?window.localStorage:null;if(!o)return;let n=this._loadState()||{};n[t]=e,o.setItem(this._persistenceKey,JSON.stringify({Version:1,Panels:n,SavedAt:(new Date).toISOString()}))}catch(t){}}_buildSkeleton(){this._viewport.innerHTML="",this._viewport.classList.add("pict-modal-shell-host"),this._wrapperEl=document.createElement("div"),this._wrapperEl.className="pict-modal-shell",this._topRow=document.createElement("div"),this._topRow.className="pict-modal-shell-row pict-modal-shell-row-top",this._wrapperEl.appendChild(this._topRow),this._middleRow=document.createElement("div"),this._middleRow.className="pict-modal-shell-row pict-modal-shell-row-middle",this._wrapperEl.appendChild(this._middleRow),this._leftStack=document.createElement("div"),this._leftStack.className="pict-modal-shell-side pict-modal-shell-side-left",this._middleRow.appendChild(this._leftStack),this._centerEl=document.createElement("div"),this._centerEl.className="pict-modal-shell-center",this._middleRow.appendChild(this._centerEl),this._rightStack=document.createElement("div"),this._rightStack.className="pict-modal-shell-side pict-modal-shell-side-right",this._middleRow.appendChild(this._rightStack),this._bottomRow=document.createElement("div"),this._bottomRow.className="pict-modal-shell-row pict-modal-shell-row-bottom",this._wrapperEl.appendChild(this._bottomRow),this._overlayLayer=document.createElement("div"),this._overlayLayer.className="pict-modal-shell-overlay-layer",this._middleRow.appendChild(this._overlayLayer),this._viewport.appendChild(this._wrapperEl)}_mountPanel(t){if("overlay"===t.Position)return void this._overlayLayer.appendChild(t.El);if("center"===t.Scope)return this._centerEl.classList.add("pict-modal-shell-center-with-inner-panel"),void("top"===t.Side?this._centerEl.insertBefore(t.El,this._centerEl.firstChild):this._centerEl.appendChild(t.El));let e;e="top"===t.Side?this._topRow:"bottom"===t.Side?this._bottomRow:"left"===t.Side?this._leftStack:"right"===t.Side?this._rightStack:this._wrapperEl,e.appendChild(t.El)}_attachDragStart(t,e){e.preventDefault();let o="top"===t.Side||"bottom"===t.Side?"y":"x";this._activeDrag={Panel:t,Axis:o,StartCoord:"x"===o?e.clientX:e.clientY,StartSize:t.Size,Direction:"left"===t.Side||"top"===t.Side?1:-1,PendingSize:null,RAFId:0},document.body.classList.add("x"===o?"pict-modal-shell-dragging-x":"pict-modal-shell-dragging-y"),t.El.classList.add("pict-modal-shell-panel-resizing");try{e.target.setPointerCapture&&e.target.setPointerCapture(e.pointerId)}catch(t){}document.addEventListener("pointermove",this._onDragMove),document.addEventListener("pointerup",this._onDragEnd)}_flushDrag(){let t=this._activeDrag;t&&(t.RAFId=0,null!==t.PendingSize&&(t.Panel.setSize(t.PendingSize),t.PendingSize=null))}_detachDragHandlers(){document.removeEventListener("pointermove",this._onDragMove),document.removeEventListener("pointerup",this._onDragEnd)}}class i{constructor(t,e){this._shell=t,this._config=e,this.Hash=e.Hash||"panel-"+ ++t._idCounter,this.Side="right"===e.Side||"bottom"===e.Side||"left"===e.Side?e.Side:"top",this.Mode="collapsible"===e.Mode||"resizable"===e.Mode?e.Mode:"fixed",this.Position="overlay"===e.Position?"overlay":"pinned",this.Scope="center"!==e.Scope||"top"!==this.Side&&"bottom"!==this.Side?"shell":"center",this.Title=e.Title||"",this.Icon=e.Icon||"",this.MinSize="number"==typeof e.MinSize?e.MinSize:40,this.MaxSize="number"==typeof e.MaxSize?e.MaxSize:1200,this.Hidden=!!e.Hidden,this.CollapsedSize="number"==typeof e.CollapsedSize?e.CollapsedSize:this.Hidden?0:24,this.PersistEnabled=t._persistenceEnabled&&!1!==e.Persist;let o="left"===this.Side||"right"===this.Side?240:60;if(this.Size="number"==typeof e.Size?e.Size:o,this.Collapsed=!!e.Collapsed,this.PersistEnabled){let e=t._loadPanelState(this.Hash);e&&("number"==typeof e.Size&&(this.Size=e.Size),"boolean"==typeof e.Collapsed&&(this.Collapsed=e.Collapsed))}this._clampSize(),this._buildEl(e),this._applySize(),this._applyCollapsedClass(),this.ResponsiveDrawer="number"==typeof e.ResponsiveDrawer&&e.ResponsiveDrawer>0?e.ResponsiveDrawer:0,this.DrawerHeight="string"==typeof e.DrawerHeight&&e.DrawerHeight?e.DrawerHeight:"33vh",this._mediaQuery=null,this._mediaQueryHandler=null,this.ResponsiveDrawer>0&&this._wireResponsiveDrawer()}getContentEl(){return this._contentEl}getContentView(){if(!this._config.ContentView)return null;let t=this._shell._modal&&this._shell._modal.pict;return t&&t.views&&t.views[this._config.ContentView]||null}collapse(){this._setCollapsed(!0)}expand(){this._setCollapsed(!1)}toggle(){this._setCollapsed(!this.Collapsed)}popup(){this.Collapsed?this._setCollapsed(!1):(this._renderContentView(),this._flash())}setSize(t){"number"==typeof t&&isFinite(t)&&(this.Size=t,this._clampSize(),this._applySize())}destroy(t){if(this._unwireResponsiveDrawer(),this.El&&this.El.parentNode&&this.El.parentNode.removeChild(this.El),!t){let t=this._shell._panels.indexOf(this);t>=0&&this._shell._panels.splice(t,1),delete this._shell._panelsByHash[this.Hash]}}_clampSize(){this.Size<this.MinSize&&(this.Size=this.MinSize),this.Size>this.MaxSize&&(this.Size=this.MaxSize)}_wireResponsiveDrawer(){if("undefined"==typeof window||!window.matchMedia)return;this._mediaQuery=window.matchMedia("(max-width: "+this.ResponsiveDrawer+"px)"),this.El&&this.El.style.setProperty("--pict-modal-drawer-height",this.DrawerHeight);let t=this;this._mediaQueryHandler=function(e){let o=e&&"boolean"==typeof e.matches?e.matches:t._mediaQuery.matches;t._setDrawerMode(o)},this._mediaQuery.addEventListener?this._mediaQuery.addEventListener("change",this._mediaQueryHandler):this._mediaQuery.addListener&&this._mediaQuery.addListener(this._mediaQueryHandler),this._mediaQueryHandler({matches:this._mediaQuery.matches}),this._resizeHandler=function(){t._setDrawerMode(t._mediaQuery.matches)},window.addEventListener("resize",this._resizeHandler)}_unwireResponsiveDrawer(){this._resizeHandler&&"undefined"!=typeof window&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._mediaQuery&&this._mediaQueryHandler&&(this._mediaQuery.removeEventListener?this._mediaQuery.removeEventListener("change",this._mediaQueryHandler):this._mediaQuery.removeListener&&this._mediaQuery.removeListener(this._mediaQueryHandler),this._mediaQuery=null,this._mediaQueryHandler=null)}_setDrawerMode(t){if(!this._shell||!this._shell._middleRow)return;if(!(!this.El||!this.El.classList.contains("pict-modal-shell-panel-drawer"))!==!!t){if(t)this._shell._middleRow.classList.add("pict-modal-shell-drawer-active"),this.El&&this.El.classList.add("pict-modal-shell-panel-drawer");else{let t=!1,e=this._shell._panels||[];for(let o=0;o<e.length;o++){let n=e[o];if(n!==this&&n._mediaQuery&&n._mediaQuery.matches&&n.ResponsiveDrawer>0){t=!0;break}}t||this._shell._middleRow.classList.remove("pict-modal-shell-drawer-active"),this.El&&this.El.classList.remove("pict-modal-shell-panel-drawer")}this._applySize()}}_buildEl(t){let e=document.createElement("div");e.className="pict-modal-shell-panel pict-modal-shell-panel-"+this.Side+" pict-modal-shell-panel-mode-"+this.Mode+("overlay"===this.Position?" pict-modal-shell-panel-overlay":"")+(this.Hidden?" pict-modal-shell-panel-hidden":""),e.setAttribute("data-shell-panel-hash",this.Hash),e.setAttribute("data-shell-panel-side",this.Side),e.setAttribute("data-shell-panel-mode",this.Mode);let o=document.createElement("div");if(o.className="pict-modal-shell-panel-content",this._contentEl=document.createElement("div"),t.ContentDestinationId&&(this._contentEl.id=t.ContentDestinationId),this._contentEl.className="pict-modal-shell-panel-content-inner",o.appendChild(this._contentEl),e.appendChild(o),("collapsible"===this.Mode||"resizable"===this.Mode)&&!this.Hidden){this._collapseTab=document.createElement("button"),this._collapseTab.type="button",this._collapseTab.className="pict-modal-shell-panel-collapse-tab",this._collapseTab.setAttribute("aria-label",this.Title?"Toggle "+this.Title:"Toggle panel"),this._collapseTab.title=this.Title||"Toggle",this._collapseTab.innerHTML=(this.Icon?'<span class="pict-modal-shell-panel-collapse-tab-icon">'+this.Icon+"</span>":"")+(this.Title?'<span class="pict-modal-shell-panel-collapse-tab-title">'+this._escape(this.Title)+"</span>":"");let t=this;this._collapseTab.addEventListener("click",function(){t.toggle()}),e.appendChild(this._collapseTab)}if("resizable"===this.Mode){this._resizeHandle=document.createElement("div"),this._resizeHandle.className="pict-modal-shell-panel-resize-handle",this._resizeHandle.setAttribute("aria-hidden","true");let t=this;this._resizeHandle.addEventListener("pointerdown",function(e){t.Collapsed||t._shell._attachDragStart(t,e)}),e.appendChild(this._resizeHandle)}this.El=e}_applySize(){let t=this.Collapsed?this.CollapsedSize:this.Size;"left"===this.Side||"right"===this.Side?(this.El.style.width=t+"px",this.El.style.height=""):(this.El.style.height=t+"px",this.El.style.width="")}_applyCollapsedClass(){this.Collapsed?this.El.classList.add("pict-modal-shell-panel-collapsed"):this.El.classList.remove("pict-modal-shell-panel-collapsed")}_setCollapsed(t){if(this.Collapsed===!!t)return;let e=this.Collapsed;this.Collapsed=!!t,this._applyCollapsedClass(),this._applySize(),this._persist(),e&&!this.Collapsed?(this._renderContentView(),this._fireHook("OnExpand")):!e&&this.Collapsed&&this._fireHook("OnCollapse"),this._fireHook("OnToggle",this.Collapsed)}_fireHook(t,e){let o=this._config[t];if("function"==typeof o)try{void 0!==e?o(e,this):o(this)}catch(t){}}_renderContentView(){let t=this.getContentView();if(t&&"function"==typeof t.render)try{t.render()}catch(t){}}_flash(){if(!this.El)return;this.El.classList.add("pict-modal-shell-panel-flash");let t=this;clearTimeout(this._flashTimer),this._flashTimer=setTimeout(function(){t.El&&t.El.classList.remove("pict-modal-shell-panel-flash")},700)}_persist(){this.PersistEnabled&&this._shell._savePanelState(this.Hash,{Collapsed:this.Collapsed,Size:this.Size})}_escape(t){return String(t||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}}e.exports=class{constructor(t){this._modal=t,this._shellsByViewport=new WeakMap}shell(t,e){let o="string"==typeof t?document.querySelector(t):t;if(!o)throw new Error("Pict-Modal-Shell.shell: viewport not found for "+t);let n=this._shellsByViewport.get(o);if(n)return n;let i=new r(this._modal,o,e);return this._shellsByViewport.set(o,i),i}},e.exports.PictModalShell=r,e.exports.ShellPanel=i,e.exports.STORAGE_PREFIX=n,e.exports.SCHEMA_VERSION=1},{}],20:[function(t,e,o){e.exports=class{constructor(t){this._modal=t,this._containers={}}toast(t,e){let o=Object.assign({},this._modal.options.DefaultToastOptions,e),n=this._getContainer(o.position),r=this._modal._nextId(),i=document.createElement("div");i.className="pict-modal-toast pict-modal-toast--"+o.type,i.id="pict-modal-toast-"+r;let a='<span class="pict-modal-toast-message">'+this._escapeHTML(t)+"</span>";o.dismissible&&(a+='<button class="pict-modal-toast-dismiss" aria-label="Dismiss">&times;</button>'),i.innerHTML=a;let s=!1,l=null,c=()=>{s||(s=!0,l&&clearTimeout(l),i.classList.remove("pict-modal-visible"),i.classList.add("pict-modal-toast-exit"),this._modal._activeToasts=this._modal._activeToasts.filter(t=>t.element!==i),setTimeout(()=>{i.parentNode&&i.parentNode.removeChild(i),this._cleanupContainer(o.position)},220))},d={dismiss:c};if(o.dismissible){let t=i.querySelector(".pict-modal-toast-dismiss");t&&t.addEventListener("click",c)}n.appendChild(i);let p={element:i,dismiss:c,handle:d};return this._modal._activeToasts.push(p),i.offsetHeight,i.classList.add("pict-modal-visible"),o.duration>0&&(l=setTimeout(c,o.duration)),d}_getContainer(t){if(this._containers[t])return this._containers[t];let e=document.createElement("div");return e.className="pict-modal-toast-container pict-modal-toast-container--"+t,document.body.appendChild(e),this._containers[t]=e,e}_cleanupContainer(t){let e=this._containers[t];e&&0===e.children.length&&(e.parentNode&&e.parentNode.removeChild(e),delete this._containers[t])}dismissAll(){let t=this._modal._activeToasts.slice();for(let e=0;e<t.length;e++)t[e].dismiss()}destroy(){this.dismissAll();let t=Object.keys(this._containers);for(let e=0;e<t.length;e++){let o=this._containers[t[e]];o&&o.parentNode&&o.parentNode.removeChild(o)}this._containers={}}_escapeHTML(t){return"string"!=typeof t?"":t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],21:[function(t,e,o){e.exports=class{constructor(t){this._modal=t}tooltip(t,e,o){let n=Object.assign({},this._modal.options.DefaultTooltipOptions,o);return this._attachTooltip(t,e,!1,n)}richTooltip(t,e,o){let n=Object.assign({},this._modal.options.DefaultTooltipOptions,o);return this._attachTooltip(t,e,!0,n)}_attachTooltip(t,e,o,n){let r=null,i=null,a=null,s=!1,l=this._modal._nextId(),c=()=>{if(s||r)return;r=document.createElement("div"),r.className="pict-modal-tooltip pict-modal-tooltip--"+n.position,r.id="pict-modal-tooltip-"+l,r.setAttribute("role","tooltip"),r.style.maxWidth=n.maxWidth,n.interactive&&r.classList.add("pict-modal-tooltip-interactive");let i=document.createElement("div");i.className="pict-modal-tooltip-arrow";let c=document.createElement("div");o?c.innerHTML=e:c.textContent=e,r.appendChild(i),r.appendChild(c),document.body.appendChild(r),t.setAttribute("aria-describedby",r.id),this._positionTooltip(r,t,n.position),r.offsetHeight,r.classList.add("pict-modal-visible"),this._modal._activeTooltips.push({element:r,targetElement:t,destroy:g}),n.interactive&&r&&(r.addEventListener("mouseenter",()=>{a&&(clearTimeout(a),a=null)}),r.addEventListener("mouseleave",()=>{d()}))},d=()=>{if(!r)return;r.classList.remove("pict-modal-visible");let e=r;r=null,t.removeAttribute("aria-describedby"),this._modal._activeTooltips=this._modal._activeTooltips.filter(t=>t.element!==e),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},220)},p=()=>{a&&(clearTimeout(a),a=null),i=setTimeout(c,n.delay)},h=()=>{i&&(clearTimeout(i),i=null),n.interactive?a=setTimeout(d,100):d()},u=()=>{i=setTimeout(c,n.delay)},m=()=>{i&&(clearTimeout(i),i=null),d()};t.addEventListener("mouseenter",p),t.addEventListener("mouseleave",h),t.addEventListener("focusin",u),t.addEventListener("focusout",m);let g=()=>{s||(s=!0,i&&clearTimeout(i),a&&clearTimeout(a),d(),t.removeEventListener("mouseenter",p),t.removeEventListener("mouseleave",h),t.removeEventListener("focusin",u),t.removeEventListener("focusout",m))};return{destroy:g}}_positionTooltip(t,e,o){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=o;"top"===i&&n.top<r.height+8?i="bottom":"bottom"===i&&window.innerHeight-n.bottom<r.height+8?i="top":"left"===i&&n.left<r.width+8?i="right":"right"===i&&window.innerWidth-n.right<r.width+8&&(i="left"),t.className=t.className.replace(/pict-modal-tooltip--\w+/,"pict-modal-tooltip--"+i);let a=0,s=0;switch(i){case"top":a=n.top-r.height-8,s=n.left+n.width/2-r.width/2;break;case"bottom":a=n.bottom+8,s=n.left+n.width/2-r.width/2;break;case"left":a=n.top+n.height/2-r.height/2,s=n.left-r.width-8;break;case"right":a=n.top+n.height/2-r.height/2,s=n.right+8}s=Math.max(4,Math.min(s,window.innerWidth-r.width-4)),a=Math.max(4,Math.min(a,window.innerHeight-r.height-4)),t.style.top=a+"px",t.style.left=s+"px"}dismissAll(){let t=this._modal._activeTooltips.slice();for(let e=0;e<t.length;e++)t[e].destroy()}}},{}],22:[function(t,e,o){e.exports=class{constructor(t){this._modal=t}show(t){let e=Object.assign({},this._modal.options.DefaultModalOptions,t);return new Promise(t=>{let o=this._buildDialog(e,t);this._showDialog(o,e,t)})}_buildDialog(t,e){let o=this._modal._nextId(),n=document.createElement("div");n.className="pict-modal-dialog",t.unbounded&&(n.className+=" pict-modal-dialog--unbounded"),n.id="pict-modal-"+o,n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.style.width=t.width;let r="";(t.title||t.closeable)&&(r='<div class="pict-modal-dialog-header">',r+='<span class="pict-modal-dialog-title">'+this._escapeHTML(t.title)+"</span>",t.closeable&&(r+='<button class="pict-modal-dialog-close" aria-label="Close">&times;</button>'),r+="</div>");let i='<div class="pict-modal-dialog-body">'+(t.content||"")+"</div>",a="";if(t.buttons&&t.buttons.length>0){a='<div class="pict-modal-dialog-footer">';for(let e=0;e<t.buttons.length;e++){let o=t.buttons[e],n="pict-modal-btn";o.Style&&(n+=" pict-modal-btn--"+o.Style),a+='<button class="'+n+'" data-hash="'+this._escapeHTML(o.Hash)+'">'+this._escapeHTML(o.Label)+"</button>"}a+="</div>"}n.innerHTML=r+i+a;let s=o=>{this._dismissDialog(n,o,e,t)};if(t.closeable){let t=n.querySelector(".pict-modal-dialog-close");t&&t.addEventListener("click",()=>{s(null)})}let l=n.querySelectorAll("[data-hash]");for(let t=0;t<l.length;t++){let e=l[t];e.addEventListener("click",()=>{s(e.getAttribute("data-hash"))})}return n._dismiss=s,n}_showDialog(t,e,o){let n={element:t,dismiss:t._dismiss,type:"window"},r=null;this._modal.options.OverlayClickDismisses&&e.closeable&&(r=()=>{t._dismiss(null)}),this._modal._overlay.show(r),document.body.appendChild(t),this._modal._activeModals.push(n),t.offsetHeight,t.classList.add("pict-modal-visible");let i=t.querySelector(".pict-modal-btn")||t.querySelector(".pict-modal-dialog-close");i&&i.focus(),t._keyHandler=o=>{"Escape"===o.key&&e.closeable&&t._dismiss(null)},document.addEventListener("keydown",t._keyHandler),"function"==typeof e.onOpen&&e.onOpen(t)}_dismissDialog(t,e,o,n){if(!t._dismissed){if(t._dismissed=!0,t._keyHandler&&document.removeEventListener("keydown",t._keyHandler),t.classList.remove("pict-modal-visible"),this._modal._activeModals=this._modal._activeModals.filter(e=>e.element!==t),this._modal._activeModals.length>0){let t=this._modal._activeModals[this._modal._activeModals.length-1];this._modal._overlay.updateClickHandler(this._modal.options.OverlayClickDismisses?t.dismiss:null)}this._modal._overlay.hide(),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},220),"function"==typeof n.onClose&&n.onClose(e),o(e)}}_escapeHTML(t){return"string"!=typeof t?"":t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],23:[function(t,e,o){e.exports={AutoInitialize:!0,AutoRender:!1,AutoSolveWithApp:!1,ViewIdentifier:"Pict-Section-Modal",OverlayClickDismisses:!0,DefaultConfirmOptions:{title:"Confirm",confirmLabel:"OK",cancelLabel:"Cancel",dangerous:!1,unbounded:!1},DefaultDoubleConfirmOptions:{title:"Are you sure?",confirmLabel:"Confirm",cancelLabel:"Cancel",phrasePrompt:'Type "{phrase}" to confirm:',confirmPhrase:"",unbounded:!1},DefaultModalOptions:{title:"",content:"",buttons:[],closeable:!0,width:"480px",unbounded:!1},DefaultTooltipOptions:{position:"top",delay:200,maxWidth:"300px",interactive:!1},DefaultToastOptions:{type:"info",duration:3e3,position:"top-right",dismissible:!0},DefaultPanelOptions:{position:"right",width:340,minWidth:200,maxWidth:600,collapsible:!0,collapsed:!1,persist:!1,persistKey:""},Templates:[],Renderables:[],CSS:"\n/* pict-section-modal */\n.pict-modal-root\n{\n\t/* Defaults are routed through pict-provider-theme tokens so apps\n\t using the theme provider get themed modals automatically. Each\n\t var() carries its original hex as the fallback so apps that don't\n\t install pict-provider-theme look exactly as before. Apps may\n\t still override any --pict-modal-* var directly to layer over the\n\t theme-driven defaults. */\n\n\t/* Overlay */\n\t--pict-modal-overlay-bg: rgba(0, 0, 0, 0.5);\n\n\t/* Dialog */\n\t--pict-modal-bg: var(--theme-color-background-panel, #ffffff);\n\t--pict-modal-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-border: var(--theme-color-border-default, #e0e0e0);\n\t--pict-modal-border-radius: 8px;\n\t--pict-modal-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);\n\t--pict-modal-header-bg: var(--theme-color-background-secondary, #f5f5f5);\n\t--pict-modal-header-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-header-border: var(--theme-color-border-default, #e0e0e0);\n\n\t/* Buttons */\n\t--pict-modal-btn-bg: var(--theme-color-background-secondary, #e0e0e0);\n\t--pict-modal-btn-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-btn-hover-bg: var(--theme-color-background-hover, #d0d0d0);\n\t--pict-modal-btn-primary-bg: var(--theme-color-brand-primary, #2563eb);\n\t--pict-modal-btn-primary-fg: var(--theme-color-text-on-brand, #ffffff);\n\t--pict-modal-btn-primary-hover-bg:var(--theme-color-brand-primary-hover,#1d4ed8);\n\t--pict-modal-btn-danger-bg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-btn-danger-fg: var(--theme-color-text-on-brand, #ffffff);\n\t--pict-modal-btn-danger-hover-bg: var(--theme-color-status-error, #b91c1c);\n\t--pict-modal-btn-border-radius: 4px;\n\n\t/* Toast */\n\t--pict-modal-toast-bg: var(--theme-color-background-panel, #333333);\n\t--pict-modal-toast-fg: var(--theme-color-text-primary, #ffffff);\n\t--pict-modal-toast-success-bg: var(--theme-color-status-success, #16a34a);\n\t--pict-modal-toast-warning-bg: var(--theme-color-status-warning, #d97706);\n\t--pict-modal-toast-error-bg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-toast-info-bg: var(--theme-color-status-info, #2563eb);\n\t--pict-modal-toast-border-radius: 6px;\n\t--pict-modal-toast-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n\n\t/* Tooltip */\n\t--pict-modal-tooltip-bg: var(--theme-color-background-tertiary,#1a1a1a);\n\t--pict-modal-tooltip-fg: var(--theme-color-text-primary, #ffffff);\n\t--pict-modal-tooltip-border-radius:4px;\n\t--pict-modal-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n\n\t/* Dropdown */\n\t--pict-modal-dropdown-bg: var(--theme-color-background-panel, #ffffff);\n\t--pict-modal-dropdown-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-dropdown-border: var(--theme-color-border-default, #e0e0e0);\n\t--pict-modal-dropdown-border-radius: 6px;\n\t--pict-modal-dropdown-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);\n\t--pict-modal-dropdown-item-hover-bg: var(--theme-color-background-hover, rgba(37, 99, 235, 0.10));\n\t--pict-modal-dropdown-item-hover-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-dropdown-item-disabled-fg: var(--theme-color-text-muted, #9aa0a6);\n\t--pict-modal-dropdown-separator: var(--theme-color-border-light, #e8e8e8);\n\t--pict-modal-dropdown-header-fg: var(--theme-color-text-secondary, #6b7280);\n\t--pict-modal-dropdown-danger-fg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-dropdown-primary-fg: var(--theme-color-brand-primary, #2563eb);\n\n\t/* Typography */\n\t--pict-modal-font-family: var(--theme-typography-family-sans, system-ui, -apple-system, sans-serif);\n\t--pict-modal-font-size: 14px;\n\t--pict-modal-title-font-size: 16px;\n\n\t/* Animation */\n\t--pict-modal-transition-duration: 200ms;\n}\n\n/* Overlay */\n.pict-modal-overlay\n{\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 1000;\n\tbackground: var(--pict-modal-overlay-bg);\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-overlay.pict-modal-visible\n{\n\topacity: 1;\n}\n\n/* Dialog */\n.pict-modal-dialog\n{\n\tposition: fixed;\n\tz-index: 1010;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%) translateY(-20px);\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n\n\tmax-width: 90vw;\n\tmax-height: 90vh;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tbackground: var(--pict-modal-bg);\n\tcolor: var(--pict-modal-fg);\n\tborder: 1px solid var(--pict-modal-border);\n\tborder-radius: var(--pict-modal-border-radius);\n\tbox-shadow: var(--pict-modal-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n}\n\n.pict-modal-dialog.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translate(-50%, -50%) translateY(0);\n}\n\n/* Unbounded modifier — lets callers opt out of the 90vh/90vw viewport cap.\n Use with caution: content taller than the viewport will push buttons\n below the fold. */\n.pict-modal-dialog.pict-modal-dialog--unbounded\n{\n\tmax-height: none;\n\tmax-width: none;\n}\n\n.pict-modal-dialog-header\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: 12px 16px;\n\tbackground: var(--pict-modal-header-bg);\n\tcolor: var(--pict-modal-header-fg);\n\tborder-bottom: 1px solid var(--pict-modal-header-border);\n\tborder-radius: var(--pict-modal-border-radius) var(--pict-modal-border-radius) 0 0;\n}\n\n.pict-modal-dialog-title\n{\n\tfont-size: var(--pict-modal-title-font-size);\n\tfont-weight: 600;\n}\n\n.pict-modal-dialog-close\n{\n\tbackground: none;\n\tborder: none;\n\tfont-size: 20px;\n\tcursor: pointer;\n\tcolor: var(--pict-modal-fg);\n\tpadding: 0 4px;\n\tline-height: 1;\n\topacity: 0.6;\n}\n\n.pict-modal-dialog-close:hover\n{\n\topacity: 1;\n}\n\n.pict-modal-dialog-body\n{\n\tpadding: 16px;\n\toverflow-y: auto;\n\tflex: 1;\n}\n\n.pict-modal-dialog-footer\n{\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tpadding: 12px 16px;\n\tborder-top: 1px solid var(--pict-modal-border);\n}\n\n/* Buttons */\n.pict-modal-btn\n{\n\tpadding: 8px 16px;\n\tborder: none;\n\tborder-radius: var(--pict-modal-btn-border-radius);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tcursor: pointer;\n\tbackground: var(--pict-modal-btn-bg);\n\tcolor: var(--pict-modal-btn-fg);\n\ttransition: background var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-btn:hover\n{\n\tbackground: var(--pict-modal-btn-hover-bg);\n}\n\n.pict-modal-btn:disabled\n{\n\topacity: 0.5;\n\tcursor: not-allowed;\n}\n\n.pict-modal-btn--primary\n{\n\tbackground: var(--pict-modal-btn-primary-bg);\n\tcolor: var(--pict-modal-btn-primary-fg);\n}\n\n.pict-modal-btn--primary:hover\n{\n\tbackground: var(--pict-modal-btn-primary-hover-bg);\n}\n\n.pict-modal-btn--danger\n{\n\tbackground: var(--pict-modal-btn-danger-bg);\n\tcolor: var(--pict-modal-btn-danger-fg);\n}\n\n.pict-modal-btn--danger:hover\n{\n\tbackground: var(--pict-modal-btn-danger-hover-bg);\n}\n\n/* Double confirm input */\n.pict-modal-confirm-input\n{\n\twidth: 100%;\n\tpadding: 8px 12px;\n\tmargin-top: 12px;\n\tborder: 1px solid var(--pict-modal-border);\n\tborder-radius: var(--pict-modal-btn-border-radius);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tbox-sizing: border-box;\n}\n\n.pict-modal-confirm-input:focus\n{\n\toutline: 2px solid var(--pict-modal-btn-primary-bg);\n\toutline-offset: -1px;\n}\n\n.pict-modal-confirm-prompt\n{\n\tmargin-top: 12px;\n\tfont-size: 13px;\n\tcolor: var(--pict-modal-fg);\n\topacity: 0.7;\n}\n\n/* Toast container */\n.pict-modal-toast-container\n{\n\tposition: fixed;\n\tz-index: 1030;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tpointer-events: none;\n\tmax-width: 400px;\n}\n\n.pict-modal-toast-container--top-right\n{\n\ttop: 16px;\n\tright: 16px;\n}\n\n.pict-modal-toast-container--top-left\n{\n\ttop: 16px;\n\tleft: 16px;\n}\n\n.pict-modal-toast-container--bottom-right\n{\n\tbottom: 16px;\n\tright: 16px;\n}\n\n.pict-modal-toast-container--bottom-left\n{\n\tbottom: 16px;\n\tleft: 16px;\n}\n\n.pict-modal-toast-container--top-center\n{\n\ttop: 16px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n.pict-modal-toast-container--bottom-center\n{\n\tbottom: 16px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n/* Toast */\n.pict-modal-toast\n{\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tpadding: 12px 16px;\n\tborder-radius: var(--pict-modal-toast-border-radius);\n\tbox-shadow: var(--pict-modal-toast-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tbackground: var(--pict-modal-toast-bg);\n\tcolor: var(--pict-modal-toast-fg);\n\tpointer-events: auto;\n\topacity: 0;\n\ttransform: translateX(100%);\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-toast.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translateX(0);\n}\n\n.pict-modal-toast.pict-modal-toast-exit\n{\n\topacity: 0;\n\ttransform: translateX(100%);\n}\n\n.pict-modal-toast--info\n{\n\tbackground: var(--pict-modal-toast-info-bg);\n}\n\n.pict-modal-toast--success\n{\n\tbackground: var(--pict-modal-toast-success-bg);\n}\n\n.pict-modal-toast--warning\n{\n\tbackground: var(--pict-modal-toast-warning-bg);\n}\n\n.pict-modal-toast--error\n{\n\tbackground: var(--pict-modal-toast-error-bg);\n}\n\n.pict-modal-toast-message\n{\n\tflex: 1;\n}\n\n.pict-modal-toast-dismiss\n{\n\tbackground: none;\n\tborder: none;\n\tcolor: inherit;\n\tfont-size: 18px;\n\tcursor: pointer;\n\tpadding: 0 2px;\n\tline-height: 1;\n\topacity: 0.7;\n}\n\n.pict-modal-toast-dismiss:hover\n{\n\topacity: 1;\n}\n\n/* Tooltip */\n.pict-modal-tooltip\n{\n\tposition: fixed;\n\tz-index: 1020;\n\tpadding: 6px 10px;\n\tborder-radius: var(--pict-modal-tooltip-border-radius);\n\tbox-shadow: var(--pict-modal-tooltip-shadow);\n\tbackground: var(--pict-modal-tooltip-bg);\n\tcolor: var(--pict-modal-tooltip-fg);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: 13px;\n\tpointer-events: none;\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease;\n\twhite-space: normal;\n\tword-wrap: break-word;\n}\n\n.pict-modal-tooltip.pict-modal-tooltip-interactive\n{\n\tpointer-events: auto;\n}\n\n.pict-modal-tooltip.pict-modal-visible\n{\n\topacity: 1;\n}\n\n.pict-modal-tooltip-arrow\n{\n\tposition: absolute;\n\twidth: 8px;\n\theight: 8px;\n\tbackground: var(--pict-modal-tooltip-bg);\n\ttransform: rotate(45deg);\n}\n\n.pict-modal-tooltip--top .pict-modal-tooltip-arrow\n{\n\tbottom: -4px;\n\tleft: 50%;\n\tmargin-left: -4px;\n}\n\n.pict-modal-tooltip--bottom .pict-modal-tooltip-arrow\n{\n\ttop: -4px;\n\tleft: 50%;\n\tmargin-left: -4px;\n}\n\n.pict-modal-tooltip--left .pict-modal-tooltip-arrow\n{\n\tright: -4px;\n\ttop: 50%;\n\tmargin-top: -4px;\n}\n\n.pict-modal-tooltip--right .pict-modal-tooltip-arrow\n{\n\tleft: -4px;\n\ttop: 50%;\n\tmargin-top: -4px;\n}\n\n/* ── Dropdown ─────────────────────────────────────────────────────────\n Anchor-positioned menu (no overlay). Used for nav menus and\n \"split button\" addenda — see Pict-Modal-Dropdown.js.\n*/\n.pict-modal-dropdown\n{\n\tposition: fixed;\n\tz-index: 1025;\n\tmin-width: 160px;\n\tmax-width: 360px;\n\tmax-height: 60vh;\n\toverflow-y: auto;\n\tbackground: var(--pict-modal-dropdown-bg);\n\tcolor: var(--pict-modal-dropdown-fg);\n\tborder: 1px solid var(--pict-modal-dropdown-border);\n\tborder-radius: var(--pict-modal-dropdown-border-radius);\n\tbox-shadow: var(--pict-modal-dropdown-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tpadding: 4px 0;\n\topacity: 0;\n\ttransform: translateY(-4px);\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-dropdown.pict-modal-dropdown--above { transform: translateY(4px); }\n\n.pict-modal-dropdown.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translateY(0);\n}\n\n.pict-modal-dropdown-item\n{\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 7px 14px;\n\tcursor: pointer;\n\tuser-select: none;\n\tcolor: inherit;\n\toutline: none;\n}\n\n.pict-modal-dropdown-item:hover,\n.pict-modal-dropdown-item:focus\n{\n\tbackground: var(--pict-modal-dropdown-item-hover-bg);\n\tcolor: var(--pict-modal-dropdown-item-hover-fg);\n}\n\n.pict-modal-dropdown-item--disabled\n{\n\tcursor: not-allowed;\n\tcolor: var(--pict-modal-dropdown-item-disabled-fg);\n}\n\n.pict-modal-dropdown-item--disabled:hover,\n.pict-modal-dropdown-item--disabled:focus\n{\n\tbackground: transparent;\n\tcolor: var(--pict-modal-dropdown-item-disabled-fg);\n}\n\n.pict-modal-dropdown-item--primary { color: var(--pict-modal-dropdown-primary-fg); }\n.pict-modal-dropdown-item--danger { color: var(--pict-modal-dropdown-danger-fg); }\n\n.pict-modal-dropdown-item-icon\n{\n\tflex: 0 0 auto;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.pict-modal-dropdown-item-icon svg { width: 100%; height: 100%; display: block; }\n\n.pict-modal-dropdown-item-label { flex: 1 1 auto; min-width: 0; }\n\n.pict-modal-dropdown-item-hint\n{\n\tflex: 0 0 auto;\n\tfont-size: 11px;\n\topacity: 0.6;\n\tmargin-left: 12px;\n}\n\n.pict-modal-dropdown-separator\n{\n\theight: 1px;\n\tbackground: var(--pict-modal-dropdown-separator);\n\tmargin: 4px 0;\n}\n\n.pict-modal-dropdown-header\n{\n\tpadding: 6px 14px 2px;\n\tfont-size: 11px;\n\tfont-weight: 600;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.04em;\n\tcolor: var(--pict-modal-dropdown-header-fg);\n}\n\n/* ── Resizable / Collapsible Panels ──────────────── */\n.pict-panel\n{\n\tposition: relative;\n\ttransition: width 0.2s ease;\n\tflex-shrink: 0;\n\toverflow: visible;\n}\n.pict-panel-collapsed\n{\n\twidth: 0 !important;\n\tmin-width: 0 !important;\n\toverflow: visible;\n}\n.pict-panel-collapsed > *:not(.pict-panel-edge)\n{\n\tdisplay: none;\n}\n\n/* Edge container — zero-width flex sibling of the panel.\n Sits next to the panel in the flex layout; children\n use absolute positioning to overlap the panel boundary. */\n.pict-panel-edge\n{\n\tposition: relative;\n\twidth: 0;\n\tflex-shrink: 0;\n\tz-index: 50;\n\toverflow: visible;\n}\n\n/* Resize handle — thin strip on the panel boundary */\n.pict-panel-resize\n{\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\twidth: 4px;\n\tcursor: col-resize;\n\tbackground: transparent;\n\ttransition: background 0.15s, width 0.15s;\n}\n.pict-panel-edge-right .pict-panel-resize\n{\n\tright: 0;\n\tborder-right: 1px solid var(--pict-panel-border, #DDD6CA);\n}\n.pict-panel-edge-left .pict-panel-resize\n{\n\tleft: 0;\n\tborder-left: 1px solid var(--pict-panel-border, #DDD6CA);\n}\n.pict-panel-resize:hover,\n.pict-panel-edge:hover .pict-panel-resize\n{\n\twidth: 5px;\n\tbackground: var(--pict-panel-accent, #2E7D74);\n\topacity: 0.5;\n}\n.pict-panel-resize.dragging\n{\n\twidth: 5px;\n\tbackground: var(--pict-panel-accent, #2E7D74);\n\topacity: 1;\n\ttransition: none;\n}\n.pict-panel-edge-collapsed .pict-panel-resize\n{\n\tdisplay: none;\n}\n\n/* Collapse tab — tucked sliver at rest, slides out on hover */\n.pict-panel-tab\n{\n\tposition: absolute;\n\ttop: 8px;\n\twidth: 8px;\n\theight: 24px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\toverflow: hidden;\n\tbackground: var(--pict-panel-border, #DDD6CA);\n\tborder: 1px solid var(--pict-panel-border, #DDD6CA);\n\tcursor: pointer;\n\tcolor: var(--pict-panel-fg, #8A7F72);\n\tfont-size: 10px;\n\tline-height: 1;\n\topacity: 0.5;\n\ttransition: opacity 0.25s, width 0.2s ease, height 0.2s ease, left 0.2s ease, right 0.2s ease, background 0.2s;\n\tz-index: 51;\n}\n.pict-panel-edge:hover .pict-panel-tab,\n.pict-panel-tab:hover\n{\n\twidth: 20px;\n\theight: 32px;\n\topacity: 1;\n\toverflow: visible;\n\tbackground: var(--pict-panel-bg, #FAF8F4);\n}\n/* Right panel: tab to the left of the edge */\n.pict-panel-edge-right .pict-panel-tab\n{\n\tright: 0;\n\tborder-right: none;\n\tborder-radius: 4px 0 0 4px;\n}\n.pict-panel-edge-right:hover .pict-panel-tab,\n.pict-panel-edge-right .pict-panel-tab:hover\n{\n\tright: 0;\n}\n/* Left panel: tab to the right of the edge */\n.pict-panel-edge-left .pict-panel-tab\n{\n\tleft: 0;\n\tborder-left: none;\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-panel-edge-left:hover .pict-panel-tab,\n.pict-panel-edge-left .pict-panel-tab:hover\n{\n\tleft: 0;\n}\n/* When collapsed — more visible */\n.pict-panel-edge-collapsed .pict-panel-tab\n{\n\twidth: 10px;\n\theight: 28px;\n\topacity: 0.6;\n}\n.pict-panel-edge-collapsed .pict-panel-tab:hover,\n.pict-panel-edge-collapsed:hover .pict-panel-tab\n{\n\twidth: 20px;\n\theight: 32px;\n\topacity: 1;\n\toverflow: visible;\n\tbackground: var(--pict-panel-bg, #FAF8F4);\n}\n\n/* ───────────────────────────────────────────────────────────────────\n * Pict-Modal-Shell — viewport-managing layout for top / right /\n * bottom / left panels around a center.\n * ───────────────────────────────────────────────────────────────── */\n\n.pict-modal-shell-host { display: block; height: 100%; min-height: 0; }\n.pict-modal-shell\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\tmin-height: 0;\n\tposition: relative;\n\tcolor: var(--pict-modal-fg, var(--theme-color-text-primary, #1a1a1a));\n\tbackground: var(--theme-color-background-primary, transparent);\n}\n.pict-modal-shell-row { display: flex; min-width: 0; min-height: 0; }\n/* \"First added = at the edge\" convention is held by reversing the\n flex-direction on the bottom row + right side. That way, for ALL\n four sides, calling addPanel() N times stacks panel #1 against\n the viewport edge, panel #2 just inside it, panel #3 further in,\n and so on. Without these reverses, top + left worked that way but\n bottom + right inverted (first-added at content side, last-added\n at edge), which surprised callers. */\n.pict-modal-shell-row-top { flex: 0 0 auto; flex-direction: column; }\n.pict-modal-shell-row-bottom { flex: 0 0 auto; flex-direction: column-reverse; }\n.pict-modal-shell-row-middle\n{\n\tflex: 1 1 0;\n\tflex-direction: row;\n\tmin-height: 0;\n\tposition: relative;\n}\n.pict-modal-shell-side\n{\n\tdisplay: flex;\n\tflex: 0 0 auto;\n\tmin-height: 0;\n}\n.pict-modal-shell-side-left { flex-direction: row; }\n.pict-modal-shell-side-right { flex-direction: row-reverse; }\n.pict-modal-shell-center\n{\n\tflex: 1 1 0;\n\tmin-width: 0;\n\tmin-height: 0;\n\toverflow: auto;\n\tposition: relative;\n}\n.pict-modal-shell-center-content\n{\n\tmin-height: 100%;\n}\n/* Center column gains this class when at least one Scope:'center'\n panel is added. The center stops scrolling internally — that job\n moves to the content destination — and switches to a vertical flex\n so the destination and any inner panels stack cleanly. */\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\toverflow: hidden;\n}\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel > .pict-modal-shell-center-content\n{\n\tflex: 1 1 0;\n\tmin-height: 0;\n\toverflow: auto;\n}\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel > .pict-modal-shell-panel\n{\n\tflex: 0 0 auto;\n\twidth: 100%;\n}\n\n/* Panels — base */\n.pict-modal-shell-panel\n{\n\t/* How far the collapse-tab's panel-bg \"merge bar\" extends INTO\n\t the panel past the tab's geometric edge. Painted via box-shadow\n\t on the tab (no DOM impact), it masks any 1px theme border on an\n\t inner element, content padding offset, or resize-handle hover\n\t bleed in the strip between the tab's panel-facing edge and the\n\t first real pixel of panel content. Consumers can bump this for\n\t themes with thicker (2+px) inner borders. */\n\t--pict-modal-collapse-tab-merge: 2px;\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tbox-sizing: border-box;\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n\tcolor: inherit;\n\tmin-width: 0;\n\tmin-height: 0;\n\ttransition: width 140ms ease, height 140ms ease;\n}\n.pict-modal-shell-panel-content\n{\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\tmin-height: 0;\n\toverflow: auto;\n}\n.pict-modal-shell-panel-content-inner\n{\n\tmin-height: 100%;\n}\n/* Panel boundary — fixed-mode panels get a hairline border for explicit\n demarcation. Collapsible / resizable panels DROP the boundary border\n (background contrast separates them from the center anyway) so the\n collapse tab can pull out cleanly without a hairline cutting across\n it. The host stylesheet still gets full control via the panel's own\n background. */\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-top { border-bottom: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-bottom { border-top: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-left { border-right: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-right { border-left: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n\n/* Resize handle — absolute on the inner edge of each panel. */\n.pict-modal-shell-panel-resize-handle\n{\n\tposition: absolute;\n\tbackground: transparent;\n\tz-index: 5;\n\ttransition: background-color 120ms ease;\n}\n/* Resize handle hover — use the active brand's mode-aware primary\n color (set by pict-section-theme's Brand provider as\n --brand-color-primary-mode) so the resize affordance picks up the\n app's wordmark color. Falls back to the theme's brand-primary\n token if no brand is registered. */\n.pict-modal-shell-panel-resize-handle:hover\n{\n\tbackground: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\topacity: 0.4;\n}\n.pict-modal-shell-panel-left .pict-modal-shell-panel-resize-handle { right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; }\n.pict-modal-shell-panel-right .pict-modal-shell-panel-resize-handle { left: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; }\n.pict-modal-shell-panel-top .pict-modal-shell-panel-resize-handle { bottom:-3px; left: 0; right: 0; height: 6px; cursor: row-resize; }\n.pict-modal-shell-panel-bottom .pict-modal-shell-panel-resize-handle { top: -3px; left: 0; right: 0; height: 6px; cursor: row-resize; }\n\n/* Collapse tab — slim sliver flush on the panel's OUTER boundary\n (where the resize handle sits), modelled on retold-content-system's\n sidebar tab. At rest it's a 6×28 px sliver; hover expands to\n 18×36 px without overlapping the panel's own content. The tab is\n positioned with its center on the boundary so half pokes into the\n adjacent area — the only place we can safely take over without\n stepping on app UI inside the panel. Title text only renders in the\n collapsed state where there's room for it. */\n.pict-modal-shell-panel-collapse-tab\n{\n\tposition: absolute;\n\tdisplay: flex; /* not inline-flex — avoids baseline alignment quirks */\n\talign-items: center;\n\tjustify-content: center;\n\toverflow: hidden;\n\tborder: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #d0d7de));\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n\tcolor: var(--theme-color-text-muted, #6b7280);\n\tfont: inherit;\n\tfont-size: 10px;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcursor: pointer;\n\tz-index: 50;\n\topacity: 0.55;\n\tpadding: 0;\n\tbox-sizing: border-box;\n\tline-height: 0; /* keep child boxes from inflating around the rotated chevron */\n\t/* Geometry (width/height/right/left) is intentionally NOT animated.\n\t Sliding the tab's outer edge inward on hover-out makes it look like\n\t the tab is \"sliding into\" the panel content — weird visual.\n\t Snapping the size change instead, and animating only the appearance\n\t (opacity/color/shadow), gives a clean fade-in/out with no boundary\n\t weirdness. */\n\ttransition: opacity 160ms ease,\n\t background-color 160ms ease, color 160ms ease,\n\t border-color 160ms ease, box-shadow 160ms ease;\n}\n/* Hover state pulls accent color from the active brand (mode-aware,\n so it's legible in both light + dark) with theme brand-primary as\n fallback. The whole point of brand colors is that they show up\n across the app's chrome. */\n.pict-modal-shell-panel-collapse-tab:hover,\n.pict-modal-shell-panel:hover > .pict-modal-shell-panel-collapse-tab\n{\n\topacity: 1;\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n/* Drop shadow casts AWAY from the panel so the tab feels pulled out\n (extension of the panel) rather than floating across the boundary.\n The first shadow value is the merge-bar (panel-bg colored, offset\n INTO the panel) which has to be repeated here so the hover override\n doesn't drop it. */\n.pict-modal-shell-panel-left:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\tcalc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t3px 0 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-right:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\tvar(--pict-modal-collapse-tab-merge) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t-3px 0 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-top:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\t0 calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t0 3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\t0 var(--pict-modal-collapse-tab-merge) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t0 -3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n\n/* Side panels: slim VERTICAL sliver pulled OUT of the panel's outer\n boundary like a drawer tab. The geometric inner edge sits 1px\n INSIDE the panel boundary, and the merge-bar box-shadow paints\n another --pict-modal-collapse-tab-merge px of panel-bg color past\n it INTO the panel — together they mask any 1px theme border on an\n inner element, content padding offset, or resize-handle hover bleed\n that would otherwise leak between the tab and the panel content.\n The tab grows OUTWARD only on hover; the inner edge stays put so\n the tab always looks like an extension of the panel rather than a\n floating button. Border-left is removed for left panels (and\n border-right for right panels) so the panel-facing edge is open. */\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab\n{\n\tright: -5px; top: 14px; width: 6px; height: 28px;\n\tborder-radius: 0 4px 4px 0;\n\tborder-left: 0;\n\tbox-shadow: calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab\n{\n\tleft: -5px; top: 14px; width: 6px; height: 28px;\n\tborder-radius: 4px 0 0 4px;\n\tborder-right: 0;\n\tbox-shadow: var(--pict-modal-collapse-tab-merge) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n/* Hover: same inner anchor (panelRight - 1), tab grows outward to\n width 18 → right: -17px. Top + height grow downward only (top\n stays, height extends so the tab visually 'drops' the chevron\n into view). */\n.pict-modal-shell-panel-left:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 18px; height: 36px; right: -17px;\n}\n.pict-modal-shell-panel-right:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 18px; height: 36px; left: -17px;\n}\n\n/* Top / bottom panels: slim HORIZONTAL sliver pulled OUT of the\n horizontal boundary, anchored 14 px in from the right. Same\n inner-edge-anchored + merge-bar pattern as the side panels — the\n merge-bar offsets vertically instead of horizontally. */\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab\n{\n\tbottom: -5px; right: 14px; width: 28px; height: 6px;\n\tborder-radius: 0 0 4px 4px;\n\tborder-top: 0;\n\tbox-shadow: 0 calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab\n{\n\ttop: -5px; right: 14px; width: 28px; height: 6px;\n\tborder-radius: 4px 4px 0 0;\n\tborder-bottom: 0;\n\tbox-shadow: 0 var(--pict-modal-collapse-tab-merge) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-top:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 36px; height: 18px; bottom: -17px;\n}\n.pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 36px; height: 18px; top: -17px;\n}\n\n.pict-modal-shell-panel-collapse-tab-title { display: none; white-space: nowrap; }\n\n/* Auto-generated chevron glyph inside the tab — only visible once the\n tab is wide / tall enough to show it (i.e. hover state, or when the\n panel is collapsed). Direction follows side + state.\n Sized 5×5 (down from 6) so even with rotation the visual stays\n well clear of the tab's overflow:hidden bounds at 18×36 hover and\n the 24px collapsed tab strip width. flex-shrink:0 ensures the\n pseudo never collapses to zero in tight tab dimensions. */\n.pict-modal-shell-panel-collapse-tab::before\n{\n\tcontent: '';\n\tdisplay: block;\n\twidth: 5px; height: 5px;\n\tflex-shrink: 0;\n\topacity: 0;\n\tborder-right: 1.5px solid currentColor;\n\tborder-bottom: 1.5px solid currentColor;\n\ttransform: rotate(135deg);\n\ttransform-origin: center center;\n\ttransition: opacity 160ms ease, transform 160ms ease;\n}\n.pict-modal-shell-panel:hover > .pict-modal-shell-panel-collapse-tab::before,\n.pict-modal-shell-panel-collapse-tab:hover::before,\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before\n{\n\topacity: 1;\n}\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-45deg); }\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-135deg); }\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(45deg); }\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-45deg); }\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(135deg); }\n.pict-modal-shell-panel-top.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(45deg); }\n.pict-modal-shell-panel-bottom.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-135deg); }\n\n/* Collapsed state — content disappears, only the collapse tab remains. */\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-content\n{\n\tdisplay: none;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-resize-handle\n{\n\tdisplay: none;\n}\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed\n{\n\t/* When collapsed, side panels rotate the title for vertical reading. */\n\toverflow: hidden;\n}\n/* When collapsed: the entire panel becomes the tab strip — full width\n for sides, full height for top/bottom — with the title visible\n vertically (sides) or horizontally (top/bottom). The little sliver\n tab on the boundary disappears (we don't need it anymore — clicking\n anywhere on the panel toggles it back open). */\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-top.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-bottom.pict-modal-shell-panel-collapsed\n{\n\toverflow: hidden;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\t/* Promote the tab to FILL the collapsed panel (not just hug its\n\t content) so the centered chevron + title group sits in the middle\n\t of the panel. Without explicit width/height: 100%, the position:\n\t absolute element shrinks to its natural content size and the\n\t group ends up flush at the top of the panel — where the chevron\n\t gets clipped by the topbar. */\n\tposition: absolute !important;\n\ttop: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;\n\twidth: 100% !important;\n\theight: 100% !important;\n\tborder: 0;\n\tborder-radius: 0;\n\tbackground: transparent;\n\topacity: 0.85;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\tpadding: 12px 4px; /* keeps chevron + title clear of edges */\n\tbox-shadow: none;\n\tcolor: var(--theme-color-text-muted, #6b7280);\n\tbox-sizing: border-box;\n\toverflow: hidden;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbackground: var(--theme-color-background-hover, var(--pict-modal-bg, #fff));\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbox-shadow: none;\n}\n/* Side panels (collapsed): rotate the title for vertical reading. */\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\twriting-mode: vertical-rl;\n\ttext-orientation: mixed;\n}\n.pict-modal-shell-panel-collapsed .pict-modal-shell-panel-collapse-tab-title\n{\n\tdisplay: inline;\n}\n\n/* Hidden panels — when Hidden:true is passed to addPanel, the collapsed\n state has zero footprint: no collapse tab (the tab is never built),\n the panel root is display:none, and the resize handle vanishes. The\n only path to the open state is a programmatic expand()/toggle() from\n somewhere else in the app (e.g. a topbar gear button). When expanded,\n the panel renders normally — so resize/drag handles continue to work\n while the panel is open. */\n.pict-modal-shell-panel-hidden.pict-modal-shell-panel-collapsed\n{\n\tdisplay: none !important;\n}\n\n/* Overlay panels — float over the middle row instead of taking layout\n space. The overlay layer is positioned absolutely inside the middle\n row; individual overlay panels stack with positive z-index. */\n.pict-modal-shell-overlay-layer\n{\n\tposition: absolute;\n\tinset: 0;\n\tpointer-events: none;\n\tz-index: 10;\n}\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel\n{\n\tpointer-events: auto;\n\tposition: absolute;\n\tbox-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-left { left: 0; top: 0; bottom: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-right { right: 0; top: 0; bottom: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-top { top: 0; left: 0; right: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-bottom { bottom: 0; left: 0; right: 0; }\n\n/* ─────────────────────────────────────────────────────────────────\n Responsive drawer mode — .pict-modal-shell-drawer-active toggles\n onto the middle row when any panel with ResponsiveDrawer crosses\n below its breakpoint. Flips the row's flex-direction from row to\n column, stacking side panels above the center and stretching them\n to full width. Each opted-in panel itself gets the\n .pict-modal-shell-panel-drawer class so per-panel rules below\n target only the drawer-mode panels (right + non-drawer panels in\n the same row are unaffected). The drawer height is read from a\n per-panel --pict-modal-drawer-height CSS variable (default\n 33vh, set in JS from the DrawerHeight option).\n ───────────────────────────────────────────────────────────────── */\n.pict-modal-shell-row-middle.pict-modal-shell-drawer-active\n{\n\tflex-direction: column;\n\t/* The drawer tab lives outside the drawer's bottom edge — ancestor\n\t chain MUST allow it to escape clip. */\n\toverflow: visible;\n}\n.pict-modal-shell-row-middle.pict-modal-shell-drawer-active .pict-modal-shell-side\n{\n\t/* Side stacks stretch full-width and lay out their panels as a\n\t horizontal row of stacked drawers (so two drawers from the same\n\t side don't end up overlapping). overflow: visible so the\n\t per-panel tab can extend below the side stack into the workspace. */\n\twidth: 100% !important;\n\tflex-direction: column;\n\toverflow: visible;\n}\n/* The drawer-tagged panel itself: kill the inline width set by\n _applySize (we override with !important since the inline style has\n higher specificity than a class selector), then size by height\n from the CSS variable. Resize handle is hidden in drawer mode\n because horizontal dragging doesn't translate to vertical sizing\n and the user already has the collapse tab to dismiss / restore.\n\n padding-bottom reserves an 18px strip at the bottom of the panel\n for the tab. The tab sits INSIDE the drawer's footprint — never\n below it — so the workspace header below the drawer is never in\n the same vertical band as the tab. (Previously the tab hung\n below the drawer's bottom edge into the workspace's top padding;\n that made the tab visually compete with the workspace header,\n even when the tab box-model bounds technically cleared the\n header.) box-sizing: border-box so the padding eats from the\n 33vh, not adding to it. */\n.pict-modal-shell-panel-drawer\n{\n\twidth: 100% !important;\n\tmax-width: 100% !important;\n\theight: var(--pict-modal-drawer-height, 33vh);\n\ttransition: height 140ms ease;\n\tpadding-bottom: 18px;\n\tbox-sizing: border-box;\n\toverflow: visible !important;\n\t/* Clip the panel bg to its CONTENT area only — the 18px\n\t padding-bottom reserve (where the tab lives) becomes\n\t transparent, so the middle row's primary background shows\n\t through. Without this the reserve would render with the\n\t panel's chrome bg, creating a visible \"strip\" between the\n\t drawer content above and the workspace below — the tab would\n\t look like it's sitting on its own miscoloured band rather\n\t than at the seam between drawer and workspace. */\n\tbackground-clip: content-box;\n}\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed\n{\n\t/* Collapsed = \"just the tab strip is visible\". 18px matches the\n\t panel's tab reserve so the height is consistent across states.\n\t When this is 0 the tab would have nowhere to render and the\n\t user couldn't reopen the drawer. */\n\theight: 18px !important;\n\tpadding-bottom: 0 !important;\n\t/* Drop the panel's bg in collapsed state — without this the 18px\n\t strip shows the --pict-modal-bg (panel chrome) which doesn't\n\t match the workspace --theme-color-background-primary below it,\n\t creating a visible \"drawer band\" around the tab that breaks the\n\t illusion of the tab belonging to the workspace area. With\n\t transparent bg the middle row's primary background shows\n\t through, the strip blends with the workspace, and the tab pill\n\t reads as a free-floating handle. */\n\tbackground: transparent !important;\n}\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-resize-handle\n{\n\tdisplay: none;\n}\n/* The drawer's collapse tab is a horizontal pill protruding from the\n bottom of the drawer (rather than the inner edge of a side panel).\n Override the side-panel positioning rules from above so the tab\n always sits at the drawer's bottom-center seam, in both expanded\n and collapsed states. The expand-from-zero affordance: when\n collapsed (height: 0), the tab still hangs below \"where the\n drawer would be\" — a small handle the user can click to pull\n the drawer back down. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\tposition: absolute !important;\n\t/* Anchored to the panel's BOTTOM edge — the tab lives INSIDE the\n\t drawer's footprint (in the 18px reserve at the bottom), never\n\t below it into the workspace. This means the workspace below\n\t the drawer is never sharing a vertical band with the tab, so\n\t the workspace header doesn't optically compete with it.\n\t bottom: 4px aligns the tab's top edge exactly with the panel's\n\t CONTENT-AREA bottom (panel.height − padding-bottom 18px). With\n\t border-top: 0 on the tab, the seam between the drawer content\n\t above and the tab body is invisible — they share --pict-modal-bg\n\t and merge into one shape, the tab reading as a labelled\n\t extension of the drawer hanging downward. Collapsed state\n\t keeps the smaller offset (overridden below) because its panel\n\t has no padding-bottom, so the math doesn't apply. */\n\ttop: auto !important;\n\tbottom: 4px !important;\n\tleft: 50% !important;\n\tright: auto !important;\n\ttransform: translate(-50%, 0) !important;\n\twidth: 64px !important;\n\theight: 14px !important;\n\t/* CRITICAL: border-box + padding: 0 — the collapsed-state base\n\t rule inherits \"padding: 12px 4px\" (so the chevron clears the\n\t edges of a tab that fills a 24px-wide side strip). In drawer\n\t mode the tab is a 14px tall pill, NOT a strip-fill, so that\n\t 12px vertical padding would balloon the tab's outer height to\n\t ~38px and crash into the workspace header text. The chevron\n\t is centered via flex anyway. */\n\tbox-sizing: border-box !important;\n\tpadding: 0 !important;\n\t/* Rounded BOTTOM corners + no top border — the tab looks like a\n\t traditional drawer-handle/tab hanging from above. Its rounded\n\t bottom curves face the workspace (the \"open downward\" affordance\n\t for a top drawer). border-top: 0 lets the tab visually merge\n\t with whatever's directly above it inside the panel (sidebar\n\t content when expanded, the panel background when collapsed). */\n\tborder-radius: 0 0 8px 8px;\n\tborder: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #cfd5dd));\n\tborder-top: 0;\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #fff));\n\topacity: 0.95;\n\tz-index: 20;\n\t/* The default side-panel hover-grow values would yank the tab off\n\t to the wrong spot in drawer mode — neutralise. */\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab:hover,\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab:hover\n{\n\topacity: 1;\n\twidth: 96px !important;\n\t/* height stays at 14px — the tab is anchored with bottom, so any\n\t height growth would push the tab's TOP edge UPWARD past the\n\t space available above it. In EXPANDED state that crashes into\n\t the drawer content above; in COLLAPSED state it crashes into\n\t the topbar's brand stripes. Width-only growth (64 to 96, +50%)\n\t still gives the \"tab is reaching toward me\" affordance without\n\t the encroachment. */\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbox-shadow: 0 3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n/* Collapsed-state bottom-offset override. Expanded panels have an\n 18px padding-bottom reserve, and \"bottom: 4px\" anchors the tab's\n top edge exactly at the content-area boundary (so it merges\n visually with the drawer above). Collapsed panels have\n padding-bottom: 0 and a total height of 18px — \"bottom: 4px\"\n there would put the tab's top at the panel's actual top edge,\n crashing the (border-top: 0) tab into the topbar. The smaller\n \"bottom: 2px\" keeps the 14px tab vertically centered in the 18px\n strip with 2px margins on either side. */\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\tbottom: 2px !important;\n}\n/* Chevron inside the tab: point UP when expanded (the drawer\n collapses UP / out of view, so the arrow indicates \"click me to\n send the drawer up\"), DOWN when collapsed (the drawer expands DOWN\n into view). Rotations come from the existing top-panel chevron\n table: rotate(-135deg) → UP arrow, rotate(45deg) → DOWN arrow. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab::before\n{\n\ttransform: rotate(-135deg) !important;\n}\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before\n{\n\ttransform: rotate(45deg) !important;\n}\n/* The collapse tab's existing title-text span is hidden when reduced\n to a pill — there's no horizontal room. The chevron alone reads\n correctly. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-title,\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-icon\n{\n\tdisplay: none;\n}\n\n/* Drag-active state — disable text selection + change cursor globally\n so resize feels solid even when the cursor briefly leaves the handle. */\n.pict-modal-shell-dragging-x, .pict-modal-shell-dragging-y { user-select: none; }\n.pict-modal-shell-dragging-x * { cursor: col-resize !important; }\n.pict-modal-shell-dragging-y * { cursor: row-resize !important; }\n\n/* Per-panel resize-active state — kills the panel's collapse/expand\n width/height transition for the duration of a drag. Without this,\n every pointermove starts a fresh 140 ms transition and the resize\n visibly lags behind the cursor (\"choppy\"). With it disabled the\n panel snaps to the new size on the same frame as the pointer, which\n feels native. */\n.pict-modal-shell-panel-resizing { transition: none !important; }\n.pict-modal-shell-panel-resizing > .pict-modal-shell-panel-resize-handle\n{\n\tbackground: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\topacity: 0.5;\n}\n\n/* Panel popup-attention flash — fires when popup() is called on an\n already-open panel. Brief brand-colored inset glow so the user sees\n that their click landed even though the panel didn't change shape.\n Class is added by the shell, auto-removed after ~700 ms. */\n@keyframes pict-modal-shell-panel-flash\n{\n\t0% { box-shadow: inset 0 0 0 0 transparent; }\n\t30% { box-shadow: inset 0 0 0 3px var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)); }\n\t100% { box-shadow: inset 0 0 0 0 transparent; }\n}\n.pict-modal-shell-panel-flash\n{\n\tanimation: pict-modal-shell-panel-flash 600ms ease-out;\n}\n"}},{}],24:[function(t,e,o){const n=t("pict-view"),r=t("./Pict-Modal-Overlay.js"),i=t("./Pict-Modal-Confirm.js"),a=t("./Pict-Modal-Window.js"),s=t("./Pict-Modal-Toast.js"),l=t("./Pict-Modal-Tooltip.js"),c=t("./Pict-Modal-Panel.js"),d=t("./Pict-Modal-Dropdown.js"),p=t("./Pict-Modal-Shell.js"),h=t("./Pict-Section-Modal-DefaultConfiguration.js");e.exports=class extends n{constructor(t,e,o){super(t,Object.assign({},h,e),o),this._activeModals=[],this._activeTooltips=[],this._activeToasts=[],this._idCounter=0,this._overlay=new r(this),this._confirm=new i(this),this._window=new a(this),this._toast=new s(this),this._tooltip=new l(this),this._panel=new c(this),this._dropdown=new d(this),this._shell=new p(this)}onBeforeInitialize(){return super.onBeforeInitialize(),"undefined"!=typeof document&&document.body&&(document.body.classList.contains("pict-modal-root")||document.body.classList.add("pict-modal-root")),super.onBeforeInitialize()}_nextId(){return this._idCounter++,this._idCounter}confirm(t,e){return this._confirm.confirm(t,e)}doubleConfirm(t,e){return this._confirm.doubleConfirm(t,e)}show(t){return this._window.show(t)}tooltip(t,e,o){return this._tooltip.tooltip(t,e,o)}richTooltip(t,e,o){return this._tooltip.richTooltip(t,e,o)}toast(t,e){return this._toast.toast(t,e)}dropdown(t,e){return this._dropdown.dropdown(t,e)}dismissDropdowns(){this._dropdown.dismissAll()}panel(t,e){return this._panel.create(t,e)}shell(t,e){return this._shell.shell(t,e)}dismissModals(){let t=this._activeModals.slice();for(let e=t.length-1;e>=0;e--)t[e].dismiss(null)}dismissTooltips(){this._tooltip.dismissAll()}dismissToasts(){this._toast.dismissAll()}dismissAll(){this.dismissModals(),this.dismissTooltips(),this.dismissToasts(),this.dismissDropdowns()}destroyPanels(){this._panel.destroyAll()}destroy(){if(this.dismissAll(),this.destroyPanels(),this._overlay.destroy(),this._toast.destroy(),"function"==typeof super.destroy)return super.destroy()}},e.exports.default_configuration=h},{"./Pict-Modal-Confirm.js":15,"./Pict-Modal-Dropdown.js":16,"./Pict-Modal-Overlay.js":17,"./Pict-Modal-Panel.js":18,"./Pict-Modal-Shell.js":19,"./Pict-Modal-Toast.js":20,"./Pict-Modal-Tooltip.js":21,"./Pict-Modal-Window.js":22,"./Pict-Section-Modal-DefaultConfiguration.js":23,"pict-view":75}],25:[function(t,e,o){
57
+ R.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=R.tokenizer,this.pipeline=new R.Pipeline,this.searchPipeline=new R.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},R.Builder.prototype.ref=function(e){this._ref=e},R.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},R.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var r=e[this._ref],n=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var o=0;o<n.length;o++){var i=n[o],a=this._fields[i].extractor,s=a?a(e):e[i],l=this.tokenizer(s,{fields:[i]}),c=this.pipeline.run(l),d=new R.FieldRef(r,i),h=Object.create(null);this.fieldTermFrequencies[d]=h,this.fieldLengths[d]=0,this.fieldLengths[d]+=c.length;for(var p=0;p<c.length;p++){var u=c[p];if(null==h[u]&&(h[u]=0),h[u]+=1,null==this.invertedIndex[u]){var f=Object.create(null);f._index=this.termIndex,this.termIndex+=1;for(var m=0;m<n.length;m++)f[n[m]]=Object.create(null);this.invertedIndex[u]=f}null==this.invertedIndex[u][i][r]&&(this.invertedIndex[u][i][r]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var y=this.metadataWhitelist[g],b=u.metadata[y];null==this.invertedIndex[u][i][r][y]&&(this.invertedIndex[u][i][r][y]=[]),this.invertedIndex[u][i][r][y].push(b)}}}},R.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,r={},n={},o=0;o<t;o++){var i=R.FieldRef.fromString(e[o]),a=i.fieldName;n[a]||(n[a]=0),n[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[i]}var s=Object.keys(this._fields);for(o=0;o<s.length;o++){var l=s[o];r[l]=r[l]/n[l]}this.averageFieldLength=r},R.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),r=t.length,n=Object.create(null),o=0;o<r;o++){for(var i=R.FieldRef.fromString(t[o]),a=i.fieldName,s=this.fieldLengths[i],l=new R.Vector,c=this.fieldTermFrequencies[i],d=Object.keys(c),h=d.length,p=this._fields[a].boost||1,u=this._documents[i.docRef].boost||1,f=0;f<h;f++){var m,g,y,b=d[f],v=c[b],S=this.invertedIndex[b]._index;void 0===n[b]?(m=R.idf(this.invertedIndex[b],this.documentCount),n[b]=m):m=n[b],g=m*((this._k1+1)*v)/(this._k1*(1-this._b+this._b*(s/this.averageFieldLength[a]))+v),g*=p,g*=u,y=Math.round(1e3*g)/1e3,l.insert(S,y)}e[i]=l}this.fieldVectors=e},R.Builder.prototype.createTokenSet=function(){this.tokenSet=R.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},R.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new R.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},R.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},R.MatchData=function(e,t,r){for(var n=Object.create(null),o=Object.keys(r||{}),i=0;i<o.length;i++){var a=o[i];n[a]=r[a].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=n)},R.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r<t.length;r++){var n=t[r],o=Object.keys(e.metadata[n]);null==this.metadata[n]&&(this.metadata[n]=Object.create(null));for(var i=0;i<o.length;i++){var a=o[i],s=Object.keys(e.metadata[n][a]);null==this.metadata[n][a]&&(this.metadata[n][a]=Object.create(null));for(var l=0;l<s.length;l++){var c=s[l];null==this.metadata[n][a][c]?this.metadata[n][a][c]=e.metadata[n][a][c]:this.metadata[n][a][c]=this.metadata[n][a][c].concat(e.metadata[n][a][c])}}}},R.MatchData.prototype.add=function(e,t,r){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=r);if(t in this.metadata[e])for(var n=Object.keys(r),o=0;o<n.length;o++){var i=n[o];i in this.metadata[e][t]?this.metadata[e][t][i]=this.metadata[e][t][i].concat(r[i]):this.metadata[e][t][i]=r[i]}else this.metadata[e][t]=r},R.Query=function(e){this.clauses=[],this.allFields=e},R.Query.wildcard=new String("*"),R.Query.wildcard.NONE=0,R.Query.wildcard.LEADING=1,R.Query.wildcard.TRAILING=2,R.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},R.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=R.Query.wildcard.NONE),e.wildcard&R.Query.wildcard.LEADING&&e.term.charAt(0)!=R.Query.wildcard&&(e.term="*"+e.term),e.wildcard&R.Query.wildcard.TRAILING&&e.term.slice(-1)!=R.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=R.Query.presence.OPTIONAL),this.clauses.push(e),this},R.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=R.Query.presence.PROHIBITED)return!1;return!0},R.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach(function(e){this.term(e,R.utils.clone(t))},this),this;var r=t||{};return r.term=e.toString(),this.clause(r),this},R.QueryParseError=function(e,t,r){this.name="QueryParseError",this.message=e,this.start=t,this.end=r},R.QueryParseError.prototype=new Error,R.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},R.QueryLexer.prototype.run=function(){for(var e=R.QueryLexer.lexText;e;)e=e(this)},R.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,r=this.pos,n=0;n<this.escapeCharPositions.length;n++)r=this.escapeCharPositions[n],e.push(this.str.slice(t,r)),t=r+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},R.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},R.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},R.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos<this.length},R.QueryLexer.EOS="EOS",R.QueryLexer.FIELD="FIELD",R.QueryLexer.TERM="TERM",R.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",R.QueryLexer.BOOST="BOOST",R.QueryLexer.PRESENCE="PRESENCE",R.QueryLexer.lexField=function(e){return e.backup(),e.emit(R.QueryLexer.FIELD),e.ignore(),R.QueryLexer.lexText},R.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new R.QueryParseError(r,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(r,t.start,t.end)}var n=e.peekLexeme();if(null==n){r="expecting term or field, found nothing";throw new R.QueryParseError(r,t.start,t.end)}switch(n.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:r="expecting term or field, found '"+n.type+"'";throw new R.QueryParseError(r,n.start,n.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+t.str+"', possible fields: "+r;throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.fields=[t.str];var o=e.peekLexeme();if(null==o){n="expecting term, found nothing";throw new R.QueryParseError(n,t.start,t.end)}if(o.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;n="expecting term, found '"+o.type+"'";throw new R.QueryParseError(n,o.start,o.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+r.type+"'";throw new R.QueryParseError(n,r.start,r.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="edit distance must be numeric";throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.editDistance=r;var o=e.peekLexeme();if(null!=o)switch(o.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+o.type+"'";throw new R.QueryParseError(n,o.start,o.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="boost must be numeric";throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.boost=r;var o=e.peekLexeme();if(null!=o)switch(o.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+o.type+"'";throw new R.QueryParseError(n,o.start,o.end)}else e.nextClause()}},M=this,L=function(){return R},"object"==typeof r?t.exports=L():M.lunr=L()}()},{}],117:[function(e,t,r){t.exports=(e,t)=>t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t},{}],118:[function(e,t,r){let n=e("./Manyfest-LogToConsole.js");t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:n,this.logError="function"==typeof t?t:n,this.translationTable={}}translationCount(){return Object.keys(this.translationTable).length}addTranslation(e){if("object"!=typeof e)return this.logError("Hash translation addTranslation expected a translation be type object but was passed in ".concat(typeof e)),!1;Object.keys(e).forEach(t=>{"string"!=typeof e[t]?this.logError("Hash translation addTranslation expected a translation destination hash for [".concat(t,"] to be a string but the referrant was a ").concat(typeof e[t])):this.translationTable[t]=e[t]})}removeTranslationHash(e){delete this.translationTable[e]}removeTranslation(e){if("string"==typeof e)return this.removeTranslationHash(e),!0;if("object"==typeof e){return Object.keys(e).forEach(e=>{this.removeTranslation(e)}),!0}return this.logError("Hash translation removeTranslation expected either a string or an object but the passed-in translation was type ".concat(typeof e)),!1}clearTranslations(){this.translationTable={}}translate(e){return e in this.translationTable?this.translationTable[e]:e}}},{"./Manyfest-LogToConsole.js":119}],119:[function(e,t,r){t.exports=(e,t)=>{let r="string"==typeof e?e:"";console.log("[Manyfest] ".concat(r)),t&&console.log(JSON.stringify(t))}},{}],120:[function(e,t,r){const n=e("./Manyfest-LogToConsole.js"),o=e("./Manyfest-ObjectAddress-GetValue.js"),i=e("./Manyfest-CleanWrapCharacters.js");let a={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:n,this.logError="function"==typeof t?t:n,this.getObjectValueClass=new o(this.logInfo,this.logError),this.cleanWrapCharacters=i}checkAddressExists(e,t,r){if("object"!=typeof e)return!1;if("string"!=typeof t)return!1;let o=void 0===r?e:r,i=a.DataFormat.stringGetFirstSegment(t);if(i.length==t.length){let r=t.indexOf("["),n=t.indexOf("]"),o=t.indexOf("(");if(o>0&&a.DataFormat.stringCountEnclosures(t)>0){let r=t.substring(0,o).trim();return r in e&&"function"==typeof e[r]}if(r>0&&n>r&&n-r>1){let o=t.substring(0,r).trim();if("object"!=typeof e[o])return!1;let i=t.substring(r+1,n).trim(),a=parseInt(i,10);return Array.isArray(e[o])!=isNaN(a)&&(isNaN(a)?(i=this.cleanWrapCharacters('"',i),i=this.cleanWrapCharacters("`",i),i=this.cleanWrapCharacters("'",i),i in e[o]):a in e[o])}return t in e}{let r=i,s=t.substring(i.length+1),l=r.indexOf("["),c=r.indexOf("]"),d=r.indexOf("(");if(d>0&&a.DataFormat.stringCountEnclosures(r)>0){let i=r.substring(0,d).trim();if("function"!=typeof e[i])return!1;let l=a.DataFormat.stringGetSegments(a.DataFormat.stringGetEnclosureValueByIndex(r.substring(i.length),0),",");if(0==l.length||""==l[0]){if(!(i in e))return n("Function ".concat(i," does not exist (address [").concat(t,"])")),!1;try{return this.checkAddressExists(e[i].apply(e),s,o)}catch(e){return n("Error calling function ".concat(i," (address [").concat(t,"]): ").concat(e.message)),!1}}else{let r=[];for(let e=0;e<l.length;e++)r.push(this.getObjectValueClass.getValueAtAddress(o,l[e]));if(!(i in e))return n("Function ".concat(i," does not exist (address [").concat(t,"])")),!1;try{return this.checkAddressExists(e[i].apply(e,r),s,o)}catch(e){return n("Error calling function ".concat(i," (address [").concat(t,"]): ").concat(e.message)),!1}}}else if(l>0&&c>l&&c-l>1){let t=r.substring(0,l).trim(),n=r.substring(l+1,c).trim(),i=parseInt(n,10);return Array.isArray(e[t])!=isNaN(i)&&(isNaN(i)?(n=this.cleanWrapCharacters('"',n),n=this.cleanWrapCharacters("`",n),n=this.cleanWrapCharacters("'",n),this.checkAddressExists(e[t][n],s,o)):this.checkAddressExists(e[t][i],s,o))}return(!(r in e)||"object"==typeof e[r])&&(r in e&&this.checkAddressExists(e[r],s,o))}}}},{"./Manyfest-CleanWrapCharacters.js":117,"./Manyfest-LogToConsole.js":119,"./Manyfest-ObjectAddress-GetValue.js":122,"./Manyfest-ObjectAddress-Parser.js":123}],121:[function(e,t,r){let n=e("./Manyfest-LogToConsole.js"),o=e("./Manyfest-CleanWrapCharacters.js"),i=e("../source/Manyfest-ParseConditionals.js"),a={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:n,this.logError="function"==typeof t?t:n,this.cleanWrapCharacters=o}checkRecordFilters(e,t){return i(this,e,t)}deleteValueAtAddress(e,t,r){if("object"!=typeof e)return;if("string"!=typeof t)return;let n="";"string"==typeof r&&(n=r);let o=a.DataFormat.stringGetFirstSegment(t);if(o.length==t.length){let r=t.indexOf("["),n=t.indexOf("]"),o=t.indexOf("{}");if(r>0&&n>r&&n-r>1){let o=t.substring(0,r).trim();if("object"!=typeof e[o])return!1;let i=t.substring(r+1,n).trim(),a=parseInt(i,10);return Array.isArray(e[o])!=isNaN(a)&&(isNaN(a)?(i=this.cleanWrapCharacters('"',i),i=this.cleanWrapCharacters("`",i),i=this.cleanWrapCharacters("'",i),delete e[o][i],!0):(delete e[o][a],!0))}if(r>0&&n>r&&n-r==1){let n=t.substring(0,r).trim();if(!Array.isArray(e[n]))return!1;let o=e[n];for(let e=o.length-1;e>=0;e--){this.checkRecordFilters(t,o[e])&&o.splice(e,1)}return!0}if(o>0){let r=t.substring(0,o).trim();return"object"==typeof e[r]&&(delete e[r],!0)}return delete e[t],!0}{let r=o,i=t.substring(o.length+1),a=r.indexOf("["),s=r.indexOf("]");if(a>0&&s>a&&s-a>1){let t=r.substring(0,a).trim(),o=r.substring(a+1,s).trim(),l=parseInt(o,10);return Array.isArray(e[t])!=isNaN(l)&&("object"==typeof e[t]&&(isNaN(l)?(o=this.cleanWrapCharacters('"',o),o=this.cleanWrapCharacters("`",o),o=this.cleanWrapCharacters("'",o),n="".concat(n).concat(n.length>0?".":"").concat(r),this.deleteValueAtAddress(e[t][o],i,n)):(n="".concat(n).concat(n.length>0?".":"").concat(r),this.deleteValueAtAddress(e[t][l],i,n))))}if(a>0&&s>a&&s-a==1){let r=t.substring(0,a).trim();if(!Array.isArray(e[r]))return!1;let o=e[r];n="".concat(n).concat(n.length>0?".":"").concat(r);let s={};for(let t=0;t<o.length;t++){let o="".concat(n,"[").concat(t,"]"),a=this.deleteValueAtAddress(e[r][t],i,o);s["".concat(o,".").concat(i)]=a}return s}let l=t.indexOf("{}");if(l>0){let r=t.substring(0,l).trim();if("object"!=typeof e[r])return!1;let o=e[r],a=Object.keys(o);n="".concat(n).concat(n.length>0?".":"").concat(r);let s={};for(let o=0;o<a.length;o++){let l="".concat(n,".").concat(a[o]),c=this.deleteValueAtAddress(e[r][a[o]],i,l);this.checkRecordFilters(t,c)&&(s["".concat(l,".").concat(i)]=c)}return s}return r in e&&"object"!=typeof e[r]?void 0:r in e?(n="".concat(n).concat(n.length>0?".":"").concat(r),this.deleteValueAtAddress(e[r],i,n)):(n="".concat(n).concat(n.length>0?".":"").concat(r),e[r]={},this.deleteValueAtAddress(e[r],i,n))}}}},{"../source/Manyfest-ParseConditionals.js":126,"./Manyfest-CleanWrapCharacters.js":117,"./Manyfest-LogToConsole.js":119,"./Manyfest-ObjectAddress-Parser.js":123}],122:[function(e,t,r){let n=e("./Manyfest-LogToConsole.js"),o=e("./Manyfest-CleanWrapCharacters.js"),i=e("../source/Manyfest-ParseConditionals.js"),a={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:n,this.logError="function"==typeof t?t:n,this.cleanWrapCharacters=o}checkRecordFilters(e,t){return i(this,e,t)}getValueAtAddress(e,t,r,n){if("object"!=typeof e)return;if(null===e)return;if("string"!=typeof t)return;let o="";"string"==typeof r&&(o=r);let i=void 0===n?e:n,s=a.DataFormat.stringGetFirstSegment(t);if(""==s){let e=a.DataFormat.stringGetSegments(o),r=0;for(let e=0;e<t.length&&"."==t.charAt(e);e++)r++;let n=e.length-r;if(n<0)return;{let o=t.slice(r);return n>0&&(o="".concat(e.slice(0,n).join("."),".").concat(o)),this.logInfo("Back-navigation detected. Recursing back to address [".concat(o,"]")),this.getValueAtAddress(i,o)}}if(s.length!=t.length){let r=s,n=t.substring(s.length+1),l=r.indexOf("["),c=r.indexOf("]"),d=r.indexOf("(");if(d>0&&a.DataFormat.stringCountEnclosures(r)>0){let s=r.substring(0,d).trim();if(o="".concat(o).concat(o.length>0?".":"").concat(r),"function"!=typeof e[s])return!1;let l=a.DataFormat.stringGetSegments(a.DataFormat.stringGetEnclosureValueByIndex(r.substring(s.length),0),",");if(0==l.length||""==l[0]){if(!(s in e))return console.log("Function ".concat(s," does not exist (address [").concat(t,"])")),!1;try{return this.getValueAtAddress(e[s].apply(e),n,o,i)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(s," (address [").concat(t,"]): ").concat(e.message)),!1}}else{let r=[];for(let e=0;e<l.length;e++){let t=l[e].trim();!(t.length>=2)||'"'!=t.charAt(0)&&"'"!=t.charAt(0)&&"`"!=t.charAt(0)||'"'!=t.charAt(t.length-1)&&"'"!=t.charAt(t.length-1)&&"`"!=t.charAt(t.length-1)?r.push(this.getValueAtAddress(i,t)):r.push(t.substring(1,t.length-1))}if(!(s in e))return console.log("Function ".concat(s," does not exist (address [").concat(t,"])")),!1;try{return this.getValueAtAddress(e[s].apply(e,r),n,o,i)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(s," (address [").concat(t,"]): ").concat(e.message)),!1}}}else{if(l>0&&c>l&&c-l>1){let t=r.substring(0,l).trim(),a=r.substring(l+1,c).trim(),s=parseInt(a,10);if(Array.isArray(e[t])==isNaN(s))return;if("object"!=typeof e[t])return;return isNaN(s)?(a=this.cleanWrapCharacters('"',a),a=this.cleanWrapCharacters("`",a),a=this.cleanWrapCharacters("'",a),o="".concat(o).concat(o.length>0?".":"").concat(r),this.getValueAtAddress(e[t][a],n,o,i)):(o="".concat(o).concat(o.length>0?".":"").concat(r),this.getValueAtAddress(e[t][s],n,o,i))}if(l>0&&c>l&&c-l==1){let r=t.substring(0,l).trim();if(!Array.isArray(e[r]))return!1;let a=e[r];o="".concat(o).concat(o.length>0?".":"").concat(r);let s={};for(let t=0;t<a.length;t++){let a="".concat(o,"[").concat(t,"]"),l=this.getValueAtAddress(e[r][t],n,a,i);s["".concat(a,".").concat(n)]=l}return s}}let h=t.indexOf("{}");if(h>0){let r=t.substring(0,h).trim();if("object"!=typeof e[r])return!1;let a=e[r],s=Object.keys(a);o="".concat(o).concat(o.length>0?".":"").concat(r);let l={};for(let a=0;a<s.length;a++){let c="".concat(o,".").concat(s[a]),d=this.getValueAtAddress(e[r][s[a]],n,c,i);this.checkRecordFilters(t,d)&&(l["".concat(c,".").concat(n)]=d)}return l}return r in e&&"object"!=typeof e[r]?void 0:r in e?(o="".concat(o).concat(o.length>0?".":"").concat(r),this.getValueAtAddress(e[r],n,o,i)):(o="".concat(o).concat(o.length>0?".":"").concat(r),e[r]={},this.getValueAtAddress(e[r],n,o,i))}{let r=t.indexOf("["),n=t.indexOf("]"),o=t.indexOf("{}"),s=t.indexOf("(");if(!(s>0&&a.DataFormat.stringCountEnclosures(t)>0)){if(r>0&&n>r&&n-r>1){let o=t.substring(0,r).trim();if("object"!=typeof e[o])return;let i=t.substring(r+1,n).trim(),a=parseInt(i,10);if(Array.isArray(e[o])==isNaN(a))return;return isNaN(a)?(i=this.cleanWrapCharacters('"',i),i=this.cleanWrapCharacters("`",i),i=this.cleanWrapCharacters("'",i),e[o][i]):e[o][a]}if(r>0&&n>r&&n-r==1){let n=t.substring(0,r).trim();if(!Array.isArray(e[n]))return!1;let o=e[n],i=[];for(let e=0;e<o.length;e++){this.checkRecordFilters(t,o[e])&&i.push(o[e])}return i}if(o>0){let r=t.substring(0,o).trim();return"object"==typeof e[r]&&e[r]}return void 0!==e[t]?e[t]:void 0}{let r=t.substring(0,s).trim();if("function"!=typeof e[r])return!1;let n=a.DataFormat.stringGetSegments(a.DataFormat.stringGetEnclosureValueByIndex(t.substring(r.length),0),",");if(0==n.length||""==n[0]){if(!(r in e))return console.log("Function ".concat(r," does not exist (address [").concat(t,"])")),!1;try{return e[r].apply(e)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(r," (address [").concat(t,"]): ").concat(e.message)),!1}}else{let o=[];for(let e=0;e<n.length;e++){let t=n[e].trim();!(t.length>=2)||'"'!=t.charAt(0)&&"'"!=t.charAt(0)&&"`"!=t.charAt(0)||'"'!=t.charAt(t.length-1)&&"'"!=t.charAt(t.length-1)&&"`"!=t.charAt(t.length-1)?o.push(this.getValueAtAddress(i,t)):o.push(t.substring(1,t.length-1))}if(!(r in e))return console.log("Function ".concat(r," does not exist (address [").concat(t,"])")),!1;try{return e[r].apply(e,o)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(r," (address [").concat(t,"]): ").concat(e.message)),!1}}}}}}},{"../source/Manyfest-ParseConditionals.js":126,"./Manyfest-CleanWrapCharacters.js":117,"./Manyfest-LogToConsole.js":119,"./Manyfest-ObjectAddress-Parser.js":123}],123:[function(e,t,r){const n={"{":0,"[":1,"(":2},o={"}":0,"]":1,")":2};t.exports={stringCountSegments:(e,t,r,i)=>{let a="string"==typeof e?e:"",s="string"==typeof t?t:".",l="object"==typeof r?r:n,c="object"==typeof i?i:o;if(a.length<1)return 0;let d=1,h=[];for(let e=0;e<a.length;e++)a[e]==s&&0==h.length?d++:a[e]in l?h.push(l[a[e]]):a[e]in c&&c[a[e]]==h[h.length-1]&&h.pop();return d},stringGetFirstSegment:(e,t,r,i)=>{let a="string"==typeof e?e:"",s="string"==typeof t?t:".",l="object"==typeof r?r:n,c="object"==typeof i?i:o;if(a.length<1)return"";let d=[];for(let e=0;e<a.length;e++){if(a[e]==s&&0==d.length)return a.substring(0,e);a[e]in l?d.push(l[a[e]]):a[e]in c&&c[a[e]]==d[d.length-1]&&d.pop()}return a},stringGetSegments:(e,t,r,i)=>{let a="string"==typeof e?e:"",s="string"==typeof t?t:".",l="object"==typeof r?r:n,c="object"==typeof i?i:o,d=0,h=[];if(a.length<1)return h;let p=[];for(let e=0;e<a.length;e++)a[e]==s&&0==p.length?(h.push(a.substring(d,e)),d=e+1):a[e]in l?p.push(l[a[e]]):a[e]in c&&c[a[e]]==p[p.length-1]&&p.pop();return d<a.length&&h.push(a.substring(d)),h},stringCountEnclosures:(e,t,r)=>{let n="string"==typeof e?e:"",o="string"==typeof t?t:"(",i="string"==typeof r?r:")",a=0,s=0;for(let e=0;e<n.length;e++)n[e]==o?(0==s&&a++,s++):n[e]==i&&s--;return a},stringGetEnclosureValueByIndex:(e,t,r,n)=>{let o="string"==typeof e?e:"",i="number"==typeof t?t:0,a="string"==typeof r?r:"(",s="string"==typeof n?n:")",l=0,c=0,d=!1,h=0,p=0;for(let e=0;e<o.length;e++)o[e]==a?(c++,1==c&&(l++,i==l-1&&(d=!0,h=e))):o[e]==s&&(c--,0==c&&d&&p<=h&&(p=e,d=!1));return l<=i?"":p>0&&p>h?o.substring(h+1,p):o.substring(h+1)}}},{}],124:[function(e,t,r){let n=e("./Manyfest-LogToConsole.js"),o=e("./Manyfest-CleanWrapCharacters.js"),i={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:n,this.logError="function"==typeof t?t:n,this.cleanWrapCharacters=o}setValueAtAddress(e,t,r){if("object"!=typeof e)return!1;if("string"!=typeof t)return!1;let n=i.DataFormat.stringGetFirstSegment(t);if(n.length==t.length){let n=t.indexOf("["),o=t.indexOf("]");if(n>=0&&o>n&&o-n>1){let i=t.substring(o+1);i.length>0&&"."===i.charAt(0)&&(i=i.substring(1));let a=t.substring(n+1,o).trim(),s=parseInt(a,10),l=!isNaN(s);if(0===n){if(l){if(!Array.isArray(e))return!1;for(;e.length<s+1;)e.push({});return i.length>0?this.setValueAtAddress(e[s],i,r):(e[s]=r,!0)}return a=this.cleanWrapCharacters('"',a),a=this.cleanWrapCharacters("`",a),a=this.cleanWrapCharacters("'",a),i.length>0?(a in e&&"object"==typeof e[a]||(e[a]={}),this.setValueAtAddress(e[a],i,r)):(e[a]=r,!0)}let c=t.substring(0,n).trim();if(null==e[c]&&(e[c]=l?[]:{}),"object"!=typeof e[c])return!1;if(Array.isArray(e[c])==isNaN(s))return!1;if(isNaN(s))return a=this.cleanWrapCharacters('"',a),a=this.cleanWrapCharacters("`",a),a=this.cleanWrapCharacters("'",a),a in e[c]||(e[c][a]={}),i.length>0?this.setValueAtAddress(e[c][a],i,r):(e[c][a]=r,!0);for(;e[c].length<s+1;)e[c].push({});return i.length>0?this.setValueAtAddress(e[c][s],i,r):(e[c][s]=r,!0)}return e[t]=r,!0}{let o=n,i=t.substring(n.length+1),a=o.indexOf("["),s=o.indexOf("]");if(a>=0&&s>a&&s-a>1){if(0===a){let t=o.substring(1,s).trim(),n=parseInt(t,10);if(isNaN(n))return t=this.cleanWrapCharacters('"',t),t=this.cleanWrapCharacters("`",t),t=this.cleanWrapCharacters("'",t),t in e&&"object"==typeof e[t]||(e[t]={}),this.setValueAtAddress(e[t],i,r);if(!Array.isArray(e))return!1;for(;e.length<n+1;)e.push({});return this.setValueAtAddress(e[n],i,r)}let t=o.substring(0,a).trim(),n=o.substring(a+1,s).trim(),l=parseInt(n,10),c=!isNaN(l),d=o.substring(s+1);if(d.length>0&&(i=i.length>0?d+"."+i:d,"."===i.charAt(0)&&(i=i.substring(1))),null==e[t]&&(e[t]=c?[]:{}),Array.isArray(e[t])!=c)return!1;if(isNaN(l))return n=this.cleanWrapCharacters('"',n),n=this.cleanWrapCharacters("`",n),n=this.cleanWrapCharacters("'",n),n in e[t]||(e[t][n]={}),this.setValueAtAddress(e[t][n],i,r);for(;e[t].length<l+1;)e[t].push({});return this.setValueAtAddress(e[t][l],i,r)}return o in e&&"object"!=typeof e[o]?("__ERROR"in e||(e.__ERROR={}),e.__ERROR[t]=r,!1):(o in e||(e[o]={}),this.setValueAtAddress(e[o],i,r))}}}},{"./Manyfest-CleanWrapCharacters.js":117,"./Manyfest-LogToConsole.js":119,"./Manyfest-ObjectAddress-Parser.js":123}],125:[function(e,t,r){let n=e("./Manyfest-LogToConsole.js");t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:n,this.logError="function"==typeof t?t:n}generateAddressses(e,t,r){let n="string"==typeof t?t:"",o="object"==typeof r?r:{},i=typeof e,a={Address:n,Hash:n,Name:n,InSchema:!1};switch("object"==i&&null==e&&(i="undefined"),i){case"string":a.DataType="String",a.Default=e,o[n]=a;break;case"number":case"bigint":a.DataType="Number",a.Default=e,o[n]=a;break;case"undefined":a.DataType="Any",a.Default=e,o[n]=a;break;case"object":if(Array.isArray(e)){a.DataType="Array",""!=n&&(o[n]=a);for(let t=0;t<e.length;t++)this.generateAddressses(e[t],"".concat(n,"[").concat(t,"]"),o)}else{a.DataType="Object",""!=n&&(o[n]=a,n+=".");let t=Object.keys(e);for(let r=0;r<t.length;r++)this.generateAddressses(e[t[r]],"".concat(n).concat(t[r]),o)}}return o}}},{"./Manyfest-LogToConsole.js":119}],126:[function(e,t,r){const n="<<~?",o="?~>>",i=(e,t,r,n,o)=>{switch(n){case"TRUE":return!0===e.getValueAtAddress(t,r);case"FALSE":return!1===e.getValueAtAddress(t,r);case"LNGT":case"LENGTH_GREATER_THAN":switch(typeof e.getValueAtAddress(t,r)){case"string":case"object":return e.getValueAtAddress(t,r).length>o;default:return!1}break;case"LNLT":case"LENGTH_LESS_THAN":switch(typeof e.getValueAtAddress(t,r)){case"string":case"object":return e.getValueAtAddress(t,r).length<o;default:return!1}break;case"!=":return e.getValueAtAddress(t,r)!=o;case"<":return e.getValueAtAddress(t,r)<o;case">":return e.getValueAtAddress(t,r)>o;case"<=":return e.getValueAtAddress(t,r)<=o;case">=":return e.getValueAtAddress(t,r)>=o;case"===":return e.getValueAtAddress(t,r)===o;default:return e.getValueAtAddress(t,r)==o}};t.exports=(e,t,r)=>{let a=!0,s=t.indexOf(n);for(;-1!=s;){let l=t.indexOf(o,s+4);if(-1!=l){let o=t.substring(s+4,l).split(","),c=o[0],d="EXISTS";o.length>1&&(d=o[1]);let h=!1;o.length>2&&(h=o[2]),a=a&&i(e,r,c,d,h),s=t.indexOf(n,l+4)}else s=-1}return a}},{}],127:[function(e,t,r){let n=e("./Manyfest-LogToConsole.js");t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:n,this.logError="function"==typeof t?t:n}resolveAddressMappings(e,t){if("object"!=typeof e)return this.logError("Attempted to resolve address mapping but the descriptor was not an object."),!1;if("object"!=typeof t)return!0;let r=Object.keys(e),n={};return r.forEach(t=>{"Hash"in e[t]&&(n[e[t].Hash]=t)}),Object.keys(t).forEach(r=>{let o,i=t[r],a=null;r in e?a=r:r in n&&(a=n[r]),a?(o=e[a],delete e[a]):o={Hash:r},e[i]=o}),!0}safeResolveAddressMappings(e,t){let r=JSON.parse(JSON.stringify(e));return this.resolveAddressMappings(r,t),r}mergeAddressMappings(e,t){if("object"!=typeof t||"object"!=typeof e)return this.logError("Attempted to merge two schema descriptors but both were not objects."),!1;let r=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(e));return Object.keys(r).forEach(e=>{e in n||(n[e]=r[e])}),n}}},{"./Manyfest-LogToConsole.js":119}],128:[function(e,t,r){const n=e("fable-serviceproviderbase");let o=e("./Manyfest-LogToConsole.js"),i=e("./Manyfest-HashTranslation.js"),a=e("./Manyfest-ObjectAddress-CheckAddressExists.js"),s=e("./Manyfest-ObjectAddress-GetValue.js"),l=e("./Manyfest-ObjectAddress-SetValue.js"),c=e("./Manyfest-ObjectAddress-DeleteValue.js"),d=e("./Manyfest-ObjectAddressGeneration.js"),h=e("./Manyfest-SchemaManipulation.js");const p={Scope:"DEFAULT",Descriptors:{}};class u extends n{constructor(e,t,r){void 0===e?super({}):super(e,t,r),this.fable,this.options,this.Hash,this.UUID,this.serviceType="Manifest",this.logInfo=o,this.logError=o,this.objectAddressCheckAddressExists=new a(this.logInfo,this.logError),this.objectAddressGetValue=new s(this.logInfo,this.logError),this.objectAddressSetValue=new l(this.logInfo,this.logError),this.objectAddressDeleteValue=new c(this.logInfo,this.logError),"defaultValues"in this.options||(this.options.defaultValues={String:"",Number:0,Float:0,Integer:0,PreciseNumber:"0.0",Boolean:!1,Binary:0,DateTime:0,Array:[],Object:{},Null:null}),"strict"in this.options||(this.options.strict=!1),this.scope=void 0,this.elementAddresses=void 0,this.elementHashes=void 0,this.elementDescriptors=void 0,this.reset(),"object"==typeof this.options&&this.loadManifest(this.options),this.schemaManipulations=new h(this.logInfo,this.logError),this.objectAddressGeneration=new d(this.logInfo,this.logError),this.hashTranslations=new i(this.logInfo,this.logError),this.numberRegex=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/}reset(){this.scope="DEFAULT",this.elementAddresses=[],this.elementHashes={},this.elementDescriptors={}}clone(){let e=JSON.parse(JSON.stringify(this.options)),t=new u(this.fable,e,this.Hash);t.logInfo=this.logInfo,t.logError=this.logError;const{Scope:r,Descriptors:n,HashTranslations:o}=this.getManifest();t.scope=r,t.elementDescriptors=n,t.elementAddresses=Object.keys(n);for(let e=0;e<t.elementAddresses.length;e++){let r=t.elementAddresses[e],n=t.elementDescriptors[r];t.elementHashes[r]=r,"Hash"in n&&(t.elementHashes[n.Hash]=r)}return t.hashTranslations.addTranslation(this.hashTranslations.translationTable),t}deserialize(e){return this.loadManifest(JSON.parse(e)),this}loadManifest(e){"object"!=typeof e&&this.logError("(".concat(this.scope,") Error loading manifest; expecting an object but parameter was type ").concat(typeof e,"."));let t="object"==typeof e?e:{},r=Object.keys(p);for(let e=0;e<r.length;e++)r[e]in t||(t[r[e]]=JSON.parse(JSON.stringify(p[r[e]])));if("Scope"in t?"string"==typeof t.Scope?this.scope=t.Scope:this.logError("(".concat(this.scope,") Error loading scope from manifest; expecting a string but property was type ").concat(typeof t.Scope,"."),t):this.logError("(".concat(this.scope,') Error loading scope from manifest object. Property "Scope" does not exist in the root of the object.'),t),"Descriptors"in t)if("object"==typeof t.Descriptors){let e=Object.keys(t.Descriptors);for(let r=0;r<e.length;r++)this.addDescriptor(e[r],t.Descriptors[e[r]])}else this.logError("(".concat(this.scope,") Error loading description object from manifest object. Expecting an object in 'Manifest.Descriptors' but the property was type ").concat(typeof t.Descriptors,"."),t);else this.logError("(".concat(this.scope,') Error loading object description from manifest object. Property "Descriptors" does not exist in the root of the Manifest object.'),t);"HashTranslations"in t&&"object"==typeof t.HashTranslations&&this.hashTranslations.addTranslation(t.HashTranslations)}serialize(){return JSON.stringify(this.getManifest())}getManifest(){return{Scope:this.scope,Descriptors:JSON.parse(JSON.stringify(this.elementDescriptors)),HashTranslations:JSON.parse(JSON.stringify(this.hashTranslations.translationTable))}}addDescriptor(e,t){return"object"==typeof t?("Address"in t||(t.Address=e),e in this.elementDescriptors||this.elementAddresses.push(e),this.elementDescriptors[e]=t,this.elementHashes[e]=e,"Hash"in t?this.elementHashes[t.Hash]=e:t.Hash=e,!0):(this.logError("(".concat(this.scope,") Error loading object descriptor for address '").concat(e,"' from manifest object. Expecting an object but property was type ").concat(typeof t,".")),!1)}getDescriptorByHash(e){return this.getDescriptor(this.resolveHashAddress(e))}getDescriptor(e){return this.elementDescriptors[e]}eachDescriptor(e){let t=Object.keys(this.elementDescriptors);for(let r=0;r<t.length;r++)e(this.elementDescriptors[t[r]])}checkAddressExistsByHash(e,t){return this.checkAddressExists(e,this.resolveHashAddress(t))}checkAddressExists(e,t){return this.objectAddressCheckAddressExists.checkAddressExists(e,t)}checkStringRole(e){if("string"!=typeof e||0===e.length)return{IsHash:!1,IsAddress:!1,ResolvedAddress:void 0};let t=e in this.elementDescriptors,r=e in this.elementHashes;return{IsHash:r,IsAddress:t,ResolvedAddress:r?this.elementHashes[e]:void 0}}resolveHashAddress(e){let t,r=e in this.elementHashes,n=e in this.hashTranslations.translationTable;return t=r&&!n?this.elementHashes[e]:n&&this.hashTranslations.translate(e)in this.elementHashes?this.elementHashes[this.hashTranslations.translate(e)]:n?this.hashTranslations.translate(e):e,t}getValueByHash(e,t){let r=this.getValueAtAddress(e,this.resolveHashAddress(t));return void 0===r&&(r=this.getDefaultValue(this.getDescriptorByHash(t))),r}lintAddress(e){if("string"!=typeof e)return"";let t=e.trim();return t.endsWith(".")&&!t.endsWith("..")&&(t=t.slice(0,-1)),t}getValueAtAddress(e,t){let r=this.lintAddress(t);if(""==r)return void this.logError("(".concat(this.scope,") Error getting value at address; address is an empty string."),e);let n=this.objectAddressGetValue.getValueAtAddress(e,r);return void 0===n&&(n=this.getDefaultValue(this.getDescriptor(r))),n}setValueByHash(e,t,r){return this.setValueAtAddress(e,this.resolveHashAddress(t),r)}setValueAtAddress(e,t,r){let n=this.lintAddress(t);return this.objectAddressSetValue.setValueAtAddress(e,n,r)}deleteValueByHash(e,t){return this.deleteValueAtAddress(e,this.resolveHashAddress(t))}deleteValueAtAddress(e,t){let r=this.lintAddress(t);return this.objectAddressDeleteValue.deleteValueAtAddress(e,r)}validate(e){let t={Error:null,Errors:[],MissingElements:[]};"object"!=typeof e&&(t.Error=!0,t.Errors.push("Expected passed in object to be type object but was passed in ".concat(typeof e)));let r=(e,r)=>{t.Error=!0,t.Errors.push('Element at address "'.concat(e,'" ').concat(r,"."))};for(let n=0;n<this.elementAddresses.length;n++){let o=this.getDescriptor(this.elementAddresses[n]),i=this.checkAddressExists(e,o.Address),a=this.getValueAtAddress(e,o.Address);if(void 0!==a&&i||(t.MissingElements.push(o.Address),(o.Required||this.options.strict)&&r(o.Address,"is flagged REQUIRED but is not set in the object")),o.DataType){let e=typeof a;switch(o.DataType.toString().trim().toLowerCase()){case"string":"string"!=e&&r(o.Address,"has a DataType ".concat(o.DataType," but is of the type ").concat(e));break;case"precisenumber":"string"!=e?r(o.Address,"has a DataType ".concat(o.DataType," but is of the type ").concat(e)):this.numberRegex.test(a)||r(o.Address,"has a DataType ".concat(o.DataType," but is not a valid number"));break;case"number":case"float":"number"!=e&&r(o.Address,"has a DataType ".concat(o.DataType," but is of the type ").concat(e));break;case"integer":if("number"!=e)r(o.Address,"has a DataType ".concat(o.DataType," but is of the type ").concat(e));else{a.toString().indexOf(".")>-1&&r(o.Address,"has a DataType ".concat(o.DataType," but has a decimal point in the number."))}break;case"boolean":"boolean"!=e&&r(o.Address,"has a DataType ".concat(o.DataType," but is of the type ").concat(e));break;case"datetime":"Invalid Date"==new Date(a).toString()&&r(o.Address,"has a DataType ".concat(o.DataType," but is not parsable as a Date by Javascript"));break;default:"string"!=e&&r(o.Address,"has a DataType ".concat(o.DataType," (which auto-converted to String because it was unrecognized) but is of the type ").concat(e))}}}return t}getDefaultValue(e){if("object"==typeof e){if("Default"in e)return e.Default;{let t="DataType"in e?e.DataType:"String";if(t in this.options.defaultValues){let e=this.options.defaultValues[t];return"object"==typeof e&&null!==e?JSON.parse(JSON.stringify(e)):e}return null}}}populateDefaults(e,t){return this.populateObject(e,t,e=>"Default"in e)}populateObject(e,t,r){let n="object"==typeof e?e:{},o=void 0!==t&&t,i="function"==typeof r?r:e=>!0;return this.elementAddresses.forEach(e=>{let t=this.getDescriptor(e);i(t)&&(!o&&this.checkAddressExists(n,e)||this.setValueAtAddress(n,e,this.getDefaultValue(t)))}),n}}t.exports=u},{"./Manyfest-HashTranslation.js":118,"./Manyfest-LogToConsole.js":119,"./Manyfest-ObjectAddress-CheckAddressExists.js":120,"./Manyfest-ObjectAddress-DeleteValue.js":121,"./Manyfest-ObjectAddress-GetValue.js":122,"./Manyfest-ObjectAddress-SetValue.js":124,"./Manyfest-ObjectAddressGeneration.js":125,"./Manyfest-SchemaManipulation.js":127,"fable-serviceproviderbase":59}],129:[function(e,t,r){t.exports=Math.abs},{}],130:[function(e,t,r){t.exports=Math.floor},{}],131:[function(e,t,r){t.exports=Number.isNaN||function(e){return e!=e}},{}],132:[function(e,t,r){t.exports=Math.max},{}],133:[function(e,t,r){t.exports=Math.min},{}],134:[function(e,t,r){t.exports=Math.pow},{}],135:[function(e,t,r){t.exports=Math.round},{}],136:[function(e,t,r){var n=e("./isNaN");t.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},{"./isNaN":131}],137:[function(e,t,r){(function(r){(function(){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,d=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,u="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,S=String.prototype.toUpperCase,T=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,P=Array.prototype.join,A=Array.prototype.slice,C=Math.floor,D="function"==typeof BigInt?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,F="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===F||"symbol")?Symbol.toStringTag:null,L=Object.prototype.propertyIsEnumerable,R=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function _(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-C(-e):C(e);if(n!==e){var o=String(n),i=b.call(t,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var B=e("./util.inspect"),N=B.custom,I=J(N)?N:null,j={__proto__:null,double:'"',single:"'"},O={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function V(e,t,r){var n=r.quoteStyle||t,o=j[n];return o+e+o}function H(e){return v.call(String(e),/"/g,"&quot;")}function U(e){return!M||!("object"==typeof e&&(M in e||void 0!==e[M]))}function z(e){return"[object Array]"===$(e)&&U(e)}function W(e){return"[object RegExp]"===$(e)&&U(e)}function J(e){if(F)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}t.exports=function e(t,n,o,s){var l=n||{};if(G(l,"quoteStyle")&&!G(j,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!G(l,"customInspect")||l.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var S=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return S?_(t,w):w}if("bigint"==typeof t){var C=String(t)+"n";return S?_(t,C):C}var k=void 0===l.depth?5:l.depth;if(void 0===o&&(o=0),o>=k&&k>0&&"object"==typeof t)return z(t)?"[Array]":"[Object]";var N=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=P.call(Array(e.indent+1)," ")}return{base:r,prev:P.call(Array(t+1),r)}}(l,o);if(void 0===s)s=[];else if(Q(s,t)>=0)return"[Circular]";function O(t,r,n){if(r&&(s=A.call(s)).push(r),n){var i={depth:l.depth};return G(l,"quoteStyle")&&(i.quoteStyle=l.quoteStyle),e(t,i,o+1,s)}return e(t,l,o+1,s)}if("function"==typeof t&&!W(t)){var q=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Y=re(t,O);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(Y.length>0?" { "+P.call(Y,", ")+" }":"")}if(J(t)){var ne=F?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(t);return"object"!=typeof t||F?ne:X(ne)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var oe="<"+T.call(String(t.nodeName)),ie=t.attributes||[],ae=0;ae<ie.length;ae++)oe+=" "+ie[ae].name+"="+V(H(ie[ae].value),"double",l);return oe+=">",t.childNodes&&t.childNodes.length&&(oe+="..."),oe+="</"+T.call(String(t.nodeName))+">"}if(z(t)){if(0===t.length)return"[]";var se=re(t,O);return N&&!function(e){for(var t=0;t<e.length;t++)if(Q(e[t],"\n")>=0)return!1;return!0}(se)?"["+te(se,N)+"]":"[ "+P.call(se,", ")+" ]"}if(function(e){return"[object Error]"===$(e)&&U(e)}(t)){var le=re(t,O);return"cause"in Error.prototype||!("cause"in t)||L.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+P.call(le,", ")+" }":"{ ["+String(t)+"] "+P.call(x.call("[cause]: "+O(t.cause),le),", ")+" }"}if("object"==typeof t&&m){if(I&&"function"==typeof t[I]&&B)return B(t,{depth:k-o});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return a&&a.call(t,function(e,r){ce.push(O(r,t,!0)+" => "+O(e,t))}),ee("Map",i.call(t),ce,N)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var de=[];return d&&d.call(t,function(e){de.push(O(e,t))}),ee("Set",c.call(t),de,N)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Z("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Z("WeakSet");if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{return u.call(e),!0}catch(e){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===$(e)&&U(e)}(t))return X(O(Number(t)));if(function(e){if(!e||"object"!=typeof e||!D)return!1;try{return D.call(e),!0}catch(e){}return!1}(t))return X(O(D.call(t)));if(function(e){return"[object Boolean]"===$(e)&&U(e)}(t))return X(f.call(t));if(function(e){return"[object String]"===$(e)&&U(e)}(t))return X(O(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==r&&t===r)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===$(e)&&U(e)}(t)&&!W(t)){var he=re(t,O),pe=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",fe=!pe&&M&&Object(t)===t&&M in t?b.call($(t),8,-1):ue?"Object":"",me=(pe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||ue?"["+P.call(x.call([],fe||[],ue||[]),": ")+"] ":"");return 0===he.length?me+"{}":N?me+"{"+te(he,N)+"}":me+"{ "+P.call(he,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return q.call(e,t)}function $(e){return m.call(e)}function Q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function K(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return K(b.call(e,0,t.maxStringLength),t)+n}var o=O[t.quoteStyle||"single"];return o.lastIndex=0,V(v.call(v.call(e,o,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+S.call(t.toString(16))}function X(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function ee(e,t,r,n){return e+" ("+t+") {"+(n?te(r,n):P.call(r,", "))+"}"}function te(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+P.call(e,","+r)+"\n"+t.prev}function re(e,t){var r=z(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=G(e,o)?t(e[o],e):""}var i,a="function"==typeof k?k(e):[];if(F){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var l in e)G(e,l)&&(r&&String(Number(l))===l&&l<e.length||F&&i["$"+l]instanceof Symbol||(w.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e))));if("function"==typeof k)for(var c=0;c<a.length;c++)L.call(e,a[c])&&n.push("["+t(a[c])+"]: "+t(e[a[c]],e));return n}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util.inspect":18}],138:[function(e,t,r){var n=e("wrappy");function o(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(o),t.exports.strict=n(i),o.proto=o(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return o(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})})},{wrappy:327}],139:[function(e,t,r){(function(e){(function(){function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var r,n="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=s,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var o={resolve:function(){for(var t,o="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=e.cwd()),s=t),r(s),0!==s.length&&(o=s+"/"+o,i=47===s.charCodeAt(0))}return o=n(o,!i),i?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(e){if(r(e),0===e.length)return".";var t=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!t)).length||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return r(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];r(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":o.normalize(e)},relative:function(e,t){if(r(e),r(t),e===t)return"";if((e=o.resolve(e))===(t=o.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var i=e.length,a=i-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var l=t.length-s,c=a<l?a:l,d=-1,h=0;h<=c;++h){if(h===c){if(l>c){if(47===t.charCodeAt(s+h))return t.slice(s+h+1);if(0===h)return t.slice(s+h)}else a>c&&(47===e.charCodeAt(n+h)?d=h:0===h&&(d=0));break}var p=e.charCodeAt(n+h);if(p!==t.charCodeAt(s+h))break;47===p&&(d=h)}var u="";for(h=n+d+1;h<=i;++h)h!==i&&47!==e.charCodeAt(h)||(0===u.length?u+="..":u+="/..");return u.length>0?u+t.slice(s+d):(s+=d,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(r(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,o=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');r(e);var n,o=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,l=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!a){o=n+1;break}}else-1===l&&(a=!1,l=n+1),s>=0&&(c===t.charCodeAt(s)?-1===--s&&(i=n):(s=-1,i=l))}return o===i?i=l:-1===i&&(i=e.length),e.slice(o,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(o,i)},extname:function(e){r(e);for(var t=-1,n=0,o=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47!==l)-1===o&&(i=!1,o=s+1),46===l?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=s+1;break}}return-1===t||-1===o||0===a||1===a&&t===o-1&&t===n+1?"":e.slice(t,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){r(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,o=e.charCodeAt(0),i=47===o;i?(t.root="/",n=1):n=0;for(var a=-1,s=0,l=-1,c=!0,d=e.length-1,h=0;d>=n;--d)if(47!==(o=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===o?-1===a?a=d:1!==h&&(h=1):-1!==a&&(h=-1);else if(!c){s=d+1;break}return-1===a||-1===l||0===h||1===h&&a===l-1&&a===s+1?-1!==l&&(t.base=t.name=0===s&&i?e.slice(1,l):e.slice(s,l)):(0===s&&i?(t.name=e.slice(1,a),t.base=e.slice(1,l)):(t.name=e.slice(s,a),t.base=e.slice(s,l)),t.ext=e.slice(a,l)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,t.exports=o}).call(this)}).call(this,e("_process"))},{_process:287}],140:[function(e,t,r){t.exports={name:"pict-application",version:"1.0.34",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-docuserve":"^0.1.5","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.1.0",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],141:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("../package.json"),i={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"};t.exports=class extends n{constructor(e,t,r){let n="object"==typeof e.settings.PictApplicationConfiguration?e.settings.PictApplicationConfiguration:{};super(e,Object.assign({},JSON.parse(JSON.stringify(i)),n,t),r),this.options,this.log,this.fable,this.UUID,this.Hash,this.servicesMap,this.serviceType="PictApplication",this._Package=o,this.pict=this.fable,this.AppData=this.fable.AppData,this.Bundle=this.fable.Bundle,this.initializeTimestamp,this.lastSolvedTimestamp,this.lastLoginTimestamp,this.lastMarshalFromViewsTimestamp,this.lastMarshalToViewsTimestamp,this.lastAutoRenderTimestamp,this.lastLoadDataTimestamp;let a=Object.keys(this.options.Manifests);if(a.length>0)for(let e=0;e<a.length;e++){let t=a[e];this.fable.instantiateServiceProvider("Manifest",this.options.Manifests[t],t)}}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}onPreSolveAsync(e){return this.onPreSolve(),e()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}onBeforeSolveAsync(e){return this.onBeforeSolve(),e()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}onSolveAsync(e){return this.onSolve(),e()}solve(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));let e=Object.keys(this.pict.providers),t=[];for(let r=0;r<e.length;r++){let n=this.pict.providers[e[r]];n.options.AutoSolveWithApp&&t.push(n)}t.sort((e,t)=>e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal);for(let e=0;e<t.length;e++)t[e].solve(t[e]);this.onBeforeSolve();let r=Object.keys(this.pict.views),n=[];for(let e=0;e<r.length;e++){let t=this.pict.views[r[e]];t.options.AutoInitialize&&n.push(t)}n.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let e=0;e<n.length;e++)n[e].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}solveAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");t.anticipate(this.onBeforeSolveAsync.bind(this));let r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(e),e)});let n=Object.keys(this.pict.providers),o=[];for(let e=0;e<n.length;e++){let t=this.pict.providers[n[e]];t.options.AutoSolveWithApp&&o.push(t)}o.sort((e,t)=>e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal);for(let e=0;e<o.length;e++)t.anticipate(o[e].solveAsync.bind(o[e]));let i=Object.keys(this.pict.views),a=[];for(let e=0;e<i.length;e++){let t=this.pict.views[i[e]];t.options.AutoSolveWithApp&&a.push(t)}a.sort((e,t)=>e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal);for(let e=0;e<a.length;e++)t.anticipate(a[e].solveAsync.bind(a[e]));t.anticipate(this.onSolveAsync.bind(this)),t.anticipate(this.onAfterSolveAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync() complete.")),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}onAfterSolveAsync(e){return this.onAfterSolve(),e()}onBeforeLoginAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),e()}onLoginAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),e()}loginAsync(e){const t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let r=e;"function"!=typeof r&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeLoginAsync.bind(this)),t.anticipate(this.onLoginAsync.bind(this)),t.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&t.anticipate(e=>{if(!this.isLoggedIn())return e();this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto loading data after login...")),this.loadDataAsync(t=>{e(t)})}),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync() complete.")),this.lastLoginTimestamp=this.fable.log.getTimeStamp(),r(e)))}isLoggedIn(){return!0}onAfterLoginAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),e()}onBeforeLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),e()}onLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),e()}loadDataAsync(e){const t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let r=e;"function"!=typeof r&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeLoadDataAsync.bind(this));let n=Object.keys(this.pict.providers),o=[];for(let e=0;e<n.length;e++){let t=this.pict.providers[n[e]];t.options.AutoLoadDataWithApp&&o.push(t)}o.sort((e,t)=>e.options.AutoLoadDataOrdinal-t.options.AutoLoadDataOrdinal);for(const e of o)t.anticipate(e.onBeforeLoadDataAsync.bind(e));t.anticipate(this.onLoadDataAsync.bind(this));for(const e of o)t.anticipate(e.onLoadDataAsync.bind(e));t.anticipate(this.onAfterLoadDataAsync.bind(this));for(const e of o)t.anticipate(e.onAfterLoadDataAsync.bind(e));t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync() complete.")),this.lastLoadDataTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),e()}onBeforeSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),e()}onSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),e()}saveDataAsync(e){const t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let r=e;"function"!=typeof r&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeSaveDataAsync.bind(this));let n=Object.keys(this.pict.providers),o=[];for(let e=0;e<n.length;e++){let t=this.pict.providers[n[e]];t.options.AutoSaveDataWithApp&&o.push(t)}o.sort((e,t)=>e.options.AutoSaveDataOrdinal-t.options.AutoSaveDataOrdinal);for(const e of o)t.anticipate(e.onBeforeSaveDataAsync.bind(e));t.anticipate(this.onSaveDataAsync.bind(this));for(const e of o)t.anticipate(e.onSaveDataAsync.bind(e));t.anticipate(this.onAfterSaveDataAsync.bind(this));for(const e of o)t.anticipate(e.onAfterSaveDataAsync.bind(e));t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync() complete.")),this.lastSaveDataTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),e()}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}onBeforeInitializeAsync(e){return this.onBeforeInitialize(),e()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}onInitializeAsync(e){return this.onInitialize(),e()}initialize(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;{if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(let e=0;e<this.options.ConfigurationOnlyViews.length;e++){let t=void 0===this.options.ConfigurationOnlyViews[e].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[e].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(t)),this.pict.addView(t,this.options.ConfigurationOnlyViews[e])}this.onInitialize();let e=Object.keys(this.pict.providers),t=[];for(let r=0;r<e.length;r++){let n=this.pict.providers[e[r]];n.options.AutoInitialize&&t.push(n)}t.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let e=0;e<t.length;e++)t[e].initialize();let r=Object.keys(this.pict.views),n=[];for(let e=0;e<r.length;e++){let t=this.pict.views[r[e]];t.options.AutoInitialize&&n.push(t)}n.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let e=0;e<n.length;e++)n[e].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}}initializeAsync(e){this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));let t="function"==typeof e&&e;if(t||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),t=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Auto Callback Error: ").concat(e),e)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(t);{let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(let e=0;e<this.options.ConfigurationOnlyViews.length;e++){let t=void 0===this.options.ConfigurationOnlyViews[e].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[e].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(t)),this.pict.addView(t,this.options.ConfigurationOnlyViews[e])}e.anticipate(this.onBeforeInitializeAsync.bind(this)),e.anticipate(this.onInitializeAsync.bind(this));let r=Object.keys(this.pict.providers),n=[];for(let e=0;e<r.length;e++){let t=this.pict.providers[r[e]];t.options.AutoInitialize&&n.push(t)}n.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let t=0;t<n.length;t++)e.anticipate(n[t].initializeAsync.bind(n[t]));let o=Object.keys(this.pict.views),i=[];for(let e=0;e<o.length;e++){let t=this.pict.views[o[e]];t.options.AutoInitialize&&i.push(t)}i.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let t=0;t<i.length;t++){let r=i[t];e.anticipate(r.initializeAsync.bind(r))}e.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),e.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),e.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),e.anticipate(this.renderMainViewportAsync.bind(this))),e.wait(e=>(e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Error: ").concat(e.message||e),{stack:e.stack}),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialization complete.")),t()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}onAfterInitializeAsync(e){return this.onAfterInitialize(),e()}onCompletionOfInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}onCompletionOfInitializeAsync(e){return this.onCompletionOfInitialize(),e()}onBeforeMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}onBeforeMarshalFromViewsAsync(e){return this.onBeforeMarshalFromViews(),e()}onMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}onMarshalFromViewsAsync(e){return this.onMarshalFromViews(),e()}marshalFromViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();let e=Object.keys(this.pict.views),t=[];for(let r=0;r<e.length;r++){let n=this.pict.views[e[r]];t.push(n)}for(let e=0;e<t.length;e++)t[e].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalFromViewsAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));let n=Object.keys(this.pict.views),o=[];for(let e=0;e<n.length;e++){let t=this.pict.views[n[e]];o.push(t)}for(let e=0;e<o.length;e++)t.anticipate(o[e].marshalFromViewAsync.bind(o[e]));t.anticipate(this.onMarshalFromViewsAsync.bind(this)),t.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync() complete.")),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}onAfterMarshalFromViewsAsync(e){return this.onAfterMarshalFromViews(),e()}onBeforeMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}onBeforeMarshalToViewsAsync(e){return this.onBeforeMarshalToViews(),e()}onMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}onMarshalToViewsAsync(e){return this.onMarshalToViews(),e()}marshalToViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();let e=Object.keys(this.pict.views),t=[];for(let r=0;r<e.length;r++){let n=this.pict.views[e[r]];t.push(n)}for(let e=0;e<t.length;e++)t[e].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalToViewsAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));let n=Object.keys(this.pict.views),o=[];for(let e=0;e<n.length;e++){let t=this.pict.views[n[e]];o.push(t)}for(let e=0;e<o.length;e++)t.anticipate(o[e].marshalToViewAsync.bind(o[e]));t.anticipate(this.onMarshalToViewsAsync.bind(this)),t.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync() complete.")),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}onAfterMarshalToViewsAsync(e){return this.onAfterMarshalToViews(),e()}onBeforeRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}onBeforeRenderAsync(e){return this.onBeforeRender(),e()}render(e,t,r,n){let o="string"!=typeof e?this.options.MainViewportViewIdentifier:e,i="string"!=typeof t?this.options.MainViewportRenderableHash:t,a="string"!=typeof r?this.options.MainViewportDestinationAddress:r,s="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(i,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();let l="string"==typeof o&&this.servicesMap.PictView[o];return l?(this.onRender(),l.render(i,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(o," because it is not a valid view.")),!1)}onRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}onRenderAsync(e){return this.onRender(),e()}renderAsync(e,t,r,n,o){let i="string"!=typeof e?this.options.MainViewportViewIdentifier:e,a="string"!=typeof t?this.options.MainViewportRenderableHash:t,s="string"!=typeof r?this.options.MainViewportDestinationAddress:r,l="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n,c="function"==typeof o?o:"function"==typeof n?n:"function"==typeof r?r:"function"==typeof t?t:"function"==typeof e&&e;c||(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.")),c=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(e),e)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(a,"] Destination[").concat(s,"] TemplateDataAddress[").concat(l,"] renderAsync:"));let d=this.fable.newAnticipate();d.anticipate(this.onBeforeRenderAsync.bind(this));let h="string"==typeof i&&this.servicesMap.PictView[i];if(!h){let e="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(i," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(e),c(new Error(e))}return d.anticipate(this.onRenderAsync.bind(this)),d.anticipate(e=>{h.renderAsync.call(h,a,s,l,e)}),d.anticipate(this.onAfterRenderAsync.bind(this)),d.wait(c)}onAfterRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}onAfterRenderAsync(e){return this.onAfterRender(),e()}renderMainViewport(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}renderMainViewportAsync(e){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(e)}renderAutoViews(){this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));let e=Object.keys(this.pict.views);e.sort((e,t)=>this.pict.views[e].options.AutoRenderOrdinal-this.pict.views[t].options.AutoRenderOrdinal);for(let t=0;t<e.length;t++){let r=this.pict.views[e[t]];r.options.AutoRender&&r.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}renderAutoViewsAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(e),e)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));let n=Object.keys(this.pict.views);n.sort((e,t)=>this.pict.views[e].options.AutoRenderOrdinal-this.pict.views[t].options.AutoRenderOrdinal);for(let e=0;e<n.length;e++){let r=this.pict.views[n[e]];r.options.AutoRender&&t.anticipate(r.renderAsync.bind(r))}t.wait(e=>(this.lastAutoRenderTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete.")),r(e)))}get isPictApplication(){return!0}}},{"../package.json":140,"fable-serviceproviderbase":59}],142:[function(e,t,r){t.exports={name:"pict-provider",version:"1.0.13",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351","pict-docuserve":"^0.1.5",quackage:"^1.1.0",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],143:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("../package.json"),i={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},JSON.parse(JSON.stringify(i)),t),r),this.fable,this.pict,this.log,this.options,this.UUID,this.Hash,this.options.ProviderIdentifier||(this.options.ProviderIdentifier="AutoProviderID-".concat(this.fable.getUUID())),this.serviceType="PictProvider",this._Package=o,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1;for(let e=0;e<this.options.Templates.length;e++){let t=this.options.Templates[e];t.hasOwnProperty("Postfix")&&t.hasOwnProperty("Template")?(t.Source||(t.Source="PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(t.Prefix,t.Postfix,t.Template,t.Source)):this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," could not load Default Template ").concat(e," in the options array."),t)}}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(e){return this.onBeforeInitialize(),e()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}onInitializeAsync(e){return this.onInitialize(),e()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(e){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),e();{let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),t.anticipate(this.onBeforeInitializeAsync.bind(this)),t.anticipate(this.onInitializeAsync.bind(this)),t.anticipate(this.onAfterInitializeAsync.bind(this)),t.wait(t=>(this.initializeTimestamp=this.pict.log.getTimeStamp(),t?this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization failed: ").concat(t.message||t),{Stack:t.stack}):this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization complete.")),e()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(e){return this.onAfterInitialize(),e()}onPreRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}onPreRenderAsync(e){return this.onPreRender(),e()}render(){return this.onPreRender()}renderAsync(e){return this.onPreRender(),e()}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}onPreSolveAsync(e){return this.onPreSolve(),e()}solve(){return this.onPreSolve()}solveAsync(e){return this.onPreSolve(),e()}onBeforeLoadDataAsync(e){return e()}onLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),e()}onAfterLoadDataAsync(e){return e()}onBeforeSaveDataAsync(e){return e()}onSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),e()}onAfterSaveDataAsync(e){return e()}}},{"../package.json":142,"fable-serviceproviderbase":59}],144:[function(e,t,r){const n={javascript:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2|(`(?:[^`\\]|\\.)*?`)|(\/(?![/*])(?:\\.|\[(?:\\.|[^\]])*\]|[^/\\\n])+\/[gimsuvy]*)/g,keywords:/\b(async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|import|in|instanceof|let|new|of|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/g,builtins:/\b(true|false|null|undefined|NaN|Infinity|console|window|document|Math|JSON|Array|Object|String|Number|Boolean|Date|RegExp|Map|Set|Promise|Error|Symbol|parseInt|parseFloat|require|module|exports)\b/g,numbers:/\b(\d+\.?\d*(?:e[+-]?\d+)?|0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+)\b/g},json:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:[^"\\]|\\.)*")/g,keywords:/\b(true|false|null)\b/g,numbers:/-?\b\d+\.?\d*(?:e[+-]?\d+)?\b/g},html:{tokenizer:/(<!--[\s\S]*?-->)|(["'])(?:(?!\2|\\).|\\.)*?\2|(<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*\/?>)/g,tagGroupIndex:3},css:{tokenizer:/(\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,selectors:/([.#]?[a-zA-Z_][\w-]*(?:\s*[>+~]\s*[.#]?[a-zA-Z_][\w-]*)*)\s*\{/g,properties:/\b([a-zA-Z-]+)\s*:/g,numbers:/\b(\d+\.?\d*)(px|em|rem|%|vh|vw|s|ms|deg|fr)?\b/g,keywords:/\b(important|inherit|initial|unset|none|auto|block|inline|flex|grid)\b/g},sql:{tokenizer:/(--[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,keywords:/\b(SELECT|FROM|WHERE|AND|OR|INSERT|INTO|VALUES|UPDATE|SET|DELETE|CREATE|TABLE|DROP|ALTER|ADD|COLUMN|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|ALL|DISTINCT|COUNT|SUM|AVG|MIN|MAX|NOT|NULL|IS|IN|BETWEEN|LIKE|EXISTS|CASE|WHEN|THEN|ELSE|END|PRIMARY|KEY|FOREIGN|REFERENCES|CONSTRAINT|DEFAULT|CHECK|UNIQUE|CASCADE|GRANT|REVOKE|COMMIT|ROLLBACK|BEGIN|TRANSACTION|INT|VARCHAR|DATETIME|AUTO_INCREMENT|CURRENT_TIMESTAMP)\b/gi,numbers:/\b\d+\.?\d*\b/g}};function o(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function i(e,t){let r=e;return t.selectors&&(t.selectors.lastIndex=0,r=r.replace(t.selectors,'<span class="function-name">$1</span>{')),t.properties&&(t.properties.lastIndex=0,r=r.replace(t.properties,'<span class="property">$1</span>:')),t.keywords&&(t.keywords.lastIndex=0,r=r.replace(t.keywords,'<span class="keyword">$1</span>')),t.builtins&&(t.builtins.lastIndex=0,r=r.replace(t.builtins,'<span class="keyword">$1</span>')),t.numbers&&(t.numbers.lastIndex=0,r=r.replace(t.numbers,e=>'<span class="number">'.concat(e,"</span>"))),r}function a(e){let t="",r=e,n=r.match(/^(<\/?)([a-zA-Z][a-zA-Z0-9-]*)/);if(!n)return o(e);t+=o(n[1]),t+='<span class="tag">'+o(n[2])+"</span>",r=r.substring(n[0].length);let i,a=/^(\s+)([a-zA-Z-]+)(?:(\s*=\s*)(["'])([^"']*?)\4)?/;for(;null!==(i=r.match(a));)t+=i[1],t+='<span class="attr-name">'+o(i[2])+"</span>",i[3]&&(t+=o(i[3]),t+='<span class="attr-value">'+o(i[4])+o(i[5])+o(i[4])+"</span>"),r=r.substring(i[0].length);return t+=o(r),t}n.js=n.javascript,n.htm=n.html,t.exports=function(e){return function(t){let r=t.textContent,s="string"==typeof e?e.toLowerCase():"javascript",l=n[s];if(!l)return void(t.innerHTML=o(r));if(!l.tokenizer)return void(t.innerHTML=i(o(r),l));let c,d="",h=0,p=l.tagGroupIndex||0;for(l.tokenizer.lastIndex=0;null!==(c=l.tokenizer.exec(r));){if(c.index>h){d+=i(o(r.substring(h,c.index)),l)}let e=c[0];c[1]?d+='<span class="comment">'.concat(o(e),"</span>"):p>0&&c[p]?d+=a(e):d+='<span class="string">'.concat(o(e),"</span>"),h=l.tokenizer.lastIndex}if(h<r.length){d+=i(o(r.substring(h)),l)}t.innerHTML=d}},t.exports.LanguageDefinitions=n},{}],145:[function(e,t,r){t.exports={RenderOnLoad:!0,DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#CodeEditor-Container-Div",Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- CodeEditor-Container Rendering Soon --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#CodeEditor-Container-Div"}],TargetElementAddress:"#CodeEditor-Container-Div",CodeDataAddress:!1,Language:"javascript",ReadOnly:!1,Tab:"\t",IndentOn:/[({[]$/,MoveToNewLine:/^[)}\]]/,AddClosing:!0,CatchTab:!0,LineNumbers:!0,DefaultCode:"// Enter your code here\n",CSS:".pict-code-editor-wrap\n{\n\tdisplay: flex;\n\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace);\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tborder: 1px solid var(--theme-color-border-default, #D0D0D0);\n\tborder-radius: 4px;\n\toverflow: hidden;\n}\n.pict-code-editor-wrap .pict-code-line-numbers\n{\n\twidth: 40px;\n\tmin-width: 40px;\n\t/* padding-top/bottom are stamped at runtime from the editor's\n\t computed padding so row 1 of the gutter aligns with row 1 of\n\t the code; only horizontal padding is stylesheet-owned. */\n\tpadding: 0;\n\ttext-align: right;\n\tbackground: var(--theme-color-editor-linenumber-background, var(--theme-color-background-secondary, #F5F5F5));\n\tborder-right: 1px solid var(--theme-color-editor-gutter-border, var(--theme-color-border-default, #D0D0D0));\n\tcolor: var(--theme-color-editor-linenumber-text, var(--theme-color-text-muted, #999));\n\tfont-size: 13px;\n\t/* line-height, padding-top, padding-bottom, and font-family are\n\t intentionally NOT declared here. PictSectionCode._syncGutterMetrics()\n\t copies them from the editor's computed styles at init and on every\n\t editor resize, so the gutter is guaranteed to track the editor.\n\t Declaring them in CSS would either be redundant (when matching) or\n\t actively wrong (when the editor's metrics diverge — e.g. theme scale\n\t changes the editor's font-size). See codejar-linenumbers for the\n\t canonical version of this pattern. */\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-sizing: border-box;\n}\n.pict-code-editor-wrap .pict-code-line-numbers span\n{\n\tdisplay: block;\n\tpadding: 0 8px 0 0;\n}\n.pict-code-editor-wrap .pict-code-editor\n{\n\tmargin: 0;\n\tpadding: 10px 10px 10px 8px;\n\tmin-height: 100px;\n\tflex: 1;\n\tmin-width: 0;\n\toutline: none;\n\ttab-size: 4;\n\twhite-space: pre;\n\toverflow-wrap: normal;\n\tcolor: var(--theme-color-text-primary, #383A42);\n\tbackground: var(--theme-color-background-panel, #FAFAFA);\n\tcaret-color: var(--theme-color-brand-primary, #526FFF);\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-code-editor-wrap .pict-code-editor.pict-code-no-line-numbers\n{\n\tpadding-left: 10px;\n\tborder-radius: 4px;\n}\n.pict-code-editor-wrap .pict-code-editor::selection,\n.pict-code-editor-wrap .pict-code-editor *::selection\n{\n\tbackground: var(--theme-color-editor-selection-background, var(--theme-color-selection-background, #B3D4FC));\n}\n/* Syntax token colors — each class binds to a Color.Syntax.* token from\n pict-provider-theme. Fallback hexes match the One Light palette so apps\n that don't install the theme provider look the same as before. */\n.pict-code-editor-wrap .pict-code-editor .keyword { color: var(--theme-color-syntax-keyword, #A626A4); }\n.pict-code-editor-wrap .pict-code-editor .string { color: var(--theme-color-syntax-string, #50A14F); }\n.pict-code-editor-wrap .pict-code-editor .number { color: var(--theme-color-syntax-number, #986801); }\n.pict-code-editor-wrap .pict-code-editor .comment { color: var(--theme-color-syntax-comment, #A0A1A7); font-style: italic; }\n.pict-code-editor-wrap .pict-code-editor .operator { color: var(--theme-color-syntax-operator, #0184BC); }\n.pict-code-editor-wrap .pict-code-editor .punctuation { color: var(--theme-color-syntax-punctuation, #383A42); }\n.pict-code-editor-wrap .pict-code-editor .function-name { color: var(--theme-color-syntax-function, #4078F2); }\n.pict-code-editor-wrap .pict-code-editor .property { color: var(--theme-color-syntax-property, #E45649); }\n.pict-code-editor-wrap .pict-code-editor .tag { color: var(--theme-color-syntax-tag, #E45649); }\n.pict-code-editor-wrap .pict-code-editor .attr-name { color: var(--theme-color-syntax-attrname, #986801); }\n.pict-code-editor-wrap .pict-code-editor .attr-value { color: var(--theme-color-syntax-attrvalue, #50A14F); }\n.pict-code-editor-wrap .pict-code-editor .builtin { color: var(--theme-color-syntax-builtin, #986801); }\n.pict-code-editor-wrap .pict-code-editor .type { color: var(--theme-color-syntax-type, #C18401); }\n.pict-code-editor-wrap .pict-code-editor .variable { color: var(--theme-color-syntax-variable, #383A42); }\n\n/* highlight.js class aliases — when host apps render code blocks with\n highlight.js (e.g. markdown previews via CodeJar's hljs integration),\n the output uses .hljs / .hljs-* classes rather than the bare token\n classes pict-section-code emits. Mapping them here lets one stylesheet\n theme both editor surfaces (bare classes) and hljs-rendered surfaces\n without the host needing a separate per-app github.css. Rules are\n intentionally unscoped (no .pict-code-editor-wrap parent) so they\n apply globally wherever hljs paints. */\n.hljs { color: var(--theme-color-text-primary, #383A42); background: transparent; }\n.hljs-keyword,\n.hljs-keyword.hljs-typeof,\n.hljs-selector-tag,\n.hljs-literal { color: var(--theme-color-syntax-keyword, #A626A4); }\n.hljs-string,\n.hljs-regexp,\n.hljs-template-tag,\n.hljs-template-variable { color: var(--theme-color-syntax-string, #50A14F); }\n.hljs-number,\n.hljs-meta { color: var(--theme-color-syntax-number, #986801); }\n.hljs-comment,\n.hljs-quote { color: var(--theme-color-syntax-comment, #A0A1A7); font-style: italic; }\n.hljs-operator,\n.hljs-link { color: var(--theme-color-syntax-operator, #0184BC); }\n.hljs-punctuation { color: var(--theme-color-syntax-punctuation, #383A42); }\n.hljs-function .hljs-title,\n.hljs-title.function_,\n.hljs-title.class_ { color: var(--theme-color-syntax-function, #4078F2); }\n.hljs-variable,\n.hljs-variable.language_,\n.hljs-params { color: var(--theme-color-syntax-variable, #383A42); }\n.hljs-type,\n.hljs-class .hljs-title { color: var(--theme-color-syntax-type, #C18401); }\n.hljs-built_in,\n.hljs-builtin-name { color: var(--theme-color-syntax-builtin, #986801); }\n.hljs-attr,\n.hljs-property { color: var(--theme-color-syntax-property, #E45649); }\n.hljs-tag,\n.hljs-name { color: var(--theme-color-syntax-tag, #E45649); }\n.hljs-attribute { color: var(--theme-color-syntax-attrname, #986801); }\n.hljs-symbol { color: var(--theme-color-syntax-attrvalue, #50A14F); }\n.hljs-emphasis { font-style: italic; }\n.hljs-strong { font-weight: bold; }\n.hljs-deletion { color: var(--theme-color-status-error, #B62828); background: rgba(220, 50, 47, 0.08); }\n.hljs-addition { color: var(--theme-color-status-success, #2E7A3A); background: rgba(80, 161, 79, 0.10); }\n"}},{}],146:[function(e,t,r){const n=e("pict-view"),o=e("./Pict-Code-Highlighter.js"),i=e("./Pict-Section-Code-DefaultConfiguration.js");t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},i,t),r),this.initialRenderComplete=!1,this.codeJar=null,this._highlightFunction=null,this._language=this.options.Language||"javascript"}onBeforeInitialize(){return super.onBeforeInitialize(),this._codeJarPrototype=null,this.targetElement=!1,this._highlightFunction=o(this._language),super.onBeforeInitialize()}connectCodeJarPrototype(e){if("function"!=typeof e)return"undefined"!=typeof window&&"function"==typeof window.CodeJar?(this.log.trace("PICT-Code Found CodeJar in window.CodeJar."),void(this._codeJarPrototype=window.CodeJar)):(this.log.error("PICT-Code No CodeJar prototype found. Include codejar via script tag or call connectCodeJarPrototype(CodeJar) explicitly."),!1);this._codeJarPrototype=e}onAfterRender(e){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),super.onAfterRender(e)}onAfterInitialRender(){if(this._codeJarPrototype||this.connectCodeJarPrototype(),!this._codeJarPrototype)return this.log.error("PICT-Code Cannot initialize editor; no CodeJar prototype available."),!1;if(this.codeJar)return this.log.error("PICT-Code editor is already initialized!"),!1;let e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-Code Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._buildEditorDOM();let t=this._resolveCodeContent(),r={};this.options.Tab&&(r.tab=this.options.Tab),this.options.IndentOn&&(r.indentOn=this.options.IndentOn),this.options.MoveToNewLine&&(r.moveToNewLine=this.options.MoveToNewLine),void 0!==this.options.AddClosing&&(r.addClosing=this.options.AddClosing),void 0!==this.options.CatchTab&&(r.catchTab=this.options.CatchTab),this.customConfigureEditorOptions(r);let n=this._editorElement;if(this.codeJar=this._codeJarPrototype(n,this._highlightFunction,r),this._resetEditorWrapStyles(),t&&this.codeJar.updateCode(t),this.codeJar.onUpdate(e=>{this._updateLineNumbers(),this.onCodeChange(e)}),this._updateLineNumbers(),this._lineNumbersElement){let e=this._lineNumbersElement;n.addEventListener("scroll",function(){e.style.transform="translateY(-"+n.scrollTop+"px)"},{passive:!0})}if(this._syncGutterMetrics(),this._lineNumbersElement&&"function"==typeof ResizeObserver){let e=this;this._editorResizeObserver=new ResizeObserver(function(){e._syncGutterMetrics()}),this._editorResizeObserver.observe(n)}if(this._lineNumbersElement&&"function"==typeof MutationObserver){let e=this;this._editorStyleObserver=new MutationObserver(function(){e._syncGutterMetrics()}),this._editorStyleObserver.observe(n,{attributes:!0,attributeFilter:["style","class"]})}this.options.ReadOnly&&n.setAttribute("contenteditable","false")}_buildEditorDOM(){this.targetElement.innerHTML="";let e=document.createElement("div");if(e.className="pict-code-editor-wrap",this.options.LineNumbers){let t=document.createElement("div");t.className="pict-code-line-numbers",e.appendChild(t),this._lineNumbersElement=t}let t=document.createElement("div");t.className="pict-code-editor language-"+this._language,this.options.LineNumbers||(t.className+=" pict-code-no-line-numbers"),e.appendChild(t),this.targetElement.appendChild(e),this._editorElement=t,this._wrapElement=e}_updateLineNumbers(){if(!this.options.LineNumbers||!this._lineNumbersElement||!this._editorElement)return;let e=(this._editorElement.textContent||"").split("\n").length,t="";for(let r=1;r<=e;r++)t+="<span>".concat(r,"</span>");this._lineNumbersElement.innerHTML=t,this._syncGutterMetrics()}_syncGutterMetrics(){if(!this._lineNumbersElement||!this._editorElement)return;if("undefined"==typeof window||"function"!=typeof window.getComputedStyle)return;let e=window.getComputedStyle(this._editorElement),t=e.lineHeight;if(t&&"normal"!==t&&(this._lineNumbersElement.style.lineHeight=t),e.paddingTop&&(this._lineNumbersElement.style.paddingTop=e.paddingTop),e.paddingBottom&&(this._lineNumbersElement.style.paddingBottom=e.paddingBottom),e.fontFamily&&(this._lineNumbersElement.style.fontFamily=e.fontFamily),"undefined"!=typeof console&&console.warn){let e=this._lineNumbersElement.querySelector("span");if(e){let r=e.getBoundingClientRect().height,n=parseFloat(t);r&&n&&Math.abs(r-n)>.5&&console.warn("[pict-section-code] gutter/editor row-height mismatch: gutter "+r+"px vs editor "+n+"px — line numbers will drift. Check for CSS overriding .pict-code-line-numbers line-height.")}}}syncMetrics(){this._syncGutterMetrics()}_resetEditorWrapStyles(){this._editorElement&&(this._editorElement.style.whiteSpace="pre",this._editorElement.style.overflowWrap="normal")}_resolveCodeContent(){if(this.options.CodeDataAddress){const e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};let t=this.fable.manifest.getValueByHash(e,this.options.CodeDataAddress);if("string"==typeof t)return t;this.log.warn("PICT-Code Address [".concat(this.options.CodeDataAddress,"] did not return a string; it was ").concat(typeof t,"."))}return this.options.DefaultCode||""}customConfigureEditorOptions(e){}onCodeChange(e){if(this.options.CodeDataAddress){const t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(t,this.options.CodeDataAddress,e)}}getCode(){return this.codeJar?this.codeJar.toString():(this.log.warn("PICT-Code getCode called before editor initialized."),"")}setCode(e){this.codeJar?(this.codeJar.updateCode(e),this._updateLineNumbers()):this.log.warn("PICT-Code setCode called before editor initialized.")}setLanguage(e){if(this._language=e,this._highlightFunction=o(e),this._editorElement&&(this._editorElement.className="pict-code-editor language-"+e,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){let e=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(e),this.codeJar.onUpdate(e=>{this._updateLineNumbers(),this.onCodeChange(e)})}}setHighlightFunction(e){if("function"==typeof e){if(this._highlightFunction=e,this.codeJar){let e=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(e),this.codeJar.onUpdate(e=>{this._updateLineNumbers(),this.onCodeChange(e)})}}else this.log.error("PICT-Code setHighlightFunction requires a function.")}setReadOnly(e){this.options.ReadOnly=e,this._editorElement&&this._editorElement.setAttribute("contenteditable",e?"false":"true")}destroy(){this._editorResizeObserver&&(this._editorResizeObserver.disconnect(),this._editorResizeObserver=null),this._editorStyleObserver&&(this._editorStyleObserver.disconnect(),this._editorStyleObserver=null),this.codeJar&&(this.codeJar.destroy(),this.codeJar=null)}marshalToView(){if(super.marshalToView(),this.codeJar&&this.options.CodeDataAddress){let e=this._resolveCodeContent();"string"==typeof e&&(this.codeJar.updateCode(e),this._updateLineNumbers())}}marshalFromView(){super.marshalFromView(),this.codeJar&&this.options.CodeDataAddress&&this.onCodeChange(this.codeJar.toString())}},t.exports.default_configuration=i,t.exports.createHighlighter=o;const a=e("./demos");t.exports.demos=a.demos,t.exports.registerWithDocuserve=a.registerWithDocuserve},{"./Pict-Code-Highlighter.js":144,"./Pict-Section-Code-DefaultConfiguration.js":145,"./demos":147,"pict-view":216}],147:[function(e,t,r){const n=e("../Pict-Section-Code.js");function o(e,t,r){let o="demo-code-"+(r.Hash||"unnamed")+"-"+Date.now();t.innerHTML='<div id="'+o+'"></div>';let i={ViewIdentifier:"Demo-Code-"+o,DefaultDestinationAddress:"#"+o,Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- demo code editor renders here --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#"+o}],TargetElementAddress:"#"+o,Language:r.Language||"javascript",ReadOnly:!!r.ReadOnly,LineNumbers:!1!==r.LineNumbers,Tab:r.Tab||"\t",AddClosing:!1!==r.AddClosing,CatchTab:!1!==r.CatchTab,DefaultCode:r.Code||"// example code\n",AutoRender:!1,RenderOnLoad:!1},a=e.addView(i.ViewIdentifier,i,n);if(!a)return null;if("undefined"!=typeof window&&(window.CodeJarModules&&"function"==typeof window.CodeJarModules.CodeJar?a.connectCodeJarPrototype(window.CodeJarModules.CodeJar):"function"==typeof window.CodeJar&&a.connectCodeJarPrototype(window.CodeJar),window.CodeJarModules&&window.CodeJarModules.hljs)){let e=window.CodeJarModules.hljs,t=i.Language;a._highlightFunction=function(r){r.removeAttribute("data-highlighted"),delete r.dataset.highlighted,r.className=r.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),r.classList.add("language-"+t);try{e.highlightElement(r)}catch(e){}}}try{a.render()}catch(e){}return a}const i=[{DemoSchemaVersion:1,Hash:"javascript-editor",Group:"pict",Module:"pict-section-code",Name:"JavaScript editor",Description:"Default pict-section-code configuration — line numbers on, highlight.js for JavaScript, two-space tab.",Spec:{Hash:"javascript-editor",Language:"javascript",LineNumbers:!0,Tab:" ",Code:"// A small example — try editing me.\nfunction fibonacci(n) {\n if (n <= 1) return n;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\nfor (let i = 0; i < 10; i++) {\n console.log(`fib(${i}) =`, fibonacci(i));\n}\n"},Mount:o,Sources:[{Name:"spec.json",Language:"json",Content:'{\n "Language": "javascript",\n "LineNumbers": true,\n "Tab": " ",\n "Code": "function fibonacci(n) { … }"\n}'}]},{DemoSchemaVersion:1,Hash:"json-readonly",Group:"pict",Module:"pict-section-code",Name:"JSON viewer (read-only)",Description:'Read-only mode with line numbers off — useful for embedded "show me the payload" surfaces in dashboards.',Spec:{Hash:"json-readonly",Language:"json",ReadOnly:!0,LineNumbers:!1,Code:'{\n "version": "1.0.7",\n "syntax": {\n "keyword": "#A626A4",\n "string": "#50A14F",\n "number": "#986801",\n "function": "#4078F2"\n },\n "features": ["highlighting", "line-numbers", "readonly", "themed"]\n}\n'},Mount:o,Sources:[{Name:"spec.json",Language:"json",Content:'{\n "Language": "json",\n "ReadOnly": true,\n "LineNumbers": false\n}'}]},{DemoSchemaVersion:1,Hash:"css-editor",Group:"pict",Module:"pict-section-code",Name:"CSS editor (4-space tab)",Description:"CSS-flavoured highlighting with a 4-space tab and bracket auto-close turned off — leaner editing for stylesheet snippets.",Spec:{Hash:"css-editor",Language:"css",LineNumbers:!0,Tab:" ",AddClosing:!1,Code:"/* Theme-aware token usage */\n.docuserve-demo-title {\n color: var(--theme-color-text-primary, #3D3229);\n font-size: 1.5em;\n font-weight: 600;\n}\n\n.docuserve-demo-description {\n color: var(--theme-color-text-secondary, #5E5549);\n line-height: 1.55;\n}\n"},Mount:o,Sources:[{Name:"spec.json",Language:"json",Content:'{\n "Language": "css",\n "LineNumbers": true,\n "Tab": " ",\n "AddClosing": false\n}'}]}];t.exports=i,t.exports.demos=i,t.exports.registerWithDocuserve=function(e){return e&&e.providers&&e.providers["Docuserve-Demos"]?e.providers["Docuserve-Demos"].registerAll(i):0}},{"../Pict-Section-Code.js":146}],148:[function(e,t,r){t.exports=e("./views/Pict-View-Content.js"),t.exports.PictContentProvider=e("./providers/Pict-Provider-Content.js")},{"./providers/Pict-Provider-Content.js":149,"./views/Pict-View-Content.js":150}],149:[function(e,t,r){const n=e("pict-provider"),o=e("pict-section-code").createHighlighter;t.exports=class extends n{constructor(e,t,r){super(e,t,r)}highlightCode(e,t){if(!e)return"";let r={textContent:e,innerHTML:""};return o(t)(r),r.innerHTML}generateLineNumbers(e){if(!e)return"<span>1</span>";let t=e.split("\n").length,r="";for(let e=1;e<=t;e++)r+="<span>"+e+"</span>";return r}parseMarkdown(e,t,r,n){if(!e)return"";let o=e.split("\n"),i=[],a=!1,s=0,l="",c=[],d=!1,h="",p=!1,u=[],f=!1,m=[],g=[],y=()=>{g.length>0&&(i.push("<p>"+g.map(e=>this.parseInline(e,t,r,n)).join(" ")+"</p>"),g=[])};for(let e=0;e<o.length;e++){let b=o[e];if(!a&&b.trim().match(/^\$\$/)){f?(i.push('<div class="pict-content-katex-display">'+m.join("\n")+"</div>"),f=!1,m=[]):(y(),d&&(i.push("ul"===h?"</ul>":"</ol>"),d=!1),p&&(i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),t,r,n)+"</blockquote>"),p=!1,u=[]),f=!0);continue}if(f){m.push(b);continue}let v=b.match(/^(`{3,})/);if(v){let e=v[1].length;if(a){if(e>=s&&b.trim()===v[1]){if("mermaid"===l)i.push('<pre class="mermaid">'+c.join("\n")+"</pre>");else{let e=c.join("\n"),t=this.highlightCode(e,l),r=this.generateLineNumbers(e);i.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+r+'</div><pre><code class="language-'+this.escapeHTML(l)+'">'+t+"</code></pre></div>")}a=!1,s=0,l="",c=[];continue}c.push(b);continue}y(),d&&(i.push("ul"===h?"</ul>":"</ol>"),d=!1),p&&(i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),t,r,n)+"</blockquote>"),p=!1,u=[]),s=e,l=b.replace(/^`{3,}/,"").trim(),a=!0;continue}if(a){c.push(b);continue}if(b.match(/^>\s?/)){p||(y(),d&&(i.push("ul"===h?"</ul>":"</ol>"),d=!1),p=!0,u=[]),u.push(b.replace(/^>\s?/,""));continue}if(p&&(i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),t,r,n)+"</blockquote>"),p=!1,u=[]),b.match(/^(-{3,}|\*{3,}|_{3,})\s*$/)){y(),d&&(i.push("ul"===h?"</ul>":"</ol>"),d=!1),i.push("<hr>");continue}let S=b.match(/^(#{1,6})\s+(.+)/);if(S){y(),d&&(i.push("ul"===h?"</ul>":"</ol>"),d=!1);let e=S[1].length,o=this.parseInline(S[2],t,r,n),a=S[2].toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");i.push("<h"+e+' id="'+a+'">'+o+"</h"+e+">");continue}let T=b.match(/^(\s*)[-*+]\s+(.*)/);if(T){y(),d&&"ul"===h||(d&&i.push("ul"===h?"</ul>":"</ol>"),i.push("<ul>"),d=!0,h="ul"),i.push("<li>"+this.parseInline(T[2],t,r,n)+"</li>");continue}let w=b.match(/^(\s*)\d+\.\s+(.*)/);if(w)y(),d&&"ol"===h||(d&&i.push("ul"===h?"</ul>":"</ol>"),i.push("<ol>"),d=!0,h="ol"),i.push("<li>"+this.parseInline(w[2],t,r,n)+"</li>");else if(d&&""!==b.trim()&&(i.push("ul"===h?"</ul>":"</ol>"),d=!1),""!==b.trim()){if(b.match(/^\|/)&&e+1<o.length&&o[e+1].match(/^\|[\s-:|]+\|/)){y(),d&&(i.push("ul"===h?"</ul>":"</ol>"),d=!1);let a="<table>",s=b.split("|").filter(e=>""!==e.trim());a+="<thead><tr>";for(let e=0;e<s.length;e++)a+="<th>"+this.parseInline(s[e].trim(),t,r,n)+"</th>";for(a+="</tr></thead>",e++,a+="<tbody>";e+1<o.length&&o[e+1].match(/^\|/);){e++;let i=o[e].split("|").filter(e=>""!==e.trim());a+="<tr>";for(let e=0;e<i.length;e++)a+="<td>"+this.parseInline(i[e].trim(),t,r,n)+"</td>";a+="</tr>"}a+="</tbody></table>",i.push(a);continue}g.push(b)}else y()}if(y(),d&&i.push("ul"===h?"</ul>":"</ol>"),p&&i.push("<blockquote>"+this.parseMarkdown(u.join("\n"),t,r,n)+"</blockquote>"),a){let e=c.join("\n"),t=this.highlightCode(e,l),r=this.generateLineNumbers(e);i.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+r+"</div><pre><code>"+t+"</code></pre></div>")}return i.join("\n")}parseInline(e,t,r,n){if(!e)return"";let o=e,i=[];return o=o.replace(/`([^`]+)`/g,(e,t)=>{let r=i.length;return i.push("<code>"+t+"</code>"),"\0CODEINLINE"+r+"\0"}),o=o.replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>'),o=o.replace(/\$([^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>'),o=o.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(e,t,n)=>{let o=n;if("function"==typeof r){let e=r(n,t);e&&(o=e)}return'<img src="'+o+'" alt="'+t+'">'}),o=o.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(e,r,n)=>{if("function"==typeof t){let e=t(n,r);if(e){let t=e.target?' target="'+e.target+'"':"",n=e.rel?' rel="'+e.rel+'"':"";return'<a href="'+e.href+'"'+t+n+">"+r+"</a>"}}return n.match(/^https?:\/\//)?'<a href="'+n+'" target="_blank" rel="noopener">'+r+"</a>":'<a href="'+n+'">'+r+"</a>"}),o=o.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),o=o.replace(/__([^_]+)__/g,"<strong>$1</strong>"),o=o.replace(/\*([^*]+)\*/g,"<em>$1</em>"),o=o.replace(/_([^_]+)_/g,"<em>$1</em>"),o=o.replace(/\x00CODEINLINE(\d+)\x00/g,(e,t)=>i[parseInt(t)]),"function"==typeof n&&(o=this._applyVocabularyLinks(o,n)),o}_applyVocabularyLinks(e,t){if(!e||"function"!=typeof t)return e;let r={},n=e.split(/(<[^>]+>)/g),o=0,i=["code","a","pre","span"];for(let e=0;e<n.length;e++){let a=n[e];if("<"===a.charAt(0)){let e=a.match(/^<(\w+)/);e&&-1!==i.indexOf(e[1].toLowerCase())&&o++;let t=a.match(/^<\/(\w+)/);t&&-1!==i.indexOf(t[1].toLowerCase())&&(o=Math.max(0,o-1));continue}o>0||(n[e]=a.replace(/\b([A-Za-z][A-Za-z0-9_-]{1,30})\b/g,(e,n)=>{if(n.length<3)return e;let o=n.toLowerCase();if(r[o])return e;let i=t(o);if(!i)return e;r[o]=!0;let a=(i.short||"").replace(/"/g,"&quot;");return'<span class="pict-vocab-term" data-vocab-slug="'+i.slug+'" data-vocab-title="'+(i.title||"").replace(/"/g,"&quot;")+'" data-vocab-short="'+a+'">'+e+"</span>"}))}return n.join("")}escapeHTML(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}},t.exports.default_configuration={ProviderIdentifier:"Pict-Content",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":143,"pict-section-code":146}],150:[function(e,t,r){const n=e("pict-view");class o extends n{constructor(e,t,r){super(e,t,r)}displayContent(e,t){let r=t||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+r,e);let n=document.getElementById(r);n&&n.parentElement&&(n.parentElement.scrollTop=0),n&&!n.classList.contains("pict-content")&&n.classList.add("pict-content"),this.enableFullscreenViewers(r,{skipMermaid:!0}),this.renderMermaidDiagrams(r),this.renderKaTeXEquations(r)}_initializeMermaidTheme(){if("undefined"==typeof mermaid||"undefined"==typeof window)return;let e=getComputedStyle(document.documentElement),t=(t,r)=>(e.getPropertyValue(t)||"").trim()||r;try{mermaid.initialize({startOnLoad:!1,theme:"base",securityLevel:"loose",themeVariables:{primaryColor:t("--theme-color-background-panel","#FAF8F4"),primaryTextColor:t("--theme-color-text-primary","#3D3229"),primaryBorderColor:t("--theme-color-brand-primary","#2E7D74"),secondaryColor:t("--theme-color-background-secondary","#F0EDE8"),secondaryTextColor:t("--theme-color-text-secondary","#5E5549"),secondaryBorderColor:t("--theme-color-border-default","#DDD6CA"),tertiaryColor:t("--theme-color-background-tertiary","#EDE9E3"),tertiaryTextColor:t("--theme-color-text-secondary","#5E5549"),tertiaryBorderColor:t("--theme-color-border-light","#E8E2D7"),background:t("--theme-color-background-panel","#FAF8F4"),mainBkg:t("--theme-color-background-panel","#FAF8F4"),secondBkg:t("--theme-color-background-secondary","#F0EDE8"),lineColor:t("--theme-color-text-secondary","#5E5549"),textColor:t("--theme-color-text-primary","#3D3229"),noteBkgColor:t("--theme-color-background-tertiary","#EDE9E3"),noteTextColor:t("--theme-color-text-primary","#3D3229"),noteBorderColor:t("--theme-color-border-default","#DDD6CA"),errorBkgColor:t("--theme-color-status-error","#D9534F"),errorTextColor:t("--theme-color-text-on-brand","#FFFFFF"),fontFamily:t("--theme-typography-family-sans","inherit")}})}catch(e){this.log&&this.log.warn&&this.log.warn("Mermaid theme init failed: "+e.message)}}_subscribeToThemeChanges(){if(this._mermaidThemeSubscribed)return;let e=this.pict&&this.pict.providers&&this.pict.providers.Theme;if(!e||"function"!=typeof e.onApply)return;let t=this;e.onApply(function(){t._initializeMermaidTheme(),t._refreshMermaidDiagrams()}),this._mermaidThemeSubscribed=!0}_refreshMermaidDiagrams(){if("undefined"==typeof mermaid||"undefined"==typeof document)return;let e=document.querySelectorAll("pre.mermaid[data-mermaid-source]");if(!(e.length<1)){for(let t=0;t<e.length;t++){let r=e[t];r.textContent=r.getAttribute("data-mermaid-source"),r.removeAttribute("data-processed"),r.classList.remove("mermaid-rendered")}try{let t=mermaid.run({nodes:e});t&&"function"==typeof t.catch&&t.catch(e=>{this.log&&this.log.warn&&this.log.warn("Mermaid re-render failed: "+(e&&e.message?e.message:e))})}catch(e){this.log&&this.log.warn&&this.log.warn("Mermaid re-render failed: "+e.message)}}}renderMermaidDiagrams(e){if("undefined"==typeof mermaid)return;let t=e||"Pict-Content-Body",r=document.getElementById(t);if(!r)return;let n=r.querySelectorAll("pre.mermaid");if(!(n.length<1)){this._initializeMermaidTheme(),this._subscribeToThemeChanges();for(let e=0;e<n.length;e++){let t=n[e];t.hasAttribute("data-mermaid-source")||t.setAttribute("data-mermaid-source",t.textContent)}try{let e=mermaid.run({nodes:n});e&&"function"==typeof e.then?e.then(()=>{this.enableFullscreenViewers(t,{onlyMermaid:!0})}).catch(e=>{this.log.error("Mermaid rendering error: "+(e&&e.message?e.message:e))}):this.enableFullscreenViewers(t,{onlyMermaid:!0})}catch(e){this.log.error("Mermaid rendering error: "+e.message)}}}renderKaTeXEquations(e){if("undefined"==typeof katex)return;let t=e||"Pict-Content-Body",r=document.getElementById(t);if(!r)return;let n=r.querySelectorAll(".pict-content-katex-inline");for(let e=0;e<n.length;e++)try{katex.render(n[e].textContent,n[e],{throwOnError:!1,displayMode:!1})}catch(e){this.log.warn("KaTeX inline error: "+e.message)}let o=r.querySelectorAll(".pict-content-katex-display");for(let e=0;e<o.length;e++)try{katex.render(o[e].textContent,o[e],{throwOnError:!1,displayMode:!0})}catch(e){this.log.warn("KaTeX display error: "+e.message)}}enableFullscreenViewers(e,t){let r=e||"Pict-Content-Body",n=document.getElementById(r);if(!n)return;let o=t||{};if(!o.onlyMermaid){let e=n.querySelectorAll("img:not([data-fullscreen-source])");for(let t=0;t<e.length;t++){let r=e[t];r.setAttribute("data-fullscreen-source","image");let n=r.getAttribute("alt");if(!n){n=(r.getAttribute("src")||"").split("/").pop().split("?")[0]||"Image"}r.setAttribute("data-fullscreen-title",n)}let t=n.querySelectorAll(".pict-content-code-wrap:not([data-code-actions-wired])");for(let e=0;e<t.length;e++)this._wireCodeActions(t[e])}if(!o.skipMermaid){let e=n.querySelectorAll("pre.mermaid:not([data-fullscreen-source])");for(let t=0;t<e.length;t++){let r=e[t];r.querySelector("svg")&&(r.setAttribute("data-fullscreen-source","mermaid"),r.setAttribute("data-fullscreen-title","Mermaid Diagram"))}}n.__pictFullscreenWired||(n.__pictFullscreenWired=!0,n.addEventListener("click",e=>{let t=e.target;for(;t&&t!==n&&!t.hasAttribute("data-fullscreen-source");)t=t.parentElement;t&&t!==n&&t.hasAttribute("data-fullscreen-source")&&(e.preventDefault(),this._openFullscreen(t))}))}_wireCodeActions(e){if(!e||e.hasAttribute("data-code-actions-wired"))return;e.setAttribute("data-code-actions-wired","true");let t=e.querySelector('code[class*="language-"]'),r="Code";if(t){let e=(t.getAttribute("class")||"").match(/language-(\S+)/);e&&(r=e[1]+" code")}e.setAttribute("data-code-language",r);let n=document.createElement("div");n.className="pict-content-code-container";let o=document.createElement("div");o.className="pict-content-code-actions",o.setAttribute("aria-hidden","false");let i=document.createElement("button");i.type="button",i.className="pict-content-code-action-btn",i.setAttribute("aria-label","Open code in fullscreen"),i.setAttribute("title","Open in fullscreen"),i.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true"><polyline points="3 6 3 3 6 3"></polyline><polyline points="13 6 13 3 10 3"></polyline><polyline points="3 10 3 13 6 13"></polyline><polyline points="13 10 13 13 10 13"></polyline></svg>';let a=document.createElement("button");a.type="button",a.className="pict-content-code-action-btn",a.setAttribute("aria-label","Copy code to clipboard"),a.setAttribute("title","Copy code"),a.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="5" y="5" width="9" height="9" rx="1.25"></rect><path d="M11 5V3.25A1.25 1.25 0 0 0 9.75 2H3.25A1.25 1.25 0 0 0 2 3.25v6.5A1.25 1.25 0 0 0 3.25 11H5"></path></svg>',o.appendChild(i),o.appendChild(a),e.parentNode.insertBefore(n,e),n.appendChild(e),n.appendChild(o),i.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this._openCodeFullscreen(e)}),a.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this._copyCodeToClipboard(e,a)})}_openCodeFullscreen(e){let t=this._buildFullscreenOverlay();e.setAttribute("data-fullscreen-source","code"),e.setAttribute("data-fullscreen-title",e.getAttribute("data-code-language")||"Code"),t.open(e)}_copyCodeToClipboard(e,t){let r=e.querySelector("code"),n=r?r.textContent:e.textContent,o=()=>{t.classList.add("is-copied"),t.setAttribute("title","Copied!"),setTimeout(()=>{t.classList.remove("is-copied"),t.setAttribute("title","Copy code")},1400)},i=()=>{t.classList.add("is-copy-failed"),t.setAttribute("title","Copy failed"),setTimeout(()=>{t.classList.remove("is-copy-failed"),t.setAttribute("title","Copy code")},1400)};try{if(navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText)return void navigator.clipboard.writeText(n).then(o).catch(i)}catch(e){}try{let e=document.createElement("textarea");e.value=n,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let t=document.execCommand("copy");document.body.removeChild(e),t?o():i()}catch(e){i()}}_buildFullscreenOverlay(){if(o._FullscreenOverlay)return o._FullscreenOverlay;let e=document.createElement("div");e.className="pict-fullscreen-overlay",e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-labelledby","pict-fullscreen-title"),e.setAttribute("hidden",""),e.innerHTML='<div class="pict-fullscreen-titlebar"><span class="pict-fullscreen-title" id="pict-fullscreen-title"></span><div class="pict-fullscreen-controls"><button type="button" class="pict-fullscreen-btn" data-action="zoom-out" aria-label="Zoom out" title="Zoom out"><svg viewBox="0 0 16 16" aria-hidden="true"><line x1="3" y1="8" x2="13" y2="8"></line></svg></button><button type="button" class="pict-fullscreen-btn" data-action="zoom-reset" aria-label="Reset zoom" title="Reset zoom"><svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5"></circle><line x1="8" y1="5" x2="8" y2="11"></line><line x1="5" y1="8" x2="11" y2="8"></line></svg></button><button type="button" class="pict-fullscreen-btn" data-action="zoom-in" aria-label="Zoom in" title="Zoom in"><svg viewBox="0 0 16 16" aria-hidden="true"><line x1="3" y1="8" x2="13" y2="8"></line><line x1="8" y1="3" x2="8" y2="13"></line></svg></button><button type="button" class="pict-fullscreen-btn pict-fullscreen-close" data-action="close" aria-label="Close" title="Close (Esc)"><svg viewBox="0 0 16 16" aria-hidden="true"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div></div><div class="pict-fullscreen-stage"><div class="pict-fullscreen-content"></div></div>',document.body.appendChild(e);let t={scale:1,translateX:0,translateY:0,isPanning:!1,didPan:!1,currentKind:"",panStartX:0,panStartY:0,panOrigX:0,panOrigY:0,pinchInitialDistance:0,pinchInitialScale:1},r=e.querySelector(".pict-fullscreen-stage"),n=e.querySelector(".pict-fullscreen-content"),i=e.querySelector(".pict-fullscreen-title"),a=()=>{n.style.transform="translate("+t.translateX+"px, "+t.translateY+"px) scale("+t.scale+")",r.classList.toggle("is-zoomed",t.scale>1.001)},s=(e,n,o)=>{let i=(s=e)<.5?.5:s>8?8:s;var s;let l=r.getBoundingClientRect(),c=void 0!==n?n:l.left+l.width/2,d=void 0!==o?o:l.top+l.height/2,h=c-(l.left+l.width/2),p=d-(l.top+l.height/2),u=i/t.scale;t.translateX=h-u*(h-t.translateX),t.translateY=p-u*(p-t.translateY),t.scale=i,a()},l=()=>{t.scale=1,t.translateX=0,t.translateY=0,a()},c=()=>{e.setAttribute("hidden",""),n.innerHTML="",l(),document.documentElement.style.removeProperty("overflow"),document.removeEventListener("keydown",d)},d=e=>{"Escape"===e.key?(e.preventDefault(),c()):"+"===e.key||"="===e.key?(e.preventDefault(),s(t.scale+.25)):"-"===e.key||"_"===e.key?(e.preventDefault(),s(t.scale-.25)):"0"===e.key&&(e.preventDefault(),l())};e.addEventListener("click",n=>{t.didPan?t.didPan=!1:n.target!==e&&n.target!==r||c()}),e.querySelectorAll("[data-action]").forEach(e=>{e.addEventListener("click",r=>{r.stopPropagation();let n=e.getAttribute("data-action");"close"===n?c():"zoom-in"===n?s(t.scale+.25):"zoom-out"===n?s(t.scale-.25):"zoom-reset"===n&&l()})}),r.addEventListener("wheel",e=>{if("code"===t.currentKind)return;e.preventDefault();let r=.15*(-e.deltaY>0?1:-1);s(t.scale+r,e.clientX,e.clientY)},{passive:!1}),r.addEventListener("pointerdown",e=>{"code"!==t.currentKind&&(t.scale<=1.001||e.target.closest(".pict-fullscreen-controls")||(t.isPanning=!0,t.panStartX=e.clientX,t.panStartY=e.clientY,t.panOrigX=t.translateX,t.panOrigY=t.translateY,r.setPointerCapture(e.pointerId),r.classList.add("is-panning")))}),r.addEventListener("pointermove",e=>{t.isPanning&&(t.translateX=t.panOrigX+(e.clientX-t.panStartX),t.translateY=t.panOrigY+(e.clientY-t.panStartY),a())});let h=e=>{if(t.isPanning){t.isPanning=!1,t.didPan=!0,r.classList.remove("is-panning");try{r.releasePointerCapture(e.pointerId)}catch(e){}}};r.addEventListener("pointerup",h),r.addEventListener("pointercancel",h);let p={};return r.addEventListener("touchstart",e=>{for(let t=0;t<e.touches.length;t++){let r=e.touches[t];p[r.identifier]={x:r.clientX,y:r.clientY}}if(2===e.touches.length){let r=e.touches[0],n=e.touches[1],o=n.clientX-r.clientX,i=n.clientY-r.clientY;t.pinchInitialDistance=Math.sqrt(o*o+i*i),t.pinchInitialScale=t.scale}},{passive:!0}),r.addEventListener("touchmove",e=>{if(2===e.touches.length&&t.pinchInitialDistance>0){e.preventDefault();let r=e.touches[0],n=e.touches[1],o=n.clientX-r.clientX,i=n.clientY-r.clientY,a=Math.sqrt(o*o+i*i)/t.pinchInitialDistance,l=(r.clientX+n.clientX)/2,c=(r.clientY+n.clientY)/2;s(t.pinchInitialScale*a,l,c)}},{passive:!1}),r.addEventListener("touchend",()=>{p={},t.pinchInitialDistance=0}),o._FullscreenOverlay={element:e,content:n,titleEl:i,state:t,open:r=>{let o=r.getAttribute("data-fullscreen-title")||"";i.textContent=o,n.innerHTML="";let a,s=r.getAttribute("data-fullscreen-source");if(t.currentKind=s||"","mermaid"===s){let e=r.querySelector("svg");e?(a=e.cloneNode(!0),a.classList.add("pict-fullscreen-mermaid-svg"),a.removeAttribute("style"),a.removeAttribute("width"),a.removeAttribute("height")):a=r.cloneNode(!0)}else"image"===s?(a=r.cloneNode(!0),a.classList.add("pict-fullscreen-img")):(a=r.cloneNode(!0),a.classList.add("pict-fullscreen-codewrap"));n.appendChild(a);let c=e.querySelectorAll('[data-action="zoom-in"], [data-action="zoom-out"], [data-action="zoom-reset"]');for(let e=0;e<c.length;e++)c[e].style.display="code"===s?"none":"";l(),e.removeAttribute("hidden"),document.documentElement.style.overflow="hidden",document.addEventListener("keydown",d)},close:c},o._FullscreenOverlay}_openFullscreen(e){this._buildFullscreenOverlay().open(e)}showLoading(e,t){let r=t||"Pict-Content-Body",n=e||"Loading content...";this.pict.ContentAssignment.assignContent("#"+r,'<div class="pict-content-loading">'+n+"</div>")}}t.exports=o,t.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* ─── Code blocks ─────────────────────────────────────\n\t\t Background, text color, line-number gutter, and every\n\t\t syntax token route through pict-provider-theme tokens —\n\t\t the same set pict-section-code (the live editor) uses.\n\t\t This way the rendered-preview code blocks look identical\n\t\t to the live editor and re-skin together when the theme\n\t\t switches. Previous version used the text-primary token\n\t\t as the code background (a TEXT token used as BACKGROUND),\n\t\t which broke in dark mode and any palette where text and\n\t\t background-tertiary diverge.\n\t\t*/\n\t\t.pict-content pre {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace);\n\t\t}\n\t\t/* Inline code (single backtick) — slightly differentiated\n\t\t from block code so it doesn't disappear into prose. */\n\t\t.pict-content code {\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF8F4);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', monospace);\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tfont-family: var(--theme-typography-family-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace);\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: hidden;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\twidth: 40px;\n\t\t\tmin-width: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF8F4);\n\t\t\tborder-right: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-family: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tline-height: inherit;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder: none;\n\t\t\tpadding: 1.25em 1.25em 1.25em 8px;\n\t\t\tborder-radius: 0 6px 6px 0;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t/* Syntax token colors — every class binds to a --theme-color-syntax-*\n\t\t variable, the same tokens pict-section-code (the live editor) uses.\n\t\t Each var() carries an Atom One Light hex as fallback for hosts\n\t\t without a theme provider; themes that DO ship syntax tokens\n\t\t (retold-default, retold-content-system, etc.) drive everything\n\t\t coherently. */\n\t\t.pict-content-code-wrap .keyword { color: var(--theme-color-syntax-keyword, #A626A4); }\n\t\t.pict-content-code-wrap .string { color: var(--theme-color-syntax-string, #50A14F); }\n\t\t.pict-content-code-wrap .number { color: var(--theme-color-syntax-number, #986801); }\n\t\t.pict-content-code-wrap .comment { color: var(--theme-color-syntax-comment, #A0A1A7); font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: var(--theme-color-syntax-operator, #0184BC); }\n\t\t.pict-content-code-wrap .punctuation { color: var(--theme-color-syntax-punctuation, #383A42); }\n\t\t.pict-content-code-wrap .function-name { color: var(--theme-color-syntax-function, #4078F2); }\n\t\t.pict-content-code-wrap .property { color: var(--theme-color-syntax-property, #E45649); }\n\t\t.pict-content-code-wrap .tag { color: var(--theme-color-syntax-tag, #E45649); }\n\t\t.pict-content-code-wrap .attr-name { color: var(--theme-color-syntax-attrname, #986801); }\n\t\t.pict-content-code-wrap .attr-value { color: var(--theme-color-syntax-attrvalue, #50A14F); }\n\t\t.pict-content-code-wrap .builtin { color: var(--theme-color-syntax-builtin, #986801); }\n\t\t.pict-content-code-wrap .type { color: var(--theme-color-syntax-type, #C18401); }\n\t\t.pict-content-code-wrap .variable { color: var(--theme-color-syntax-variable, #383A42); }\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: var(--theme-color-background-secondary, #F7F5F0);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: var(--theme-color-background-secondary, #F5F0E8);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: var(--theme-color-background-secondary, #F7F5F0);\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: var(--theme-color-background-panel, #fff);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content pre.mermaid text,\n\t\t.pict-content pre.mermaid .nodeLabel,\n\t\t.pict-content pre.mermaid .edgeLabel,\n\t\t.pict-content pre.mermaid .label,\n\t\t.pict-content pre.mermaid .cluster-label,\n\t\t.pict-content pre.mermaid span,\n\t\t.pict-content pre.mermaid foreignObject p,\n\t\t.pict-content pre.mermaid foreignObject div,\n\t\t.pict-content pre.mermaid foreignObject span {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E) !important;\n\t\t\tfill: var(--theme-color-text-primary, #2A241E) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .edgePath .path {\n\t\t\tstroke: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .arrowheadPath {\n\t\t\tfill: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\n\t\t/* Fullscreen viewer for images and mermaid diagrams (click-to-zoom) */\n\t\t.pict-content [data-fullscreen-source] {\n\t\t\tcursor: zoom-in;\n\t\t\toutline: 1px solid transparent;\n\t\t\toutline-offset: 3px;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: outline-color 0.15s ease;\n\t\t}\n\t\t.pict-content [data-fullscreen-source]:hover {\n\t\t\toutline-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t/* Code block container with hover-revealed action buttons */\n\t\t.pict-content-code-container {\n\t\t\tposition: relative;\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tgap: 8px;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content-code-container > .pict-content-code-wrap {\n\t\t\tmargin: 0;\n\t\t\tflex: 1 1 auto;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-actions {\n\t\t\tposition: sticky;\n\t\t\ttop: 64px;\n\t\t\talign-self: flex-start;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t\tflex: 0 0 auto;\n\t\t\tpadding-top: 6px;\n\t\t\topacity: 0;\n\t\t\ttransform: translateX(-4px);\n\t\t\ttransition: opacity 0.15s ease, transform 0.15s ease;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-content-code-container:hover .pict-content-code-actions,\n\t\t.pict-content-code-container:focus-within .pict-content-code-actions {\n\t\t\topacity: 1;\n\t\t\ttransform: translateX(0);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-content-code-action-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tpadding: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-muted, #5E5549);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\tcursor: pointer;\n\t\t\tbox-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;\n\t\t}\n\t\t.pict-content-code-action-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.6;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-content-code-action-btn:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t}\n\t\t.pict-content-code-action-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-content-code-action-btn.is-copied {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.pict-content-code-action-btn.is-copy-failed {\n\t\t\tbackground: var(--theme-color-status-error, #B23A3A);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-status-error, #B23A3A);\n\t\t}\n\t\t.pict-fullscreen-overlay {\n\t\t\tposition: fixed;\n\t\t\tinset: 0;\n\t\t\tz-index: 9999;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: rgba(0, 0, 0, 0.62);\n\t\t\tbackdrop-filter: blur(6px);\n\t\t\t-webkit-backdrop-filter: blur(6px);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-fullscreen-overlay[hidden] {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-fullscreen-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 1em;\n\t\t\theight: 48px;\n\t\t\tpadding: 0 1em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #1A1612);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t\tflex: 0 0 auto;\n\t\t}\n\t\t.pict-fullscreen-title {\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.01em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcolor: var(--theme-color-text-primary, #1A1612);\n\t\t}\n\t\t.pict-fullscreen-controls {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-fullscreen-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 6px;\n\t\t\tcolor: var(--theme-color-text-muted, #5E5549);\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n\t\t}\n\t\t.pict-fullscreen-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.75;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-fullscreen-btn:hover {\n\t\t\tbackground: var(--theme-color-border-light, #EAE3D8);\n\t\t\tcolor: var(--theme-color-text-primary, #1A1612);\n\t\t}\n\t\t.pict-fullscreen-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-fullscreen-close:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-text-on-brand, #FFFFFF);\n\t\t}\n\t\t.pict-fullscreen-stage {\n\t\t\tflex: 1 1 auto;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 1.5em;\n\t\t\tcursor: zoom-in;\n\t\t\ttouch-action: none;\n\t\t}\n\t\t.pict-fullscreen-stage.is-zoomed {\n\t\t\tcursor: grab;\n\t\t}\n\t\t.pict-fullscreen-stage.is-panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-fullscreen-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 100%;\n\t\t\ttransform-origin: center center;\n\t\t\ttransition: transform 0.05s linear;\n\t\t\twill-change: transform;\n\t\t}\n\t\t.pict-fullscreen-content > * {\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-img {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tobject-fit: contain;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 12px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg {\n\t\t\twidth: min(90vw, 1400px);\n\t\t\theight: auto;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 16px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-codewrap {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tmargin: 0;\n\t\t\toverflow: auto;\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":216}],151:[function(e,t,r){t.exports={RenderOnLoad:!0,DefaultRenderable:"Histogram-Wrap",DefaultDestinationAddress:"#Histogram-Container-Div",Templates:[{Hash:"Histogram-Container",Template:"\x3c!-- Histogram Container Rendering Soon --\x3e"}],Renderables:[{RenderableHash:"Histogram-Wrap",TemplateHash:"Histogram-Container",DestinationAddress:"#Histogram-Container-Div"}],TargetElementAddress:"#Histogram-Container-Div",DataAddress:!1,Bins:[],LabelProperty:"Label",ValueProperty:"Value",Orientation:"vertical",RenderMode:"browser",MaxBarSize:200,BarThickness:30,BarGap:4,FillContainer:!1,ShowValues:!0,ShowLabels:!0,LabelInterval:0,BarColor:"#4A90D9",SelectedBarColor:"#2ECC71",SelectionRangeColor:"#85C1E9",Selectable:!1,SelectionMode:"range",SelectionDataAddress:!1,InitialSelection:null,BarCharacter:"█",BarPartialCharacters:[" ","▁","▂","▃","▄","▅","▆","▇","█"],EmptyCharacter:" ",SliderCharacter:"│",SliderHandleCharacter:"◆",TextWidth:60,TextHeight:15,CSS:".pict-histogram-container\n{\n\tdisplay: inline-block;\n\tposition: relative;\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n\tfont-size: 12px;\n\tuser-select: none;\n}\n.pict-histogram-chart\n{\n\tdisplay: flex;\n\talign-items: flex-end;\n\tposition: relative;\n}\n.pict-histogram-container.pict-histogram-horizontal\n{\n\tdisplay: inline-flex;\n\tflex-direction: row;\n\talign-items: stretch;\n}\n.pict-histogram-chart.pict-histogram-horizontal\n{\n\tflex-direction: column;\n\talign-items: flex-start;\n}\n.pict-histogram-bar-group\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tcursor: default;\n\tflex-shrink: 0;\n}\n.pict-histogram-horizontal .pict-histogram-bar-group\n{\n\tflex-direction: row;\n\talign-items: center;\n}\n.pict-histogram-bar\n{\n\ttransition: background-color 0.15s ease, height 0.2s ease, width 0.2s ease;\n\tborder-radius: 2px 2px 0 0;\n\tmin-width: 1px;\n\tmin-height: 1px;\n}\n.pict-histogram-horizontal .pict-histogram-bar\n{\n\tborder-radius: 0 2px 2px 0;\n}\n.pict-histogram-bar.pict-histogram-selectable\n{\n\tcursor: pointer;\n}\n.pict-histogram-bar.pict-histogram-selectable:hover\n{\n\topacity: 0.8;\n}\n.pict-histogram-bar.pict-histogram-selected\n{\n\tbox-shadow: 0 0 0 2px rgba(46, 204, 113, 0.4);\n}\n.pict-histogram-bar.pict-histogram-in-range\n{\n\topacity: 0.9;\n}\n.pict-histogram-value-label\n{\n\ttext-align: center;\n\tcolor: var(--theme-color-text-secondary, #666);\n\tfont-size: 11px;\n\tpadding: 2px 0;\n\twhite-space: nowrap;\n}\n.pict-histogram-horizontal .pict-histogram-value-label\n{\n\tpadding: 0 4px;\n}\n.pict-histogram-bin-label\n{\n\ttext-align: center;\n\tcolor: var(--theme-color-text-primary, #333);\n\tfont-size: 11px;\n\tpadding: 4px 2px 0 2px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n.pict-histogram-horizontal .pict-histogram-bin-label\n{\n\tpadding: 0 4px 0 0;\n\ttext-align: right;\n\tmin-width: 40px;\n}\n.pict-histogram-range-slider-container\n{\n\tposition: relative;\n\twidth: 100%;\n\theight: 24px;\n\tmargin-top: 4px;\n}\n.pict-histogram-horizontal .pict-histogram-range-slider-container\n{\n\twidth: 24px;\n\theight: auto;\n\talign-self: stretch;\n\tmargin-top: 0;\n\tmargin-left: 4px;\n}\n.pict-histogram-range-track\n{\n\tposition: absolute;\n\ttop: 10px;\n\tleft: 0;\n\tright: 0;\n\theight: 4px;\n\tbackground: var(--theme-color-border-default, #E0E0E0);\n\tborder-radius: 2px;\n}\n.pict-histogram-horizontal .pict-histogram-range-track\n{\n\ttop: 0;\n\tleft: 10px;\n\tright: auto;\n\tbottom: 0;\n\twidth: 4px;\n\theight: auto;\n}\n.pict-histogram-range-fill\n{\n\tposition: absolute;\n\ttop: 10px;\n\theight: 4px;\n\tbackground: var(--theme-color-brand-primary, #4A90D9);\n\tborder-radius: 2px;\n}\n.pict-histogram-horizontal .pict-histogram-range-fill\n{\n\ttop: auto;\n\tleft: 10px;\n\twidth: 4px;\n\theight: auto;\n}\n.pict-histogram-range-handle\n{\n\tposition: absolute;\n\ttop: 4px;\n\twidth: 16px;\n\theight: 16px;\n\tbackground: var(--theme-color-background-panel, #fff);\n\tborder: 2px solid var(--theme-color-brand-primary, #4A90D9);\n\tborder-radius: 50%;\n\tcursor: grab;\n\tz-index: 2;\n\ttransform: translateX(-50%);\n}\n.pict-histogram-horizontal .pict-histogram-range-handle\n{\n\ttop: auto;\n\tleft: 4px;\n\ttransform: translateY(-50%);\n}\n.pict-histogram-range-handle:active\n{\n\tcursor: grabbing;\n\tbackground: var(--theme-color-brand-primary, #4A90D9);\n}\n.pict-histogram-range-handle:active,\n.pict-histogram-range-handle:focus\n{\n\tbox-shadow: 0 0 0 3px rgba(74, 144, 217, 0.3);\n\toutline: none;\n}\n.pict-histogram-container.pict-histogram-fill\n{\n\tdisplay: block;\n\twidth: 100%;\n}\n.pict-histogram-fill .pict-histogram-chart\n{\n\twidth: 100%;\n}\n.pict-histogram-fill .pict-histogram-bar-group\n{\n\tflex: 1 1 0%;\n\tmin-width: 0;\n}\n.pict-histogram-fill .pict-histogram-bar\n{\n\twidth: 100%;\n}\n.pict-histogram-axis-line\n{\n\twidth: 100%;\n\theight: 1px;\n\tbackground: var(--theme-color-border-default, #ccc);\n}\n.pict-histogram-label-row\n{\n\tdisplay: flex;\n\twidth: 100%;\n}\n.pict-histogram-fill-label\n{\n\tfont-size: 10px;\n\tcolor: var(--theme-color-text-secondary, #666);\n\ttext-align: center;\n\twhite-space: nowrap;\n\toverflow: visible;\n\tline-height: 16px;\n}\n"}},{}],152:[function(e,t,r){const n=e("pict-view"),o=e("./Pict-Section-Histogram-DefaultConfiguration.js"),i=e("./renderers/Pict-Histogram-Renderer-Browser.js"),a=e("./renderers/Pict-Histogram-Renderer-ConsoleUI.js"),s=e("./renderers/Pict-Histogram-Renderer-CLI.js");t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},o,t),r),this.initialRenderComplete=!1,this._selectedIndices=new Set,this._selectionRangeStart=0,this._selectionRangeEnd=0,this._renderer=this._resolveRenderer(),this._applyInitialSelection()}_applyInitialSelection(){if(this.options.InitialSelection)this.setSelection(this.options.InitialSelection);else if(this.options.Selectable&&"range"===this.options.SelectionMode){let e=this.getBins();this._selectionRangeStart=0,this._selectionRangeEnd=Math.max(0,e.length-1),this._syncSelectionFromRange()}}_resolveRenderer(){switch(this.options.RenderMode){case"consoleui":return a;case"cli":return s;default:return i}}getBins(){if(this.options.DataAddress){const e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};let t=this.fable.manifest.getValueByHash(e,this.options.DataAddress);if(Array.isArray(t))return t;this.log.warn("PICT-Histogram DataAddress [".concat(this.options.DataAddress,"] did not return an array."))}return this.options.Bins||[]}setBins(e){if(Array.isArray(e)){if(this.options.Bins=e,this.options.DataAddress){const t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(t,this.options.DataAddress,e)}}else this.log.warn("PICT-Histogram setBins requires an array.")}isIndexSelected(e){return!!this.options.Selectable&&("range"===this.options.SelectionMode?e===this._selectionRangeStart||e===this._selectionRangeEnd:this._selectedIndices.has(e))}isIndexInRange(e){return!(!this.options.Selectable||"range"!==this.options.SelectionMode)&&(e>this._selectionRangeStart&&e<this._selectionRangeEnd)}getSelection(){if("range"===this.options.SelectionMode){let e=this.getBins(),t=[];for(let e=this._selectionRangeStart;e<=this._selectionRangeEnd;e++)t.push(e);return{Mode:"range",RangeStart:this._selectionRangeStart,RangeEnd:this._selectionRangeEnd,SelectedIndices:t,StartLabel:(e[this._selectionRangeStart]||{})[this.options.LabelProperty],EndLabel:(e[this._selectionRangeEnd]||{})[this.options.LabelProperty]}}return{Mode:this.options.SelectionMode,SelectedIndices:Array.from(this._selectedIndices).sort((e,t)=>e-t)}}setSelection(e){"range"===this.options.SelectionMode?e&&"number"==typeof e.Start&&"number"==typeof e.End&&(this._selectionRangeStart=e.Start,this._selectionRangeEnd=e.End,this._syncSelectionFromRange()):Array.isArray(e)&&(this._selectedIndices=new Set(e)),this._writeSelectionToAddress()}handleBarClick(e){"single"===this.options.SelectionMode?(this._selectedIndices.clear(),this._selectedIndices.add(e)):"multiple"===this.options.SelectionMode&&(this._selectedIndices.has(e)?this._selectedIndices.delete(e):this._selectedIndices.add(e)),this._writeSelectionToAddress(),this.onSelectionChange(this.getSelection()),this.renderHistogram()}handleRangeBarClick(e){Math.abs(e-this._selectionRangeStart)<=Math.abs(e-this._selectionRangeEnd)?this._selectionRangeStart=Math.min(e,this._selectionRangeEnd):this._selectionRangeEnd=Math.max(e,this._selectionRangeStart),this._syncSelectionFromRange(),this._writeSelectionToAddress(),this.onSelectionChange(this.getSelection()),this.renderHistogram()}_syncSelectionFromRange(){this._selectedIndices.clear();for(let e=this._selectionRangeStart;e<=this._selectionRangeEnd;e++)this._selectedIndices.add(e)}_writeSelectionToAddress(){if(!this.options.SelectionDataAddress)return;const e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.SelectionDataAddress,this.getSelection())}onSelectionChange(e){}onBeforeInitialize(){return super.onBeforeInitialize(),super.onBeforeInitialize()}onAfterRender(e){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),super.onAfterRender(e)}onAfterInitialRender(){this.renderHistogram()}renderHistogram(){this.pict.CSSMap&&this.pict.CSSMap.injectCSS(),this._renderer.render(this),this._renderer.wireEvents(this),this.initialRenderComplete=!0}marshalToView(){super.marshalToView(),this.initialRenderComplete&&this.renderHistogram()}marshalFromView(){super.marshalFromView(),this._writeSelectionToAddress()}setOrientation(e){"vertical"===e||"horizontal"===e?(this.options.Orientation=e,this.initialRenderComplete&&this.renderHistogram()):this.log.warn("PICT-Histogram invalid orientation: ".concat(e))}setRenderMode(e){this.options.RenderMode=e,this._renderer=this._resolveRenderer(),this.initialRenderComplete&&this.renderHistogram()}toText(){return"vertical"===this.options.Orientation?a.renderVertical(this):a.renderHorizontal(this)}},t.exports.default_configuration=o,t.exports.renderers={browser:i,consoleui:a,cli:s}},{"./Pict-Section-Histogram-DefaultConfiguration.js":151,"./renderers/Pict-Histogram-Renderer-Browser.js":153,"./renderers/Pict-Histogram-Renderer-CLI.js":154,"./renderers/Pict-Histogram-Renderer-ConsoleUI.js":155,"pict-view":216}],153:[function(e,t,r){function n(e,t,r,n,o,i,a){let s=e[n.LabelProperty]||"",l=e[n.ValueProperty]||0,c="vertical"===n.Orientation,d=o?n.SelectedBarColor:i?n.SelectionRangeColor:n.BarColor,h=n.Selectable?" pict-histogram-selectable":"",p=o?" pict-histogram-selected":"",u=i?" pict-histogram-in-range":"",f=n.FillContainer,m="";m=c?f?"height:".concat(r,"px;background-color:").concat(d,";"):"height:".concat(r,"px;width:").concat(n.BarThickness,"px;background-color:").concat(d,";"):f?"width:".concat(r,"px;background-color:").concat(d,";"):"width:".concat(r,"px;height:").concat(n.BarThickness,"px;background-color:").concat(d,";");let g=n.BarThickness+n.BarGap,y="";y=f?"":c?"margin:0 ".concat(n.BarGap/2,"px;width:").concat(g,"px;"):"margin:".concat(n.BarGap/2,"px 0;");let b='<div class="pict-histogram-bar-group" style="'.concat(y,'" data-histogram-index="').concat(t,'">');if(c)n.ShowValues&&!f&&(b+='<div class="pict-histogram-value-label" style="width:'.concat(g,'px;">').concat(l,"</div>")),b+='<div class="pict-histogram-bar'.concat(h).concat(p).concat(u,'" style="').concat(m,'" data-histogram-index="').concat(t,'"></div>'),n.ShowLabels&&!f&&(b+='<div class="pict-histogram-bin-label" style="width:'.concat(g,'px;">').concat(s,"</div>"));else{if(n.ShowLabels){let e=a?"width:".concat(a,"px;min-width:").concat(a,"px;"):"";b+='<div class="pict-histogram-bin-label" style="'.concat(e,'">').concat(s,"</div>")}b+='<div class="pict-histogram-bar'.concat(h).concat(p).concat(u,'" style="').concat(m,'" data-histogram-index="').concat(t,'"></div>'),n.ShowValues&&(b+='<div class="pict-histogram-value-label">'.concat(l,"</div>"))}return b+="</div>",b}function o(e,t,r){let n=t.getAttribute("data-handle"),o="vertical"===e.options.Orientation,i=!1;function a(t){if(!i)return;let a=e.getBins();if(!a||0===a.length)return;let s=function(){let e=r.querySelector(".pict-histogram-range-slider-container");if(!e)return{start:0,size:1};let t=e.getBoundingClientRect();return o?{start:t.left,size:t.width||1}:{start:t.top,size:t.height||1}}(),l=((o?t.clientX:t.clientY)-s.start)/s.size;l=Math.max(0,Math.min(1,l));let c=Math.round(l*(a.length-1));"start"===n?(c>e._selectionRangeEnd&&(c=e._selectionRangeEnd),e._selectionRangeStart=c):(c<e._selectionRangeStart&&(c=e._selectionRangeStart),e._selectionRangeEnd=c),e._syncSelectionFromRange(),e.renderHistogram()}function s(){i&&(i=!1,"undefined"!=typeof document&&(document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s)))}t.addEventListener("mousedown",e=>{e.preventDefault(),i=!0,"undefined"!=typeof document&&(document.addEventListener("mousemove",a),document.addEventListener("mouseup",s))})}t.exports={render:function(e){let t=e.getBins();if(!t||0===t.length)return void e.services.ContentAssignment.assignContent(e.options.TargetElementAddress,'<div class="pict-histogram-container"><em>No histogram data</em></div>');let r=0;for(let n=0;n<t.length;n++){let o=t[n][e.options.ValueProperty]||0;o>r&&(r=o)}0===r&&(r=1);let o="vertical"===e.options.Orientation,i=o?"pict-histogram-vertical":"pict-histogram-horizontal",a=e.options.FillContainer?" pict-histogram-fill":"",s=0;if(!o&&e.options.ShowLabels&&!e.options.FillContainer){for(let r=0;r<t.length;r++){let n=6.5*String(t[r][e.options.LabelProperty]||"").length+8;n>s&&(s=n)}s=Math.max(s,40)}let l='<div class="pict-histogram-container '.concat(i).concat(a,'">');l+='<div class="pict-histogram-chart '.concat(i).concat(a,'">');for(let o=0;o<t.length;o++){let i=t[o][e.options.ValueProperty]||0,a=Math.round(i/r*e.options.MaxBarSize);i>0&&a<1&&(a=1);let c=e.isIndexSelected(o),d=!c&&e.isIndexInRange(o);l+=n(t[o],o,a,e.options,c,d,s)}l+="</div>",e.options.FillContainer&&o&&e.options.ShowLabels&&(l+='<div class="pict-histogram-axis-line"></div>',l+=function(e,t){if(!t||0===t.length)return"";let r=e.options.LabelInterval||0;if(r<=0){let n=e.services.ContentAssignment.getElement(e.options.TargetElementAddress),o=800;if(n&&n.length>0&&n[0]&&(o=n[0].clientWidth||800),t.length>0){let e=o/t.length;r=Math.max(1,Math.ceil(80/e))}else r=1}let n='<div class="pict-histogram-label-row">';for(let o=0;o<t.length;o++)if(o%r===0){let i=t[o][e.options.LabelProperty]||"",a=Math.min(r,t.length-o);n+='<div class="pict-histogram-fill-label" style="flex:'.concat(a,';">').concat(i,"</div>"),o+=a-1}return n+="</div>",n}(e,t)),e.options.Selectable&&"range"===e.options.SelectionMode&&(l+=function(e){let t=e.getBins();if(!t||0===t.length)return"";let r=e._selectionRangeStart,n=e._selectionRangeEnd,o=t.length-1,i=o>0?r/o*100:0,a=o>0?n/o*100:100,s='<div class="pict-histogram-range-slider-container">';return s+='<div class="pict-histogram-range-track"></div>',"vertical"===e.options.Orientation?(s+='<div class="pict-histogram-range-fill" style="left:'.concat(i,"%;right:").concat(100-a,'%;"></div>'),s+='<div class="pict-histogram-range-handle pict-histogram-range-handle-start" tabindex="0" style="left:'.concat(i,'%;" data-handle="start"></div>'),s+='<div class="pict-histogram-range-handle pict-histogram-range-handle-end" tabindex="0" style="left:'.concat(a,'%;" data-handle="end"></div>')):(s+='<div class="pict-histogram-range-fill" style="top:'.concat(i,"%;bottom:").concat(100-a,'%;"></div>'),s+='<div class="pict-histogram-range-handle pict-histogram-range-handle-start" tabindex="0" style="top:'.concat(i,'%;" data-handle="start"></div>'),s+='<div class="pict-histogram-range-handle pict-histogram-range-handle-end" tabindex="0" style="top:'.concat(a,'%;" data-handle="end"></div>')),s+="</div>",s}(e)),l+="</div>",e.services.ContentAssignment.assignContent(e.options.TargetElementAddress,l)},wireEvents:function(e){if(!e.options.Selectable)return;let t=e.services.ContentAssignment.getElement(e.options.TargetElementAddress);if(!t||t.length<1)return;let r=t[0];if(r){if("single"===e.options.SelectionMode||"multiple"===e.options.SelectionMode){let t=r.querySelectorAll(".pict-histogram-bar[data-histogram-index]");for(let r=0;r<t.length;r++)t[r].addEventListener("click",t=>{let r=parseInt(t.currentTarget.getAttribute("data-histogram-index"),10);isNaN(r)||e.handleBarClick(r)})}if("range"===e.options.SelectionMode){let t=r.querySelectorAll(".pict-histogram-bar[data-histogram-index]");for(let r=0;r<t.length;r++)t[r].addEventListener("click",t=>{let r=parseInt(t.currentTarget.getAttribute("data-histogram-index"),10);isNaN(r)||e.handleRangeBarClick(r)});let n=r.querySelectorAll(".pict-histogram-range-handle");for(let t=0;t<n.length;t++)o(e,n[t],r)}}}}},{}],154:[function(e,t,r){(function(e){(function(){const r={black:"",red:"",green:"",yellow:"",blue:"",magenta:"",cyan:"",white:"",reset:"",bold:"",dim:""};function n(e){if(!e)return r.blue;let t=e.toLowerCase();if(r[t])return r[t];if("#"===t.charAt(0)&&t.length>=7){let e=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),o=parseInt(t.substring(5,7),16);if(n>e&&n>o)return r.green;if(e>n&&e>o)return r.red;if(o>e&&o>n)return r.blue;if(e>200&&n>200)return r.yellow;if(e>200&&o>200)return r.magenta;if(n>200&&o>200)return r.cyan}return r.blue}function o(e){let t=e.getBins(),o=e.options,i=o.TextHeight||15,s=o.BarCharacter,c=o.BarPartialCharacters,d=n(o.BarColor),h=n(o.SelectedBarColor),p=n(o.SelectionRangeColor),u=r.reset;if(!t||0===t.length)return"(no data)\n";let f=0;for(let e=0;e<t.length;e++){let r=t[e][o.ValueProperty]||0;r>f&&(f=r)}0===f&&(f=1);let m=String(f).length+1,g=[];for(let n=i;n>=1;n--){let l="";n===i?l+=r.dim+a(String(f),m)+"|"+u:1===n?l+=r.dim+a("0",m)+"|"+u:n===Math.ceil(i/2)?l+=r.dim+a(String(Math.round(f/2)),m)+"|"+u:l+=r.dim+a("",m)+"|"+u;for(let r=0;r<t.length;r++){let a=(t[r][o.ValueProperty]||0)/f*i,m=Math.floor(a),g=a-m,y=e.isIndexSelected(r),b=!y&&e.isIndexInRange(r),v=y?h:b?p:d,S=" ";if(n<=m)S=s;else if(n===m+1&&g>0){S=c[Math.round(g*(c.length-1))]}l+=" "!==S?" "+v+S+S+S+u:" "}g.push(l)}let y=r.dim+a("",m)+"+";for(let e=0;e<t.length;e++)y+="----";if(y+=u,g.push(y),o.ShowLabels){let e=a("",m)+" ";for(let r=0;r<t.length;r++){e+=l(String(t[r][o.LabelProperty]||"").substring(0,4),4)}g.push(e)}if(o.Selectable&&"range"===o.SelectionMode){let n=e._selectionRangeStart,i=e._selectionRangeEnd,a=t[n]?t[n][o.LabelProperty]:n,s=t[i]?t[i][o.LabelProperty]:i;g.push(""),g.push(r.bold+" Selection: "+a+" - "+s+u)}return g.join("\n")+"\n"}function i(e){let t=e.getBins(),o=e.options,i=o.TextWidth||60,a=o.BarCharacter,l=n(o.BarColor),c=n(o.SelectedBarColor),d=n(o.SelectionRangeColor),h=r.reset;if(!t||0===t.length)return"(no data)\n";let p=0,u=0;for(let e=0;e<t.length;e++){let r=t[e][o.ValueProperty]||0;r>p&&(p=r);let n=String(t[e][o.LabelProperty]||"");n.length>u&&(u=n.length)}0===p&&(p=1);let f=Math.min(u,12),m=i-f-String(p).length-4;m<10&&(m=10);let g=[];for(let n=0;n<t.length;n++){let i=t[n][o.ValueProperty]||0,u=String(t[n][o.LabelProperty]||""),y=Math.round(i/p*m),b=e.isIndexSelected(n),v=!b&&e.isIndexInRange(n),S=b?c:v?d:l,T="";for(let e=0;e<y;e++)T+=a;let w=r.dim+s(u.substring(0,f),f)+" |"+h;w+=S+T+h,w+=" "+i,b?w+=r.bold+" *"+h:v&&(w+=r.dim+" ~"+h),g.push(w)}if(o.Selectable&&"range"===o.SelectionMode){let n=e._selectionRangeStart,i=e._selectionRangeEnd,a=t[n]?t[n][o.LabelProperty]:n,s=t[i]?t[i][o.LabelProperty]:i;g.push(""),g.push(r.bold+" Selection: "+a+" - "+s+h)}return g.join("\n")+"\n"}function a(e,t){let r=String(e);for(;r.length<t;)r=" "+r;return r}function s(e,t){let r=String(e);for(;r.length<t;)r+=" ";return r}function l(e,t){let r=String(e);for(;r.length<t;)r=r.length%2==0?r+" ":" "+r;return r}t.exports={render:function(t){let r;r="vertical"===t.options.Orientation?o(t):i(t),t.services&&t.services.ContentAssignment?t.services.ContentAssignment.assignContent(t.options.TargetElementAddress,r):void 0!==e&&e.stdout&&e.stdout.write(r)},wireEvents:function(){},renderVertical:o,renderHorizontal:i,colorToAnsi:n,ANSI_COLORS:r}}).call(this)}).call(this,e("_process"))},{_process:287}],155:[function(e,t,r){function n(e){let t=e.getBins(),r=e.options,n=r.TextHeight||15,o=r.BarCharacter,a=r.BarPartialCharacters,l=r.EmptyCharacter;if(!t||0===t.length)return"(no data)";let c=0;for(let e=0;e<t.length;e++){let n=t[e][r.ValueProperty]||0;n>c&&(c=n)}0===c&&(c=1);let d=String(c).length+1,h=[];for(let s=n;s>=1;s--){let p="";s===n?p+=i(String(c),d)+"|":1===s?p+=i("0",d)+"|":s===Math.ceil(n/2)?p+=i(String(Math.round(c/2)),d)+"|":p+=i("",d)+"|";for(let i=0;i<t.length;i++){let d=(t[i][r.ValueProperty]||0)/c*n,h=Math.floor(d),u=d-h,f=l;if(s<=h)f=o;else if(s===h+1&&u>0){f=a[Math.round(u*(a.length-1))]}let m=e.isIndexSelected(i),g=!m&&e.isIndexInRange(i);m&&f!==l?f="*":g&&f!==l&&(f="#"),p+=" "+f+f+f}h.push(p)}let p=i("",d)+"+";for(let e=0;e<t.length;e++)p+="----";if(h.push(p),r.ShowLabels){let e=i("",d)+" ";for(let n=0;n<t.length;n++){e+=s(String(t[n][r.LabelProperty]||"").substring(0,4),4)}h.push(e)}if(r.Selectable&&"range"===r.SelectionMode){let r=i("",d)+" ";for(let n=0;n<t.length;n++)n===e._selectionRangeStart?r+=" [ ":n===e._selectionRangeEnd?r+=" ] ":n>e._selectionRangeStart&&n<e._selectionRangeEnd?r+=" - ":r+=" ";h.push(r)}return h.join("\n")}function o(e){let t=e.getBins(),r=e.options,n=r.TextWidth||60,o=r.BarCharacter,i=r.BarPartialCharacters;if(!t||0===t.length)return"(no data)";let s=0,l=0;for(let e=0;e<t.length;e++){let n=t[e][r.ValueProperty]||0;n>s&&(s=n);let o=String(t[e][r.LabelProperty]||"");o.length>l&&(l=o.length)}0===s&&(s=1);let c=Math.min(l,12),d=n-c-2;d<10&&(d=10);let h=[];for(let n=0;n<t.length;n++){let l=t[n][r.ValueProperty]||0,p=String(t[n][r.LabelProperty]||""),u=l/s*d,f=Math.floor(u),m=u-f,g="";for(let e=0;e<f;e++)g+=o;if(m>0&&f<d){g+=i[Math.round(m*(i.length-1))]}let y=e.isIndexSelected(n),b=!y&&e.isIndexInRange(n),v=y?"*":b?"~":"",S=r.ShowValues?" "+l:"",T=a(p.substring(0,c),c)+" |"+g+S+v;h.push(T)}return r.Selectable&&"range"===r.SelectionMode&&(h.push(""),h.push(a("",c)+" Range: ["+e._selectionRangeStart+" - "+e._selectionRangeEnd+"]")),h.join("\n")}function i(e,t){let r=String(e);for(;r.length<t;)r=" "+r;return r}function a(e,t){let r=String(e);for(;r.length<t;)r+=" ";return r}function s(e,t){let r=String(e);for(;r.length<t;)r=r.length%2==0?r+" ":" "+r;return r}t.exports={render:function(e){let t;t="vertical"===e.options.Orientation?n(e):o(e),e.services.ContentAssignment.assignContent(e.options.TargetElementAddress,t)},wireEvents:function(){},renderVertical:n,renderHorizontal:o}},{}],156:[function(e,t,r){t.exports=class{constructor(e){this._modal=e}confirm(e,t){let r=Object.assign({},this._modal.options.DefaultConfirmOptions,t);return new Promise(t=>{let n=this._buildDialog(r.title,e,t,r);this._showDialog(n,t)})}doubleConfirm(e,t){let r=Object.assign({},this._modal.options.DefaultDoubleConfirmOptions,t);return new Promise(t=>{let n=this._buildDoubleConfirmDialog(r.title,e,t,r);this._showDialog(n,t)})}_buildDialog(e,t,r,n){let o=this._modal._nextId(),i=n.dangerous?"danger":"primary",a=document.createElement("div");a.className="pict-modal-dialog",n.unbounded&&(a.className+=" pict-modal-dialog--unbounded"),a.id="pict-modal-"+o,a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.style.width="420px",a.innerHTML='<div class="pict-modal-dialog-header"><span class="pict-modal-dialog-title">'+this._escapeHTML(e)+'</span><button class="pict-modal-dialog-close" aria-label="Close">&times;</button></div><div class="pict-modal-dialog-body"><p>'+this._escapeHTML(t)+'</p></div><div class="pict-modal-dialog-footer"><button class="pict-modal-btn" data-action="cancel">'+this._escapeHTML(n.cancelLabel)+'</button><button class="pict-modal-btn pict-modal-btn--'+i+'" data-action="confirm">'+this._escapeHTML(n.confirmLabel)+"</button></div>";let s=a.querySelector(".pict-modal-dialog-close"),l=a.querySelector('[data-action="cancel"]'),c=a.querySelector('[data-action="confirm"]'),d=e=>{this._dismissDialog(a,e,r)};return s.addEventListener("click",()=>{d(!1)}),l.addEventListener("click",()=>{d(!1)}),c.addEventListener("click",()=>{d(!0)}),a._dismiss=d,a._focusTarget=l,a}_buildDoubleConfirmDialog(e,t,r,n){let o=this._modal._nextId(),i="string"==typeof n.confirmPhrase&&n.confirmPhrase.length>0,a=document.createElement("div");a.className="pict-modal-dialog",n.unbounded&&(a.className+=" pict-modal-dialog--unbounded"),a.id="pict-modal-"+o,a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.style.width="420px";let s="<p>"+this._escapeHTML(t)+"</p>";if(i){let e=n.phrasePrompt.replace("{phrase}",n.confirmPhrase);s+='<div class="pict-modal-confirm-prompt">'+this._escapeHTML(e)+'</div><input type="text" class="pict-modal-confirm-input" autocomplete="off" spellcheck="false" />'}a.innerHTML='<div class="pict-modal-dialog-header"><span class="pict-modal-dialog-title">'+this._escapeHTML(e)+'</span><button class="pict-modal-dialog-close" aria-label="Close">&times;</button></div><div class="pict-modal-dialog-body">'+s+'</div><div class="pict-modal-dialog-footer"><button class="pict-modal-btn" data-action="cancel">'+this._escapeHTML(n.cancelLabel)+'</button><button class="pict-modal-btn pict-modal-btn--danger" data-action="confirm" disabled>'+this._escapeHTML(n.confirmLabel)+"</button></div>";let l=a.querySelector(".pict-modal-dialog-close"),c=a.querySelector('[data-action="cancel"]'),d=a.querySelector('[data-action="confirm"]'),h=e=>{this._dismissDialog(a,e,r)};if(l.addEventListener("click",()=>{h(!1)}),c.addEventListener("click",()=>{h(!1)}),i){let e=a.querySelector(".pict-modal-confirm-input");e.addEventListener("input",()=>{d.disabled=e.value!==n.confirmPhrase}),d.addEventListener("click",()=>{d.disabled||h(!0)}),a._focusTarget=e}else{let e=0;n.confirmLabel;d.disabled=!1,d.addEventListener("click",()=>{e++,1===e?d.textContent="Click again to confirm":h(!0)}),a._focusTarget=c}return a._dismiss=h,a}_showDialog(e,t){let r={element:e,dismiss:e._dismiss,type:"confirm"},n=null;this._modal.options.OverlayClickDismisses&&(n=()=>{e._dismiss(!1)}),this._modal._overlay.show(n),document.body.appendChild(e),this._modal._activeModals.push(r),e.offsetHeight,e.classList.add("pict-modal-visible"),e._focusTarget&&e._focusTarget.focus(),e._keyHandler=t=>{"Escape"===t.key&&e._dismiss(!1)},document.addEventListener("keydown",e._keyHandler)}_dismissDialog(e,t,r){if(!e._dismissed){if(e._dismissed=!0,e._keyHandler&&document.removeEventListener("keydown",e._keyHandler),e.classList.remove("pict-modal-visible"),this._modal._activeModals=this._modal._activeModals.filter(t=>t.element!==e),this._modal._activeModals.length>0){let e=this._modal._activeModals[this._modal._activeModals.length-1];this._modal._overlay.updateClickHandler(this._modal.options.OverlayClickDismisses?e.dismiss:null)}this._modal._overlay.hide(),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},220),r(t)}}_escapeHTML(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],157:[function(e,t,r){t.exports=class{constructor(e){this._modal=e,this._activeMenu=null}dropdown(e,t){let r=Object.assign({align:"left",position:"auto",maxHeight:"60vh",closeOnSelect:!0},t||{}),n=this._resolveAnchor(e),o=this._anchorRect(e,n);if(!o)return Promise.resolve(null);if(this._activeMenu&&this._activeMenu.anchor===n)return this._activeMenu.promise;this.dismissAll();let i,a=Array.isArray(r.items)?r.items:[],s=new Promise(e=>{i=e}),l=this._buildMenu(a,r);document.body.appendChild(l),this._positionMenu(l,o,r),l.offsetHeight,l.classList.add("pict-modal-visible");let c=e=>{l._dismissed||(l._dismissed=!0,document.removeEventListener("mousedown",h,!0),document.removeEventListener("keydown",p,!0),window.removeEventListener("resize",u),window.removeEventListener("scroll",u,!0),l.classList.remove("pict-modal-visible"),setTimeout(()=>{l.parentNode&&l.parentNode.removeChild(l)},180),this._activeMenu&&this._activeMenu.element===l&&(this._activeMenu=null),"function"==typeof r.onClose&&r.onClose(e),i(e))},d=l.querySelectorAll("[data-pict-modal-dropdown-item]");for(let e=0;e<d.length;e++){let t=d[e];t.addEventListener("click",e=>{if(t.hasAttribute("data-disabled"))return;e.stopPropagation();let n=parseInt(t.getAttribute("data-index"),10),o=a[n],i=t.getAttribute("data-hash");"function"==typeof r.onSelect&&r.onSelect(i,o),!1!==r.closeOnSelect&&c({Hash:i,Item:o})})}let h=e=>{l.contains(e.target)||n&&n.contains&&n.contains(e.target)||c(null)};document.addEventListener("mousedown",h,!0);let p=e=>{if("Escape"===e.key)return e.stopPropagation(),void c(null);if("ArrowDown"===e.key||"ArrowUp"===e.key)e.preventDefault(),this._focusNeighbor(l,"ArrowDown"===e.key?1:-1);else if("Enter"===e.key||" "===e.key){let t=document.activeElement;t&&l.contains(t)&&t.hasAttribute("data-pict-modal-dropdown-item")&&(e.preventDefault(),t.click())}};document.addEventListener("keydown",p,!0);let u=()=>{let t=this._anchorRect(e,n);t&&this._positionMenu(l,t,r)};return window.addEventListener("resize",u),window.addEventListener("scroll",u,!0),setTimeout(()=>{this._focusFirstEnabled(l)},0),this._activeMenu={element:l,anchor:n,promise:s,dismiss:c},s}dismissAll(){if(this._activeMenu){let e=this._activeMenu.dismiss;this._activeMenu=null,e(null)}}_resolveAnchor(e){return e?"string"==typeof e?document.querySelector(e):1===e.nodeType?e:null:null}_anchorRect(e,t){return t&&"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():e&&"object"==typeof e&&"number"==typeof e.left&&"number"==typeof e.top?{left:e.left,top:e.top,width:e.width||0,height:e.height||0,right:e.left+(e.width||0),bottom:e.top+(e.height||0)}:null}_buildMenu(e,t){let r=this._modal._nextId(),n=document.createElement("div");n.className="pict-modal-dropdown",t.className&&(n.className+=" "+t.className),n.id="pict-modal-dropdown-"+r,n.setAttribute("role","menu"),n.style.maxHeight=t.maxHeight;let o="";for(let t=0;t<e.length;t++){let r=e[t];if(r.Separator){o+='<div class="pict-modal-dropdown-separator" role="separator"></div>';continue}if(r.Header){o+='<div class="pict-modal-dropdown-header">'+this._escapeHTML(r.Header)+"</div>";continue}let n="pict-modal-dropdown-item";r.Style&&(n+=" pict-modal-dropdown-item--"+r.Style),r.Disabled&&(n+=" pict-modal-dropdown-item--disabled");let i=' data-pict-modal-dropdown-item data-index="'+t+'" data-hash="'+this._escapeHTML(r.Hash||"")+'" role="menuitem" tabindex="-1"';r.Disabled&&(i+=' aria-disabled="true" data-disabled'),r.Tooltip&&(i+=' title="'+this._escapeHTML(r.Tooltip)+'"');let a=r.Icon?'<span class="pict-modal-dropdown-item-icon">'+r.Icon+"</span>":"",s=r.Hint?'<span class="pict-modal-dropdown-item-hint">'+this._escapeHTML(r.Hint)+"</span>":"";o+='<div class="'+n+'"'+i+">"+a+'<span class="pict-modal-dropdown-item-label">'+this._escapeHTML(r.Label||"")+"</span>"+s+"</div>"}return n.innerHTML=o,n}_positionMenu(e,t,r){let n=r.minWidth||(t.width>=80?Math.ceil(t.width)+"px":"160px");e.style.minWidth=n;let o,i=e.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth,s=(window.innerHeight||document.documentElement.clientHeight)-t.bottom-4,l=t.top-4;o="above"===r.position||"below"!==r.position&&(i.height>s&&l>s);let c,d,h=Math.max(80,(o?l:s)-8);e.style.maxHeight=h+"px",c="right"===r.align?t.right-i.width:"center"===r.align?t.left+(t.width-i.width)/2:t.left,c=Math.min(c,a-i.width-4),c=Math.max(4,c),o?(d=Math.max(4,t.top-i.height-4),e.classList.add("pict-modal-dropdown--above")):(d=t.bottom+4,e.classList.remove("pict-modal-dropdown--above")),e.style.left=Math.round(c)+"px",e.style.top=Math.round(d)+"px"}_focusFirstEnabled(e){let t=e.querySelectorAll("[data-pict-modal-dropdown-item]:not([data-disabled])");t.length&&t[0].focus()}_focusNeighbor(e,t){let r=Array.prototype.slice.call(e.querySelectorAll("[data-pict-modal-dropdown-item]:not([data-disabled])"));if(!r.length)return;let n=document.activeElement,o=r.indexOf(n);r[-1===o?t>0?0:r.length-1:(o+t+r.length)%r.length].focus()}_escapeHTML(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],158:[function(e,t,r){t.exports=class{constructor(e){this._modal=e,this._element=null,this._refCount=0}show(e){this._refCount++,this._element||(this._element=document.createElement("div"),this._element.className="pict-modal-overlay",document.body.appendChild(this._element),this._element.offsetHeight,this._element.classList.add("pict-modal-visible")),e&&(this._currentClickHandler=e,this._element.onclick=e=>{e.target===this._element&&this._currentClickHandler&&this._currentClickHandler()})}updateClickHandler(e){this._currentClickHandler=e||null}hide(){if(this._refCount--,this._refCount<=0&&(this._refCount=0,this._element)){this._element.classList.remove("pict-modal-visible");let e=this._element;setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},220),this._element=null,this._currentClickHandler=null}}destroy(){this._refCount=0,this._element&&this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null,this._currentClickHandler=null}}},{}],159:[function(e,t,r){t.exports=class{constructor(e){this._modal=e,this._panels=[]}create(e,t){let r=this._modal&&this._modal.options&&this._modal.options.DefaultPanelOptions||{},n=Object.assign({},{position:"right",width:340,minWidth:200,maxWidth:600,collapsible:!0,collapsed:!1,persist:!1,persistKey:"",onResize:null,onToggle:null},r,t);if("undefined"==typeof document)return this._nullHandle();let o=document.querySelector(e);if(!o)return this._nullHandle();let i=this._modal._nextId(),a="right"===n.position,s=!1,l=n.width,c=!1;if(n.persist&&n.persistKey)try{let e=localStorage.getItem("pict-panel-"+n.persistKey);if(e){let t=JSON.parse(e);"number"==typeof t.width&&(l=t.width),"boolean"==typeof t.collapsed&&(n.collapsed=t.collapsed)}}catch(e){}o.classList.add("pict-panel"),o.classList.add(a?"pict-panel-right":"pict-panel-left"),o.style.width=l+"px","none"===o.style.display&&(o.style.display="");let d=document.createElement("div");d.className="pict-panel-edge "+(a?"pict-panel-edge-right":"pict-panel-edge-left");let h=document.createElement("div");h.className="pict-panel-resize",d.appendChild(h);let p=null;n.collapsible&&(p=document.createElement("div"),p.className="pict-panel-tab",p.title="Toggle panel",d.appendChild(p)),o.parentNode?a?o.parentNode.insertBefore(d,o):o.parentNode.insertBefore(d,o.nextSibling):o.insertBefore(d,o.firstChild);let u="undefined"!=typeof window&&window.pict?window.pict:null,f=e=>u&&"function"==typeof u.icon?u.icon(e):"",m=()=>{if(!p)return;let e=f("ChevronRight"),t=f("ChevronLeft");p.innerHTML=a?s?t:e:s?e:t},g=()=>{if(n.persist&&n.persistKey)try{localStorage.setItem("pict-panel-"+n.persistKey,JSON.stringify({width:l,collapsed:s}))}catch(e){}},y=()=>{s||c||(s=!0,o.classList.add("pict-panel-collapsed"),d.classList.add("pict-panel-edge-collapsed"),m(),g(),"function"==typeof n.onToggle&&n.onToggle(!0))},b=()=>{s&&!c&&(s=!1,d.classList.remove("pict-panel-edge-collapsed"),o.classList.remove("pict-panel-collapsed"),o.style.width=l+"px",m(),g(),"function"==typeof n.onToggle&&n.onToggle(!1))},v=()=>{s?b():y()};p&&p.addEventListener("click",e=>{e.stopPropagation(),v()});let S=e=>{if(s)return;e.preventDefault();let t=e.clientX,r=o.offsetWidth;h.classList.add("dragging"),o.style.transition="none",document.body.style.userSelect="none",document.body.style.cursor="col-resize";let i=e=>{let i=a?t-e.clientX:e.clientX-t,s=Math.max(n.minWidth,Math.min(n.maxWidth,r+i));o.style.width=s+"px"},c=e=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),h.classList.remove("dragging"),o.style.transition="",document.body.style.userSelect="",document.body.style.cursor="",l=o.offsetWidth,g(),"function"==typeof n.onResize&&n.onResize(l)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",c)};h.addEventListener("mousedown",S),m(),n.collapsed&&(s=!0,o.classList.add("pict-panel-collapsed"),d.classList.add("pict-panel-edge-collapsed"),m());let T={id:i,collapse:y,expand:b,toggle:v,setWidth:e=>{if(c)return;let t=Math.max(n.minWidth,Math.min(n.maxWidth,e));l=t,s||(o.style.width=t+"px"),g(),"function"==typeof n.onResize&&n.onResize(t)},destroy:()=>{if(c)return;c=!0,h.removeEventListener("mousedown",S),d.parentNode&&d.remove(),o.classList.remove("pict-panel","pict-panel-right","pict-panel-left","pict-panel-collapsed"),o.style.width="",o.style.transition="";let e=this._panels.indexOf(T);e>=0&&this._panels.splice(e,1)}};return this._panels.push(T),T}_nullHandle(){return{id:0,collapse:()=>{},expand:()=>{},toggle:()=>{},setWidth:()=>{},destroy:()=>{}}}destroyAll(){let e=this._panels.slice();for(let t=0;t<e.length;t++)e[t].destroy()}}},{}],160:[function(e,t,r){const n="pict-modal-shell:";class o{constructor(e,t,r){_defineProperty2(this,"_onDragMove",e=>{if(!this._activeDrag)return;let t=this._activeDrag,r=(("x"===t.Axis?e.clientX:e.clientY)-t.StartCoord)*t.Direction;if(t.PendingSize=t.StartSize+r,!t.RAFId){let e=this;t.RAFId="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){e._flushDrag()}):setTimeout(function(){e._flushDrag()},16)}}),_defineProperty2(this,"_onDragEnd",()=>{if(!this._activeDrag)return;let e=this._activeDrag;null!==e.PendingSize&&this._flushDrag(),e.RAFId&&"undefined"!=typeof window&&window.cancelAnimationFrame&&window.cancelAnimationFrame(e.RAFId),document.body.classList.remove("pict-modal-shell-dragging-x"),document.body.classList.remove("pict-modal-shell-dragging-y"),e.Panel.El.classList.remove("pict-modal-shell-panel-resizing"),document.removeEventListener("pointermove",this._onDragMove),document.removeEventListener("pointerup",this._onDragEnd),e.Panel._persist(),this._activeDrag=null}),this._modal=e,this._viewport=t,this._options=r||{},this._panels=[],this._panelsByHash={},this._centerDestinationEl=null,this._idCounter=0,this._activeDrag=null,this._persistenceEnabled=!1!==this._options.Persistence,this._persistenceKey=this._persistenceEnabled?this._resolvePersistenceKey(this._options.PersistenceKey):null,this._buildSkeleton()}addPanel(e){let t=new i(this,e||{});return this._panels.push(t),this._panelsByHash[t.Hash]=t,this._mountPanel(t),t._renderContentView(),t}getPanel(e){return this._panelsByHash[e]||null}getPanels(){return this._panels.slice()}openPanel(e){let t=this._panelsByHash[e];return t&&t.popup(),t||null}center(e){if((e=e||{}).ContentDestinationId){this._centerDestinationEl&&this._centerDestinationEl.parentNode===this._centerEl&&this._centerEl.removeChild(this._centerDestinationEl);let t=document.createElement("div");t.id=e.ContentDestinationId,t.className="pict-modal-shell-center-content";let r=null,n=this._centerEl.children;for(let e=0;e<n.length;e++){let t=n[e];if(t.classList&&t.classList.contains("pict-modal-shell-panel-bottom")){r=t;break}}r?this._centerEl.insertBefore(t,r):this._centerEl.appendChild(t),this._centerDestinationEl=t}return this._centerEl}getCenterEl(){return this._centerEl}destroy(){for(let e=0;e<this._panels.length;e++)this._panels[e].destroy(!0);this._panels=[],this._panelsByHash={},this._wrapperEl&&this._wrapperEl.parentNode&&this._wrapperEl.parentNode.removeChild(this._wrapperEl),this._detachDragHandlers()}_resolvePersistenceKey(e){if("string"==typeof e&&e.length>0)return n+e;try{if("undefined"!=typeof window&&window.location&&window.location.hostname)return n+window.location.hostname}catch(e){}return n+"default"}_loadState(){if(!this._persistenceKey)return null;try{let e="undefined"!=typeof window?window.localStorage:null;if(!e)return null;let t=e.getItem(this._persistenceKey);if(!t)return null;let r=JSON.parse(t);return r&&1===r.Version?r.Panels&&"object"==typeof r.Panels?r.Panels:{}:null}catch(e){return null}}_loadPanelState(e){let t=this._loadState();return t&&t[e]||null}_savePanelState(e,t){if(this._persistenceKey)try{let r="undefined"!=typeof window?window.localStorage:null;if(!r)return;let n=this._loadState()||{};n[e]=t,r.setItem(this._persistenceKey,JSON.stringify({Version:1,Panels:n,SavedAt:(new Date).toISOString()}))}catch(e){}}_buildSkeleton(){this._viewport.innerHTML="",this._viewport.classList.add("pict-modal-shell-host"),this._wrapperEl=document.createElement("div"),this._wrapperEl.className="pict-modal-shell",this._topRow=document.createElement("div"),this._topRow.className="pict-modal-shell-row pict-modal-shell-row-top",this._wrapperEl.appendChild(this._topRow),this._middleRow=document.createElement("div"),this._middleRow.className="pict-modal-shell-row pict-modal-shell-row-middle",this._wrapperEl.appendChild(this._middleRow),this._leftStack=document.createElement("div"),this._leftStack.className="pict-modal-shell-side pict-modal-shell-side-left",this._middleRow.appendChild(this._leftStack),this._centerEl=document.createElement("div"),this._centerEl.className="pict-modal-shell-center",this._middleRow.appendChild(this._centerEl),this._rightStack=document.createElement("div"),this._rightStack.className="pict-modal-shell-side pict-modal-shell-side-right",this._middleRow.appendChild(this._rightStack),this._bottomRow=document.createElement("div"),this._bottomRow.className="pict-modal-shell-row pict-modal-shell-row-bottom",this._wrapperEl.appendChild(this._bottomRow),this._overlayLayer=document.createElement("div"),this._overlayLayer.className="pict-modal-shell-overlay-layer",this._middleRow.appendChild(this._overlayLayer),this._viewport.appendChild(this._wrapperEl)}_mountPanel(e){if("overlay"===e.Position)return void this._overlayLayer.appendChild(e.El);if("center"===e.Scope)return this._centerEl.classList.add("pict-modal-shell-center-with-inner-panel"),void("top"===e.Side?this._centerEl.insertBefore(e.El,this._centerEl.firstChild):this._centerEl.appendChild(e.El));let t;t="top"===e.Side?this._topRow:"bottom"===e.Side?this._bottomRow:"left"===e.Side?this._leftStack:"right"===e.Side?this._rightStack:this._wrapperEl,t.appendChild(e.El)}_attachDragStart(e,t){t.preventDefault();let r="top"===e.Side||"bottom"===e.Side?"y":"x";this._activeDrag={Panel:e,Axis:r,StartCoord:"x"===r?t.clientX:t.clientY,StartSize:e.Size,Direction:"left"===e.Side||"top"===e.Side?1:-1,PendingSize:null,RAFId:0},document.body.classList.add("x"===r?"pict-modal-shell-dragging-x":"pict-modal-shell-dragging-y"),e.El.classList.add("pict-modal-shell-panel-resizing");try{t.target.setPointerCapture&&t.target.setPointerCapture(t.pointerId)}catch(e){}document.addEventListener("pointermove",this._onDragMove),document.addEventListener("pointerup",this._onDragEnd)}_flushDrag(){let e=this._activeDrag;e&&(e.RAFId=0,null!==e.PendingSize&&(e.Panel.setSize(e.PendingSize),e.PendingSize=null))}_detachDragHandlers(){document.removeEventListener("pointermove",this._onDragMove),document.removeEventListener("pointerup",this._onDragEnd)}}class i{constructor(e,t){this._shell=e,this._config=t,this.Hash=t.Hash||"panel-"+ ++e._idCounter,this.Side="right"===t.Side||"bottom"===t.Side||"left"===t.Side?t.Side:"top",this.Mode="collapsible"===t.Mode||"resizable"===t.Mode?t.Mode:"fixed",this.Position="overlay"===t.Position?"overlay":"pinned",this.Scope="center"!==t.Scope||"top"!==this.Side&&"bottom"!==this.Side?"shell":"center",this.Title=t.Title||"",this.Icon=t.Icon||"",this.MinSize="number"==typeof t.MinSize?t.MinSize:40,this.MaxSize="number"==typeof t.MaxSize?t.MaxSize:1200,this.Hidden=!!t.Hidden,this.CollapsedSize="number"==typeof t.CollapsedSize?t.CollapsedSize:this.Hidden?0:24,this.PersistEnabled=e._persistenceEnabled&&!1!==t.Persist;let r="left"===this.Side||"right"===this.Side?240:60;if(this.Size="number"==typeof t.Size?t.Size:r,this.Collapsed=!!t.Collapsed,this.PersistEnabled){let t=e._loadPanelState(this.Hash);t&&("number"==typeof t.Size&&(this.Size=t.Size),"boolean"==typeof t.Collapsed&&(this.Collapsed=t.Collapsed))}this._clampSize(),this._buildEl(t),this._applySize(),this._applyCollapsedClass(),this.ResponsiveDrawer="number"==typeof t.ResponsiveDrawer&&t.ResponsiveDrawer>0?t.ResponsiveDrawer:0,this.DrawerHeight="string"==typeof t.DrawerHeight&&t.DrawerHeight?t.DrawerHeight:"33vh",this._mediaQuery=null,this._mediaQueryHandler=null,this.ResponsiveDrawer>0&&this._wireResponsiveDrawer()}getContentEl(){return this._contentEl}getContentView(){if(!this._config.ContentView)return null;let e=this._shell._modal&&this._shell._modal.pict;return e&&e.views&&e.views[this._config.ContentView]||null}collapse(){this._setCollapsed(!0)}expand(){this._setCollapsed(!1)}toggle(){this._setCollapsed(!this.Collapsed)}popup(){this.Collapsed?this._setCollapsed(!1):(this._renderContentView(),this._flash())}setSize(e){"number"==typeof e&&isFinite(e)&&(this.Size=e,this._clampSize(),this._applySize())}destroy(e){if(this._unwireResponsiveDrawer(),this.El&&this.El.parentNode&&this.El.parentNode.removeChild(this.El),!e){let e=this._shell._panels.indexOf(this);e>=0&&this._shell._panels.splice(e,1),delete this._shell._panelsByHash[this.Hash]}}_clampSize(){this.Size<this.MinSize&&(this.Size=this.MinSize),this.Size>this.MaxSize&&(this.Size=this.MaxSize)}_wireResponsiveDrawer(){if("undefined"==typeof window||!window.matchMedia)return;this._mediaQuery=window.matchMedia("(max-width: "+this.ResponsiveDrawer+"px)"),this.El&&this.El.style.setProperty("--pict-modal-drawer-height",this.DrawerHeight);let e=this;this._mediaQueryHandler=function(t){let r=t&&"boolean"==typeof t.matches?t.matches:e._mediaQuery.matches;e._setDrawerMode(r)},this._mediaQuery.addEventListener?this._mediaQuery.addEventListener("change",this._mediaQueryHandler):this._mediaQuery.addListener&&this._mediaQuery.addListener(this._mediaQueryHandler),this._mediaQueryHandler({matches:this._mediaQuery.matches}),this._resizeHandler=function(){e._setDrawerMode(e._mediaQuery.matches)},window.addEventListener("resize",this._resizeHandler)}_unwireResponsiveDrawer(){this._resizeHandler&&"undefined"!=typeof window&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._mediaQuery&&this._mediaQueryHandler&&(this._mediaQuery.removeEventListener?this._mediaQuery.removeEventListener("change",this._mediaQueryHandler):this._mediaQuery.removeListener&&this._mediaQuery.removeListener(this._mediaQueryHandler),this._mediaQuery=null,this._mediaQueryHandler=null)}_setDrawerMode(e){if(!this._shell||!this._shell._middleRow)return;if(!(!this.El||!this.El.classList.contains("pict-modal-shell-panel-drawer"))!==!!e){if(e)this._shell._middleRow.classList.add("pict-modal-shell-drawer-active"),this.El&&this.El.classList.add("pict-modal-shell-panel-drawer");else{let e=!1,t=this._shell._panels||[];for(let r=0;r<t.length;r++){let n=t[r];if(n!==this&&n._mediaQuery&&n._mediaQuery.matches&&n.ResponsiveDrawer>0){e=!0;break}}e||this._shell._middleRow.classList.remove("pict-modal-shell-drawer-active"),this.El&&this.El.classList.remove("pict-modal-shell-panel-drawer")}this._applySize()}}_buildEl(e){let t=document.createElement("div");t.className="pict-modal-shell-panel pict-modal-shell-panel-"+this.Side+" pict-modal-shell-panel-mode-"+this.Mode+("overlay"===this.Position?" pict-modal-shell-panel-overlay":"")+(this.Hidden?" pict-modal-shell-panel-hidden":""),t.setAttribute("data-shell-panel-hash",this.Hash),t.setAttribute("data-shell-panel-side",this.Side),t.setAttribute("data-shell-panel-mode",this.Mode);let r=document.createElement("div");if(r.className="pict-modal-shell-panel-content",this._contentEl=document.createElement("div"),e.ContentDestinationId&&(this._contentEl.id=e.ContentDestinationId),this._contentEl.className="pict-modal-shell-panel-content-inner",r.appendChild(this._contentEl),t.appendChild(r),("collapsible"===this.Mode||"resizable"===this.Mode)&&!this.Hidden){this._collapseTab=document.createElement("button"),this._collapseTab.type="button",this._collapseTab.className="pict-modal-shell-panel-collapse-tab",this._collapseTab.setAttribute("aria-label",this.Title?"Toggle "+this.Title:"Toggle panel"),this._collapseTab.title=this.Title||"Toggle",this._collapseTab.innerHTML=(this.Icon?'<span class="pict-modal-shell-panel-collapse-tab-icon">'+this.Icon+"</span>":"")+(this.Title?'<span class="pict-modal-shell-panel-collapse-tab-title">'+this._escape(this.Title)+"</span>":"");let e=this;this._collapseTab.addEventListener("click",function(){e.toggle()}),t.appendChild(this._collapseTab)}if("resizable"===this.Mode){this._resizeHandle=document.createElement("div"),this._resizeHandle.className="pict-modal-shell-panel-resize-handle",this._resizeHandle.setAttribute("aria-hidden","true");let e=this;this._resizeHandle.addEventListener("pointerdown",function(t){e.Collapsed||e._shell._attachDragStart(e,t)}),t.appendChild(this._resizeHandle)}this.El=t}_applySize(){let e=this.Collapsed?this.CollapsedSize:this.Size;"left"===this.Side||"right"===this.Side?(this.El.style.width=e+"px",this.El.style.height=""):(this.El.style.height=e+"px",this.El.style.width="")}_applyCollapsedClass(){this.Collapsed?this.El.classList.add("pict-modal-shell-panel-collapsed"):this.El.classList.remove("pict-modal-shell-panel-collapsed")}_setCollapsed(e){if(this.Collapsed===!!e)return;let t=this.Collapsed;this.Collapsed=!!e,this._applyCollapsedClass(),this._applySize(),this._persist(),t&&!this.Collapsed?(this._renderContentView(),this._fireHook("OnExpand")):!t&&this.Collapsed&&this._fireHook("OnCollapse"),this._fireHook("OnToggle",this.Collapsed)}_fireHook(e,t){let r=this._config[e];if("function"==typeof r)try{void 0!==t?r(t,this):r(this)}catch(e){}}_renderContentView(){let e=this.getContentView();if(e&&"function"==typeof e.render)try{e.render()}catch(e){}}_flash(){if(!this.El)return;this.El.classList.add("pict-modal-shell-panel-flash");let e=this;clearTimeout(this._flashTimer),this._flashTimer=setTimeout(function(){e.El&&e.El.classList.remove("pict-modal-shell-panel-flash")},700)}_persist(){this.PersistEnabled&&this._shell._savePanelState(this.Hash,{Collapsed:this.Collapsed,Size:this.Size})}_escape(e){return String(e||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}}t.exports=class{constructor(e){this._modal=e,this._shellsByViewport=new WeakMap}shell(e,t){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error("Pict-Modal-Shell.shell: viewport not found for "+e);let n=this._shellsByViewport.get(r);if(n)return n;let i=new o(this._modal,r,t);return this._shellsByViewport.set(r,i),i}},t.exports.PictModalShell=o,t.exports.ShellPanel=i,t.exports.STORAGE_PREFIX=n,t.exports.SCHEMA_VERSION=1},{}],161:[function(e,t,r){t.exports=class{constructor(e){this._modal=e,this._containers={}}toast(e,t){let r=Object.assign({},this._modal.options.DefaultToastOptions,t),n=this._getContainer(r.position),o=this._modal._nextId(),i=document.createElement("div");i.className="pict-modal-toast pict-modal-toast--"+r.type,i.id="pict-modal-toast-"+o;let a='<span class="pict-modal-toast-message">'+this._escapeHTML(e)+"</span>";r.dismissible&&(a+='<button class="pict-modal-toast-dismiss" aria-label="Dismiss">&times;</button>'),i.innerHTML=a;let s=!1,l=null,c=()=>{s||(s=!0,l&&clearTimeout(l),i.classList.remove("pict-modal-visible"),i.classList.add("pict-modal-toast-exit"),this._modal._activeToasts=this._modal._activeToasts.filter(e=>e.element!==i),setTimeout(()=>{i.parentNode&&i.parentNode.removeChild(i),this._cleanupContainer(r.position)},220))},d={dismiss:c};if(r.dismissible){let e=i.querySelector(".pict-modal-toast-dismiss");e&&e.addEventListener("click",c)}n.appendChild(i);let h={element:i,dismiss:c,handle:d};return this._modal._activeToasts.push(h),i.offsetHeight,i.classList.add("pict-modal-visible"),r.duration>0&&(l=setTimeout(c,r.duration)),d}_getContainer(e){if(this._containers[e])return this._containers[e];let t=document.createElement("div");return t.className="pict-modal-toast-container pict-modal-toast-container--"+e,document.body.appendChild(t),this._containers[e]=t,t}_cleanupContainer(e){let t=this._containers[e];t&&0===t.children.length&&(t.parentNode&&t.parentNode.removeChild(t),delete this._containers[e])}dismissAll(){let e=this._modal._activeToasts.slice();for(let t=0;t<e.length;t++)e[t].dismiss()}destroy(){this.dismissAll();let e=Object.keys(this._containers);for(let t=0;t<e.length;t++){let r=this._containers[e[t]];r&&r.parentNode&&r.parentNode.removeChild(r)}this._containers={}}_escapeHTML(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],162:[function(e,t,r){t.exports=class{constructor(e){this._modal=e}tooltip(e,t,r){let n=Object.assign({},this._modal.options.DefaultTooltipOptions,r);return this._attachTooltip(e,t,!1,n)}richTooltip(e,t,r){let n=Object.assign({},this._modal.options.DefaultTooltipOptions,r);return this._attachTooltip(e,t,!0,n)}_attachTooltip(e,t,r,n){let o=null,i=null,a=null,s=!1,l=this._modal._nextId(),c=()=>{if(s||o)return;o=document.createElement("div"),o.className="pict-modal-tooltip pict-modal-tooltip--"+n.position,o.id="pict-modal-tooltip-"+l,o.setAttribute("role","tooltip"),o.style.maxWidth=n.maxWidth,n.interactive&&o.classList.add("pict-modal-tooltip-interactive");let i=document.createElement("div");i.className="pict-modal-tooltip-arrow";let c=document.createElement("div");r?c.innerHTML=t:c.textContent=t,o.appendChild(i),o.appendChild(c),document.body.appendChild(o),e.setAttribute("aria-describedby",o.id),this._positionTooltip(o,e,n.position),o.offsetHeight,o.classList.add("pict-modal-visible"),this._modal._activeTooltips.push({element:o,targetElement:e,destroy:m}),n.interactive&&o&&(o.addEventListener("mouseenter",()=>{a&&(clearTimeout(a),a=null)}),o.addEventListener("mouseleave",()=>{d()}))},d=()=>{if(!o)return;o.classList.remove("pict-modal-visible");let t=o;o=null,e.removeAttribute("aria-describedby"),this._modal._activeTooltips=this._modal._activeTooltips.filter(e=>e.element!==t),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},220)},h=()=>{a&&(clearTimeout(a),a=null),i=setTimeout(c,n.delay)},p=()=>{i&&(clearTimeout(i),i=null),n.interactive?a=setTimeout(d,100):d()},u=()=>{i=setTimeout(c,n.delay)},f=()=>{i&&(clearTimeout(i),i=null),d()};e.addEventListener("mouseenter",h),e.addEventListener("mouseleave",p),e.addEventListener("focusin",u),e.addEventListener("focusout",f);let m=()=>{s||(s=!0,i&&clearTimeout(i),a&&clearTimeout(a),d(),e.removeEventListener("mouseenter",h),e.removeEventListener("mouseleave",p),e.removeEventListener("focusin",u),e.removeEventListener("focusout",f))};return{destroy:m}}_positionTooltip(e,t,r){let n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=r;"top"===i&&n.top<o.height+8?i="bottom":"bottom"===i&&window.innerHeight-n.bottom<o.height+8?i="top":"left"===i&&n.left<o.width+8?i="right":"right"===i&&window.innerWidth-n.right<o.width+8&&(i="left"),e.className=e.className.replace(/pict-modal-tooltip--\w+/,"pict-modal-tooltip--"+i);let a=0,s=0;switch(i){case"top":a=n.top-o.height-8,s=n.left+n.width/2-o.width/2;break;case"bottom":a=n.bottom+8,s=n.left+n.width/2-o.width/2;break;case"left":a=n.top+n.height/2-o.height/2,s=n.left-o.width-8;break;case"right":a=n.top+n.height/2-o.height/2,s=n.right+8}s=Math.max(4,Math.min(s,window.innerWidth-o.width-4)),a=Math.max(4,Math.min(a,window.innerHeight-o.height-4)),e.style.top=a+"px",e.style.left=s+"px"}dismissAll(){let e=this._modal._activeTooltips.slice();for(let t=0;t<e.length;t++)e[t].destroy()}}},{}],163:[function(e,t,r){t.exports=class{constructor(e){this._modal=e}show(e){let t=Object.assign({},this._modal.options.DefaultModalOptions,e);return new Promise(e=>{let r=this._buildDialog(t,e);this._showDialog(r,t,e)})}_buildDialog(e,t){let r=this._modal._nextId(),n=document.createElement("div");n.className="pict-modal-dialog",e.unbounded&&(n.className+=" pict-modal-dialog--unbounded"),n.id="pict-modal-"+r,n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.style.width=e.width;let o="";(e.title||e.closeable)&&(o='<div class="pict-modal-dialog-header">',o+='<span class="pict-modal-dialog-title">'+this._escapeHTML(e.title)+"</span>",e.closeable&&(o+='<button class="pict-modal-dialog-close" aria-label="Close">&times;</button>'),o+="</div>");let i='<div class="pict-modal-dialog-body">'+(e.content||"")+"</div>",a="";if(e.buttons&&e.buttons.length>0){a='<div class="pict-modal-dialog-footer">';for(let t=0;t<e.buttons.length;t++){let r=e.buttons[t],n="pict-modal-btn";r.Style&&(n+=" pict-modal-btn--"+r.Style),a+='<button class="'+n+'" data-hash="'+this._escapeHTML(r.Hash)+'">'+this._escapeHTML(r.Label)+"</button>"}a+="</div>"}n.innerHTML=o+i+a;let s=r=>{this._dismissDialog(n,r,t,e)};if(e.closeable){let e=n.querySelector(".pict-modal-dialog-close");e&&e.addEventListener("click",()=>{s(null)})}let l=n.querySelectorAll("[data-hash]");for(let e=0;e<l.length;e++){let t=l[e];t.addEventListener("click",()=>{s(t.getAttribute("data-hash"))})}return n._dismiss=s,n}_showDialog(e,t,r){let n={element:e,dismiss:e._dismiss,type:"window"},o=null;this._modal.options.OverlayClickDismisses&&t.closeable&&(o=()=>{e._dismiss(null)}),this._modal._overlay.show(o),document.body.appendChild(e),this._modal._activeModals.push(n),e.offsetHeight,e.classList.add("pict-modal-visible");let i=e.querySelector(".pict-modal-btn")||e.querySelector(".pict-modal-dialog-close");i&&i.focus(),e._keyHandler=r=>{"Escape"===r.key&&t.closeable&&e._dismiss(null)},document.addEventListener("keydown",e._keyHandler),"function"==typeof t.onOpen&&t.onOpen(e)}_dismissDialog(e,t,r,n){if(!e._dismissed){if(e._dismissed=!0,e._keyHandler&&document.removeEventListener("keydown",e._keyHandler),e.classList.remove("pict-modal-visible"),this._modal._activeModals=this._modal._activeModals.filter(t=>t.element!==e),this._modal._activeModals.length>0){let e=this._modal._activeModals[this._modal._activeModals.length-1];this._modal._overlay.updateClickHandler(this._modal.options.OverlayClickDismisses?e.dismiss:null)}this._modal._overlay.hide(),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},220),"function"==typeof n.onClose&&n.onClose(t),r(t)}}_escapeHTML(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],164:[function(e,t,r){t.exports={AutoInitialize:!0,AutoRender:!1,AutoSolveWithApp:!1,ViewIdentifier:"Pict-Section-Modal",OverlayClickDismisses:!0,DefaultConfirmOptions:{title:"Confirm",confirmLabel:"OK",cancelLabel:"Cancel",dangerous:!1,unbounded:!1},DefaultDoubleConfirmOptions:{title:"Are you sure?",confirmLabel:"Confirm",cancelLabel:"Cancel",phrasePrompt:'Type "{phrase}" to confirm:',confirmPhrase:"",unbounded:!1},DefaultModalOptions:{title:"",content:"",buttons:[],closeable:!0,width:"480px",unbounded:!1},DefaultTooltipOptions:{position:"top",delay:200,maxWidth:"300px",interactive:!1},DefaultToastOptions:{type:"info",duration:3e3,position:"top-right",dismissible:!0},DefaultPanelOptions:{position:"right",width:340,minWidth:200,maxWidth:600,collapsible:!0,collapsed:!1,persist:!1,persistKey:""},Templates:[],Renderables:[],CSS:"\n/* pict-section-modal */\n.pict-modal-root\n{\n\t/* Defaults are routed through pict-provider-theme tokens so apps\n\t using the theme provider get themed modals automatically. Each\n\t var() carries its original hex as the fallback so apps that don't\n\t install pict-provider-theme look exactly as before. Apps may\n\t still override any --pict-modal-* var directly to layer over the\n\t theme-driven defaults. */\n\n\t/* Overlay */\n\t--pict-modal-overlay-bg: rgba(0, 0, 0, 0.5);\n\n\t/* Dialog */\n\t--pict-modal-bg: var(--theme-color-background-panel, #ffffff);\n\t--pict-modal-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-border: var(--theme-color-border-default, #e0e0e0);\n\t--pict-modal-border-radius: 8px;\n\t--pict-modal-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);\n\t--pict-modal-header-bg: var(--theme-color-background-secondary, #f5f5f5);\n\t--pict-modal-header-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-header-border: var(--theme-color-border-default, #e0e0e0);\n\n\t/* Buttons */\n\t--pict-modal-btn-bg: var(--theme-color-background-secondary, #e0e0e0);\n\t--pict-modal-btn-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-btn-hover-bg: var(--theme-color-background-hover, #d0d0d0);\n\t--pict-modal-btn-primary-bg: var(--theme-color-brand-primary, #2563eb);\n\t--pict-modal-btn-primary-fg: var(--theme-color-text-on-brand, #ffffff);\n\t--pict-modal-btn-primary-hover-bg:var(--theme-color-brand-primary-hover,#1d4ed8);\n\t--pict-modal-btn-danger-bg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-btn-danger-fg: var(--theme-color-text-on-brand, #ffffff);\n\t--pict-modal-btn-danger-hover-bg: var(--theme-color-status-error, #b91c1c);\n\t--pict-modal-btn-border-radius: 4px;\n\n\t/* Toast */\n\t--pict-modal-toast-bg: var(--theme-color-background-panel, #333333);\n\t--pict-modal-toast-fg: var(--theme-color-text-primary, #ffffff);\n\t--pict-modal-toast-success-bg: var(--theme-color-status-success, #16a34a);\n\t--pict-modal-toast-warning-bg: var(--theme-color-status-warning, #d97706);\n\t--pict-modal-toast-error-bg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-toast-info-bg: var(--theme-color-status-info, #2563eb);\n\t--pict-modal-toast-border-radius: 6px;\n\t--pict-modal-toast-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n\n\t/* Tooltip */\n\t--pict-modal-tooltip-bg: var(--theme-color-background-tertiary,#1a1a1a);\n\t--pict-modal-tooltip-fg: var(--theme-color-text-primary, #ffffff);\n\t--pict-modal-tooltip-border-radius:4px;\n\t--pict-modal-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n\n\t/* Dropdown */\n\t--pict-modal-dropdown-bg: var(--theme-color-background-panel, #ffffff);\n\t--pict-modal-dropdown-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-dropdown-border: var(--theme-color-border-default, #e0e0e0);\n\t--pict-modal-dropdown-border-radius: 6px;\n\t--pict-modal-dropdown-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);\n\t--pict-modal-dropdown-item-hover-bg: var(--theme-color-background-hover, rgba(37, 99, 235, 0.10));\n\t--pict-modal-dropdown-item-hover-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-dropdown-item-disabled-fg: var(--theme-color-text-muted, #9aa0a6);\n\t--pict-modal-dropdown-separator: var(--theme-color-border-light, #e8e8e8);\n\t--pict-modal-dropdown-header-fg: var(--theme-color-text-secondary, #6b7280);\n\t--pict-modal-dropdown-danger-fg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-dropdown-primary-fg: var(--theme-color-brand-primary, #2563eb);\n\n\t/* Typography */\n\t--pict-modal-font-family: var(--theme-typography-family-sans, system-ui, -apple-system, sans-serif);\n\t--pict-modal-font-size: 14px;\n\t--pict-modal-title-font-size: 16px;\n\n\t/* Animation */\n\t--pict-modal-transition-duration: 200ms;\n}\n\n/* Overlay */\n.pict-modal-overlay\n{\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 1000;\n\tbackground: var(--pict-modal-overlay-bg);\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-overlay.pict-modal-visible\n{\n\topacity: 1;\n}\n\n/* Dialog */\n.pict-modal-dialog\n{\n\tposition: fixed;\n\tz-index: 1010;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%) translateY(-20px);\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n\n\tmax-width: 90vw;\n\tmax-height: 90vh;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tbackground: var(--pict-modal-bg);\n\tcolor: var(--pict-modal-fg);\n\tborder: 1px solid var(--pict-modal-border);\n\tborder-radius: var(--pict-modal-border-radius);\n\tbox-shadow: var(--pict-modal-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n}\n\n.pict-modal-dialog.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translate(-50%, -50%) translateY(0);\n}\n\n/* Unbounded modifier — lets callers opt out of the 90vh/90vw viewport cap.\n Use with caution: content taller than the viewport will push buttons\n below the fold. */\n.pict-modal-dialog.pict-modal-dialog--unbounded\n{\n\tmax-height: none;\n\tmax-width: none;\n}\n\n.pict-modal-dialog-header\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: 12px 16px;\n\tbackground: var(--pict-modal-header-bg);\n\tcolor: var(--pict-modal-header-fg);\n\tborder-bottom: 1px solid var(--pict-modal-header-border);\n\tborder-radius: var(--pict-modal-border-radius) var(--pict-modal-border-radius) 0 0;\n}\n\n.pict-modal-dialog-title\n{\n\tfont-size: var(--pict-modal-title-font-size);\n\tfont-weight: 600;\n}\n\n.pict-modal-dialog-close\n{\n\tbackground: none;\n\tborder: none;\n\tfont-size: 20px;\n\tcursor: pointer;\n\tcolor: var(--pict-modal-fg);\n\tpadding: 0 4px;\n\tline-height: 1;\n\topacity: 0.6;\n}\n\n.pict-modal-dialog-close:hover\n{\n\topacity: 1;\n}\n\n.pict-modal-dialog-body\n{\n\tpadding: 16px;\n\toverflow-y: auto;\n\tflex: 1;\n}\n\n.pict-modal-dialog-footer\n{\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tpadding: 12px 16px;\n\tborder-top: 1px solid var(--pict-modal-border);\n}\n\n/* Buttons */\n.pict-modal-btn\n{\n\tpadding: 8px 16px;\n\tborder: none;\n\tborder-radius: var(--pict-modal-btn-border-radius);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tcursor: pointer;\n\tbackground: var(--pict-modal-btn-bg);\n\tcolor: var(--pict-modal-btn-fg);\n\ttransition: background var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-btn:hover\n{\n\tbackground: var(--pict-modal-btn-hover-bg);\n}\n\n.pict-modal-btn:disabled\n{\n\topacity: 0.5;\n\tcursor: not-allowed;\n}\n\n.pict-modal-btn--primary\n{\n\tbackground: var(--pict-modal-btn-primary-bg);\n\tcolor: var(--pict-modal-btn-primary-fg);\n}\n\n.pict-modal-btn--primary:hover\n{\n\tbackground: var(--pict-modal-btn-primary-hover-bg);\n}\n\n.pict-modal-btn--danger\n{\n\tbackground: var(--pict-modal-btn-danger-bg);\n\tcolor: var(--pict-modal-btn-danger-fg);\n}\n\n.pict-modal-btn--danger:hover\n{\n\tbackground: var(--pict-modal-btn-danger-hover-bg);\n}\n\n/* Double confirm input */\n.pict-modal-confirm-input\n{\n\twidth: 100%;\n\tpadding: 8px 12px;\n\tmargin-top: 12px;\n\tborder: 1px solid var(--pict-modal-border);\n\tborder-radius: var(--pict-modal-btn-border-radius);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tbox-sizing: border-box;\n}\n\n.pict-modal-confirm-input:focus\n{\n\toutline: 2px solid var(--pict-modal-btn-primary-bg);\n\toutline-offset: -1px;\n}\n\n.pict-modal-confirm-prompt\n{\n\tmargin-top: 12px;\n\tfont-size: 13px;\n\tcolor: var(--pict-modal-fg);\n\topacity: 0.7;\n}\n\n/* Toast container */\n.pict-modal-toast-container\n{\n\tposition: fixed;\n\tz-index: 1030;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tpointer-events: none;\n\tmax-width: 400px;\n}\n\n.pict-modal-toast-container--top-right\n{\n\ttop: 16px;\n\tright: 16px;\n}\n\n.pict-modal-toast-container--top-left\n{\n\ttop: 16px;\n\tleft: 16px;\n}\n\n.pict-modal-toast-container--bottom-right\n{\n\tbottom: 16px;\n\tright: 16px;\n}\n\n.pict-modal-toast-container--bottom-left\n{\n\tbottom: 16px;\n\tleft: 16px;\n}\n\n.pict-modal-toast-container--top-center\n{\n\ttop: 16px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n.pict-modal-toast-container--bottom-center\n{\n\tbottom: 16px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n/* Toast */\n.pict-modal-toast\n{\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tpadding: 12px 16px;\n\tborder-radius: var(--pict-modal-toast-border-radius);\n\tbox-shadow: var(--pict-modal-toast-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tbackground: var(--pict-modal-toast-bg);\n\tcolor: var(--pict-modal-toast-fg);\n\tpointer-events: auto;\n\topacity: 0;\n\ttransform: translateX(100%);\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-toast.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translateX(0);\n}\n\n.pict-modal-toast.pict-modal-toast-exit\n{\n\topacity: 0;\n\ttransform: translateX(100%);\n}\n\n.pict-modal-toast--info\n{\n\tbackground: var(--pict-modal-toast-info-bg);\n}\n\n.pict-modal-toast--success\n{\n\tbackground: var(--pict-modal-toast-success-bg);\n}\n\n.pict-modal-toast--warning\n{\n\tbackground: var(--pict-modal-toast-warning-bg);\n}\n\n.pict-modal-toast--error\n{\n\tbackground: var(--pict-modal-toast-error-bg);\n}\n\n.pict-modal-toast-message\n{\n\tflex: 1;\n}\n\n.pict-modal-toast-dismiss\n{\n\tbackground: none;\n\tborder: none;\n\tcolor: inherit;\n\tfont-size: 18px;\n\tcursor: pointer;\n\tpadding: 0 2px;\n\tline-height: 1;\n\topacity: 0.7;\n}\n\n.pict-modal-toast-dismiss:hover\n{\n\topacity: 1;\n}\n\n/* Tooltip */\n.pict-modal-tooltip\n{\n\tposition: fixed;\n\tz-index: 1020;\n\tpadding: 6px 10px;\n\tborder-radius: var(--pict-modal-tooltip-border-radius);\n\tbox-shadow: var(--pict-modal-tooltip-shadow);\n\tbackground: var(--pict-modal-tooltip-bg);\n\tcolor: var(--pict-modal-tooltip-fg);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: 13px;\n\tpointer-events: none;\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease;\n\twhite-space: normal;\n\tword-wrap: break-word;\n}\n\n.pict-modal-tooltip.pict-modal-tooltip-interactive\n{\n\tpointer-events: auto;\n}\n\n.pict-modal-tooltip.pict-modal-visible\n{\n\topacity: 1;\n}\n\n.pict-modal-tooltip-arrow\n{\n\tposition: absolute;\n\twidth: 8px;\n\theight: 8px;\n\tbackground: var(--pict-modal-tooltip-bg);\n\ttransform: rotate(45deg);\n}\n\n.pict-modal-tooltip--top .pict-modal-tooltip-arrow\n{\n\tbottom: -4px;\n\tleft: 50%;\n\tmargin-left: -4px;\n}\n\n.pict-modal-tooltip--bottom .pict-modal-tooltip-arrow\n{\n\ttop: -4px;\n\tleft: 50%;\n\tmargin-left: -4px;\n}\n\n.pict-modal-tooltip--left .pict-modal-tooltip-arrow\n{\n\tright: -4px;\n\ttop: 50%;\n\tmargin-top: -4px;\n}\n\n.pict-modal-tooltip--right .pict-modal-tooltip-arrow\n{\n\tleft: -4px;\n\ttop: 50%;\n\tmargin-top: -4px;\n}\n\n/* ── Dropdown ─────────────────────────────────────────────────────────\n Anchor-positioned menu (no overlay). Used for nav menus and\n \"split button\" addenda — see Pict-Modal-Dropdown.js.\n*/\n.pict-modal-dropdown\n{\n\tposition: fixed;\n\tz-index: 1025;\n\tmin-width: 160px;\n\tmax-width: 360px;\n\tmax-height: 60vh;\n\toverflow-y: auto;\n\tbackground: var(--pict-modal-dropdown-bg);\n\tcolor: var(--pict-modal-dropdown-fg);\n\tborder: 1px solid var(--pict-modal-dropdown-border);\n\tborder-radius: var(--pict-modal-dropdown-border-radius);\n\tbox-shadow: var(--pict-modal-dropdown-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tpadding: 4px 0;\n\topacity: 0;\n\ttransform: translateY(-4px);\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-dropdown.pict-modal-dropdown--above { transform: translateY(4px); }\n\n.pict-modal-dropdown.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translateY(0);\n}\n\n.pict-modal-dropdown-item\n{\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 7px 14px;\n\tcursor: pointer;\n\tuser-select: none;\n\tcolor: inherit;\n\toutline: none;\n}\n\n.pict-modal-dropdown-item:hover,\n.pict-modal-dropdown-item:focus\n{\n\tbackground: var(--pict-modal-dropdown-item-hover-bg);\n\tcolor: var(--pict-modal-dropdown-item-hover-fg);\n}\n\n.pict-modal-dropdown-item--disabled\n{\n\tcursor: not-allowed;\n\tcolor: var(--pict-modal-dropdown-item-disabled-fg);\n}\n\n.pict-modal-dropdown-item--disabled:hover,\n.pict-modal-dropdown-item--disabled:focus\n{\n\tbackground: transparent;\n\tcolor: var(--pict-modal-dropdown-item-disabled-fg);\n}\n\n.pict-modal-dropdown-item--primary { color: var(--pict-modal-dropdown-primary-fg); }\n.pict-modal-dropdown-item--danger { color: var(--pict-modal-dropdown-danger-fg); }\n\n.pict-modal-dropdown-item-icon\n{\n\tflex: 0 0 auto;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.pict-modal-dropdown-item-icon svg { width: 100%; height: 100%; display: block; }\n\n.pict-modal-dropdown-item-label { flex: 1 1 auto; min-width: 0; }\n\n.pict-modal-dropdown-item-hint\n{\n\tflex: 0 0 auto;\n\tfont-size: 11px;\n\topacity: 0.6;\n\tmargin-left: 12px;\n}\n\n.pict-modal-dropdown-separator\n{\n\theight: 1px;\n\tbackground: var(--pict-modal-dropdown-separator);\n\tmargin: 4px 0;\n}\n\n.pict-modal-dropdown-header\n{\n\tpadding: 6px 14px 2px;\n\tfont-size: 11px;\n\tfont-weight: 600;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.04em;\n\tcolor: var(--pict-modal-dropdown-header-fg);\n}\n\n/* ── Resizable / Collapsible Panels ──────────────── */\n.pict-panel\n{\n\tposition: relative;\n\ttransition: width 0.2s ease;\n\tflex-shrink: 0;\n\toverflow: visible;\n}\n.pict-panel-collapsed\n{\n\twidth: 0 !important;\n\tmin-width: 0 !important;\n\toverflow: visible;\n}\n.pict-panel-collapsed > *:not(.pict-panel-edge)\n{\n\tdisplay: none;\n}\n\n/* Edge container — zero-width flex sibling of the panel.\n Sits next to the panel in the flex layout; children\n use absolute positioning to overlap the panel boundary. */\n.pict-panel-edge\n{\n\tposition: relative;\n\twidth: 0;\n\tflex-shrink: 0;\n\tz-index: 50;\n\toverflow: visible;\n}\n\n/* Resize handle — thin strip on the panel boundary */\n.pict-panel-resize\n{\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\twidth: 4px;\n\tcursor: col-resize;\n\tbackground: transparent;\n\ttransition: background 0.15s, width 0.15s;\n}\n.pict-panel-edge-right .pict-panel-resize\n{\n\tright: 0;\n\tborder-right: 1px solid var(--pict-panel-border, #DDD6CA);\n}\n.pict-panel-edge-left .pict-panel-resize\n{\n\tleft: 0;\n\tborder-left: 1px solid var(--pict-panel-border, #DDD6CA);\n}\n.pict-panel-resize:hover,\n.pict-panel-edge:hover .pict-panel-resize\n{\n\twidth: 5px;\n\tbackground: var(--pict-panel-accent, #2E7D74);\n\topacity: 0.5;\n}\n.pict-panel-resize.dragging\n{\n\twidth: 5px;\n\tbackground: var(--pict-panel-accent, #2E7D74);\n\topacity: 1;\n\ttransition: none;\n}\n.pict-panel-edge-collapsed .pict-panel-resize\n{\n\tdisplay: none;\n}\n\n/* Collapse tab — tucked sliver at rest, slides out on hover */\n.pict-panel-tab\n{\n\tposition: absolute;\n\ttop: 8px;\n\twidth: 8px;\n\theight: 24px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\toverflow: hidden;\n\tbackground: var(--pict-panel-border, #DDD6CA);\n\tborder: 1px solid var(--pict-panel-border, #DDD6CA);\n\tcursor: pointer;\n\tcolor: var(--pict-panel-fg, #8A7F72);\n\tfont-size: 10px;\n\tline-height: 1;\n\topacity: 0.5;\n\ttransition: opacity 0.25s, width 0.2s ease, height 0.2s ease, left 0.2s ease, right 0.2s ease, background 0.2s;\n\tz-index: 51;\n}\n.pict-panel-edge:hover .pict-panel-tab,\n.pict-panel-tab:hover\n{\n\twidth: 20px;\n\theight: 32px;\n\topacity: 1;\n\toverflow: visible;\n\tbackground: var(--pict-panel-bg, #FAF8F4);\n}\n/* Right panel: tab to the left of the edge */\n.pict-panel-edge-right .pict-panel-tab\n{\n\tright: 0;\n\tborder-right: none;\n\tborder-radius: 4px 0 0 4px;\n}\n.pict-panel-edge-right:hover .pict-panel-tab,\n.pict-panel-edge-right .pict-panel-tab:hover\n{\n\tright: 0;\n}\n/* Left panel: tab to the right of the edge */\n.pict-panel-edge-left .pict-panel-tab\n{\n\tleft: 0;\n\tborder-left: none;\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-panel-edge-left:hover .pict-panel-tab,\n.pict-panel-edge-left .pict-panel-tab:hover\n{\n\tleft: 0;\n}\n/* When collapsed — more visible */\n.pict-panel-edge-collapsed .pict-panel-tab\n{\n\twidth: 10px;\n\theight: 28px;\n\topacity: 0.6;\n}\n.pict-panel-edge-collapsed .pict-panel-tab:hover,\n.pict-panel-edge-collapsed:hover .pict-panel-tab\n{\n\twidth: 20px;\n\theight: 32px;\n\topacity: 1;\n\toverflow: visible;\n\tbackground: var(--pict-panel-bg, #FAF8F4);\n}\n\n/* ───────────────────────────────────────────────────────────────────\n * Pict-Modal-Shell — viewport-managing layout for top / right /\n * bottom / left panels around a center.\n * ───────────────────────────────────────────────────────────────── */\n\n.pict-modal-shell-host { display: block; height: 100%; min-height: 0; }\n.pict-modal-shell\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\tmin-height: 0;\n\tposition: relative;\n\tcolor: var(--pict-modal-fg, var(--theme-color-text-primary, #1a1a1a));\n\tbackground: var(--theme-color-background-primary, transparent);\n}\n.pict-modal-shell-row { display: flex; min-width: 0; min-height: 0; }\n/* \"First added = at the edge\" convention is held by reversing the\n flex-direction on the bottom row + right side. That way, for ALL\n four sides, calling addPanel() N times stacks panel #1 against\n the viewport edge, panel #2 just inside it, panel #3 further in,\n and so on. Without these reverses, top + left worked that way but\n bottom + right inverted (first-added at content side, last-added\n at edge), which surprised callers. */\n.pict-modal-shell-row-top { flex: 0 0 auto; flex-direction: column; }\n.pict-modal-shell-row-bottom { flex: 0 0 auto; flex-direction: column-reverse; }\n.pict-modal-shell-row-middle\n{\n\tflex: 1 1 0;\n\tflex-direction: row;\n\tmin-height: 0;\n\tposition: relative;\n}\n.pict-modal-shell-side\n{\n\tdisplay: flex;\n\tflex: 0 0 auto;\n\tmin-height: 0;\n}\n.pict-modal-shell-side-left { flex-direction: row; }\n.pict-modal-shell-side-right { flex-direction: row-reverse; }\n.pict-modal-shell-center\n{\n\tflex: 1 1 0;\n\tmin-width: 0;\n\tmin-height: 0;\n\toverflow: auto;\n\tposition: relative;\n}\n.pict-modal-shell-center-content\n{\n\tmin-height: 100%;\n}\n/* Center column gains this class when at least one Scope:'center'\n panel is added. The center stops scrolling internally — that job\n moves to the content destination — and switches to a vertical flex\n so the destination and any inner panels stack cleanly. */\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\toverflow: hidden;\n}\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel > .pict-modal-shell-center-content\n{\n\tflex: 1 1 0;\n\tmin-height: 0;\n\toverflow: auto;\n}\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel > .pict-modal-shell-panel\n{\n\tflex: 0 0 auto;\n\twidth: 100%;\n}\n\n/* Panels — base */\n.pict-modal-shell-panel\n{\n\t/* How far the collapse-tab's panel-bg \"merge bar\" extends INTO\n\t the panel past the tab's geometric edge. Painted via box-shadow\n\t on the tab (no DOM impact), it masks any 1px theme border on an\n\t inner element, content padding offset, or resize-handle hover\n\t bleed in the strip between the tab's panel-facing edge and the\n\t first real pixel of panel content. Consumers can bump this for\n\t themes with thicker (2+px) inner borders. */\n\t--pict-modal-collapse-tab-merge: 2px;\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tbox-sizing: border-box;\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n\tcolor: inherit;\n\tmin-width: 0;\n\tmin-height: 0;\n\ttransition: width 140ms ease, height 140ms ease;\n}\n.pict-modal-shell-panel-content\n{\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\tmin-height: 0;\n\toverflow: auto;\n}\n.pict-modal-shell-panel-content-inner\n{\n\tmin-height: 100%;\n}\n/* Panel boundary — fixed-mode panels get a hairline border for explicit\n demarcation. Collapsible / resizable panels DROP the boundary border\n (background contrast separates them from the center anyway) so the\n collapse tab can pull out cleanly without a hairline cutting across\n it. The host stylesheet still gets full control via the panel's own\n background. */\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-top { border-bottom: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-bottom { border-top: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-left { border-right: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-right { border-left: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n\n/* Resize handle — absolute on the inner edge of each panel. */\n.pict-modal-shell-panel-resize-handle\n{\n\tposition: absolute;\n\tbackground: transparent;\n\tz-index: 5;\n\ttransition: background-color 120ms ease;\n}\n/* Resize handle hover — use the active brand's mode-aware primary\n color (set by pict-section-theme's Brand provider as\n --brand-color-primary-mode) so the resize affordance picks up the\n app's wordmark color. Falls back to the theme's brand-primary\n token if no brand is registered. */\n.pict-modal-shell-panel-resize-handle:hover\n{\n\tbackground: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\topacity: 0.4;\n}\n.pict-modal-shell-panel-left .pict-modal-shell-panel-resize-handle { right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; }\n.pict-modal-shell-panel-right .pict-modal-shell-panel-resize-handle { left: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; }\n.pict-modal-shell-panel-top .pict-modal-shell-panel-resize-handle { bottom:-3px; left: 0; right: 0; height: 6px; cursor: row-resize; }\n.pict-modal-shell-panel-bottom .pict-modal-shell-panel-resize-handle { top: -3px; left: 0; right: 0; height: 6px; cursor: row-resize; }\n\n/* Collapse tab — slim sliver flush on the panel's OUTER boundary\n (where the resize handle sits), modelled on retold-content-system's\n sidebar tab. At rest it's a 6×28 px sliver; hover expands to\n 18×36 px without overlapping the panel's own content. The tab is\n positioned with its center on the boundary so half pokes into the\n adjacent area — the only place we can safely take over without\n stepping on app UI inside the panel. Title text only renders in the\n collapsed state where there's room for it. */\n.pict-modal-shell-panel-collapse-tab\n{\n\tposition: absolute;\n\tdisplay: flex; /* not inline-flex — avoids baseline alignment quirks */\n\talign-items: center;\n\tjustify-content: center;\n\toverflow: hidden;\n\tborder: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #d0d7de));\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n\tcolor: var(--theme-color-text-muted, #6b7280);\n\tfont: inherit;\n\tfont-size: 10px;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcursor: pointer;\n\tz-index: 50;\n\topacity: 0.55;\n\tpadding: 0;\n\tbox-sizing: border-box;\n\tline-height: 0; /* keep child boxes from inflating around the rotated chevron */\n\t/* Geometry (width/height/right/left) is intentionally NOT animated.\n\t Sliding the tab's outer edge inward on hover-out makes it look like\n\t the tab is \"sliding into\" the panel content — weird visual.\n\t Snapping the size change instead, and animating only the appearance\n\t (opacity/color/shadow), gives a clean fade-in/out with no boundary\n\t weirdness. */\n\ttransition: opacity 160ms ease,\n\t background-color 160ms ease, color 160ms ease,\n\t border-color 160ms ease, box-shadow 160ms ease;\n}\n/* Hover state pulls accent color from the active brand (mode-aware,\n so it's legible in both light + dark) with theme brand-primary as\n fallback. The whole point of brand colors is that they show up\n across the app's chrome. */\n.pict-modal-shell-panel-collapse-tab:hover,\n.pict-modal-shell-panel:hover > .pict-modal-shell-panel-collapse-tab\n{\n\topacity: 1;\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n/* Drop shadow casts AWAY from the panel so the tab feels pulled out\n (extension of the panel) rather than floating across the boundary.\n The first shadow value is the merge-bar (panel-bg colored, offset\n INTO the panel) which has to be repeated here so the hover override\n doesn't drop it. */\n.pict-modal-shell-panel-left:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\tcalc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t3px 0 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-right:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\tvar(--pict-modal-collapse-tab-merge) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t-3px 0 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-top:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\t0 calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t0 3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\t0 var(--pict-modal-collapse-tab-merge) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t0 -3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n\n/* Side panels: slim VERTICAL sliver pulled OUT of the panel's outer\n boundary like a drawer tab. The geometric inner edge sits 1px\n INSIDE the panel boundary, and the merge-bar box-shadow paints\n another --pict-modal-collapse-tab-merge px of panel-bg color past\n it INTO the panel — together they mask any 1px theme border on an\n inner element, content padding offset, or resize-handle hover bleed\n that would otherwise leak between the tab and the panel content.\n The tab grows OUTWARD only on hover; the inner edge stays put so\n the tab always looks like an extension of the panel rather than a\n floating button. Border-left is removed for left panels (and\n border-right for right panels) so the panel-facing edge is open. */\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab\n{\n\tright: -5px; top: 14px; width: 6px; height: 28px;\n\tborder-radius: 0 4px 4px 0;\n\tborder-left: 0;\n\tbox-shadow: calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab\n{\n\tleft: -5px; top: 14px; width: 6px; height: 28px;\n\tborder-radius: 4px 0 0 4px;\n\tborder-right: 0;\n\tbox-shadow: var(--pict-modal-collapse-tab-merge) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n/* Hover: same inner anchor (panelRight - 1), tab grows outward to\n width 18 → right: -17px. Top + height grow downward only (top\n stays, height extends so the tab visually 'drops' the chevron\n into view). */\n.pict-modal-shell-panel-left:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 18px; height: 36px; right: -17px;\n}\n.pict-modal-shell-panel-right:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 18px; height: 36px; left: -17px;\n}\n\n/* Top / bottom panels: slim HORIZONTAL sliver pulled OUT of the\n horizontal boundary, anchored 14 px in from the right. Same\n inner-edge-anchored + merge-bar pattern as the side panels — the\n merge-bar offsets vertically instead of horizontally. */\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab\n{\n\tbottom: -5px; right: 14px; width: 28px; height: 6px;\n\tborder-radius: 0 0 4px 4px;\n\tborder-top: 0;\n\tbox-shadow: 0 calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab\n{\n\ttop: -5px; right: 14px; width: 28px; height: 6px;\n\tborder-radius: 4px 4px 0 0;\n\tborder-bottom: 0;\n\tbox-shadow: 0 var(--pict-modal-collapse-tab-merge) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-top:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 36px; height: 18px; bottom: -17px;\n}\n.pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 36px; height: 18px; top: -17px;\n}\n\n.pict-modal-shell-panel-collapse-tab-title { display: none; white-space: nowrap; }\n\n/* Auto-generated chevron glyph inside the tab — only visible once the\n tab is wide / tall enough to show it (i.e. hover state, or when the\n panel is collapsed). Direction follows side + state.\n Sized 5×5 (down from 6) so even with rotation the visual stays\n well clear of the tab's overflow:hidden bounds at 18×36 hover and\n the 24px collapsed tab strip width. flex-shrink:0 ensures the\n pseudo never collapses to zero in tight tab dimensions. */\n.pict-modal-shell-panel-collapse-tab::before\n{\n\tcontent: '';\n\tdisplay: block;\n\twidth: 5px; height: 5px;\n\tflex-shrink: 0;\n\topacity: 0;\n\tborder-right: 1.5px solid currentColor;\n\tborder-bottom: 1.5px solid currentColor;\n\ttransform: rotate(135deg);\n\ttransform-origin: center center;\n\ttransition: opacity 160ms ease, transform 160ms ease;\n}\n.pict-modal-shell-panel:hover > .pict-modal-shell-panel-collapse-tab::before,\n.pict-modal-shell-panel-collapse-tab:hover::before,\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before\n{\n\topacity: 1;\n}\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-45deg); }\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-135deg); }\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(45deg); }\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-45deg); }\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(135deg); }\n.pict-modal-shell-panel-top.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(45deg); }\n.pict-modal-shell-panel-bottom.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-135deg); }\n\n/* Collapsed state — content disappears, only the collapse tab remains. */\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-content\n{\n\tdisplay: none;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-resize-handle\n{\n\tdisplay: none;\n}\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed\n{\n\t/* When collapsed, side panels rotate the title for vertical reading. */\n\toverflow: hidden;\n}\n/* When collapsed: the entire panel becomes the tab strip — full width\n for sides, full height for top/bottom — with the title visible\n vertically (sides) or horizontally (top/bottom). The little sliver\n tab on the boundary disappears (we don't need it anymore — clicking\n anywhere on the panel toggles it back open). */\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-top.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-bottom.pict-modal-shell-panel-collapsed\n{\n\toverflow: hidden;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\t/* Promote the tab to FILL the collapsed panel (not just hug its\n\t content) so the centered chevron + title group sits in the middle\n\t of the panel. Without explicit width/height: 100%, the position:\n\t absolute element shrinks to its natural content size and the\n\t group ends up flush at the top of the panel — where the chevron\n\t gets clipped by the topbar. */\n\tposition: absolute !important;\n\ttop: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;\n\twidth: 100% !important;\n\theight: 100% !important;\n\tborder: 0;\n\tborder-radius: 0;\n\tbackground: transparent;\n\topacity: 0.85;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\tpadding: 12px 4px; /* keeps chevron + title clear of edges */\n\tbox-shadow: none;\n\tcolor: var(--theme-color-text-muted, #6b7280);\n\tbox-sizing: border-box;\n\toverflow: hidden;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbackground: var(--theme-color-background-hover, var(--pict-modal-bg, #fff));\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbox-shadow: none;\n}\n/* Side panels (collapsed): rotate the title for vertical reading. */\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\twriting-mode: vertical-rl;\n\ttext-orientation: mixed;\n}\n.pict-modal-shell-panel-collapsed .pict-modal-shell-panel-collapse-tab-title\n{\n\tdisplay: inline;\n}\n\n/* Hidden panels — when Hidden:true is passed to addPanel, the collapsed\n state has zero footprint: no collapse tab (the tab is never built),\n the panel root is display:none, and the resize handle vanishes. The\n only path to the open state is a programmatic expand()/toggle() from\n somewhere else in the app (e.g. a topbar gear button). When expanded,\n the panel renders normally — so resize/drag handles continue to work\n while the panel is open. */\n.pict-modal-shell-panel-hidden.pict-modal-shell-panel-collapsed\n{\n\tdisplay: none !important;\n}\n\n/* Overlay panels — float over the middle row instead of taking layout\n space. The overlay layer is positioned absolutely inside the middle\n row; individual overlay panels stack with positive z-index. */\n.pict-modal-shell-overlay-layer\n{\n\tposition: absolute;\n\tinset: 0;\n\tpointer-events: none;\n\tz-index: 10;\n}\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel\n{\n\tpointer-events: auto;\n\tposition: absolute;\n\tbox-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-left { left: 0; top: 0; bottom: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-right { right: 0; top: 0; bottom: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-top { top: 0; left: 0; right: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-bottom { bottom: 0; left: 0; right: 0; }\n\n/* ─────────────────────────────────────────────────────────────────\n Responsive drawer mode — .pict-modal-shell-drawer-active toggles\n onto the middle row when any panel with ResponsiveDrawer crosses\n below its breakpoint. Flips the row's flex-direction from row to\n column, stacking side panels above the center and stretching them\n to full width. Each opted-in panel itself gets the\n .pict-modal-shell-panel-drawer class so per-panel rules below\n target only the drawer-mode panels (right + non-drawer panels in\n the same row are unaffected). The drawer height is read from a\n per-panel --pict-modal-drawer-height CSS variable (default\n 33vh, set in JS from the DrawerHeight option).\n ───────────────────────────────────────────────────────────────── */\n.pict-modal-shell-row-middle.pict-modal-shell-drawer-active\n{\n\tflex-direction: column;\n\t/* The drawer tab lives outside the drawer's bottom edge — ancestor\n\t chain MUST allow it to escape clip. */\n\toverflow: visible;\n}\n.pict-modal-shell-row-middle.pict-modal-shell-drawer-active .pict-modal-shell-side\n{\n\t/* Side stacks stretch full-width and lay out their panels as a\n\t horizontal row of stacked drawers (so two drawers from the same\n\t side don't end up overlapping). overflow: visible so the\n\t per-panel tab can extend below the side stack into the workspace. */\n\twidth: 100% !important;\n\tflex-direction: column;\n\toverflow: visible;\n}\n/* The drawer-tagged panel itself: kill the inline width set by\n _applySize (we override with !important since the inline style has\n higher specificity than a class selector), then size by height\n from the CSS variable. Resize handle is hidden in drawer mode\n because horizontal dragging doesn't translate to vertical sizing\n and the user already has the collapse tab to dismiss / restore.\n\n padding-bottom reserves an 18px strip at the bottom of the panel\n for the tab. The tab sits INSIDE the drawer's footprint — never\n below it — so the workspace header below the drawer is never in\n the same vertical band as the tab. (Previously the tab hung\n below the drawer's bottom edge into the workspace's top padding;\n that made the tab visually compete with the workspace header,\n even when the tab box-model bounds technically cleared the\n header.) box-sizing: border-box so the padding eats from the\n 33vh, not adding to it. */\n.pict-modal-shell-panel-drawer\n{\n\twidth: 100% !important;\n\tmax-width: 100% !important;\n\theight: var(--pict-modal-drawer-height, 33vh);\n\ttransition: height 140ms ease;\n\tpadding-bottom: 18px;\n\tbox-sizing: border-box;\n\toverflow: visible !important;\n\t/* Clip the panel bg to its CONTENT area only — the 18px\n\t padding-bottom reserve (where the tab lives) becomes\n\t transparent, so the middle row's primary background shows\n\t through. Without this the reserve would render with the\n\t panel's chrome bg, creating a visible \"strip\" between the\n\t drawer content above and the workspace below — the tab would\n\t look like it's sitting on its own miscoloured band rather\n\t than at the seam between drawer and workspace. */\n\tbackground-clip: content-box;\n}\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed\n{\n\t/* Collapsed = \"just the tab strip is visible\". 18px matches the\n\t panel's tab reserve so the height is consistent across states.\n\t When this is 0 the tab would have nowhere to render and the\n\t user couldn't reopen the drawer. */\n\theight: 18px !important;\n\tpadding-bottom: 0 !important;\n\t/* Drop the panel's bg in collapsed state — without this the 18px\n\t strip shows the --pict-modal-bg (panel chrome) which doesn't\n\t match the workspace --theme-color-background-primary below it,\n\t creating a visible \"drawer band\" around the tab that breaks the\n\t illusion of the tab belonging to the workspace area. With\n\t transparent bg the middle row's primary background shows\n\t through, the strip blends with the workspace, and the tab pill\n\t reads as a free-floating handle. */\n\tbackground: transparent !important;\n}\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-resize-handle\n{\n\tdisplay: none;\n}\n/* The drawer's collapse tab is a horizontal pill protruding from the\n bottom of the drawer (rather than the inner edge of a side panel).\n Override the side-panel positioning rules from above so the tab\n always sits at the drawer's bottom-center seam, in both expanded\n and collapsed states. The expand-from-zero affordance: when\n collapsed (height: 0), the tab still hangs below \"where the\n drawer would be\" — a small handle the user can click to pull\n the drawer back down. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\tposition: absolute !important;\n\t/* Anchored to the panel's BOTTOM edge — the tab lives INSIDE the\n\t drawer's footprint (in the 18px reserve at the bottom), never\n\t below it into the workspace. This means the workspace below\n\t the drawer is never sharing a vertical band with the tab, so\n\t the workspace header doesn't optically compete with it.\n\t bottom: 4px aligns the tab's top edge exactly with the panel's\n\t CONTENT-AREA bottom (panel.height − padding-bottom 18px). With\n\t border-top: 0 on the tab, the seam between the drawer content\n\t above and the tab body is invisible — they share --pict-modal-bg\n\t and merge into one shape, the tab reading as a labelled\n\t extension of the drawer hanging downward. Collapsed state\n\t keeps the smaller offset (overridden below) because its panel\n\t has no padding-bottom, so the math doesn't apply. */\n\ttop: auto !important;\n\tbottom: 4px !important;\n\tleft: 50% !important;\n\tright: auto !important;\n\ttransform: translate(-50%, 0) !important;\n\twidth: 64px !important;\n\theight: 14px !important;\n\t/* CRITICAL: border-box + padding: 0 — the collapsed-state base\n\t rule inherits \"padding: 12px 4px\" (so the chevron clears the\n\t edges of a tab that fills a 24px-wide side strip). In drawer\n\t mode the tab is a 14px tall pill, NOT a strip-fill, so that\n\t 12px vertical padding would balloon the tab's outer height to\n\t ~38px and crash into the workspace header text. The chevron\n\t is centered via flex anyway. */\n\tbox-sizing: border-box !important;\n\tpadding: 0 !important;\n\t/* Rounded BOTTOM corners + no top border — the tab looks like a\n\t traditional drawer-handle/tab hanging from above. Its rounded\n\t bottom curves face the workspace (the \"open downward\" affordance\n\t for a top drawer). border-top: 0 lets the tab visually merge\n\t with whatever's directly above it inside the panel (sidebar\n\t content when expanded, the panel background when collapsed). */\n\tborder-radius: 0 0 8px 8px;\n\tborder: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #cfd5dd));\n\tborder-top: 0;\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #fff));\n\topacity: 0.95;\n\tz-index: 20;\n\t/* The default side-panel hover-grow values would yank the tab off\n\t to the wrong spot in drawer mode — neutralise. */\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab:hover,\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab:hover\n{\n\topacity: 1;\n\twidth: 96px !important;\n\t/* height stays at 14px — the tab is anchored with bottom, so any\n\t height growth would push the tab's TOP edge UPWARD past the\n\t space available above it. In EXPANDED state that crashes into\n\t the drawer content above; in COLLAPSED state it crashes into\n\t the topbar's brand stripes. Width-only growth (64 to 96, +50%)\n\t still gives the \"tab is reaching toward me\" affordance without\n\t the encroachment. */\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbox-shadow: 0 3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n/* Collapsed-state bottom-offset override. Expanded panels have an\n 18px padding-bottom reserve, and \"bottom: 4px\" anchors the tab's\n top edge exactly at the content-area boundary (so it merges\n visually with the drawer above). Collapsed panels have\n padding-bottom: 0 and a total height of 18px — \"bottom: 4px\"\n there would put the tab's top at the panel's actual top edge,\n crashing the (border-top: 0) tab into the topbar. The smaller\n \"bottom: 2px\" keeps the 14px tab vertically centered in the 18px\n strip with 2px margins on either side. */\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\tbottom: 2px !important;\n}\n/* Chevron inside the tab: point UP when expanded (the drawer\n collapses UP / out of view, so the arrow indicates \"click me to\n send the drawer up\"), DOWN when collapsed (the drawer expands DOWN\n into view). Rotations come from the existing top-panel chevron\n table: rotate(-135deg) → UP arrow, rotate(45deg) → DOWN arrow. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab::before\n{\n\ttransform: rotate(-135deg) !important;\n}\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before\n{\n\ttransform: rotate(45deg) !important;\n}\n/* The collapse tab's existing title-text span is hidden when reduced\n to a pill — there's no horizontal room. The chevron alone reads\n correctly. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-title,\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-icon\n{\n\tdisplay: none;\n}\n\n/* Drag-active state — disable text selection + change cursor globally\n so resize feels solid even when the cursor briefly leaves the handle. */\n.pict-modal-shell-dragging-x, .pict-modal-shell-dragging-y { user-select: none; }\n.pict-modal-shell-dragging-x * { cursor: col-resize !important; }\n.pict-modal-shell-dragging-y * { cursor: row-resize !important; }\n\n/* Per-panel resize-active state — kills the panel's collapse/expand\n width/height transition for the duration of a drag. Without this,\n every pointermove starts a fresh 140 ms transition and the resize\n visibly lags behind the cursor (\"choppy\"). With it disabled the\n panel snaps to the new size on the same frame as the pointer, which\n feels native. */\n.pict-modal-shell-panel-resizing { transition: none !important; }\n.pict-modal-shell-panel-resizing > .pict-modal-shell-panel-resize-handle\n{\n\tbackground: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\topacity: 0.5;\n}\n\n/* Panel popup-attention flash — fires when popup() is called on an\n already-open panel. Brief brand-colored inset glow so the user sees\n that their click landed even though the panel didn't change shape.\n Class is added by the shell, auto-removed after ~700 ms. */\n@keyframes pict-modal-shell-panel-flash\n{\n\t0% { box-shadow: inset 0 0 0 0 transparent; }\n\t30% { box-shadow: inset 0 0 0 3px var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)); }\n\t100% { box-shadow: inset 0 0 0 0 transparent; }\n}\n.pict-modal-shell-panel-flash\n{\n\tanimation: pict-modal-shell-panel-flash 600ms ease-out;\n}\n"}},{}],165:[function(e,t,r){const n=e("pict-view"),o=e("./Pict-Modal-Overlay.js"),i=e("./Pict-Modal-Confirm.js"),a=e("./Pict-Modal-Window.js"),s=e("./Pict-Modal-Toast.js"),l=e("./Pict-Modal-Tooltip.js"),c=e("./Pict-Modal-Panel.js"),d=e("./Pict-Modal-Dropdown.js"),h=e("./Pict-Modal-Shell.js"),p=e("./Pict-Section-Modal-DefaultConfiguration.js");t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},p,t),r),this._activeModals=[],this._activeTooltips=[],this._activeToasts=[],this._idCounter=0,this._overlay=new o(this),this._confirm=new i(this),this._window=new a(this),this._toast=new s(this),this._tooltip=new l(this),this._panel=new c(this),this._dropdown=new d(this),this._shell=new h(this)}onBeforeInitialize(){return super.onBeforeInitialize(),"undefined"!=typeof document&&document.body&&(document.body.classList.contains("pict-modal-root")||document.body.classList.add("pict-modal-root")),super.onBeforeInitialize()}_nextId(){return this._idCounter++,this._idCounter}confirm(e,t){return this._confirm.confirm(e,t)}doubleConfirm(e,t){return this._confirm.doubleConfirm(e,t)}show(e){return this._window.show(e)}tooltip(e,t,r){return this._tooltip.tooltip(e,t,r)}richTooltip(e,t,r){return this._tooltip.richTooltip(e,t,r)}toast(e,t){return this._toast.toast(e,t)}dropdown(e,t){return this._dropdown.dropdown(e,t)}dismissDropdowns(){this._dropdown.dismissAll()}panel(e,t){return this._panel.create(e,t)}shell(e,t){return this._shell.shell(e,t)}dismissModals(){let e=this._activeModals.slice();for(let t=e.length-1;t>=0;t--)e[t].dismiss(null)}dismissTooltips(){this._tooltip.dismissAll()}dismissToasts(){this._toast.dismissAll()}dismissAll(){this.dismissModals(),this.dismissTooltips(),this.dismissToasts(),this.dismissDropdowns()}destroyPanels(){this._panel.destroyAll()}destroy(){if(this.dismissAll(),this.destroyPanels(),this._overlay.destroy(),this._toast.destroy(),"function"==typeof super.destroy)return super.destroy()}},t.exports.default_configuration=p},{"./Pict-Modal-Confirm.js":156,"./Pict-Modal-Dropdown.js":157,"./Pict-Modal-Overlay.js":158,"./Pict-Modal-Panel.js":159,"./Pict-Modal-Shell.js":160,"./Pict-Modal-Toast.js":161,"./Pict-Modal-Tooltip.js":162,"./Pict-Modal-Window.js":163,"./Pict-Section-Modal-DefaultConfiguration.js":164,"pict-view":216}],166:[function(e,t,r){
58
58
  /**
59
59
  * Pict Provider: Theme
60
60
  *
@@ -87,5 +87,15 @@ M.Builder=function(){this._ref="id",this._fields=Object.create(null),this._docum
87
87
  * @author Steven Velozo <steven@velozo.com>
88
88
  * @license MIT
89
89
  */
90
- const n=t("pict-provider"),r="pict-theme",i="theme-light",a="theme-dark",s="--theme-";class l extends n{constructor(e,o,n){if(super(e,o,n),this.serviceType="PictProviderTheme",this._themes={},this._themeOrder=[],this._activeHash=null,this._activeMode=null,this._resolvedMode=null,this._systemMediaQuery=null,this._systemListener=null,this._registeredCSSHashes=[],this._applyListeners=[],this.pict&&"function"==typeof this.pict.addTemplate)try{this.pict.addTemplate(t("./templates/Pict-Template-Theme.js")),this.pict.addTemplate(t("./templates/Pict-Template-ThemeVar.js")),this.pict.addTemplate(t("./templates/Pict-Template-ThemeAsset.js")),this.pict.addTemplate(t("./templates/Pict-Template-ThemeImage.js"))}catch(t){this.log&&this.log.warn("PictProviderTheme: template registration skipped: "+t.message)}}registerTheme(t){return t&&"object"==typeof t?t.Hash&&"string"==typeof t.Hash?(this._themes[t.Hash]||this._themeOrder.push(t.Hash),this._themes[t.Hash]=t,!0):(this.log&&this.log.warn("PictProviderTheme.registerTheme: bundle missing required string Hash"),!1):(this.log&&this.log.warn("PictProviderTheme.registerTheme: bundle is not an object"),!1)}listThemes(){let t=[];for(let e=0;e<this._themeOrder.length;e++){let o=this._themeOrder[e],n=this._themes[o],r=n.Modes||{};t.push({Hash:n.Hash,Name:n.Name||n.Hash,Version:n.Version||null,Strategy:r.Strategy||"single",DefaultMode:r.Default||"light",Comprehensive:!1!==n.Comprehensive})}return t}getTheme(t){return this._themes[t]||null}applyTheme(t,e){let o=this._themes[t];if(!o)return this.log&&this.log.warn("PictProviderTheme.applyTheme: unknown theme hash [".concat(t,"]")),!1;let n=this._resolveBundle(o),r=n.Modes&&n.Modes.Strategy||"single",i=n.Modes&&n.Modes.Default||"light",a=e||i;"single"===r&&(a=i),this._activeHash=t,this._activeMode=a;let s=this._buildThemeCSS(n);return this._injectStyleElement(s),this._registerAuxiliaryCSS(n),this._applyMode(a,r),this._fireApplyListeners(n),!0}setMode(t){if(!this._activeHash)return!1;let e=this._resolveBundle(this._themes[this._activeHash]),o=e.Modes&&e.Modes.Strategy||"single";return"single"!==o&&(this._activeMode=t,this._applyMode(t,o),this._fireApplyListeners(e),!0)}onApply(t){if("function"!=typeof t)return function(){};this._applyListeners.push(t);let e=this;return function(){e.offApply(t)}}offApply(t){let e=this._applyListeners.indexOf(t);e>=0&&this._applyListeners.splice(e,1)}_fireApplyListeners(t){if(0===this._applyListeners.length)return;let e={Hash:this._activeHash,Mode:this._activeMode,ResolvedMode:this._resolvedMode};for(let o=0;o<this._applyListeners.length;o++)try{this._applyListeners[o](t,e)}catch(t){this.log&&this.log.warn("PictProviderTheme: onApply listener threw: "+t.message)}}unapplyTheme(){if(this._detachSystemListener(),"undefined"!=typeof document){let t=document.getElementById(r);t&&t.parentNode&&t.parentNode.removeChild(t),document.documentElement&&document.documentElement.classList&&(document.documentElement.classList.remove(i),document.documentElement.classList.remove(a))}if(this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.removeCSS)for(let t=0;t<this._registeredCSSHashes.length;t++)this.pict.CSSMap.removeCSS(this._registeredCSSHashes[t]);return this._registeredCSSHashes=[],this._activeHash=null,this._activeMode=null,this._resolvedMode=null,!0}getActiveTheme(){return{Hash:this._activeHash,Mode:this._activeMode,ResolvedMode:this._resolvedMode}}token(t){if(!this._activeHash)return null;let e=this._resolveBundle(this._themes[this._activeHash]),o=this._walkPath(e,t);return this._resolveModedValue(o)}cssVar(t){return"var("+this._cssVarName(t)+")"}asset(t,e){if(!this._activeHash)return null;let o=this._resolveBundle(this._themes[this._activeHash])[t];return o?this._walkPath(o,e):null}image(t){return this.asset("Image",t)}svg(t){return this.asset("SVG",t)}_resolveBundle(t){let e=[],o=t,n={};for(;o&&!n[o.Hash];){n[o.Hash]=!0,e.unshift(o);let t=o.BasedOn;o=t?this._themes[t]:null}if(1===e.length)return e[0];let r={};for(let t=0;t<e.length;t++)r=this._deepMerge(r,e[t]);return r}_deepMerge(t,e){let o=Object.assign({},t),n=Object.keys(e);for(let t=0;t<n.length;t++){let r=n[t],i=e[r];null===i||"object"!=typeof i||Array.isArray(i)||null===o[r]||"object"!=typeof o[r]||Array.isArray(o[r])?o[r]=i:o[r]=this._deepMerge(o[r],i)}return o}_walkPath(t,e){if(!t||!e)return null;let o=e.split("."),n=t;for(let t=0;t<o.length;t++){if(null===n||"object"!=typeof n)return null;if(n=n[o[t]],void 0===n)return null}return n}_resolveModedValue(t){if(this._isPairedValue(t)){return t["dark"===(this._resolvedMode||"light")?"Dark":"Light"]}return t}_isPairedValue(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.keys(t).every(t=>"Light"===t||"Dark"===t)}_buildThemeCSS(t){let e=t.Tokens||{},o=this._flattenTokens(e,""),n=t.Modes&&t.Modes.Strategy||"single",r=o.some(t=>this._isPairedValue(t.Value)),i=this._buildAliasLines(t.Aliases);if("single"===n||!r){let t=":root {\n";for(let e=0;e<o.length;e++){let n=o[e],r=this._isPairedValue(n.Value)?n.Value.Light:n.Value;t+="\t"+this._cssVarName(n.Path)+": "+this._formatCSSValue(r)+";\n"}return t+=i,t+="}\n",t}let s=":root {\n",l="."+a+" {\n";for(let t=0;t<o.length;t++){let e=o[t],n=this._cssVarName(e.Path);this._isPairedValue(e.Value)?(void 0!==e.Value.Light&&(s+="\t"+n+": "+this._formatCSSValue(e.Value.Light)+";\n"),void 0!==e.Value.Dark&&(l+="\t"+n+": "+this._formatCSSValue(e.Value.Dark)+";\n")):s+="\t"+n+": "+this._formatCSSValue(e.Value)+";\n"}return s+=i,s+="}\n",l+="}\n",s+l}_buildAliasLines(t){if(!t||"object"!=typeof t)return"";let e=Object.keys(t),o="";for(let n=0;n<e.length;n++){let r=e[n],i=t[r];"string"==typeof i&&0!==i.length&&(o+="\t"+r+": var("+this._cssVarName(i)+");\n")}return o}_flattenTokens(t,e){let o=[];if(null===t||"object"!=typeof t||Array.isArray(t))return e&&o.push({Path:e,Value:t}),o;if(this._isPairedValue(t))return o.push({Path:e,Value:t}),o;let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r],a=e?e+"."+i:i,s=t[i];o=o.concat(this._flattenTokens(s,a))}return o}_cssVarName(t){return s+t.toLowerCase().replace(/\./g,"-")}_formatCSSValue(t){return null==t?"":String(t)}_injectStyleElement(t){if("undefined"==typeof document)return;let e=document.getElementById(r);e||(e=document.createElement("style"),e.id=r,document.head.appendChild(e)),e.textContent=t}_registerAuxiliaryCSS(t){if(this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.removeCSS)for(let t=0;t<this._registeredCSSHashes.length;t++)this.pict.CSSMap.removeCSS(this._registeredCSSHashes[t]);if(this._registeredCSSHashes=[],Array.isArray(t.CSS)&&this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.addCSS)for(let e=0;e<t.CSS.length;e++){let o=t.CSS[e];if(!o||!o.Hash||"string"!=typeof o.Content)continue;let n="number"==typeof o.Priority?o.Priority:500;this.pict.CSSMap.addCSS(o.Hash,o.Content,n),this._registeredCSSHashes.push(o.Hash)}}_applyMode(t,e){this._detachSystemListener();let o=t;"system"===t&&(o=this._readSystemPreference(),this._attachSystemListener(e)),this._resolvedMode="dark"===o?"dark":"light",this._writeHTMLClass(this._resolvedMode)}_writeHTMLClass(t){if("undefined"==typeof document||!document.documentElement||!document.documentElement.classList)return;let e=document.documentElement.classList;"dark"===t?(e.remove(i),e.add(a)):(e.remove(a),e.add(i))}_readSystemPreference(){if("undefined"==typeof window||"function"!=typeof window.matchMedia)return"light";try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(t){return"light"}}_attachSystemListener(t){if("undefined"!=typeof window&&"function"==typeof window.matchMedia)try{let t=this,e=window.matchMedia("(prefers-color-scheme: dark)"),o=function(){let o=e.matches?"dark":"light";t._resolvedMode=o,t._writeHTMLClass(o)};"function"==typeof e.addEventListener?e.addEventListener("change",o):"function"==typeof e.addListener&&e.addListener(o),this._systemMediaQuery=e,this._systemListener=o}catch(t){}}_detachSystemListener(){if(this._systemMediaQuery&&this._systemListener){try{"function"==typeof this._systemMediaQuery.removeEventListener?this._systemMediaQuery.removeEventListener("change",this._systemListener):"function"==typeof this._systemMediaQuery.removeListener&&this._systemMediaQuery.removeListener(this._systemListener)}catch(t){}this._systemMediaQuery=null,this._systemListener=null}}}l.default_configuration={ProviderIdentifier:"Theme",AutoInitialize:!0,AutoInitializeOrdinal:0},e.exports=l,e.exports.STYLE_ELEMENT_ID=r,e.exports.HTML_CLASS_LIGHT=i,e.exports.HTML_CLASS_DARK=a,e.exports.CSS_VAR_PREFIX=s},{"./templates/Pict-Template-Theme.js":26,"./templates/Pict-Template-ThemeAsset.js":27,"./templates/Pict-Template-ThemeImage.js":28,"./templates/Pict-Template-ThemeVar.js":29,"pict-provider":7}],26:[function(t,e,o){const n=t("pict-template");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this.addPattern("{~Theme:","~}")}render(t){let e=(t||"").trim();if(!e)return"";let o=this._findThemeProvider();if(!o)return"";let n=o.token(e);return null==n?"":String(n)}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":73}],27:[function(t,e,o){const n=t("pict-template");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this.addPattern("{~ThemeAsset:","~}")}render(t){let e=(t||"").trim();if(!e)return"";let o=e.indexOf(".");if(o<0)return"";let n=e.substring(0,o),r=e.substring(o+1),i=this._findThemeProvider();if(!i)return"";let a=i.asset(n,r);return null==a?"":String(a)}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":73}],28:[function(t,e,o){const n=t("pict-template");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this.addPattern("{~ThemeImage:","~}")}render(t){let e=(t||"").trim();if(!e)return"";let o=this._findThemeProvider();if(!o)return"";let n=o.image(e);return null==n?"":String(n)}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":73}],29:[function(t,e,o){const n=t("pict-template");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this.addPattern("{~ThemeVar:","~}")}render(t){let e=(t||"").trim();if(!e)return"";let o=this._findThemeProvider();return o?o.cssVar(e):""}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":73}],30:[function(t,e,o){const n=t("pict-provider"),r=t("pict-provider-theme"),i=t("./views/PictView-Theme-Picker.js"),a=t("./views/PictView-Theme-ModeToggle.js"),s=t("./views/PictView-Theme-ScaleSelect.js"),l=t("./views/PictView-Theme-Button.js"),c=t("./views/PictView-Theme-BrandStrip.js"),d=t("./views/PictView-Theme-Brand-Mark.js"),p=t("./views/PictView-Theme-TopBar.js"),h=t("./views/PictView-Theme-BottomBar.js"),u=t("./Theme-Persistence.js"),m=t("./Theme-Scale.js"),g=t("./Theme-Brand.js"),f=t("./themes/_catalog.js"),b={Picker:{lib:i,hash:"Theme-Picker"},ModeToggle:{lib:a,hash:"Theme-ModeToggle"},ScaleSelect:{lib:s,hash:"Theme-ScaleSelect"},Button:{lib:l,hash:"Theme-Button"},BrandStrip:{lib:c,hash:"Theme-BrandStrip"},BrandMark:{lib:d,hash:"Theme-Brand-Mark"},TopBar:{lib:p,hash:"Theme-TopBar"},BottomBar:{lib:h,hash:"Theme-BottomBar"}};function v(t){if(!t||!t.providers||!t.providers.Theme)return t&&t.log&&t.log.warn&&t.log.warn("pict-section-theme.registerCatalog: pict.providers.Theme not found — register the runtime first"),0;let e=t.providers.Theme,o=f.list(),n=0;for(let t=0;t<o.length;t++)e.registerTheme(o[t].Bundle)&&n++;return n}function y(t,e){if(!t||"function"!=typeof t.addProvider)throw new Error("pict-section-theme: requires a Pict instance");let o=e||{};if(!t.providers||!t.providers.Theme){let e=Object.assign({},r.default_configuration,o.ProviderOptions||{});t.addProvider("Theme",e,r)}!1!==o.RegisterCatalog&&v(t);let n=Array.isArray(o.Views)?o.Views:Object.keys(b);for(let e=0;e<n.length;e++){let r=b[n[e]];if(!r){t.log&&t.log.warn&&t.log.warn('pict-section-theme: unknown view name "'+n[e]+'" — skipped');continue}if(t.views&&t.views[r.hash])continue;let i=Object.assign({},r.lib.default_configuration,o.ViewOptions&&o.ViewOptions[n[e]]||{});t.addView(r.hash,i,r.lib)}let i=t.providers.Theme,a=!1!==o.Persistence,s=null,l=o.ApplyDefault||null,c=o.DefaultMode||null,d="number"==typeof o.DefaultScale?o.DefaultScale:null;if(a&&i){s=u.resolveKey(o.PersistenceKey);let t=u.load(s);t&&t.ThemeHash&&"function"==typeof i.getTheme&&i.getTheme(t.ThemeHash)?(l=t.ThemeHash,t.Mode&&(c=t.Mode),t.Scale&&(d=t.Scale)):t&&t.Scale&&(d=t.Scale);let e=function(){let t="function"==typeof i.getActiveTheme?i.getActiveTheme():{Hash:null,Mode:null};u.save(s,{ThemeHash:t.Hash,Mode:t.Mode,Scale:m.getActive()})};i.onApply(e),m.onChange(e)}return l&&i&&i.applyTheme(l,c),null!==d&&m.applyScale(d),o.Brand&&g.applyBrand(o.Brand),i&&s&&(i._persistenceKey=s),i}class w extends n{constructor(t,e,o){super(t,e,o),this.serviceType="PictSectionTheme",y(this.pict,this.options)}mount(t){let e=t||{},o=e.Container;if(!o)return null;let n="string"==typeof o?this.pict&&this.pict.ContentAssignment?this.pict.ContentAssignment.getElement(o):document.querySelector(o):o;if(n&&n.length&&!n.tagName&&(n=n[0]),!n)return this.pict&&this.pict.log&&this.pict.log.warn&&this.pict.log.warn("pict-section-theme.mount: container not found for "+o),null;let r=Array.isArray(e.Views)&&e.Views.length?e.Views:["Picker","ModeToggle","ScaleSelect"],i=[],a=[];for(let t=0;t<r.length;t++){let e=b[r[t]];if(!e)continue;let o=(e.lib.default_configuration.DefaultDestinationAddress||"").replace(/^#/,"");o&&(i.push('<div class="pict-theme-mount-row pict-theme-mount-row-'+e.hash.toLowerCase()+'"><div id="'+o+'"></div></div>'),a.push(e.hash))}let s="pict-theme-mount"+(e.WrapperClass?" "+e.WrapperClass:"");n.innerHTML='<div class="'+s+'">'+i.join("")+"</div>";for(let t=0;t<a.length;t++){let e=this.pict.views[a[t]];if(e&&"function"==typeof e.render)try{e.render()}catch(t){}}return{container:n,viewsRendered:a}}}e.exports=w,e.exports.default_configuration={ProviderIdentifier:"Theme-Section",AutoInitialize:!1,ApplyDefault:null,DefaultMode:null,DefaultScale:null,Persistence:!0,PersistenceKey:null,RegisterCatalog:!0,Views:null,ViewOptions:null,Brand:null,ProviderOptions:null},e.exports.Provider=r,e.exports.PictSectionThemeProvider=w,e.exports.PickerView=i,e.exports.ModeToggleView=a,e.exports.ButtonView=l,e.exports.ScaleSelectView=s,e.exports.BrandStripView=c,e.exports.BrandMarkView=d,e.exports.TopBarView=p,e.exports.BottomBarView=h,e.exports.Catalog=f,e.exports.Brand=g,e.exports.Scale=m,e.exports.Persistence=u,e.exports.registerCatalog=v,e.exports.listCatalog=function(){let t=f.list(),e=[];for(let o=0;o<t.length;o++){let n=t[o],r=n.Bundle||{},i=r.Modes||{};e.push({Hash:n.Hash,Name:r.Name||n.Hash,Category:n.Category||"Other",Strategy:i.Strategy||"single",DefaultMode:i.Default||"light",IsDefault:!!n.IsDefault})}return e},e.exports.install=function(t,e){if(!t||"function"!=typeof t.addProvider)throw new Error("pict-section-theme.install: first arg must be a Pict instance");return y(t,e||{})},e.exports.clearPersistence=function(t){let e=t&&t.providers&&t.providers.Theme&&t.providers.Theme._persistenceKey||u.resolveKey(null);return u.clear(e)}},{"./Theme-Brand.js":31,"./Theme-Persistence.js":33,"./Theme-Scale.js":34,"./themes/_catalog.js":38,"./views/PictView-Theme-BottomBar.js":64,"./views/PictView-Theme-Brand-Mark.js":65,"./views/PictView-Theme-BrandStrip.js":66,"./views/PictView-Theme-Button.js":67,"./views/PictView-Theme-ModeToggle.js":68,"./views/PictView-Theme-Picker.js":69,"./views/PictView-Theme-ScaleSelect.js":70,"./views/PictView-Theme-TopBar.js":71,"pict-provider":7,"pict-provider-theme":25}],31:[function(t,e,o){const n="pict-brand",r="pict-brand-favicon",i="pict-brand-favicon-dark";let a=null,s=[];function l(t){return"string"==typeof t&&/^\s*<svg[\s>]/i.test(t)}function c(t){return"string"==typeof t&&/^(data:|https?:|\/|\.\.?\/)/.test(t)}function d(t){return t&&"string"==typeof t.IconType?t.IconType:t&&t.Icon?l(t.Icon)?"svg":c(t.Icon)?"image":null:null}function p(t){if("string"==typeof t&&t.length>0)return{Light:t,Dark:t,Base:t};if(t&&"object"==typeof t){let e="string"==typeof t.Light&&t.Light.length>0?t.Light:null,o="string"==typeof t.Dark&&t.Dark.length>0?t.Dark:null;return e||o?(e=e||o,o=o||e,{Light:e,Dark:o,Base:"string"==typeof t.Base&&t.Base.length>0?t.Base:e}):null}return null}function h(t){if(!t||"string"!=typeof t)return null;if(l(t)){return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(t).replace(/'/g,"%27").replace(/"/g,"%22")}return c(t)?t:null}function u(){"undefined"!=typeof document&&[r,i].forEach(t=>{let e=document.getElementById(t);e&&e.parentNode&&e.parentNode.removeChild(e)})}function m(t){let e=t.Colors;var o;return":root {\n\t--brand-color-primary: "+e.Primary+";\n\t--brand-color-secondary: "+e.Secondary+";\n\t--brand-color-primary-light: "+e.PrimaryLight+";\n\t--brand-color-primary-dark: "+e.PrimaryDark+";\n\t--brand-color-secondary-light: "+e.SecondaryLight+";\n\t--brand-color-secondary-dark: "+e.SecondaryDark+";\n\t--brand-color-primary-mode: "+e.PrimaryLight+";\n\t--brand-color-secondary-mode: "+e.SecondaryLight+";\n\t--brand-name: "+(o=t.Name,'"'+String(o||"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'";\n}\n')+(".theme-dark {\n\t--brand-color-primary-mode: "+e.PrimaryDark+";\n\t--brand-color-secondary-mode: "+e.SecondaryDark+";\n}\n")}function g(t){let e=a;if(null===t){if(a=null,"undefined"!=typeof document){let t=document.getElementById(n);t&&t.parentNode&&t.parentNode.removeChild(t)}return u(),b(null,e),null}let o=function(t){if(!t||"object"!=typeof t)return null;let e=t.Colors||{},o=p(e.Primary),n=p(e.Secondary);if(!o||!n)return null;let r=e.PrimaryLight||o.Light,i=e.PrimaryDark||o.Dark,a=e.SecondaryLight||n.Light,s=e.SecondaryDark||n.Dark;return{Hash:t.Hash||"brand",Name:t.Name||t.Hash||"Brand",Icon:t.Icon||null,IconType:d(t),Tagline:"string"==typeof t.Tagline?t.Tagline:null,Favicon:t.Favicon||null,FaviconDark:t.FaviconDark||null,Colors:{Primary:o.Base,Secondary:n.Base,PrimaryLight:r,PrimaryDark:i,SecondaryLight:a,SecondaryDark:s}}}(t);return o?(a=o,function(t){if("undefined"==typeof document)return;let e=document.getElementById(n);e||(e=document.createElement("style"),e.id=n,document.head.appendChild(e)),e.textContent=t}(m(o)),function(t){if("undefined"==typeof document)return;u();let e=h(t.Favicon),o=h(t.FaviconDark);if(!e&&!o)return;let n=!(!e||!o);if(e){let t=document.createElement("link");t.id=r,t.rel="icon",t.href=e,/^data:image\/svg\+xml/.test(e)&&(t.type="image/svg+xml"),n&&(t.media="(prefers-color-scheme: light)"),document.head.appendChild(t)}if(o){let t=document.createElement("link");t.id=i,t.rel="icon",t.href=o,/^data:image\/svg\+xml/.test(o)&&(t.type="image/svg+xml"),n&&(t.media="(prefers-color-scheme: dark)"),document.head.appendChild(t)}}(o),b(o,e),o):("undefined"!=typeof console&&console.warn&&console.warn("Theme-Brand.applyBrand: bad brand object — needs Colors.Primary + Colors.Secondary as strings."),a)}function f(t){let e=s.indexOf(t);e>=0&&s.splice(e,1)}function b(t,e){for(let o=0;o<s.length;o++)try{s[o](t,e)}catch(t){}}e.exports={applyBrand:g,getActive:function(){return a},onChange:function(t){return"function"!=typeof t?function(){}:(s.push(t),function(){f(t)})},offChange:f,reset:function(){g(null),s=[]},STYLE_ELEMENT_ID:n,FAVICON_LINK_ID:r,FAVICON_DARK_LINK_ID:i}},{}],32:[function(t,e,o){function n(t,e){let o="number"==typeof t&&t>0?t:14;return'<svg class="pict-theme-icon" width="'+o+'" height="'+o+'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'+e+"</svg>"}function r(t){return n(t,'<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>')}function i(t){return n(t,'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>')}function a(t){let e="number"==typeof t&&t>0?t:14;return'<svg class="pict-theme-icon pict-theme-icon-paired" width="'+1.6*e+'" height="'+e+'" viewBox="0 0 38 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="12" r="3"/><path d="M8 4v1.5M8 18.5V20M2.5 12H4M12 12h1.5M4.1 7.1l1 1M11.1 7.1l-1 1M4.1 16.9l1-1M11.1 16.9l-1-1"/><path d="M33 13.5A6.5 6.5 0 1 1 26 6a5 5 0 0 0 7 7.5z"/></svg>'}e.exports={iconSun:r,iconMoon:i,iconSystem:function(t){return n(t,'<rect x="2" y="4" width="20" height="14" rx="2"/><path d="M8 21h8M12 18v3"/>')},iconPaired:a,iconChevronDown:function(t){let e="number"==typeof t&&t>0?t:10;return'<svg class="pict-theme-icon pict-theme-icon-chevron" width="'+e+'" height="'+e+'" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 4.5l3 3 3-3"/></svg>'},iconForTheme:function(t,e,o){return"single"===t?"dark"===e?i(o):r(o):a(o)},DEFAULT_SIZE_PX:14}},{}],33:[function(t,e,o){const n="pict-section-theme:";function r(){try{if("undefined"!=typeof window&&window.localStorage)return window.localStorage}catch(t){}return null}e.exports={resolveKey:function(t){let e="string"==typeof t&&t.length>0?t:function(){try{if("undefined"!=typeof window&&window.location&&window.location.hostname)return window.location.hostname}catch(t){}return"default"}();return n+e},load:function(t){let e,o,n=r();if(!n)return null;try{e=n.getItem(t)}catch(t){return null}if(!e)return null;try{o=JSON.parse(e)}catch(t){return null}if(!o||"object"!=typeof o)return null;if(1!==o.Version)return null;if("string"!=typeof o.ThemeHash||0===o.ThemeHash.length)return null;let i=null;return"number"==typeof o.Scale&&isFinite(o.Scale)&&o.Scale>0&&(i=o.Scale),{ThemeHash:o.ThemeHash,Mode:"string"==typeof o.Mode&&o.Mode.length>0?o.Mode:null,Scale:i}},save:function(t,e){let o=r();if(!o)return!1;if(!e||"string"!=typeof e.ThemeHash||0===e.ThemeHash.length)return!1;let n={Version:1,ThemeHash:e.ThemeHash,Mode:"string"==typeof e.Mode&&e.Mode.length>0?e.Mode:null,Scale:"number"==typeof e.Scale&&isFinite(e.Scale)&&e.Scale>0?e.Scale:null,SavedAt:(new Date).toISOString()};try{return o.setItem(t,JSON.stringify(n)),!0}catch(t){return!1}},clear:function(t){let e=r();if(!e)return!1;try{return e.removeItem(t),!0}catch(t){return!1}},STORAGE_PREFIX:n,SCHEMA_VERSION:1}},{}],34:[function(t,e,o){const n="pict-theme-scale",r="--theme-scale";let i=1,a=[];function s(t){let e=a.indexOf(t);e>=0&&a.splice(e,1)}e.exports={applyScale:function(t){let e=i,o=function(t){let e=Number(t);return!isFinite(e)||e<=0?1:e<.5?.5:e>3?3:e}(t);return i=o,function(t){if("undefined"==typeof document)return;let e=document.getElementById(n);e||(e=document.createElement("style"),e.id=n,document.head.appendChild(e)),e.textContent=t}(function(t){return":root {\n\t"+r+": "+t+";\n}\nhtml {\n\tzoom: "+t+";\n}\n"}(o)),e!==o&&function(t,e){for(let o=0;o<a.length;o++)try{a[o](t,e)}catch(t){}}(o,e),o},getActive:function(){return i},onChange:function(t){return"function"!=typeof t?function(){}:(a.push(t),function(){s(t)})},offChange:s,reset:function(){if(i=1,"undefined"!=typeof document){let t=document.getElementById(n);t&&t.parentNode&&t.parentNode.removeChild(t)}a=[]},PRESETS:[{Value:.75,Label:"Tiny (75%)"},{Value:.85,Label:"Small (85%)"},{Value:1,Label:"Default (100%)"},{Value:1.15,Label:"Comfortable (115%)"},{Value:1.25,Label:"Large (125%)"},{Value:1.5,Label:"Huge (150%)"},{Value:1.75,Label:"Extra Huge (175%)"},{Value:2,Label:"Massive (200%)"}],DEFAULT_SCALE:1,MIN_SCALE:.5,MAX_SCALE:3,STYLE_ELEMENT_ID:n,CSS_VAR_NAME:r}},{}],35:[function(t,e,o){e.exports={Hash:"1970s-console",Name:"1970s Console",Category:"Fun",Version:"0.0.1",Description:"Amber phosphor on brown-black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A1000",Secondary:"#140C00",Tertiary:"#1E1400",Panel:"#1C1200",Viewer:"#100A00",Hover:"#2A1C00",Selected:"#3A2800",Thumb:"#140C00"},Text:{Primary:"#FFAA00",Secondary:"#DD8800",Muted:"#AA6600",Dim:"#884400",Placeholder:"#663300"},Brand:{Accent:"#FFCC00",AccentHover:"#FFDD44"},Border:{Default:"#2A1800",Light:"#3A2200"},Status:{Danger:"#FF4400",DangerMuted:"#AA3300"},Scrollbar:{Track:"#2A1800",Hover:"#3A2800"},Selection:{Background:"rgba(255, 204, 0, 0.2)"},Focus:{Outline:"#FFCC00"},Syntax:{Keyword:"#FFB000",String:"#FFD080",Number:"#FFB000",Comment:"#806020",Operator:"#FFB000",Punctuation:"#FFD080",Function:"#FFB000",Variable:"#FFE090",Type:"#FFB000",Builtin:"#FFB000",Property:"#FF6E40",Tag:"#FF6E40",AttrName:"#FFB000",AttrValue:"#FFD080"}},Typography:{Family:{Sans:"'Courier New', 'Lucida Console', monospace",Mono:"'Courier New', 'Lucida Console', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#DD8800",Accent:"#FFCC00",Muted:"#884400",Light:"#1E1400",WarmBeige:"#201800",TealTint:"#1A1000",Lavender:"#1C1200",AmberTint:"#221800",PdfFill:"#201000",PdfText:"#FF4400"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.405Z",CompilerVersion:1}},{}],36:[function(t,e,o){e.exports={Hash:"1980s-console",Name:"1980s Console",Category:"Fun",Version:"0.0.1",Description:"Green phosphor on black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#001200",Secondary:"#000E00",Tertiary:"#001600",Panel:"#001400",Viewer:"#000A00",Hover:"#002200",Selected:"#003800",Thumb:"#000E00"},Text:{Primary:"#00FF00",Secondary:"#00CC00",Muted:"#009900",Dim:"#006600",Placeholder:"#004400"},Brand:{Accent:"#00FF66",AccentHover:"#44FF88"},Border:{Default:"#002A00",Light:"#003A00"},Status:{Danger:"#FF0000",DangerMuted:"#AA0000"},Scrollbar:{Track:"#002A00",Hover:"#004400"},Selection:{Background:"rgba(0, 255, 102, 0.2)"},Focus:{Outline:"#00FF66"},Syntax:{Keyword:"#00FF00",String:"#90FF90",Number:"#FFFF00",Comment:"#208020",Operator:"#00FF00",Punctuation:"#90FF90",Function:"#00FF00",Variable:"#C0FFC0",Type:"#FFFF00",Builtin:"#FFFF00",Property:"#FF4040",Tag:"#FF4040",AttrName:"#FFFF00",AttrValue:"#90FF90"}},Typography:{Family:{Sans:"'Courier New', monospace",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#00CC00",Accent:"#00FF66",Muted:"#006600",Light:"#001600",WarmBeige:"#001A00",TealTint:"#001200",Lavender:"#001400",AmberTint:"#001800",PdfFill:"#140000",PdfText:"#FF0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],37:[function(t,e,o){e.exports={Hash:"1990s-website",Name:"1990s Web Site",Category:"Fun",Version:"0.0.1",Description:"Blue links on grey, beveled Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#C0C0C0",Secondary:"#B0B0B0",Tertiary:"#A8A8A8",Panel:"#B8B8B8",Viewer:"#D0D0D0",Hover:"#B8B8D0",Selected:"#000080",Thumb:"#B0B0B0"},Text:{Primary:"#000000",Secondary:"#000080",Muted:"#404040",Dim:"#606060",Placeholder:"#808080"},Brand:{Accent:"#0000FF",AccentHover:"#0000CC"},Border:{Default:"#808080",Light:"#A0A0A0"},Status:{Danger:"#FF0000",DangerMuted:"#990000"},Scrollbar:{Track:"#808080",Hover:"#606060"},Selection:{Background:"rgba(0, 0, 128, 0.3)"},Focus:{Outline:"#0000FF"},Syntax:{Keyword:"#0000FF",String:"#008000",Number:"#A52A2A",Comment:"#808080",Operator:"#000080",Punctuation:"#000000",Function:"#0000A0",Variable:"#000000",Type:"#A52A2A",Builtin:"#A52A2A",Property:"#800080",Tag:"#800080",AttrName:"#A52A2A",AttrValue:"#008000"}},Typography:{Family:{Sans:"'Times New Roman', Times, serif",Mono:"'Courier New', Courier, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#000080",Accent:"#0000FF",Muted:"#606060",Light:"#A8A8A8",WarmBeige:"#B0B0B0",TealTint:"#A0A0A0",Lavender:"#ABABD0",AmberTint:"#B8B0A0",PdfFill:"#C0A0A0",PdfText:"#FF0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],38:[function(t,e,o){class n{constructor(){this._themes=new Map,this._loadStarterSet()}_loadStarterSet(){const e=[{Hash:"retold-default",Category:"Default",IsDefault:!0,Bundle:t("./retold-default.json")},{Hash:"retold-mono",Category:"Default",Bundle:t("./retold-mono.json")},{Hash:"retold-manager",Category:"App",Bundle:t("./retold-manager.json")},{Hash:"retold-content-system",Category:"App",Bundle:t("./retold-content-system.json")},{Hash:"ultravisor-desert-dusk",Category:"App",Bundle:t("./ultravisor-desert-dusk.json")},{Hash:"ultravisor-desert-day",Category:"App",Bundle:t("./ultravisor-desert-day.json")},{Hash:"ultravisor-desert-sunset",Category:"App",Bundle:t("./ultravisor-desert-sunset.json")},{Hash:"ultravisor-professional-light",Category:"App",Bundle:t("./ultravisor-professional-light.json")},{Hash:"ultravisor-professional-dark",Category:"App",Bundle:t("./ultravisor-professional-dark.json")},{Hash:"ultravisor-desert-canyon",Category:"App",Bundle:t("./ultravisor-desert-canyon.json")},{Hash:"playground-corp",Category:"Paired",Bundle:t("./playground-corp.json")},{Hash:"playground-starter",Category:"Paired",Bundle:t("./playground-starter.json")},{Hash:"twilight",Category:"Grey",Bundle:t("./twilight.json")},{Hash:"night",Category:"Grey",Bundle:t("./night.json")},{Hash:"evening",Category:"Grey",Bundle:t("./evening.json")},{Hash:"afternoon",Category:"Grey",Bundle:t("./afternoon.json")},{Hash:"daylight",Category:"Grey",Bundle:t("./daylight.json")},{Hash:"cyberpunk",Category:"Fun",Bundle:t("./cyberpunk.json")},{Hash:"synthwave",Category:"Fun",Bundle:t("./synthwave.json")},{Hash:"neo-tokyo",Category:"Fun",Bundle:t("./neo-tokyo.json")},{Hash:"solarized-dark",Category:"Fun",Bundle:t("./solarized-dark.json")},{Hash:"forest",Category:"Fun",Bundle:t("./forest.json")},{Hash:"hotdog",Category:"Fun",Bundle:t("./hotdog.json")},{Hash:"1970s-console",Category:"Fun",Bundle:t("./1970s-console.json")},{Hash:"1980s-console",Category:"Fun",Bundle:t("./1980s-console.json")},{Hash:"1990s-website",Category:"Fun",Bundle:t("./1990s-website.json")},{Hash:"early-2000s",Category:"Fun",Bundle:t("./early-2000s.json")},{Hash:"mobile-debug",Category:"Debug",Bundle:t("./mobile-debug.json")}];for(let t=0;t<e.length;t++){let o=Object.assign({},e[t],{Source:e[t].Source||"starter"});this._themes.set(o.Hash,o)}}register(t){if(!t||"object"!=typeof t)throw new Error("ThemeRegistry.register: entry must be an object");if("string"!=typeof t.Hash||0===t.Hash.length)throw new Error("ThemeRegistry.register: entry.Hash is required");if(!t.Bundle||"object"!=typeof t.Bundle)throw new Error("ThemeRegistry.register: entry.Bundle is required");let e=Object.assign({Source:"host"},t);return this._themes.set(t.Hash,e),e}unregister(t){return this._themes.delete(t)}get(t){return this._themes.get(t)}has(t){return this._themes.has(t)}list(){return Array.from(this._themes.values())}clear(){this._themes.clear()}loadStarterSet(){this._loadStarterSet()}get count(){return this._themes.size}async registerFromURL(t,e){if("function"!=typeof fetch)throw new Error("ThemeRegistry.registerFromURL: fetch is not available in this environment");let o=await fetch(t);if(!o.ok)throw new Error("ThemeRegistry.registerFromURL: HTTP "+o.status+" for "+t);let n=await o.json();if(!n||"object"!=typeof n||"string"!=typeof n.Hash)throw new Error("ThemeRegistry.registerFromURL: payload missing Hash");let r=e||{};return this.register({Hash:r.Hash||n.Hash,Bundle:n,Category:r.Category||"Garden",IsDefault:!!r.IsDefault,Source:t})}get length(){return this._themes.size}[Symbol.iterator](){return this._themes.values()}}const r=new n,i=new Proxy(r,{get(t,e,o){if("string"==typeof e&&/^\d+$/.test(e)){let o=parseInt(e,10);return t.list()[o]}return Reflect.get(t,e,o)},has:(t,e)=>"string"==typeof e&&/^\d+$/.test(e)?parseInt(e,10)<t.length:Reflect.has(t,e)});e.exports=i,e.exports.ThemeRegistry=n},{"./1970s-console.json":35,"./1980s-console.json":36,"./1990s-website.json":37,"./afternoon.json":39,"./cyberpunk.json":40,"./daylight.json":41,"./early-2000s.json":42,"./evening.json":43,"./forest.json":44,"./hotdog.json":45,"./mobile-debug.json":46,"./neo-tokyo.json":47,"./night.json":48,"./playground-corp.json":49,"./playground-starter.json":50,"./retold-content-system.json":51,"./retold-default.json":52,"./retold-manager.json":53,"./retold-mono.json":54,"./solarized-dark.json":55,"./synthwave.json":56,"./twilight.json":57,"./ultravisor-desert-canyon.json":58,"./ultravisor-desert-day.json":59,"./ultravisor-desert-dusk.json":60,"./ultravisor-desert-sunset.json":61,"./ultravisor-professional-dark.json":62,"./ultravisor-professional-light.json":63}],39:[function(t,e,o){e.exports={Hash:"afternoon",Name:"Afternoon",Category:"Grey",Version:"0.0.1",Description:"Warm light grey, softer contrast Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#E8E4E0",Secondary:"#DAD6D2",Tertiary:"#D0CCC8",Panel:"#DDD9D5",Viewer:"#F0ECE8",Hover:"#CCC8C4",Selected:"#B8B4B0",Thumb:"#DAD6D2"},Text:{Primary:"#2A2A2A",Secondary:"#404040",Muted:"#707070",Dim:"#909090",Placeholder:"#B0B0B0"},Brand:{Accent:"#555555",AccentHover:"#333333"},Border:{Default:"#C0BCB8",Light:"#D0CCC8"},Status:{Danger:"#AA3333",DangerMuted:"#886655"},Scrollbar:{Track:"#B8B4B0",Hover:"#A0A09C"},Selection:{Background:"rgba(85, 85, 85, 0.2)"},Focus:{Outline:"#555555"},Syntax:{Keyword:"#7038A0",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#666666",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"Georgia, 'Times New Roman', serif",Mono:"'Courier New', Courier, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#404040",Accent:"#555555",Muted:"#909090",Light:"#D0CCC8",WarmBeige:"#DAD6D2",TealTint:"#CCC8C4",Lavender:"#D2D0CE",AmberTint:"#D8D2C8",PdfFill:"#D8C8C0",PdfText:"#AA3333"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],40:[function(t,e,o){e.exports={Hash:"cyberpunk",Name:"Cyberpunk",Category:"Fun",Version:"0.0.1",Description:"Electric green on black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0A0E0A",Secondary:"#060806",Tertiary:"#0E120E",Panel:"#0C100C",Viewer:"#040604",Hover:"#142014",Selected:"#1A3A1A",Thumb:"#060806"},Text:{Primary:"#C8FFC8",Secondary:"#A0D8A0",Muted:"#608860",Dim:"#406040",Placeholder:"#305030"},Brand:{Accent:"#00FF41",AccentHover:"#44FF77"},Border:{Default:"#1A2A1A",Light:"#224022"},Status:{Danger:"#FF3333",DangerMuted:"#AA2222"},Scrollbar:{Track:"#1A2A1A",Hover:"#2A4A2A"},Selection:{Background:"rgba(0, 255, 65, 0.2)"},Focus:{Outline:"#00FF41"},Syntax:{Keyword:"#FF00FF",String:"#00FF41",Number:"#FFFF00",Comment:"#406040",Operator:"#00FFFF",Punctuation:"#A0D8A0",Function:"#FF00FF",Variable:"#C8FFC8",Type:"#FFFF00",Builtin:"#FFFF00",Property:"#FF3333",Tag:"#FF3333",AttrName:"#FFFF00",AttrValue:"#00FF41"}},Typography:{Family:{Sans:"'Lucida Console', 'Courier New', monospace",Mono:"'Lucida Console', 'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#A0D8A0",Accent:"#00FF41",Muted:"#406040",Light:"#0E120E",WarmBeige:"#101610",TealTint:"#0C140C",Lavender:"#0E120E",AmberTint:"#141810",PdfFill:"#181010",PdfText:"#FF3333"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],41:[function(t,e,o){e.exports={Hash:"daylight",Name:"Daylight",Category:"Grey",Version:"0.0.1",Description:"Bright white, dark text Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#FFFFFF",Secondary:"#F0F0F0",Tertiary:"#E8E8E8",Panel:"#F5F5F5",Viewer:"#FAFAFA",Hover:"#E0E0E0",Selected:"#C8C8C8",Thumb:"#F0F0F0"},Text:{Primary:"#1A1A1A",Secondary:"#333333",Muted:"#666666",Dim:"#888888",Placeholder:"#AAAAAA"},Brand:{Accent:"#444444",AccentHover:"#222222"},Border:{Default:"#D0D0D0",Light:"#E0E0E0"},Status:{Danger:"#CC0000",DangerMuted:"#884444"},Scrollbar:{Track:"#C0C0C0",Hover:"#A0A0A0"},Selection:{Background:"rgba(68, 68, 68, 0.2)"},Focus:{Outline:"#444444"},Syntax:{Keyword:"#7038A0",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#444444",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"'Segoe UI', system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#333333",Accent:"#444444",Muted:"#888888",Light:"#E8E8E8",WarmBeige:"#F0F0F0",TealTint:"#E0E0E0",Lavender:"#EBEBEB",AmberTint:"#F0EDE8",PdfFill:"#F0E0E0",PdfText:"#CC0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],42:[function(t,e,o){e.exports={Hash:"early-2000s",Name:"Early 2000s Web",Category:"Fun",Version:"0.0.1",Description:"Teal and silver, Web 2.0 Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#E8F4F8",Secondary:"#D0E8EE",Tertiary:"#C0DDE6",Panel:"#D8EEF2",Viewer:"#F0F8FA",Hover:"#B0D4E0",Selected:"#88C4D8",Thumb:"#D0E8EE"},Text:{Primary:"#1A3A4A",Secondary:"#2A4A5A",Muted:"#5A7A8A",Dim:"#7A9AAA",Placeholder:"#9ABACA"},Brand:{Accent:"#0099CC",AccentHover:"#00AADD"},Border:{Default:"#A0C8D8",Light:"#B8D8E4"},Status:{Danger:"#CC3300",DangerMuted:"#994422"},Scrollbar:{Track:"#A0C8D8",Hover:"#88B8CC"},Selection:{Background:"rgba(0, 153, 204, 0.2)"},Focus:{Outline:"#0099CC"},Syntax:{Keyword:"#1A4080",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#333333",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"Verdana, Geneva, Tahoma, sans-serif",Mono:"'Lucida Console', Monaco, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#2A4A5A",Accent:"#0099CC",Muted:"#7A9AAA",Light:"#C0DDE6",WarmBeige:"#D0E8EE",TealTint:"#B0D8E4",Lavender:"#C8DCE6",AmberTint:"#D8E0D0",PdfFill:"#E0C8C0",PdfText:"#CC3300"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],43:[function(t,e,o){e.exports={Hash:"evening",Name:"Evening",Category:"Grey",Version:"0.0.1",Description:"Medium grey, transitional Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#484848",Secondary:"#3C3C3C",Tertiary:"#424242",Panel:"#454545",Viewer:"#363636",Hover:"#525252",Selected:"#606060",Thumb:"#3C3C3C"},Text:{Primary:"#E0E0E0",Secondary:"#D0D0D0",Muted:"#A0A0A0",Dim:"#888888",Placeholder:"#707070"},Brand:{Accent:"#C0C0C0",AccentHover:"#E0E0E0"},Border:{Default:"#585858",Light:"#606060"},Status:{Danger:"#FF6666",DangerMuted:"#AA6666"},Scrollbar:{Track:"#585858",Hover:"#686868"},Selection:{Background:"rgba(192, 192, 192, 0.25)"},Focus:{Outline:"#C0C0C0"},Syntax:{Keyword:"#B894FF",String:"#A8D8B0",Number:"#FFB880",Comment:"#8A8A8A",Operator:"#7EC0FF",Punctuation:"#BBBBBB",Function:"#FFCC80",Variable:"#DDDDDD",Type:"#FFB880",Builtin:"#FFB880",Property:"#FF9494",Tag:"#FF9494",AttrName:"#FFB880",AttrValue:"#A8D8B0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0D0D0",Accent:"#C0C0C0",Muted:"#888888",Light:"#424242",WarmBeige:"#484848",TealTint:"#3E3E3E",Lavender:"#444444",AmberTint:"#4A4640",PdfFill:"#4A3C3C",PdfText:"#FF6666"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],44:[function(t,e,o){e.exports={Hash:"forest",Name:"Forest",Category:"Fun",Version:"0.0.1",Description:"Deep greens and earth browns Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A2018",Secondary:"#141A12",Tertiary:"#1E2620",Panel:"#1C221A",Viewer:"#101410",Hover:"#283828",Selected:"#344834",Thumb:"#141A12"},Text:{Primary:"#D0DCC8",Secondary:"#B0C4A8",Muted:"#809878",Dim:"#607858",Placeholder:"#486040"},Brand:{Accent:"#6AAF5C",AccentHover:"#88CC78"},Border:{Default:"#2A3A28",Light:"#3A4A38"},Status:{Danger:"#CC4422",DangerMuted:"#884422"},Scrollbar:{Track:"#2A3A28",Hover:"#3A4A38"},Selection:{Background:"rgba(106, 175, 92, 0.25)"},Focus:{Outline:"#6AAF5C"},Syntax:{Keyword:"#D4E157",String:"#A5D6A7",Number:"#FFB74D",Comment:"#5D6F58",Operator:"#80CBC4",Punctuation:"#A8C8A0",Function:"#FFCC80",Variable:"#C8E6C9",Type:"#FFB74D",Builtin:"#FFB74D",Property:"#FF8A65",Tag:"#FF8A65",AttrName:"#FFB74D",AttrValue:"#A5D6A7"}},Typography:{Family:{Sans:"'Palatino Linotype', 'Book Antiqua', Palatino, serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#B0C4A8",Accent:"#6AAF5C",Muted:"#607858",Light:"#1E2620",WarmBeige:"#22281E",TealTint:"#1A221A",Lavender:"#1E2420",AmberTint:"#262218",PdfFill:"#261A18",PdfText:"#CC4422"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],45:[function(t,e,o){e.exports={Hash:"hotdog",Name:"Hotdog",Category:"Fun",Version:"0.0.1",Description:"Red and mustard yellow, garish Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#8B0000",Secondary:"#6B0000",Tertiary:"#7B0000",Panel:"#750000",Viewer:"#550000",Hover:"#AA1111",Selected:"#BB3300",Thumb:"#6B0000"},Text:{Primary:"#FFD700",Secondary:"#FFC000",Muted:"#CC9900",Dim:"#AA7700",Placeholder:"#886600"},Brand:{Accent:"#FFD700",AccentHover:"#FFEE44"},Border:{Default:"#AA2222",Light:"#BB3333"},Status:{Danger:"#FFFF00",DangerMuted:"#CCCC00"},Scrollbar:{Track:"#AA2222",Hover:"#CC3333"},Selection:{Background:"rgba(255, 215, 0, 0.3)"},Focus:{Outline:"#FFD700"},Syntax:{Keyword:"#FFD800",String:"#FFFFFF",Number:"#FFD800",Comment:"#9C2828",Operator:"#FFD800",Punctuation:"#FFFFFF",Function:"#FFD800",Variable:"#FFFFFF",Type:"#FFD800",Builtin:"#FFD800",Property:"#FFD800",Tag:"#FFD800",AttrName:"#FFD800",AttrValue:"#FFFFFF"}},Typography:{Family:{Sans:"Impact, 'Arial Black', sans-serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#FFC000",Accent:"#FFD700",Muted:"#AA7700",Light:"#7B0000",WarmBeige:"#800000",TealTint:"#6B0000",Lavender:"#780000",AmberTint:"#7A1000",PdfFill:"#6B0000",PdfText:"#FFFF00"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],46:[function(t,e,o){e.exports={Hash:"mobile-debug",Name:"Mobile Container Debug",Category:"Debug",Version:"0.0.1",Description:"Unique color per container for layout debugging Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#FF0000",Secondary:"#00CCCC",Tertiary:"#00AA00",Panel:"#FFAA00",Viewer:"#333333",Hover:"rgba(255, 255, 255, 0.2)",Selected:"rgba(255, 255, 255, 0.3)",Thumb:"#AA00AA"},Text:{Primary:"#FFFFFF",Secondary:"#EEEEEE",Muted:"#CCCCCC",Dim:"#AAAAAA",Placeholder:"#888888"},Brand:{Accent:"#FFFF00",AccentHover:"#FFFF88"},Border:{Default:"#FFFFFF",Light:"#CCCCCC"},Status:{Danger:"#FF0000",DangerMuted:"#CC4444"},Scrollbar:{Track:"#888888",Hover:"#AAAAAA"},Selection:{Background:"rgba(255, 255, 0, 0.3)"},Focus:{Outline:"#FFFF00"},Syntax:{Keyword:"#A626A4",String:"#50A14F",Number:"#986801",Comment:"#A0A1A7",Operator:"#0184BC",Punctuation:"#383A42",Function:"#4078F2",Variable:"#383A42",Type:"#C18401",Builtin:"#986801",Property:"#E45649",Tag:"#E45649",AttrName:"#986801",AttrValue:"#50A14F"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#FFFFFF",Accent:"#FFFF00",Muted:"#CCCCCC",Light:"#333333",WarmBeige:"#FFAA00",TealTint:"#00CCCC",Lavender:"#AA00AA",AmberTint:"#FFAA00",PdfFill:"#FF4444",PdfText:"#FFFFFF"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],47:[function(t,e,o){e.exports={Hash:"neo-tokyo",Name:"Neo-Tokyo",Category:"Fun",Version:"0.0.1",Description:"Neon pink on dark navy Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0D0D2B",Secondary:"#080820",Tertiary:"#121235",Panel:"#0F0F28",Viewer:"#060615",Hover:"#1A1A42",Selected:"#2A1845",Thumb:"#080820"},Text:{Primary:"#E8E0F0",Secondary:"#D0C8E0",Muted:"#9088A8",Dim:"#6860A0",Placeholder:"#504888"},Brand:{Accent:"#FF2D8A",AccentHover:"#FF5AA0"},Border:{Default:"#2A2050",Light:"#382868"},Status:{Danger:"#FF4466",DangerMuted:"#AA3355"},Scrollbar:{Track:"#2A2050",Hover:"#3A3068"},Selection:{Background:"rgba(255, 45, 138, 0.25)"},Focus:{Outline:"#FF2D8A"},Syntax:{Keyword:"#FF4E9F",String:"#A1FFCE",Number:"#FFD93D",Comment:"#807A9E",Operator:"#7DF9FF",Punctuation:"#C0BCEB",Function:"#FFCC80",Variable:"#E0D8FF",Type:"#FFD93D",Builtin:"#FFD93D",Property:"#FF6E6E",Tag:"#FF6E6E",AttrName:"#FFD93D",AttrValue:"#A1FFCE"}},Typography:{Family:{Sans:"'Courier New', monospace",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0C8E0",Accent:"#FF2D8A",Muted:"#6860A0",Light:"#121235",WarmBeige:"#141438",TealTint:"#100E30",Lavender:"#141232",AmberTint:"#1A1228",PdfFill:"#1A1028",PdfText:"#FF4466"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],48:[function(t,e,o){e.exports={Hash:"night",Name:"Night",Category:"Grey",Version:"0.0.1",Description:"Near-black, minimal contrast Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0A0A0A",Secondary:"#060606",Tertiary:"#0E0E0E",Panel:"#0C0C0C",Viewer:"#040404",Hover:"#161616",Selected:"#252525",Thumb:"#060606"},Text:{Primary:"#888888",Secondary:"#707070",Muted:"#555555",Dim:"#444444",Placeholder:"#333333"},Brand:{Accent:"#666666",AccentHover:"#808080"},Border:{Default:"#1A1A1A",Light:"#222222"},Status:{Danger:"#AA4444",DangerMuted:"#663333"},Scrollbar:{Track:"#1A1A1A",Hover:"#2A2A2A"},Selection:{Background:"rgba(102, 102, 102, 0.2)"},Focus:{Outline:"#666666"},Syntax:{Keyword:"#C28FFF",String:"#B0E0B0",Number:"#FFA070",Comment:"#888888",Operator:"#80C8FF",Punctuation:"#BBBBBB",Function:"#FFD080",Variable:"#DDDDDD",Type:"#FFB870",Builtin:"#FFB870",Property:"#FF9090",Tag:"#FF9090",AttrName:"#FFB870",AttrValue:"#B0E0B0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#707070",Accent:"#666666",Muted:"#444444",Light:"#0E0E0E",WarmBeige:"#121212",TealTint:"#0C0C0C",Lavender:"#101010",AmberTint:"#141210",PdfFill:"#141010",PdfText:"#AA4444"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],49:[function(t,e,o){e.exports={Hash:"playground-corp",Name:"Playground Corp",Version:"0.0.1",Description:"A different paired starter — corporate teal palette, rounder corners.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#fbfbfd",Dark:"#0e1416"},Secondary:{Light:"#eef3f6",Dark:"#152024"},Tertiary:{Light:"#dde7ec",Dark:"#1e2c30"},Panel:{Light:"#ffffff",Dark:"#162126"},Hover:{Light:"#e5edf1",Dark:"#1d292e"}},Text:{Primary:{Light:"#0a1d22",Dark:"#e3edf0"},Secondary:{Light:"#3a5b65",Dark:"#a8c0c8"},Muted:{Light:"#647e87",Dark:"#7a929a"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Brand:{Primary:{Light:"#117a8b",Dark:"#3ec0d4"},PrimaryHover:{Light:"#0e6271",Dark:"#5fd0e0"},Accent:{Light:"#d97706",Dark:"#fb923c"}},Border:{Default:{Light:"#cfdce1",Dark:"#2c3a3f"},Strong:{Light:"#86a3ac",Dark:"#4d5e64"}},Status:{Success:{Light:"#0f7a52",Dark:"#34d399"},Warning:{Light:"#b45309",Dark:"#fbbf24"},Error:{Light:"#9f1239",Dark:"#fb7185"},Info:{Light:"#1e6fbe",Dark:"#60a5fa"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}}},Typography:{Family:{Sans:"Inter, system-ui, sans-serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{SM:"0.875rem",MD:"1rem",LG:"1.25rem"},Weight:{Regular:"400",Bold:"700"}},Spacing:{XS:"4px",SM:"8px",MD:"14px",LG:"20px",XL:"28px"},Radius:{SM:"4px",MD:"10px",LG:"16px"}},Brand:{Name:"Corp"},Aliases:{"--pict-modal-overlay-bg":"Color.Background.Tertiary","--pict-modal-bg":"Color.Background.Panel","--pict-modal-fg":"Color.Text.Primary","--pict-modal-border":"Color.Border.Default","--pict-modal-shadow":"Color.Border.Strong","--pict-modal-header-bg":"Color.Background.Secondary","--pict-modal-header-fg":"Color.Text.Primary","--pict-modal-header-border":"Color.Border.Default","--pict-modal-btn-bg":"Color.Background.Secondary","--pict-modal-btn-fg":"Color.Text.Primary","--pict-modal-btn-hover-bg":"Color.Background.Hover","--pict-modal-btn-primary-bg":"Color.Brand.Primary","--pict-modal-btn-primary-fg":"Color.Text.OnBrand","--pict-modal-btn-primary-hover-bg":"Color.Brand.PrimaryHover","--pict-modal-btn-danger-bg":"Color.Status.Error","--pict-modal-btn-danger-fg":"Color.Text.OnBrand","--pict-modal-btn-danger-hover-bg":"Color.Status.Error","--pict-modal-toast-bg":"Color.Background.Panel","--pict-modal-toast-fg":"Color.Text.Primary","--pict-modal-toast-shadow":"Color.Border.Strong","--pict-modal-toast-success-bg":"Color.Status.Success","--pict-modal-toast-error-bg":"Color.Status.Error","--pict-modal-toast-warning-bg":"Color.Status.Warning","--pict-modal-toast-info-bg":"Color.Status.Info","--pict-modal-tooltip-bg":"Color.Background.Tertiary","--pict-modal-tooltip-fg":"Color.Text.Primary","--pict-modal-font-family":"Typography.Family.Sans","--pict-um-bg":"Color.Background.Panel","--pict-um-fg":"Color.Text.Primary","--pict-um-muted":"Color.Text.Muted","--pict-um-accent":"Color.Brand.Primary","--pict-um-border":"Color.Border.Default","--pict-um-border-soft":"Color.Border.Light","--pict-um-input-bg":"Color.Background.Primary","--pict-um-pill-bg":"Color.Background.Tertiary","--pict-um-font":"Typography.Family.Sans"}}},{}],50:[function(t,e,o){e.exports={Hash:"playground-starter",Name:"Playground Starter",Version:"0.0.1",Description:"A complete paired light/dark starter theme. Edit any token and watch the gallery reflow.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#1a1a1a"},Secondary:{Light:"#f5f5f5",Dark:"#242424"},Tertiary:{Light:"#ebebeb",Dark:"#2e2e2e"},Panel:{Light:"#ffffff",Dark:"#222222"},Hover:{Light:"#f0f0f0",Dark:"#2a2a2a"}},Text:{Primary:{Light:"#1a1a1a",Dark:"#ededed"},Secondary:{Light:"#454545",Dark:"#bdbdbd"},Muted:{Light:"#6b6b6b",Dark:"#888888"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Brand:{Primary:{Light:"#3357c7",Dark:"#6b8eff"},PrimaryHover:{Light:"#2848b3",Dark:"#88a4ff"},Accent:{Light:"#c75033",Dark:"#ff8a6b"}},Border:{Default:{Light:"#d6d6d6",Dark:"#3a3a3a"},Strong:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Status:{Success:{Light:"#2e7a3a",Dark:"#5fc377"},Warning:{Light:"#a86b00",Dark:"#f0b84a"},Error:{Light:"#b62828",Dark:"#ff7373"},Info:{Light:"#1f6fb5",Dark:"#5fb4ff"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}}},Typography:{Family:{Sans:"system-ui, -apple-system, Segoe UI, Roboto, sans-serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{SM:"0.875rem",MD:"1rem",LG:"1.25rem"},Weight:{Regular:"400",Bold:"700"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px"},Radius:{SM:"2px",MD:"6px",LG:"10px"}},Brand:{Name:"Playground"},Aliases:{"--pict-modal-overlay-bg":"Color.Background.Tertiary","--pict-modal-bg":"Color.Background.Panel","--pict-modal-fg":"Color.Text.Primary","--pict-modal-border":"Color.Border.Default","--pict-modal-shadow":"Color.Border.Strong","--pict-modal-header-bg":"Color.Background.Secondary","--pict-modal-header-fg":"Color.Text.Primary","--pict-modal-header-border":"Color.Border.Default","--pict-modal-btn-bg":"Color.Background.Secondary","--pict-modal-btn-fg":"Color.Text.Primary","--pict-modal-btn-hover-bg":"Color.Background.Hover","--pict-modal-btn-primary-bg":"Color.Brand.Primary","--pict-modal-btn-primary-fg":"Color.Text.OnBrand","--pict-modal-btn-primary-hover-bg":"Color.Brand.PrimaryHover","--pict-modal-btn-danger-bg":"Color.Status.Error","--pict-modal-btn-danger-fg":"Color.Text.OnBrand","--pict-modal-btn-danger-hover-bg":"Color.Status.Error","--pict-modal-toast-bg":"Color.Background.Panel","--pict-modal-toast-fg":"Color.Text.Primary","--pict-modal-toast-shadow":"Color.Border.Strong","--pict-modal-toast-success-bg":"Color.Status.Success","--pict-modal-toast-error-bg":"Color.Status.Error","--pict-modal-toast-warning-bg":"Color.Status.Warning","--pict-modal-toast-info-bg":"Color.Status.Info","--pict-modal-tooltip-bg":"Color.Background.Tertiary","--pict-modal-tooltip-fg":"Color.Text.Primary","--pict-modal-font-family":"Typography.Family.Sans","--pict-um-bg":"Color.Background.Panel","--pict-um-fg":"Color.Text.Primary","--pict-um-muted":"Color.Text.Muted","--pict-um-accent":"Color.Brand.Primary","--pict-um-border":"Color.Border.Default","--pict-um-border-soft":"Color.Border.Light","--pict-um-input-bg":"Color.Background.Primary","--pict-um-pill-bg":"Color.Background.Tertiary","--pict-um-font":"Typography.Family.Sans"}}},{}],51:[function(t,e,o){e.exports={Hash:"retold-content-system",Name:"Retold Content System",Version:"0.0.1",Description:"Default palette for the Retold Content System editor — warm beige with teal accents. Light side preserves the original retold-content-system.css palette verbatim; dark side keeps the teal accent and warms the backgrounds into a deep walnut/charcoal range so dark mode reads as the same family of values rather than a generic dark theme.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#F5F3EE",Dark:"#1F1B17"},Secondary:{Light:"#FAF8F4",Dark:"#2A251F"},Tertiary:{Light:"#F0EDE8",Dark:"#332D26"},Panel:{Light:"#FFFFFF",Dark:"#26221C"},Hover:{Light:"#EDE9E3",Dark:"#383028"},Selected:{Light:"#DCE9E7",Dark:"#1E3833"}},Text:{Primary:{Light:"#3D3229",Dark:"#E8DCC8"},Secondary:{Light:"#5E5549",Dark:"#C0B5A4"},Muted:{Light:"#8A7F72",Dark:"#8E8478"},Placeholder:{Light:"#A89E91",Dark:"#6E6457"},OnBrand:{Light:"#FFFFFF",Dark:"#1F1B17"}},Brand:{Primary:{Light:"#2E7D74",Dark:"#4FB3A6"},PrimaryHover:{Light:"#3A9E92",Dark:"#65CBBE"},Accent:{Light:"#2E7D74",Dark:"#4FB3A6"},AccentHover:{Light:"#3A9E92",Dark:"#65CBBE"}},Border:{Default:{Light:"#DDD6CA",Dark:"#3F362C"},Light:{Light:"#E8E2D7",Dark:"#33291F"},Strong:{Light:"#C4BDB0",Dark:"#5A4F40"}},Status:{Success:{Light:"#7BC47F",Dark:"#8FD493"},Warning:{Light:"#E8A94D",Dark:"#F0BE6E"},Error:{Light:"#D9534F",Dark:"#E87B78"},Info:{Light:"#5DA6C7",Dark:"#7FBDD8"}},Scrollbar:{Track:{Light:"#F5F0E8",Dark:"#26221C"},Thumb:{Light:"#C4BDB0",Dark:"#4A4036"},Hover:{Light:"#8A7F72",Dark:"#6A5F50"}},Selection:{Background:{Light:"#CDE3E0",Dark:"#2E5B55"},Text:{Light:"#3D3229",Dark:"#E8DCC8"}},Focus:{Outline:{Light:"#2E7D74",Dark:"#4FB3A6"}},Shadow:{Color:{Light:"rgba(61, 50, 41, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#A0532E",Dark:"#E89A6E"},String:{Light:"#3F8A52",Dark:"#8FD493"},Number:{Light:"#A86B00",Dark:"#E8A94D"},Comment:{Light:"#8A7F72",Dark:"#8E8478"},Operator:{Light:"#2E7D74",Dark:"#4FB3A6"},Punctuation:{Light:"#5E5549",Dark:"#C0B5A4"},Function:{Light:"#2E5E96",Dark:"#7FBDD8"},Variable:{Light:"#3D3229",Dark:"#E8DCC8"},Type:{Light:"#A86B00",Dark:"#E8A94D"},Builtin:{Light:"#A86B00",Dark:"#E8A94D"},Property:{Light:"#A0532E",Dark:"#E89A6E"},Tag:{Light:"#A0532E",Dark:"#E89A6E"},AttrName:{Light:"#A86B00",Dark:"#E8A94D"},AttrValue:{Light:"#3F8A52",Dark:"#8FD493"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"250px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"Retold Content",Tagline:"Author content for the Retold ecosystem."}}},{}],52:[function(t,e,o){e.exports={Hash:"retold-default",Name:"Retold Default",Version:"0.0.1",Description:"The reference paired light/dark theme for the Retold ecosystem. Neutral palette suitable for any app; dark mode is mid-grey rather than pure black to reduce eye strain.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#1a1a1a"},Secondary:{Light:"#f5f5f5",Dark:"#242424"},Tertiary:{Light:"#ebebeb",Dark:"#2e2e2e"},Panel:{Light:"#ffffff",Dark:"#222222"},Hover:{Light:"#f0f0f0",Dark:"#2a2a2a"},Selected:{Light:"#e0eaff",Dark:"#2a3550"}},Text:{Primary:{Light:"#1a1a1a",Dark:"#ededed"},Secondary:{Light:"#454545",Dark:"#bdbdbd"},Muted:{Light:"#6b6b6b",Dark:"#888888"},Placeholder:{Light:"#9a9a9a",Dark:"#6a6a6a"}},Brand:{Primary:{Light:"#3357c7",Dark:"#6b8eff"},PrimaryHover:{Light:"#2848b3",Dark:"#88a4ff"},Accent:{Light:"#c75033",Dark:"#ff8a6b"}},Border:{Default:{Light:"#d6d6d6",Dark:"#3a3a3a"},Light:{Light:"#e9e9e9",Dark:"#2c2c2c"},Strong:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Status:{Success:{Light:"#2e7a3a",Dark:"#5fc377"},Warning:{Light:"#a86b00",Dark:"#f0b84a"},Error:{Light:"#b62828",Dark:"#ff7373"},Info:{Light:"#1f6fb5",Dark:"#5fb4ff"}},Scrollbar:{Track:{Light:"#ebebeb",Dark:"#1f1f1f"},Thumb:{Light:"#c2c2c2",Dark:"#3f3f3f"},Hover:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Selection:{Background:{Light:"#bcd2ff",Dark:"#3a4f7a"},Text:{Light:"#1a1a1a",Dark:"#ededed"}},Focus:{Outline:{Light:"#3357c7",Dark:"#6b8eff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}},Editor:{LineNumberBackground:{Light:"#f5f5f5",Dark:"#1f1f1f"},LineNumberText:{Light:"#9a9a9a",Dark:"#6a6a6a"},CurrentLineHighlight:{Light:"#f0f0f0",Dark:"#2a2a2a"},SelectionBackground:{Light:"#bcd2ff",Dark:"#3a4f7a"},GutterBorder:{Light:"#e9e9e9",Dark:"#2c2c2c"}}},Typography:{Family:{Sans:"system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif",Serif:"Georgia, Cambria, Times New Roman, Times, serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.45",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Shadow:{SM:"0 1px 2px var(--theme-color-shadow-color)",MD:"0 2px 6px var(--theme-color-shadow-color)",LG:"0 6px 18px var(--theme-color-shadow-color)"},ZIndex:{Base:"0",Dropdown:"100",Sticky:"200",Overlay:"900",Modal:"1000",Toast:"2000",Tooltip:"3000"},Duration:{Fast:"100ms",Normal:"200ms",Slow:"400ms"}},Brand:{Name:"Retold",Tagline:"A suite of JavaScript modules for building web applications and APIs."},CSS:[{Hash:"retold-default-brand-accents",Priority:600,Content:"/* retold-default — subtle brand-aware accents.\n Falls back gracefully to theme-color tokens when no brand is registered,\n so non-branded apps still look right. */\na { text-decoration-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, currentColor)); text-decoration-thickness: 2px; text-underline-offset: 3px; }\nh1 { border-bottom: 2px solid var(--brand-color-primary-mode, var(--theme-color-border-default, transparent)); padding-bottom: 6px; }\nh2 { border-bottom: 1px solid var(--brand-color-secondary-mode, var(--theme-color-border-light, transparent)); padding-bottom: 4px; }"}]}},{}],53:[function(t,e,o){e.exports={Hash:"retold-manager",Name:"Retold Manager",Description:"Default palette for the Retold Manager application — GitHub-style dark on slate with a parallel light variant. Dark side mirrors retold-manager.css's original colors verbatim; light side is a sympathetic translation tuned for daytime use. The retold-manager.css :root block proxies its --color-* names through these --theme-color-* tokens (with the original hexes as fallbacks), so this theme drives the whole app cleanly and other catalog themes still skin most of it.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#f6f8fa",Dark:"#0e1116"},Secondary:{Light:"#eef1f4",Dark:"#161b22"},Tertiary:{Light:"#e4e8ec",Dark:"#1c2128"},Panel:{Light:"#ffffff",Dark:"#161b22"},PanelAlt:{Light:"#f0f3f6",Dark:"#1c2128"},Hover:{Light:"#eaeef2",Dark:"#1c2128"},Selected:{Light:"#dbe7ff",Dark:"#243454"}},Border:{Default:{Light:"#d0d7de",Dark:"#30363d"},Light:{Light:"#e1e4e8",Dark:"#21262d"},Strong:{Light:"#a8b1bb",Dark:"#484f58"}},Brand:{Primary:{Light:"#0969da",Dark:"#2f81f7"},PrimaryHover:{Light:"#0550ae",Dark:"#1f6feb"},Accent:{Light:"#0969da",Dark:"#2f81f7"},AccentHover:{Light:"#0550ae",Dark:"#1f6feb"}},Text:{Primary:{Light:"#1f2328",Dark:"#e6edf3"},Secondary:{Light:"#3b424a",Dark:"#c9d1d9"},Muted:{Light:"#656d76",Dark:"#8b949e"},Placeholder:{Light:"#8c959f",Dark:"#6e7681"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Status:{Success:{Light:"#1a7f37",Dark:"#3fb950"},Danger:{Light:"#cf222e",Dark:"#f85149"},Warning:{Light:"#9a6700",Dark:"#d29922"},Error:{Light:"#cf222e",Dark:"#f85149"},Info:{Light:"#0969da",Dark:"#2f81f7"}},Scrollbar:{Track:{Light:"#eef1f4",Dark:"#161b22"},Thumb:{Light:"#c1c8cf",Dark:"#30363d"},Hover:{Light:"#a8b1bb",Dark:"#484f58"}},Selection:{Background:{Light:"#cfe6ff",Dark:"#243454"},Text:{Light:"#1f2328",Dark:"#e6edf3"}},Focus:{Outline:{Light:"#0969da",Dark:"#2f81f7"}},Syntax:{Keyword:{Light:"#cf222e",Dark:"#ff7b72"},String:{Light:"#0a3069",Dark:"#a5d6ff"},Number:{Light:"#0550ae",Dark:"#79c0ff"},Comment:{Light:"#6e7781",Dark:"#8b949e"},Operator:{Light:"#cf222e",Dark:"#ff7b72"},Punctuation:{Light:"#24292f",Dark:"#c9d1d9"},Function:{Light:"#8250df",Dark:"#d2a8ff"},Variable:{Light:"#24292f",Dark:"#c9d1d9"},Type:{Light:"#953800",Dark:"#ffa657"},Builtin:{Light:"#0550ae",Dark:"#79c0ff"},Property:{Light:"#0550ae",Dark:"#79c0ff"},Tag:{Light:"#116329",Dark:"#7ee787"},AttrName:{Light:"#8250df",Dark:"#d2a8ff"},AttrValue:{Light:"#0a3069",Dark:"#a5d6ff"}}},Typography:{Family:{Sans:'-apple-system, BlinkMacSystemFont, "SF Pro", "Segoe UI", sans-serif',Mono:'ui-monospace, "SF Mono", Menlo, Monaco, "Courier New", monospace'}},Layout:{SidebarWidth:"280px",TopbarHeight:"44px",StatusbarHeight:"28px"}}}},{}],54:[function(t,e,o){e.exports={Hash:"retold-mono",Name:"Retold Mono",Version:"0.0.2",Description:"High-contrast monochrome theme — black on white in light mode, white on black in dark mode. Useful for print, simple admin tooling, and as a paired-mode reference theme that proves the toggle works on something visually unmistakable.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#000000"},Secondary:{Light:"#f0f0f0",Dark:"#101010"},Tertiary:{Light:"#e2e2e2",Dark:"#1c1c1c"},Panel:{Light:"#ffffff",Dark:"#000000"},Hover:{Light:"#ebebeb",Dark:"#1a1a1a"},Selected:{Light:"#d6d6d6",Dark:"#2a2a2a"}},Text:{Primary:{Light:"#000000",Dark:"#ffffff"},Secondary:{Light:"#222222",Dark:"#dddddd"},Muted:{Light:"#555555",Dark:"#aaaaaa"},Placeholder:{Light:"#888888",Dark:"#777777"}},Brand:{Primary:{Light:"#000000",Dark:"#ffffff"},PrimaryHover:{Light:"#222222",Dark:"#dddddd"},Accent:{Light:"#444444",Dark:"#bbbbbb"}},Border:{Default:{Light:"#888888",Dark:"#666666"},Light:{Light:"#cccccc",Dark:"#333333"},Strong:{Light:"#000000",Dark:"#ffffff"}},Status:{Success:{Light:"#000000",Dark:"#ffffff"},Warning:{Light:"#000000",Dark:"#ffffff"},Error:{Light:"#000000",Dark:"#ffffff"},Info:{Light:"#000000",Dark:"#ffffff"}},Scrollbar:{Track:{Light:"#e0e0e0",Dark:"#101010"},Thumb:{Light:"#888888",Dark:"#666666"},Hover:{Light:"#444444",Dark:"#bbbbbb"}},Selection:{Background:{Light:"#000000",Dark:"#ffffff"},Text:{Light:"#ffffff",Dark:"#000000"}},Focus:{Outline:{Light:"#000000",Dark:"#ffffff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.18)",Dark:"rgba(255, 255, 255, 0.18)"}},Syntax:{Keyword:{Light:"#000000",Dark:"#ffffff"},String:{Light:"#555555",Dark:"#cccccc"},Number:{Light:"#000000",Dark:"#ffffff"},Comment:{Light:"#888888",Dark:"#888888"},Operator:{Light:"#000000",Dark:"#ffffff"},Punctuation:{Light:"#444444",Dark:"#bbbbbb"},Function:{Light:"#000000",Dark:"#ffffff"},Variable:{Light:"#000000",Dark:"#ffffff"},Type:{Light:"#222222",Dark:"#dddddd"},Builtin:{Light:"#222222",Dark:"#dddddd"},Property:{Light:"#444444",Dark:"#bbbbbb"},Tag:{Light:"#000000",Dark:"#ffffff"},AttrName:{Light:"#444444",Dark:"#bbbbbb"},AttrValue:{Light:"#555555",Dark:"#cccccc"}}},Typography:{Family:{Sans:"Helvetica, Arial, sans-serif",Serif:"Georgia, Times New Roman, serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"600",Bold:"700"},LineHeight:{Tight:"1.15",Normal:"1.4",Loose:"1.65"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"0",MD:"0",LG:"0",XL:"0",Pill:"999px"},Shadow:{SM:"0 1px 0 var(--theme-color-shadow-color)",MD:"0 2px 0 var(--theme-color-shadow-color)",LG:"0 4px 0 var(--theme-color-shadow-color)"},ZIndex:{Base:"0",Dropdown:"100",Sticky:"200",Overlay:"900",Modal:"1000",Toast:"2000",Tooltip:"3000"},Duration:{Fast:"0ms",Normal:"0ms",Slow:"0ms"}},Brand:{Name:"Retold Mono",Tagline:"Black on white. White on black. Nothing else."},CSS:[{Hash:"retold-mono-brand-accents",Priority:600,Content:"/* retold-mono — keeps the all-monochrome aesthetic but lets brand colors\n in for narrow accent moments. The thick rule under H1 is brand primary;\n the hair rule under H2 is brand secondary. Without a brand registered\n they fall back to mono black/grey. */\na { text-decoration-color: var(--brand-color-primary-mode, currentColor); text-decoration-thickness: 2px; text-underline-offset: 3px; }\nh1 { border-bottom: 3px solid var(--brand-color-primary-mode, var(--theme-color-text-primary, #000)); padding-bottom: 6px; }\nh2 { border-bottom: 1px solid var(--brand-color-secondary-mode, var(--theme-color-border-default, #888)); padding-bottom: 4px; }"}]}},{}],55:[function(t,e,o){e.exports={Hash:"solarized-dark",Name:"Solarized Dark",Category:"Fun",Version:"0.0.1",Description:"Schoonover's classic palette Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#002B36",Secondary:"#073642",Tertiary:"#003B4A",Panel:"#00303C",Viewer:"#001E28",Hover:"#0A4858",Selected:"#155868",Thumb:"#073642"},Text:{Primary:"#FDF6E3",Secondary:"#EEE8D5",Muted:"#93A1A1",Dim:"#839496",Placeholder:"#657B83"},Brand:{Accent:"#268BD2",AccentHover:"#45A0E0"},Border:{Default:"#0A4050",Light:"#125868"},Status:{Danger:"#DC322F",DangerMuted:"#AA2A28"},Scrollbar:{Track:"#0A4050",Hover:"#125868"},Selection:{Background:"rgba(38, 139, 210, 0.25)"},Focus:{Outline:"#268BD2"},Syntax:{Keyword:"#859900",String:"#2AA198",Number:"#D33682",Comment:"#586E75",Operator:"#268BD2",Punctuation:"#93A1A1",Function:"#B58900",Variable:"#FDF6E3",Type:"#B58900",Builtin:"#CB4B16",Property:"#268BD2",Tag:"#268BD2",AttrName:"#B58900",AttrValue:"#2AA198"}},Typography:{Family:{Sans:"'Source Code Pro', 'Fira Code', monospace",Mono:"'Source Code Pro', 'Fira Code', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#EEE8D5",Accent:"#268BD2",Muted:"#839496",Light:"#003B4A",WarmBeige:"#073642",TealTint:"#004050",Lavender:"#003848",AmberTint:"#0A3A30",PdfFill:"#0A3028",PdfText:"#DC322F"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],56:[function(t,e,o){e.exports={Hash:"synthwave",Name:"Synthwave",Category:"Fun",Version:"0.0.1",Description:"Purple and pink neon Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A0A2E",Secondary:"#140824",Tertiary:"#200E38",Panel:"#1C0C32",Viewer:"#100620",Hover:"#2A1848",Selected:"#3A2060",Thumb:"#140824"},Text:{Primary:"#E8C0F8",Secondary:"#D0A8E8",Muted:"#9878B8",Dim:"#7858A8",Placeholder:"#584088"},Brand:{Accent:"#FF71CE",AccentHover:"#FF99DD"},Border:{Default:"#302050",Light:"#402868"},Status:{Danger:"#FF4488",DangerMuted:"#AA3366"},Scrollbar:{Track:"#302050",Hover:"#402868"},Selection:{Background:"rgba(255, 113, 206, 0.25)"},Focus:{Outline:"#FF71CE"},Syntax:{Keyword:"#FF6AD5",String:"#FFE066",Number:"#FF6AD5",Comment:"#9C8AC1",Operator:"#26F0F1",Punctuation:"#C8B6E2",Function:"#26F0F1",Variable:"#FFE0FF",Type:"#FFD93D",Builtin:"#FFD93D",Property:"#FF477E",Tag:"#FF477E",AttrName:"#FFD93D",AttrValue:"#FFE066"}},Typography:{Family:{Sans:"'Trebuchet MS', sans-serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0A8E8",Accent:"#FF71CE",Muted:"#7858A8",Light:"#200E38",WarmBeige:"#221040",TealTint:"#1A0C30",Lavender:"#1E0E36",AmberTint:"#241028",PdfFill:"#241020",PdfText:"#FF4488"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],57:[function(t,e,o){e.exports={Hash:"twilight",Name:"Twilight",Category:"Grey",Version:"0.0.1",Description:"Dark grey, low light. Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format. Single-mode (no light/dark bifurcation). Aliases preserve the legacy `--retold-*` variable names so existing CSS keeps working through the migration.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1E1E1E",Secondary:"#181818",Tertiary:"#252525",Panel:"#202020",Viewer:"#141414",Hover:"#2E2E2E",Selected:"#404040",Thumb:"#181818"},Text:{Primary:"#E0E0E0",Secondary:"#C8C8C8",Muted:"#909090",Dim:"#707070",Placeholder:"#585858"},Brand:{Accent:"#A0A0A0",AccentHover:"#C0C0C0"},Border:{Default:"#333333",Light:"#404040"},Status:{Danger:"#FF6666",DangerMuted:"#AA6666"},Scrollbar:{Track:"#404040",Hover:"#505050"},Selection:{Background:"rgba(160, 160, 160, 0.25)"},Focus:{Outline:"#A0A0A0"},Syntax:{Keyword:"#B58FFF",String:"#9CDFB0",Number:"#FFB870",Comment:"#6E6E6E",Operator:"#7CC5FF",Punctuation:"#C0C0C0",Function:"#FFD080",Variable:"#E0E0E0",Type:"#FFB870",Builtin:"#FFB870",Property:"#FF8B8B",Tag:"#FF8B8B",AttrName:"#FFB870",AttrValue:"#9CDFB0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#C8C8C8",Accent:"#A0A0A0",Muted:"#707070",Light:"#252525",WarmBeige:"#2A2A2A",TealTint:"#222222",Lavender:"#282828",AmberTint:"#2E2A24",PdfFill:"#2E2224",PdfText:"#E06060"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],58:[function(t,e,o){e.exports={Hash:"ultravisor-desert-canyon",Name:"Ultravisor — Desert Canyon",Version:"0.0.1",Description:"Vibrant desert palette — orange brand and teal accents on deep canyon-brown backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#18120e",Secondary:"#221a14",Tertiary:"#2e2018",Panel:"#221a14",Hover:"#3a2a1e",Selected:"#3a2a1e"},Text:{Primary:"#d8c8b0",Secondary:"#e8d8c0",Muted:"#a09080",Placeholder:"#685040",OnBrand:"#18120e"},Brand:{Primary:"#e8943a",PrimaryHover:"#f0a44a",Accent:"#18a0a0",AccentHover:"#30b0b0"},Border:{Default:"#3a2a1e",Light:"#2e2018",Strong:"#4a3a2e"},Status:{Success:"#18a0a0",Warning:"#e0c870",Error:"#e05830",Info:"#18a0a0"},Scrollbar:{Track:"#221a14",Thumb:"#3a2a1e",Hover:"#4a3a2e"},Selection:{Background:"#3a2a1e",Text:"#e8d8c0"},Focus:{Outline:"#e8943a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#221a14",LineNumberText:"#685040",CurrentLineHighlight:"#2e2018",SelectionBackground:"#3a2a1e",GutterBorder:"#2e2018"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],59:[function(t,e,o){e.exports={Hash:"ultravisor-desert-day",Name:"Ultravisor — Desert Day",Version:"0.0.1",Description:"Ultravisor's warm light palette — cream backgrounds, deep walnut text, teal accents. Single-mode light.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#faf6f0",Secondary:"#f0e6d6",Tertiary:"#e8ddd0",Panel:"#ffffff",Hover:"#f0e6d6",Selected:"#e8ddd0"},Text:{Primary:"#3d2b1f",Secondary:"#2e1e14",Muted:"#8a7560",Placeholder:"#a09080",OnBrand:"#ffffff"},Brand:{Primary:"#5c3d2e",PrimaryHover:"#7a5040",Accent:"#3a8a8c",AccentHover:"#2a7070"},Border:{Default:"#e0d0b8",Light:"#e8ddd0",Strong:"#c8b8a0"},Status:{Success:"#5a7a30",Warning:"#b08020",Error:"#a03040",Info:"#3a8a8c"},Scrollbar:{Track:"#f0e6d6",Thumb:"#d0c0a8",Hover:"#c0b098"},Selection:{Background:"#e8ddd0",Text:"#2e1e14"},Focus:{Outline:"#c2703e"},Shadow:{Color:"rgba(92, 61, 46, 0.10)"},Syntax:{Keyword:"#A0532E",String:"#3F8A52",Number:"#A86B00",Comment:"#8A7F72",Operator:"#2E7D74",Punctuation:"#5E5549",Function:"#2E5E96",Variable:"#3D3229",Type:"#A86B00",Builtin:"#A86B00",Property:"#A0532E",Tag:"#A0532E",AttrName:"#A86B00",AttrValue:"#3F8A52"},Editor:{LineNumberBackground:"#f0e6d6",LineNumberText:"#a09080",CurrentLineHighlight:"#f5ede0",SelectionBackground:"#e8ddd0",GutterBorder:"#e0d0b8"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],60:[function(t,e,o){e.exports={Hash:"ultravisor-desert-dusk",Name:"Ultravisor — Desert Dusk",Version:"0.0.1",Description:"Ultravisor's original default — warm tan brand on muted dark desert backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1a1714",Secondary:"#252018",Tertiary:"#302818",Panel:"#252018",Hover:"#3a3028",Selected:"#3a3028"},Text:{Primary:"#c8b8a0",Secondary:"#d8c8a8",Muted:"#907860",Placeholder:"#706050",OnBrand:"#FFFFFF"},Brand:{Primary:"#c4956a",PrimaryHover:"#d4a57a",Accent:"#4a9090",AccentHover:"#5aacac"},Border:{Default:"#3a3028",Light:"#302818",Strong:"#4a4038"},Status:{Success:"#8a9a5a",Warning:"#c0a050",Error:"#b04050",Info:"#4a9090"},Scrollbar:{Track:"#252018",Thumb:"#3a3028",Hover:"#4a4038"},Selection:{Background:"#3a3028",Text:"#d8c8a8"},Focus:{Outline:"#c4956a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#252018",LineNumberText:"#706050",CurrentLineHighlight:"#302818",SelectionBackground:"#3a3028",GutterBorder:"#302818"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],61:[function(t,e,o){e.exports={Hash:"ultravisor-desert-sunset",Name:"Ultravisor — Desert Sunset",Version:"0.0.1",Description:"Ultravisor's golden-hour palette — orange brand on rust-warmed dark backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1e1610",Secondary:"#2a2018",Tertiary:"#342818",Panel:"#2a2018",Hover:"#3a2e22",Selected:"#3a2e22"},Text:{Primary:"#d4c4aa",Secondary:"#e0d0b8",Muted:"#8a7560",Placeholder:"#6a5840",OnBrand:"#1e1610"},Brand:{Primary:"#e8943a",PrimaryHover:"#f0a44a",Accent:"#2a8a8a",AccentHover:"#3a9a9a"},Border:{Default:"#3a2e22",Light:"#342818",Strong:"#4a3e32"},Status:{Success:"#6a9a3a",Warning:"#d4a46a",Error:"#c44e2a",Info:"#2a8a8a"},Scrollbar:{Track:"#2a2018",Thumb:"#3a2e22",Hover:"#4a3e32"},Selection:{Background:"#3a2e22",Text:"#e0d0b8"},Focus:{Outline:"#e8943a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#2a2018",LineNumberText:"#6a5840",CurrentLineHighlight:"#342818",SelectionBackground:"#3a2e22",GutterBorder:"#342818"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],62:[function(t,e,o){e.exports={Hash:"ultravisor-professional-dark",Name:"Ultravisor — Professional Dark",Version:"0.0.1",Description:"Dark modern palette — slate-blue text on inky surfaces, sky-blue brand. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#111318",Secondary:"#1a1d24",Tertiary:"#22252e",Panel:"#1a1d24",Hover:"#282c34",Selected:"#282c34"},Text:{Primary:"#c8cdd5",Secondary:"#e0e4ea",Muted:"#8b92a0",Placeholder:"#5a6070",OnBrand:"#ffffff"},Brand:{Primary:"#60a5fa",PrimaryHover:"#93c5fd",Accent:"#60a5fa",AccentHover:"#93c5fd"},Border:{Default:"#282c34",Light:"#22252e",Strong:"#3a3f4a"},Status:{Success:"#34d399",Warning:"#fbbf24",Error:"#f87171",Info:"#60a5fa"},Scrollbar:{Track:"#1a1d24",Thumb:"#282c34",Hover:"#3a3f4a"},Selection:{Background:"#1e2230",Text:"#e0e4ea"},Focus:{Outline:"#60a5fa"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#1a1d24",LineNumberText:"#5a6070",CurrentLineHighlight:"#22252e",SelectionBackground:"#1e2230",GutterBorder:"#22252e"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],63:[function(t,e,o){e.exports={Hash:"ultravisor-professional-light",Name:"Ultravisor — Professional Light",Version:"0.0.1",Description:"Bright modern palette — slate text on near-white backgrounds, royal-blue brand. Single-mode light.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#f5f6f8",Secondary:"#ffffff",Tertiary:"#e4e7ec",Panel:"#ffffff",Hover:"#f0f1f4",Selected:"#e4e7ec"},Text:{Primary:"#2d3748",Secondary:"#1a202c",Muted:"#6b7280",Placeholder:"#9ca3af",OnBrand:"#ffffff"},Brand:{Primary:"#3b82f6",PrimaryHover:"#2563eb",Accent:"#3b82f6",AccentHover:"#2563eb"},Border:{Default:"#e2e5ea",Light:"#eceef2",Strong:"#c8cdd5"},Status:{Success:"#10b981",Warning:"#f59e0b",Error:"#ef4444",Info:"#3b82f6"},Scrollbar:{Track:"#f0f1f4",Thumb:"#d1d5db",Hover:"#b0b5bd"},Selection:{Background:"#dbeafe",Text:"#1a202c"},Focus:{Outline:"#3b82f6"},Shadow:{Color:"rgba(0, 0, 0, 0.06)"},Syntax:{Keyword:"#A0532E",String:"#3F8A52",Number:"#A86B00",Comment:"#8A7F72",Operator:"#2E7D74",Punctuation:"#5E5549",Function:"#2E5E96",Variable:"#3D3229",Type:"#A86B00",Builtin:"#A86B00",Property:"#A0532E",Tag:"#A0532E",AttrName:"#A86B00",AttrValue:"#3F8A52"},Editor:{LineNumberBackground:"#f5f6f8",LineNumberText:"#9ca3af",CurrentLineHighlight:"#f0f1f4",SelectionBackground:"#dbeafe",GutterBorder:"#e2e5ea"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],64:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o)}onAfterRender(t,e,o,n){if(this.pict.CSSMap.injectCSS(),"undefined"!=typeof document&&this.options.Height){let t=document.querySelector(".pict-theme-bottombar");t&&(t.style.minHeight=this.options.Height+"px")}let r=t=>{if(!t)return;let e=this.pict.views[t];e?e.render():this.log&&this.log.warn&&this.log.warn('Theme-BottomBar: slot view "'+t+'" not registered')};return r(this.options.StatusView),r(this.options.InfoView),r(this.options.ActionsView),super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}setStatusView(t){this._setSlotView("StatusView","#Theme-BottomBar-Status",t)}setInfoView(t){this._setSlotView("InfoView","#Theme-BottomBar-Info",t)}setActionsView(t){this._setSlotView("ActionsView","#Theme-BottomBar-Actions",t)}_setSlotView(t,e,o){if(this.options[t]=o||null,"undefined"!=typeof document){let t=document.querySelector(e);t&&(t.innerHTML="")}if(!o)return;let n=this.pict.views[o];n?n.render():this.log&&this.log.warn&&this.log.warn('Theme-BottomBar: view "'+o+'" not registered')}},e.exports.default_configuration={ViewIdentifier:"Theme-BottomBar",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-BottomBar",DefaultRenderable:"Theme-BottomBar-Renderable",StatusView:null,InfoView:null,ActionsView:null,Height:32,Templates:[{Hash:"Theme-BottomBar-Template",Template:'\n<div class="pict-theme-bottombar">\n\t<div class="pict-theme-bottombar-status" id="Theme-BottomBar-Status"></div>\n\t<div class="pict-theme-bottombar-info" id="Theme-BottomBar-Info"></div>\n\t<div class="pict-theme-bottombar-actions" id="Theme-BottomBar-Actions"></div>\n</div>'}],Renderables:[{RenderableHash:"Theme-BottomBar-Renderable",TemplateHash:"Theme-BottomBar-Template",ContentDestinationAddress:"#Theme-BottomBar",RenderMethod:"replace"}],CSS:"\n.pict-theme-bottombar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\t/* The min-height is rewritten per-instance in onAfterRender from the\n\t Height option (default 32). A fixed px value avoids the\n\t percent-height resolution trap the pict-section-modal shell sets\n\t up — see the comment on Theme-TopBar's CSS for the full story. */\n\tmin-height: 32px;\n\tpadding: 0 14px;\n\tbox-sizing: border-box;\n\tbackground: var(--theme-color-background-secondary, transparent);\n\tfont-size: var(--theme-typography-size-xs, 12px);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\t/* Single medium brand-primary stripe at the top of the bottombar.\n\t The topbar carries the full two-stripe identifier; on the\n\t bottombar (which is only 32px tall) a single 2px primary line is\n\t enough to seat the brand colour at the bottom of the page\n\t without competing for visual weight against the content row. */\n\tborder-top: 2px solid var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n.pict-theme-bottombar-status {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tmax-width: 50%;\n}\n.pict-theme-bottombar-info {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 12px;\n\tmin-width: 0;\n\toverflow: hidden;\n}\n.pict-theme-bottombar-actions {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}",CSSPriority:500}},{"pict-view":75}],65:[function(t,e,o){const n=t("pict-view"),r=t("../Theme-Brand.js");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this._unsubscribeFromBrand=null}onAfterInitialize(){return this._subscribeToBrand(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(t){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(t):void 0}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}_subscribeToBrand(){if(this._unsubscribeFromBrand)return;let t=this;this._unsubscribeFromBrand=r.onChange(function(){t.render()})}_refreshAppData(){let t=r.getActive();if(this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},!t)return void(this.pict.AppData.PictSectionTheme.BrandMark={BodySlot:[]});let e=!1!==this.options.ShowIcon,o=!1!==this.options.ShowName,n=e&&"svg"===t.IconType&&t.Icon?[{IconHTML:t.Icon}]:[],i=e&&"image"===t.IconType&&t.Icon?[{IconURL:t.Icon}]:[],a=o&&t.Name?[{Name:t.Name}]:[];this.pict.AppData.PictSectionTheme.BrandMark={BodySlot:[{Tooltip:t.Tagline||t.Name||"",IconSVGSlot:n,IconImgSlot:i,NameSlot:a}]}}},e.exports.default_configuration={ViewIdentifier:"Theme-Brand-Mark",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Brand-Mark",DefaultRenderable:"Theme-Brand-Mark-Renderable",ShowIcon:!0,ShowName:!0,Templates:[{Hash:"Theme-Brand-Mark-Template",Template:"{~TS:Theme-Brand-Mark-Body-Template:AppData.PictSectionTheme.BrandMark.BodySlot~}"},{Hash:"Theme-Brand-Mark-Body-Template",Template:'\n<span class="pict-theme-brand-mark" title="{~D:Record.Tooltip~}">\n\t{~TS:Theme-Brand-Mark-IconSVG-Template:Record.IconSVGSlot~}\n\t{~TS:Theme-Brand-Mark-IconImg-Template:Record.IconImgSlot~}\n\t{~TS:Theme-Brand-Mark-Name-Template:Record.NameSlot~}\n</span>'},{Hash:"Theme-Brand-Mark-IconSVG-Template",Template:'<span class="pict-theme-brand-mark-icon">{~D:Record.IconHTML~}</span>'},{Hash:"Theme-Brand-Mark-IconImg-Template",Template:'<span class="pict-theme-brand-mark-icon"><img src="{~D:Record.IconURL~}" alt=""></span>'},{Hash:"Theme-Brand-Mark-Name-Template",Template:'<span class="pict-theme-brand-mark-name">{~D:Record.Name~}</span>'}],Renderables:[{RenderableHash:"Theme-Brand-Mark-Renderable",TemplateHash:"Theme-Brand-Mark-Template",ContentDestinationAddress:"#Theme-Brand-Mark",RenderMethod:"replace"}],CSS:"\n.pict-theme-brand-mark {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\t/* line-height: 1 collapses the inherited ~1.2 line-box around the\n\t name glyphs. Without this the inline-flex container is taller\n\t than its visible content, the line-box adds asymmetric space\n\t above the caps, and the whole mark looks pushed up vs.\n\t neighbouring buttons that sit on standard 12px-text baselines. */\n\tline-height: 1;\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-text-primary, #1a1a1a));\n\tuser-select: none;\n}\n.pict-theme-brand-mark-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 22px;\n\theight: 22px;\n\tcolor: currentColor;\n}\n.pict-theme-brand-mark-icon img,\n.pict-theme-brand-mark-icon svg {\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: block;\n}\n.pict-theme-brand-mark-name {\n\t/* Font size dropped from 15 → 14 so the brand name reads closer\n\t to the typical 12px action-button text height; bigger glyphs\n\t reaching higher into the row are why the mark looked optically\n\t high. The 2px brand-secondary underline keeps the mark feeling\n\t distinctly branded; padding-bottom: 1px was an asymmetric nudge\n\t that shifted the visual center up — removed. */\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\tborder-bottom: 2px solid var(--brand-color-secondary-mode, transparent);\n\twhite-space: nowrap;\n}\n/* Compact form — at narrow viewports the brand mark collapses to\n icon-only. The icon alone still reads as the brand (the deterministic\n logo is designed to be recognisable without the wordmark) and freeing\n up the wordmark's width keeps the nav buttons reachable on tablet /\n small-laptop widths. The threshold matches the topbar's compact\n breakpoint in Theme-TopBar. */\n@media (max-width: 720px) {\n\t.pict-theme-brand-mark-name {\n\t\tdisplay: none;\n\t}\n}",CSSPriority:500}},{"../Theme-Brand.js":31,"pict-view":75}],66:[function(t,e,o){const n=t("pict-view"),r=t("../Theme-Brand.js");class i extends n{constructor(t,e,o){super(t,e,o),this._unsubscribeFromBrand=null}onAfterInitialize(){return this._subscribeToBrand(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(t){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(t):void 0}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}_subscribeToBrand(){if(this._unsubscribeFromBrand)return;let t=this;this._unsubscribeFromBrand=r.onChange(function(){t.render()})}_refreshAppData(){let t=r.getActive();if(this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},!t)return void(this.pict.AppData.PictSectionTheme.BrandStrip={BodySlot:[]});let e=!1!==this.options.ShowName,o=[],n=[];"svg"===t.IconType&&t.Icon?o=[{IconHTML:t.Icon}]:"image"===t.IconType&&t.Icon&&(n=[{IconURL:t.Icon}]);let i=e?[{Name:t.Name,IconSVGSlot:o,IconImgSlot:n}]:[],a=t.Name+(t.Tagline?" — "+t.Tagline:"");this.pict.AppData.PictSectionTheme.BrandStrip={BodySlot:[{Tooltip:a,NameRowSlot:i,PrimaryHeight:this.options.PrimaryStripeHeight||3,SecondaryHeight:this.options.SecondaryStripeHeight||1}]}}}i.default_configuration={ViewIdentifier:"Theme-BrandStrip",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-BrandStrip",DefaultRenderable:"Theme-BrandStrip-Renderable",PrimaryStripeHeight:3,SecondaryStripeHeight:1,ShowName:!0,Templates:[{Hash:"Theme-BrandStrip-Template",Template:"\n{~TS:Theme-BrandStrip-Body-Template:AppData.PictSectionTheme.BrandStrip.BodySlot~}"},{Hash:"Theme-BrandStrip-Body-Template",Template:'\n<div class="pict-theme-brandstrip" title="{~D:Record.Tooltip~}">\n\t{~TS:Theme-BrandStrip-NameRow-Template:Record.NameRowSlot~}\n\t<div class="pict-theme-brandstrip-stripes">\n\t\t<div class="pict-theme-brandstrip-stripe pict-theme-brandstrip-stripe-primary"\n\t\t style="height: {~D:Record.PrimaryHeight~}px;"></div>\n\t\t<div class="pict-theme-brandstrip-stripe pict-theme-brandstrip-stripe-secondary"\n\t\t style="height: {~D:Record.SecondaryHeight~}px;"></div>\n\t</div>\n</div>'},{Hash:"Theme-BrandStrip-NameRow-Template",Template:'\n<div class="pict-theme-brandstrip-row">\n\t{~TS:Theme-BrandStrip-IconSVG-Template:Record.IconSVGSlot~}\n\t{~TS:Theme-BrandStrip-IconImg-Template:Record.IconImgSlot~}\n\t<span class="pict-theme-brandstrip-name">{~D:Record.Name~}</span>\n</div>'},{Hash:"Theme-BrandStrip-IconSVG-Template",Template:'<span class="pict-theme-brandstrip-icon">{~D:Record.IconHTML~}</span>'},{Hash:"Theme-BrandStrip-IconImg-Template",Template:'<span class="pict-theme-brandstrip-icon"><img src="{~D:Record.IconURL~}" alt=""></span>'}],Renderables:[{RenderableHash:"Theme-BrandStrip-Renderable",TemplateHash:"Theme-BrandStrip-Template",ContentDestinationAddress:"#Theme-BrandStrip",RenderMethod:"replace"}],CSS:"\n.pict-theme-brandstrip {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tuser-select: none;\n}\n.pict-theme-brandstrip-row {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 6px 12px 4px;\n\tfont-size: 12px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcolor: var(--brand-color-primary, var(--theme-color-text-muted, #6b6b6b));\n}\n.pict-theme-brandstrip-name {\n\tborder-bottom: 2px solid var(--brand-color-secondary, transparent);\n\tpadding-bottom: 1px;\n}\n.pict-theme-brandstrip-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 16px; height: 16px;\n\tcolor: var(--brand-color-primary, currentColor);\n}\n.pict-theme-brandstrip-icon img,\n.pict-theme-brandstrip-icon svg {\n\twidth: 100%; height: 100%;\n\tdisplay: block;\n}\n.pict-theme-brandstrip-stripes {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n}\n.pict-theme-brandstrip-stripe {\n\twidth: 100%;\n}\n.pict-theme-brandstrip-stripe-primary {\n\tbackground: var(--brand-color-primary, transparent);\n}\n.pict-theme-brandstrip-stripe-secondary {\n\tbackground: var(--brand-color-secondary, transparent);\n}",CSSPriority:500},e.exports=i},{"../Theme-Brand.js":31,"pict-view":75}],67:[function(t,e,o){const n=t("pict-view"),r=t("../Theme-Icons.js"),i={ViewIdentifier:"Theme-Button",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Button",DefaultRenderable:"Theme-Button-Renderable",ProviderHash:"Theme",ModalViewHash:"Pict-Section-Modal",PickerViewHash:"Theme-Picker",ModeToggleViewHash:"Theme-ModeToggle",ScaleSelectViewHash:"Theme-ScaleSelect",Title:"Theme",AriaLabel:"Open theme menu",ModalTitle:"Theme",ModalWidth:"320px",Templates:[{Hash:"Theme-Button-Template",Template:'\n<button type="button"\n class="pict-theme-button"\n aria-label="{~D:AppData.PictSectionTheme.Button.AriaLabel~}"\n title="{~D:AppData.PictSectionTheme.Button.Title~}"\n onclick="_Pict.views[\'Theme-Button\'].openMenu();">\n\t'.concat(r.iconSun(16),"\n</button>")},{Hash:"Theme-Button-Modal-Template",Template:'\n<div class="pict-theme-button-menu">\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Theme</label>\n\t\t<div id="Theme-Picker"></div>\n\t</div>\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Mode</label>\n\t\t<div id="Theme-ModeToggle"></div>\n\t</div>\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Scale</label>\n\t\t<div id="Theme-ScaleSelect"></div>\n\t</div>\n</div>'}],Renderables:[{RenderableHash:"Theme-Button-Renderable",TemplateHash:"Theme-Button-Template",ContentDestinationAddress:"#Theme-Button",RenderMethod:"replace"}],CSS:"\n.pict-theme-button {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\t/* Sized to match a typical 12px-font / 6px-12px-padding text button\n\t (~28px tall) so this drops cleanly into a topbar row alongside\n\t action buttons without standing taller and crashing the row's\n\t visual rhythm. Squareish — width matches height for the icon. */\n\twidth: 28px;\n\theight: 28px;\n\tpadding: 0;\n\tborder-radius: 6px;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\ttransition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;\n}\n.pict-theme-button:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n}\n.pict-theme-button-icon { width: 16px; height: 16px; }\n.pict-theme-button-menu { display: flex; flex-direction: column; gap: 14px; }\n.pict-theme-button-menu-row { display: flex; flex-direction: column; gap: 6px; }\n.pict-theme-button-menu-label {\n\tfont-size: 11px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}",CSSPriority:500};class a extends n{onBeforeRender(t){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(t):void 0}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}openMenu(){let t=this._modal();if(!t)return"undefined"!=typeof console&&console.warn('Theme-Button: pict-section-modal view not found at "'+(this.options.ModalViewHash||"Pict-Section-Modal")+'" — cannot open theme menu.'),null;let e=this.pict.parseTemplateByHash("Theme-Button-Modal-Template",{}),o=this;return t.show({title:this.options.ModalTitle||"Theme",content:e,width:this.options.ModalWidth||"320px",closeable:!0,buttons:[],onOpen:function(){o._mountSubViews()}})}_modal(){let t=this.options.ModalViewHash||"Pict-Section-Modal";return this.pict&&this.pict.views&&this.pict.views[t]}_mountSubViews(){let t=this.pict.views[this.options.PickerViewHash||"Theme-Picker"];t&&t.render();let e=this.pict.views[this.options.ModeToggleViewHash||"Theme-ModeToggle"];e&&e.render();let o=this.pict.views[this.options.ScaleSelectViewHash||"Theme-ScaleSelect"];o&&o.render()}_refreshAppData(){this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.Button={Title:this.options.Title||"Theme",AriaLabel:this.options.AriaLabel||"Open theme menu"}}}a.default_configuration=i,e.exports=a},{"../Theme-Icons.js":32,"pict-view":75}],68:[function(t,e,o){const n=t("pict-view"),r=t("../Theme-Icons.js"),i={ViewIdentifier:"Theme-ModeToggle",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-ModeToggle",DefaultRenderable:"Theme-ModeToggle-Renderable",ProviderHash:"Theme",Labels:{Light:"Light",Dark:"Dark",System:"System"},ShowIcons:!0,Templates:[{Hash:"Theme-ModeToggle-Template",Template:'\n<div class="pict-theme-modetoggle-wrap">\n\t<div class="pict-theme-modetoggle{~NE:AppData.PictSectionTheme.ModeToggle.Disabled^ pict-theme-modetoggle-disabled~}"\n\t role="group" aria-label="Color mode"\n\t title="{~D:AppData.PictSectionTheme.ModeToggle.WrapTitle~}">\n\t\t{~TS:Theme-ModeToggle-Button-Template:AppData.PictSectionTheme.ModeToggle.Buttons~}\n\t</div>\n\t{~TS:Theme-ModeToggle-LockedNote-Template:AppData.PictSectionTheme.ModeToggle.LockedNoteSlot~}\n</div>'},{Hash:"Theme-ModeToggle-Button-Template",Template:'\n<button type="button"\n class="pict-theme-modetoggle-btn{~NE:Record.Active^ pict-theme-modetoggle-btn-active~}{~NE:Record.LockedOut^ pict-theme-modetoggle-btn-lockedout~}"\n title="{~D:Record.Title~}"\n aria-pressed="{~D:Record.Active~}"\n aria-disabled="{~D:Record.LockedOut~}"\n onclick="_Pict.views[\'Theme-ModeToggle\'].pickMode(\'{~D:Record.Mode~}\');">\n\t{~TS:Theme-ModeToggle-Icon-Light:Record.IconLight~}{~TS:Theme-ModeToggle-Icon-Dark:Record.IconDark~}{~TS:Theme-ModeToggle-Icon-System:Record.IconSystem~}<span class="pict-theme-modetoggle-label">{~D:Record.Label~}</span>\n</button>'},{Hash:"Theme-ModeToggle-LockedNote-Template",Template:'\n<div class="pict-theme-modetoggle-locked-note" role="note">\n\t<svg class="pict-theme-modetoggle-locked-icon" viewBox="0 0 24 24" fill="none"\n\t stroke="currentColor" stroke-width="2" stroke-linecap="round"\n\t stroke-linejoin="round" aria-hidden="true">\n\t\t<rect x="4" y="11" width="16" height="9" rx="2"/>\n\t\t<path d="M8 11V7a4 4 0 0 1 8 0v4"/>\n\t</svg>\n\t<span>{~D:Record.Message~}</span>\n</div>'},{Hash:"Theme-ModeToggle-Icon-Light",Template:r.iconSun()},{Hash:"Theme-ModeToggle-Icon-Dark",Template:r.iconMoon()},{Hash:"Theme-ModeToggle-Icon-System",Template:r.iconSystem()}],Renderables:[{RenderableHash:"Theme-ModeToggle-Renderable",TemplateHash:"Theme-ModeToggle-Template",ContentDestinationAddress:"#Theme-ModeToggle",RenderMethod:"replace"}],CSS:"\n.pict-theme-modetoggle-wrap { display: inline-flex; flex-direction: column; gap: 6px; }\n.pict-theme-modetoggle {\n\tdisplay: inline-flex;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tborder-radius: 6px;\n\toverflow: hidden;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tfont-size: 12px;\n}\n.pict-theme-modetoggle-btn {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 4px 10px;\n\tborder: 0;\n\tbackground: transparent;\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\tborder-right: 1px solid var(--theme-color-border-default, #cfd5dd);\n\ttransition: background-color 120ms ease, color 120ms ease;\n}\n.pict-theme-modetoggle-btn:last-child { border-right: 0; }\n.pict-theme-modetoggle-btn:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n}\n.pict-theme-modetoggle-btn-active {\n\tbackground: var(--theme-color-brand-primary, #2563eb);\n\tcolor: var(--theme-color-text-on-brand, #ffffff);\n}\n.pict-theme-modetoggle-btn-active:hover {\n\tbackground: var(--theme-color-brand-primary-hover, #1e54cc);\n\tcolor: var(--theme-color-text-on-brand, #ffffff);\n}\n/* When the active theme is single-mode the entire group becomes\n non-interactive. The locked-out buttons (the ones the theme cannot\n switch to) get a strikethrough so the cause is unmistakable; the\n active button stays styled normally so users can still see which\n mode the theme IS using. */\n.pict-theme-modetoggle-disabled .pict-theme-modetoggle-btn {\n\tpointer-events: none;\n\tcursor: not-allowed;\n}\n.pict-theme-modetoggle-disabled .pict-theme-modetoggle-btn-lockedout {\n\topacity: 0.45;\n\ttext-decoration: line-through;\n\ttext-decoration-thickness: 1.5px;\n}\n/* Icons come from Theme-Icons.js with explicit width/height baked into\n the <svg>. We only need to nudge their vertical alignment with the\n button label. */\n.pict-theme-modetoggle .pict-theme-icon {\n\tdisplay: inline-block; vertical-align: -2px;\n}\n.pict-theme-modetoggle-label { line-height: 1; }\n.pict-theme-modetoggle-locked-note {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tfont-size: 11px;\n\tline-height: 1.3;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n\tpadding: 0 2px;\n}\n.pict-theme-modetoggle-locked-icon {\n\twidth: 12px; height: 12px;\n\tflex: 0 0 12px;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}",CSSPriority:500};class a extends n{constructor(t,e,o){super(t,e,o),this._unsubscribeFromProvider=null}onAfterInitialize(){return this._subscribeToProvider(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(t){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(t):void 0}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}pickMode(t){let e=this._provider();if(!e)return!1;let o=e.setMode(t);if(o&&"function"==typeof this.options.OnModeChange)try{this.options.OnModeChange(t)}catch(t){}return o||this.render(),o}_subscribeToProvider(){if(this._unsubscribeFromProvider)return;let t=this._provider();if(!t||"function"!=typeof t.onApply)return;let e=this;this._unsubscribeFromProvider=t.onApply(function(){e.render()})}_provider(){let t=this.options.ProviderHash||"Theme";return this.pict&&this.pict.providers&&this.pict.providers[t]}_refreshAppData(){let t=this._provider(),e=t?t.getActiveTheme():null,o=e&&e.Mode||"light",n=!1,r=null,a=null;if(e&&e.Hash&&t&&"function"==typeof t.getTheme){let i=t.getTheme(e.Hash);n="single"===(i&&i.Modes&&i.Modes.Strategy||"single"),n&&(r=i.Modes&&i.Modes.Default||o||"light",a=i.Name||i.Hash||"this theme")}let s=this.options.Labels||i.Labels,l=!1!==this.options.ShowIcons,c=[{Mode:"light",Label:s.Light||"Light"},{Mode:"dark",Label:s.Dark||"Dark"},{Mode:"system",Label:s.System||"System"}],d=[];for(let t=0;t<c.length;t++){let e,i=c[t],s=o===i.Mode,p=n&&i.Mode!==r;if(p){e=a+" is fixed to "+(r.charAt(0).toUpperCase()+r.slice(1))+" mode — pick a different theme to switch."}else e=i.Label+" mode";d.push({Mode:i.Mode,Label:i.Label,Title:e,Active:s,LockedOut:p,IconLight:l&&"light"===i.Mode?[{}]:[],IconDark:l&&"dark"===i.Mode?[{}]:[],IconSystem:l&&"system"===i.Mode?[{}]:[]})}let p=[],h="";if(n){let t=a+" is fixed to "+(r.charAt(0).toUpperCase()+r.slice(1))+" mode";p=[{Message:t}],h=t+" — pick a different theme to switch modes."}this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.ModeToggle={ActiveMode:o,Disabled:n,LockedToMode:r,ThemeName:a,Buttons:d,LockedNoteSlot:p,WrapTitle:h}}}a.default_configuration=i,e.exports=a},{"../Theme-Icons.js":32,"pict-view":75}],69:[function(t,e,o){const n=t("pict-view"),r=t("../Theme-Icons.js");class i extends n{constructor(t,e,o){super(t,e,o),this._unsubscribeFromProvider=null}onAfterInitialize(){return this._subscribeToProvider(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(t){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(t):void 0}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}openMenu(t){let e=this._modal();if(!e)return"undefined"!=typeof console&&console.warn&&console.warn("Theme-Picker: pict-section-modal not registered — cannot open menu."),null;let o=this._buildMenuItems(),n=this;return e.dropdown(t,{items:o,align:"left",minWidth:"260px",maxHeight:"60vh",className:"pict-theme-picker-menu",closeOnSelect:!0,onSelect:function(t){n.pick(t)}})}pick(t){let e=this._provider();if(!e)return!1;let o=e.getActiveTheme(),n=o?o.Mode:null,r=e.applyTheme(t,n);if(r&&"function"==typeof this.options.OnPick)try{this.options.OnPick(t)}catch(t){}return r}_subscribeToProvider(){if(this._unsubscribeFromProvider)return;let t=this._provider();if(!t||"function"!=typeof t.onApply)return;let e=this;this._unsubscribeFromProvider=t.onApply(function(){e.render()})}_provider(){let t=this.options.ProviderHash||"Theme";return this.pict&&this.pict.providers&&this.pict.providers[t]}_modal(){let t=this.options.ModalViewHash||"Pict-Section-Modal";return this.pict&&this.pict.views&&this.pict.views[t]}_buildMenuItems(){let t=this._provider(),e=t?t.listThemes():[],o=t?t.getActiveTheme():{Hash:null},n=o&&o.Hash||null,i=this._loadCatalog(),a={},s=[];Array.isArray(this.options.Categories)&&(s=this.options.Categories.slice());for(let t=0;t<i.length;t++){let e=i[t],o=e.Category||"Other";a[e.Hash]=o,s.indexOf(o)<0&&s.push(o)}let l={};for(let t=0;t<e.length;t++){let o=e[t],n=a[o.Hash]||"Other";l[n]||(l[n]=[],s.indexOf(n)<0&&s.push(n)),l[n].push(o)}let c=!1!==this.options.ShowModeIcons,d=[];for(let t=0;t<s.length;t++){let e=s[t];if(l[e]&&0!==l[e].length){d.push({Header:e});for(let t=0;t<l[e].length;t++){let o=l[e][t],i=c?r.iconForTheme(o.Strategy,o.DefaultMode,14):"";d.push({Hash:o.Hash,Label:o.Name||o.Hash,Icon:i,Style:o.Hash===n?"active":null,Tooltip:this._capabilityLabel(o)})}}}return d}_capabilityLabel(t){if("single"===(t.Strategy||"single")){let e=t.DefaultMode||"light";return(t.Name||t.Hash)+" — "+("dark"===e?"dark only":"light only")}return(t.Name||t.Hash)+" — light + dark"}_refreshAppData(){let t=this._provider(),e=t?t.listThemes():[],o=t?t.getActiveTheme():{Hash:null},n=o&&o.Hash||null,i=null;for(let t=0;t<e.length;t++)if(e[t].Hash===n){i=e[t];break}let a=[];!1!==this.options.ShowModeIcons&&i&&(a=[{IconHTML:r.iconForTheme(i.Strategy,i.DefaultMode,14)}]),this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.Picker={ActiveHash:n,ActiveLabel:i?i.Name||i.Hash:"Choose a theme",TriggerTooltip:i?this._capabilityLabel(i)+" — click to change":"Choose a theme",TriggerGlyphSlot:a,ChevronHTML:r.iconChevronDown(10)},this.pict.AppData.PictSectionTheme.AllThemes=e}_loadCatalog(){try{return t("../themes/_catalog.js")}catch(t){return[]}}}i.default_configuration={ViewIdentifier:"Theme-Picker",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Picker",DefaultRenderable:"Theme-Picker-Renderable",ProviderHash:"Theme",ModalViewHash:"Pict-Section-Modal",Categories:null,ShowModeIcons:!0,Templates:[{Hash:"Theme-Picker-Template",Template:'\n<button type="button" class="pict-theme-picker"\n title="{~D:AppData.PictSectionTheme.Picker.TriggerTooltip~}"\n onclick="_Pict.views[\'Theme-Picker\'].openMenu(this);">\n\t{~TS:Theme-Picker-Trigger-Glyph:AppData.PictSectionTheme.Picker.TriggerGlyphSlot~}\n\t<span class="pict-theme-picker-name">{~D:AppData.PictSectionTheme.Picker.ActiveLabel~}</span>\n\t<span class="pict-theme-picker-chevron">{~D:AppData.PictSectionTheme.Picker.ChevronHTML~}</span>\n</button>'},{Hash:"Theme-Picker-Trigger-Glyph",Template:'<span class="pict-theme-picker-trigger-glyph">{~D:Record.IconHTML~}</span>'}],Renderables:[{RenderableHash:"Theme-Picker-Renderable",TemplateHash:"Theme-Picker-Template",ContentDestinationAddress:"#Theme-Picker",RenderMethod:"replace"}],CSS:"\n.pict-theme-picker {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tmin-width: 200px;\n\tmax-width: 100%;\n\tpadding: 6px 10px;\n\tborder-radius: 6px;\n\tfont: inherit;\n\tfont-size: 13px;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tcursor: pointer;\n\ttext-align: left;\n\ttransition: border-color 120ms ease, box-shadow 120ms ease;\n}\n.pict-theme-picker:hover { border-color: var(--theme-color-text-muted, #6b6b6b); }\n.pict-theme-picker:focus, .pict-theme-picker:focus-visible {\n\toutline: none;\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n\tbox-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}\n.pict-theme-picker .pict-theme-picker-name {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n.pict-theme-picker .pict-theme-picker-chevron {\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n\tdisplay: inline-flex;\n\talign-items: center;\n}\n.pict-theme-picker-trigger-glyph {\n\tdisplay: inline-flex; align-items: center;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}\n\n/* Skin the modal-dropdown items with cleaner spacing for our glyphs. */\n.pict-theme-picker-menu .pict-modal-dropdown-item-icon {\n\twidth: 28px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}\n.pict-theme-picker-menu .pict-modal-dropdown-item--active {\n\tbackground: var(--theme-color-background-selected, #e0eaff);\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n}\n.pict-theme-picker-menu .pict-modal-dropdown-item--active .pict-modal-dropdown-item-icon {\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n}",CSSPriority:500},i.APPDATA_ADDRESS="PictSectionTheme.Picker",e.exports=i},{"../Theme-Icons.js":32,"../themes/_catalog.js":38,"pict-view":75}],70:[function(t,e,o){const n=t("pict-view"),r=t("../Theme-Scale.js");class i extends n{constructor(t,e,o){super(t,e,o),this._unsubscribeFromScale=null}onAfterInitialize(){return this._subscribeToScale(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(t){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(t):void 0}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}pickScale(t){let e=r.applyScale(t);if("function"==typeof this.options.OnScaleChange)try{this.options.OnScaleChange(e)}catch(t){}return e}_subscribeToScale(){if(this._unsubscribeFromScale)return;let t=this;this._unsubscribeFromScale=r.onChange(function(){t.render()})}_refreshAppData(){let t=Array.isArray(this.options.Presets)?this.options.Presets:r.PRESETS,e=r.getActive(),o=0,n=1/0;for(let r=0;r<t.length;r++){let i=Math.abs(t[r].Value-e);i<n&&(n=i,o=r)}let i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push({Value:n.Value,Label:n.Label,Selected:e===o})}let a="Viewport scale — currently "+Math.round(100*e)+"%";this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.ScaleSelect={ActiveScale:e,Tooltip:a,Options:i}}}i.default_configuration={ViewIdentifier:"Theme-ScaleSelect",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-ScaleSelect",DefaultRenderable:"Theme-ScaleSelect-Renderable",Presets:null,Templates:[{Hash:"Theme-ScaleSelect-Template",Template:'\n<select class="pict-theme-scaleselect"\n title="{~D:AppData.PictSectionTheme.ScaleSelect.Tooltip~}"\n onchange="_Pict.views[\'Theme-ScaleSelect\'].pickScale(parseFloat(this.value));">\n\t{~TS:Theme-ScaleSelect-Option-Template:AppData.PictSectionTheme.ScaleSelect.Options~}\n</select>'},{Hash:"Theme-ScaleSelect-Option-Template",Template:'\n<option value="{~D:Record.Value~}"{~NE:Record.Selected^ selected~}>{~D:Record.Label~}</option>'}],Renderables:[{RenderableHash:"Theme-ScaleSelect-Renderable",TemplateHash:"Theme-ScaleSelect-Template",ContentDestinationAddress:"#Theme-ScaleSelect",RenderMethod:"replace"}],CSS:"\n.pict-theme-scaleselect {\n\tmin-width: 180px;\n\tpadding: 6px 10px;\n\tborder-radius: 6px;\n\tfont: inherit;\n\tfont-size: 13px;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tcursor: pointer;\n}\n.pict-theme-scaleselect:focus {\n\toutline: none;\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n\tbox-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}",CSSPriority:500},e.exports=i},{"../Theme-Scale.js":34,"pict-view":75}],71:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o)}onAfterRender(t,e,o,n){if(this.pict.CSSMap.injectCSS(),"undefined"!=typeof document&&this.options.Height){let t=document.querySelector(".pict-theme-topbar");t&&(t.style.minHeight=this.options.Height+"px")}if(this._applyCompactBreakpoint(),"undefined"!=typeof document&&this.options.NavAlign){let t={left:"flex-start",right:"flex-end",center:"center"}[this.options.NavAlign];if(t){let e=document.querySelector(".pict-theme-topbar-nav");e&&(e.style.justifyContent=t)}}if(!1!==this.options.MountBrandMark){let t=this.pict.views["Theme-Brand-Mark"];t&&t.render()}if(this.options.NavView){let t=this.pict.views[this.options.NavView];t?t.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: NavView "'+this.options.NavView+'" not registered')}if(this.options.UserView){let t=this.pict.views[this.options.UserView];t?t.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: UserView "'+this.options.UserView+'" not registered')}if(!1!==this.options.MountThemeButton){let t=this.pict.views["Theme-Button"];t&&t.render()}return super.onAfterRender?super.onAfterRender(t,e,o,n):void 0}setNavView(t){this.options.NavView=t||null,this._mountSlot("#Theme-TopBar-Nav",this.options.NavView)}setUserView(t){this.options.UserView=t||null,this._mountSlot("#Theme-TopBar-User",this.options.UserView)}_mountSlot(t,e){if("undefined"!=typeof document){let e=document.querySelector(t);e&&(e.innerHTML="")}if(!e)return;let o=this.pict.views[e];o?o.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: view "'+e+'" not registered')}_applyCompactBreakpoint(){if("undefined"==typeof document)return;let t=this.options.CompactBreakpoint;if(null==t)return;if(900===t)return;let e="pict-theme-topbar-compact-"+this.UUID,o=document.getElementById(e);o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent="number"!=typeof t||t<=0?".pict-theme-topbar-nav { display: flex !important; }\n.pict-theme-topbar-user-slot { display: flex !important; }\n.pict-theme-topbar-burger { display: none !important; }\n.pict-theme-topbar-user { margin-left: 0 !important; }\n":"@media (max-width: "+t+"px) {\n\t.pict-theme-topbar-nav { display: none !important; }\n\t.pict-theme-topbar-user-slot { display: none !important; }\n\t.pict-theme-topbar-burger { display: inline-flex !important; }\n\t.pict-theme-topbar-user { margin-left: auto !important; }\n}\n@media (min-width: "+(t+1)+"px) {\n\t.pict-theme-topbar-nav { display: flex !important; }\n\t.pict-theme-topbar-user-slot { display: flex !important; }\n\t.pict-theme-topbar-burger { display: none !important; }\n\t.pict-theme-topbar-user { margin-left: 0 !important; }\n}\n"}openBurgerMenu(){if("undefined"==typeof document)return null;let t=this.pict.views["Pict-Section-Modal"];if(!t||"function"!=typeof t.show)return"undefined"!=typeof console&&console.warn&&console.warn("Theme-TopBar: pict-section-modal not registered — burger menu unavailable."),null;let e=[],o=document.querySelector("#Theme-TopBar-Nav"),n=document.querySelector("#Theme-TopBar-User");o&&o.innerHTML.trim()&&e.push('<div class="pict-theme-burger-menu-section">'+o.innerHTML+"</div>"),n&&n.innerHTML.trim()&&e.push('<div class="pict-theme-burger-menu-section">'+n.innerHTML+"</div>"),0===e.length&&e.push('<div class="pict-theme-burger-menu-empty">No menu items configured.</div>');let r='<div class="pict-theme-burger-menu">'+e.join("")+"</div>";return t.show({title:"Menu",content:r,width:"280px",closeable:!0,buttons:[]})}},e.exports.default_configuration={ViewIdentifier:"Theme-TopBar",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-TopBar",DefaultRenderable:"Theme-TopBar-Renderable",MountBrandMark:!0,MountThemeButton:!0,NavView:null,UserView:null,Height:56,NavAlign:"right",CompactBreakpoint:900,Templates:[{Hash:"Theme-TopBar-Template",Template:'\n<div class="pict-theme-topbar">\n\t<div class="pict-theme-topbar-mark"><div id="Theme-Brand-Mark"></div></div>\n\t<div class="pict-theme-topbar-nav" id="Theme-TopBar-Nav"></div>\n\t<div class="pict-theme-topbar-user">\n\t\t<div class="pict-theme-topbar-user-slot" id="Theme-TopBar-User"></div>\n\t\t<div class="pict-theme-topbar-user-button"><div id="Theme-Button"></div></div>\n\t\t<button type="button" class="pict-theme-topbar-burger"\n\t\t\taria-label="More navigation"\n\t\t\ttitle="Menu"\n\t\t\tonclick="_Pict.views[\'Theme-TopBar\'].openBurgerMenu();">\n\t\t\t<svg width="20" height="20" viewBox="0 0 24 24" fill="none"\n\t\t\t\tstroke="currentColor" stroke-width="2"\n\t\t\t\tstroke-linecap="round" stroke-linejoin="round"\n\t\t\t\taria-hidden="true">\n\t\t\t\t<path d="M3 6h18M3 12h18M3 18h18"/>\n\t\t\t</svg>\n\t\t</button>\n\t</div>\n</div>'}],Renderables:[{RenderableHash:"Theme-TopBar-Renderable",TemplateHash:"Theme-TopBar-Template",ContentDestinationAddress:"#Theme-TopBar",RenderMethod:"replace"}],CSS:'\n.pict-theme-topbar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\t/* The min-height is rewritten per-instance in onAfterRender from the\n\t Height option (default 56). Avoids the percent-height resolution\n\t trap: pict-section-modal\'s panel destination uses min-height: 100%\n\t on its inner div, which means a child\'s height: 100% / min-height:\n\t 100% resolves against the parent\'s *property* (auto), not its\n\t resolved size — and collapses the row to its content. A fixed px\n\t value gives align-items: center real space to centre into. */\n\tmin-height: 56px;\n\tpadding: 0 14px;\n\tbox-sizing: border-box;\n\tbackground: var(--theme-color-background-panel, transparent);\n\t/* Brand stripes are drawn by .pict-theme-topbar::after as an absolute\n\t element overlaying the bottom 5px of the row. Using ::after rather\n\t than border-bottom + box-shadow lets us put a transparent gap\n\t between the two stripes (border / box-shadow can\'t draw gaps).\n\t Position relative so the ::after positions to this row. */\n\tposition: relative;\n}\n/* Two-stripe brand identifier at the bottom of the topbar:\n 4px brand-primary (thicker — the dominant identifier)\n 2px transparent gap (clearly readable separation)\n 3px brand-secondary (thinner than primary but still substantial)\n Earlier iterations used 1–2px stripes; both read clearly at light\n mode but dark-mode secondary colors are often desaturated (lifted)\n so the eye can miss a thin band against a dark background. The\n current sizes push the secondary above the perception threshold\n regardless of palette. Stripes overlay the bottom 9px of the row;\n content (which centres in the full row via align-items: center)\n keeps its visual position. */\n.pict-theme-topbar::after {\n\tcontent: \'\';\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\theight: 9px;\n\tpointer-events: none;\n\tbackground: linear-gradient(\n\t\tto bottom,\n\t\tvar(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)) 0,\n\t\tvar(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)) 4px,\n\t\ttransparent 4px,\n\t\ttransparent 6px,\n\t\tvar(--brand-color-secondary-mode, var(--theme-color-brand-secondary, transparent)) 6px,\n\t\tvar(--brand-color-secondary-mode, var(--theme-color-brand-secondary, transparent)) 9px\n\t);\n}\n.pict-theme-topbar-mark {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n}\n.pict-theme-topbar-nav {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\talign-items: center;\n\t/* Default to right-aligning nav items inside the stretched slot —\n\t the convention retold-* apps converged on. Overridden per-instance\n\t from the NavAlign option in onAfterRender. */\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tmin-width: 0;\n\t/* Horizontally scrollable when the nav overflows (narrow viewports\n\t with many buttons) — better than overflow:hidden which would\n\t silently clip buttons offscreen. The vertical axis stays clipped\n\t so a tall accidental child doesn\'t blow up the row height. A\n\t proper overflow menu is a future enhancement; this gets us safe\n\t degradation today. */\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\t/* Hide the scrollbar by default; modern browsers pick up the\n\t trackpad scroll without it. Apps wanting a visible scrollbar\n\t can override at higher specificity. */\n\tscrollbar-width: none;\n}\n.pict-theme-topbar-nav::-webkit-scrollbar { display: none; }\n/* Active-route indicator. The convention every host app should follow:\n put aria-current="page" on the button (or anchor) representing the\n current route. The W3C-standard attribute reads correctly to screen\n readers and gets a brand-tinted highlight here. Apps that already\n ship their own active styling can override these rules — they\'re\n keyed off attribute selectors so no class collision is possible. */\n.pict-theme-topbar-nav [aria-current="page"],\n.pict-theme-topbar-user [aria-current="page"] {\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbackground: var(--theme-color-background-hover, rgba(37, 99, 235, 0.08));\n}\n.pict-theme-topbar-user {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n.pict-theme-topbar-user-slot {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n.pict-theme-topbar-user-button {\n\tdisplay: flex;\n\talign-items: center;\n}\n/* Burger button — hidden by default; the media query (or the inline\n per-instance JS that swaps it via CompactBreakpoint) shows it once\n the viewport drops below the host\'s compact threshold. Sized to\n match Theme-Button (28×28) so the row\'s rhythm is preserved. */\n.pict-theme-topbar-burger {\n\tdisplay: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 28px;\n\theight: 28px;\n\tpadding: 0;\n\tborder-radius: 6px;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\ttransition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;\n}\n.pict-theme-topbar-burger:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n/* Burger menu popup — applied to the cloned nav + user DOM inside\n pict-section-modal. The cloned children inherit their original\n styling (action buttons, badges, etc.) so the popup looks visually\n consistent with what was on the topbar. */\n.pict-theme-burger-menu {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n.pict-theme-burger-menu-section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n/* Cloned children render as a vertical stack inside the popup — flip\n the horizontal flex layouts to column so each button takes a full\n row instead of cramming side-by-side at narrow width. */\n.pict-theme-burger-menu .rm-topbar-nav,\n.pict-theme-burger-menu .rm-topbar-user,\n.pict-theme-burger-menu [class*="-topbar-nav"],\n.pict-theme-burger-menu [class*="-topbar-user"] {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: stretch;\n\tgap: 6px;\n}\n.pict-theme-burger-menu button { width: 100%; text-align: left; }\n.pict-theme-burger-menu .rm-topbar-nav-divider,\n.pict-theme-burger-menu [class*="divider"] { display: none; }\n/* Compact mode — defaults to a 900px breakpoint. The onAfterRender\n handler injects a per-instance <style> rule when the host passes a\n different CompactBreakpoint, so this @media block is the fallback\n for hosts that accept the default. */\n@media (max-width: 900px) {\n\t.pict-theme-topbar-nav { display: none !important; }\n\t.pict-theme-topbar-user-slot { display: none !important; }\n\t.pict-theme-topbar-burger { display: inline-flex; }\n\t/* In wide mode the flex-1 nav slot pushes the user-area to the\n\t right edge. With the nav hidden the user-area would collapse\n\t left of the now-empty middle; the auto-margin re-creates the\n\t "push right" effect so the theme button + burger stay flush\n\t against the right edge of the topbar. */\n\t.pict-theme-topbar-user { margin-left: auto; }\n}',CSSPriority:500}},{"pict-view":75}],72:[function(t,e,o){e.exports={name:"pict-template",version:"1.0.15",description:"Pict Template Base Class",main:"source/Pict-Template.js",scripts:{start:"node source/Pict-Template.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ."},types:"types/source/Pict-Template.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],73:[function(t,e,o){const n=t("fable-serviceproviderbase"),r=t("../package.json");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this.fable,this.pict=this.fable,this.serviceType="PictTemplate",this._Package=r}render(t,e,o,n,r){return""}renderAsync(t,e,o,n,r,i){return o(null,this.render(t,e,n,r,i))}addPattern(t,e){return this.pict.MetaTemplate.addPatternBoth(t,e,this.render,this.renderAsync,this)}resolveStateFromAddress(t,e,o,n,r,i){return this.pict.resolveStateFromAddress(t,e,o,n,r,i)}},e.exports.template_hash="Default"},{"../package.json":72,"fable-serviceproviderbase":2}],74:[function(t,e,o){e.exports={name:"pict-view",version:"1.0.68",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.363",quackage:"^1.0.65",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.67","fable-serviceproviderbase":"^3.0.19"}}},{}],75:[function(t,e,o){const n=t("fable-serviceproviderbase"),r=t("../package.json"),i={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};e.exports=class extends n{constructor(t,e,o){super(t,Object.assign({},JSON.parse(JSON.stringify(i)),e),o),this.fable,this.options,this.UUID,this.Hash,this.log;const n=this.Hash===this.UUID;this.UUID="V-".concat(this.UUID),n&&(this.Hash=this.UUID),this.options.ViewIdentifier||(this.options.ViewIdentifier="AutoViewID-".concat(this.fable.getUUID())),this.serviceType="PictView",this._Package=r,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1,this.lastRenderedTimestamp=!1,this.lastMarshalFromViewTimestamp=!1,this.lastMarshalToViewTimestamp=!1,this.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(let t=0;t<this.options.Templates.length;t++){let e=this.options.Templates[t];"Hash"in e&&"Template"in e?(e.Source||(e.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addTemplate(e.Hash,e.Template,e.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Template ").concat(t," in the options array."),e)}for(let t=0;t<this.options.DefaultTemplates.length;t++){let e=this.options.DefaultTemplates[t];"Postfix"in e&&"Template"in e?(e.Source||(e.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(e.Prefix,e.Postfix,e.Template,e.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Default Template ").concat(t," in the options array."),e)}if(this.options.CSS){let t=this.options.CSSHash?this.options.CSSHash:"View-".concat(this.options.ViewIdentifier),e=this.options.CSSProvider?this.options.CSSProvider:t;this.pict.CSSMap.addCSS(t,this.options.CSS,e,this.options.CSSPriority)}this.renderables={};for(let t=0;t<this.options.Renderables.length;t++){let e=this.options.Renderables[t];this.addRenderable(e)}}addRenderable(t,e,o,n,r){let i;if("object"==typeof t)i=t;else{i={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:o,ContentDestinationAddress:n,RenderMethod:"string"!=typeof r?r:"replace"}}"string"!=typeof i.RenderableHash||"string"!=typeof i.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),i):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(i.RenderableHash,"] pointed to template ").concat(i.TemplateHash,".")),this.renderables[i.RenderableHash]=i)}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(t){return this.onBeforeInitialize(),t()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}onInitializeAsync(t){return this.onInitialize(),t()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(t){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();{let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),e.anticipate(this.onBeforeInitializeAsync.bind(this)),e.anticipate(this.onInitializeAsync.bind(this)),e.anticipate(this.onAfterInitializeAsync.bind(this)),e.wait(e=>(e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization failed: ").concat(e.message||e),{stack:e.stack}),this.initializeTimestamp=this.pict.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization complete.")),t()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(t){return this.onAfterInitialize(),t()}onBeforeRender(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}onBeforeRenderAsync(t,e){return this.onBeforeRender(e),t()}onBeforeProject(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}onBeforeProjectAsync(t,e){return this.onBeforeProject(e),t()}buildRenderOptions(t,e,o){let n={Valid:!0};return n.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,n.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(n.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),n.Valid=!1),n.Renderable=this.renderables[n.RenderableHash],n.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(t,") because it does not exist.")),n.Valid=!1),n.DestinationAddress="string"==typeof e?e:"string"==typeof n.Renderable.ContentDestinationAddress?n.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,n.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),n.Valid=!1),"object"==typeof o?(n.RecordAddress="Passed in as object",n.Record=o):(n.RecordAddress="string"==typeof o?o:"string"==typeof n.Renderable.DefaultTemplateRecordAddress?n.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,n.Record="string"==typeof n.RecordAddress?this.pict.DataProvider.getDataByAddress(n.RecordAddress):void 0),n}assignRenderContent(t,e,o){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,o,t.TestAddress)}render(t,e,o,n){return this.renderWithScope(this,t,e,o,n)}renderWithScope(t,e,o,n,r){let i,a,s,l="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return l?("__Virtual"==l?i={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof i.ContentDestinationAddress?i.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:r&&r.TransactionHash,RootRenderableViewHash:r&&r.RootRenderableViewHash}:(i=Object.assign({},this.renderables[l]),i.ContentDestinationAddress="string"==typeof o?o:"string"==typeof i.ContentDestinationAddress?i.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),i.TransactionHash||(i.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),i.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(i.TransactionHash)),i?i.ContentDestinationAddress?("object"==typeof n?(s=n,a="Passed in as object"):(a="string"==typeof n?n:"string"==typeof i.DefaultTemplateRecordAddress?i.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,s="string"==typeof a?this.pict.DataProvider.getDataByAddress(a):void 0),this.onBeforeRender(i),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(i.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(l,"] to Destination [").concat(i.ContentDestinationAddress,"]...")),i.Content=this.pict.parseTemplateByHash(i.TemplateHash,s,null,[this],t,{RootRenderable:"object"==typeof r?r:i}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(l,"] content length ").concat(i.Content.length," to Destination [").concat(i.ContentDestinationAddress,"] using render method [").concat(i.RenderMethod,"].")),this.onBeforeProject(i),this.onProject(i),"virtual-assignment"!==i.RenderMethod&&(this.onAfterProject(i),this.onAfterRender(i)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it is not a valid renderable.")),!1)}renderAsync(t,e,o,n,r){return this.renderWithScopeAsync(this,t,e,o,n,r)}renderWithScopeAsync(t,e,o,n,r,i){let a,s,l,c="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,d="function"==typeof i?i:"function"==typeof n?n:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof r?r:null;if(d||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!c)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(c," (param ").concat(e,"because it is not a valid renderable.")),d(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(c," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==c?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:r&&"function"!=typeof r&&r.TransactionHash,RootRenderableViewHash:r&&"function"!=typeof r&&r.RootRenderableViewHash}:(a=Object.assign({},this.renderables[c]),a.ContentDestinationAddress="string"==typeof o?o:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(c,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not exist.")),d(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not have a valid destination address.")),d(new Error("Could not render ".concat(c)));"object"==typeof n?(l=n,s="Passed in as object"):(s="string"==typeof n?n:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,l="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(c,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));let p=this.fable.newAnticipate();p.anticipate(t=>{this.onBeforeRenderAsync(t,a)}),p.anticipate(o=>{this.pict.parseTemplateByHash(a.TemplateHash,l,(t,n)=>t?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(c," (param ").concat(e,") because it did not parse the template."),t),o(t)):(a.Content=n,o()),[this],t,{RootRenderable:"object"==typeof r?r:a})}),p.anticipate(t=>{this.onBeforeProjectAsync(t,a)}),p.anticipate(t=>{this.onProjectAsync(t,a)}),"virtual-assignment"!==a.RenderMethod&&(p.anticipate(t=>{this.onAfterProjectAsync(t,a)}),p.anticipate(t=>{this.onAfterRenderAsync(t,a)})),p.wait(d)}renderDefaultAsync(t){this.renderAsync(t)}basicRender(t,e,o){return this.basicRenderWithScope(this,t,e,o)}basicRenderWithScope(t,e,o,n){let r=this.buildRenderOptions(e,o,n);return r.Valid?(this.assignRenderContent(r.Renderable,r.DestinationAddress,this.pict.parseTemplateByHash(r.Renderable.TemplateHash,r.Record,null,[this],t,{RootRenderable:r.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(r.RenderableHash," because it is not valid.")),!1)}basicRenderAsync(t,e,o,n){return this.basicRenderWithScopeAsync(this,t,e,o,n)}basicRenderWithScopeAsync(t,e,o,n,r){let i="function"==typeof r?r:"function"==typeof n?n:"function"==typeof o?o:"function"==typeof e?e:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});const a=this.buildRenderOptions(e,o,n);if(!a.Valid){let t="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(a.RenderableHash," because it is not valid.");return this.log.error(t),i(new Error(t))}this.pict.parseTemplateByHash(a.Renderable.TemplateHash,a.Record,(t,e)=>t?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(a.RenderableHash," because it did not parse the template."),t),i(t)):(this.assignRenderContent(a.Renderable,a.DestinationAddress,e),i()),[this],t,{RootRenderable:a.Renderable})}onProject(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}onProjectAsync(t,e){return this.onProject(e),t()}onAfterRender(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){const e=this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[];for(const o of e){const e=this.pict.views[o.Data.ViewHash];e?(e.onAfterProject(),e.onAfterRender(o.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(o.Data.ViewHash,"."))}this.pict.TransactionTracking.unregisterTransaction(t.TransactionHash)}return!0}onAfterRenderAsync(t,e){this.onAfterRender(e);const o=this.fable.newAnticipate(),n=e&&e.RootRenderableViewHash===this.Hash;if(n){const t=this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[];for(const n of t){const t=this.pict.views[n.Data.ViewHash];t?(o.anticipate(t.onAfterProjectAsync.bind(t)),o.anticipate(e=>{t.onAfterRenderAsync(e,n.Data.Renderable)})):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(n.Data.ViewHash,"."))}}return o.wait(o=>(n&&e&&e.TransactionHash&&this.pict.TransactionTracking.unregisterTransaction(e.TransactionHash),t(o)))}onAfterProject(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}onAfterProjectAsync(t,e){return t()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}onBeforeSolveAsync(t){return this.onBeforeSolve(),t()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}onSolveAsync(t){return this.onSolve(),t()}solve(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}solveAsync(t){let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),o="function"==typeof t?t:null;o||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeSolveAsync.bind(this)),e.anticipate(this.onSolveAsync.bind(this)),e.anticipate(this.onAfterSolveAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," solveAsync() complete.")),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),o(t)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}onAfterSolveAsync(t){return this.onAfterSolve(),t()}onBeforeMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}onBeforeMarshalFromViewAsync(t){return this.onBeforeMarshalFromView(),t()}onMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}onMarshalFromViewAsync(t){return this.onMarshalFromView(),t()}marshalFromView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalFromViewAsync(t){let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),o="function"==typeof t?t:null;o||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),e.anticipate(this.onMarshalFromViewAsync.bind(this)),e.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalFromViewAsync() complete.")),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),o(t)))}onAfterMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}onAfterMarshalFromViewAsync(t){return this.onAfterMarshalFromView(),t()}onBeforeMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}onBeforeMarshalToViewAsync(t){return this.onBeforeMarshalToView(),t()}onMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}onMarshalToViewAsync(t){return this.onMarshalToView(),t()}marshalToView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalToViewAsync(t){let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),o="function"==typeof t?t:null;o||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),e.anticipate(this.onMarshalToViewAsync.bind(this)),e.anticipate(this.onAfterMarshalToViewAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalToViewAsync() complete.")),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),o(t)))}onAfterMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}onAfterMarshalToViewAsync(t){return this.onAfterMarshalToView(),t()}get isPictView(){return!0}}},{"../package.json":74,"fable-serviceproviderbase":2}],76:[function(t,e,o){e.exports={name:"pict-docuserve",version:"1.3.0",description:"Pict Documentation Server - A single-page documentation viewer built on Pict",main:"source/Pict-Application-Docuserve.js",bin:{"pict-docuserve":"source/cli/Docuserve-CLI-Run.js"},files:["source/","dist/","html/"],scripts:{start:"node source/cli/Docuserve-CLI-Run.js serve",brand:"node node_modules/pict-section-theme/bin/pict-section-theme-brand.js --manifest ../../../Retold-Modules-Manifest.json --module pict-docuserve",prebuild:"npm run brand",build:"npx quack build && npx quack copy","prebuild-docs":"npm run brand","build-docs":"npx quack build && npx quack copy && node source/cli/Docuserve-CLI-Run.js inject ./docs && node example_applications/build-examples.js stage-docs","serve-docs":"node source/cli/Docuserve-CLI-Run.js serve ./docs","serve-examples":"node example_applications/build-examples.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",prepublishOnly:"npm run build"},author:"steven velozo <steven@velozo.com>",license:"MIT",dependencies:{"fable-serviceproviderbase":"^3.0.19",lunr:"^2.3.9",pict:"^1.0.368","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-section-code":"^1.0.11","pict-section-content":"^1.0.2","pict-section-modal":"^1.1.1","pict-section-theme":"^1.0.2","pict-service-commandlineutility":"^1.0.19","pict-view":"^1.0.68"},devDependencies:{"pict-docuserve":"^1.2.0",quackage:"^1.2.3"},copyFilesSettings:{whenFileExists:"overwrite"},copyFiles:[{from:"./html/*",to:"./dist/"}],mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},retold:{brand:{Hash:"pict-docuserve",Name:"Pict Docuserve",Tagline:"A documentation viewer built on Pict",Palette:"default",Icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="frame-pict-docuserve-filled-light">\n\t\t\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z" fill="#692bbf"/>\n\t\t<g clip-path="url(#frame-pict-docuserve-filled-light)"><rect x="18" y="30" width="48" height="48" rx="8" fill="#c13ccd" opacity="0.9"/>\n\t\t\t\t\t<rect x="30" y="18" width="48" height="48" rx="8" fill="rgba(255,255,255,0.18)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="38" font-weight="600"\n\t\t\tfill="#ffffff" letter-spacing="-1">PD</text>\n\t</svg>',IconType:"svg",Favicon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="fav-pict-docuserve-light">\n\t\t\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z" fill="#692bbf"/>\n\t\t<g clip-path="url(#fav-pict-docuserve-light)"><rect x="28" y="16" width="52" height="52" rx="9" fill="rgba(255,255,255,0.22)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="60" font-weight="800"\n\t\t\tfill="#ffffff" letter-spacing="-1">P</text>\n\t</svg>',FaviconDark:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="fav-pict-docuserve-dark">\n\t\t\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z" fill="#9a6fd8"/>\n\t\t<g clip-path="url(#fav-pict-docuserve-dark)"><rect x="28" y="16" width="52" height="52" rx="9" fill="rgba(255,255,255,0.22)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="60" font-weight="800"\n\t\t\tfill="#101418" letter-spacing="-1">P</text>\n\t</svg>',Colors:{Primary:"#692bbf",Secondary:"#c13ccd",PrimaryLight:"#692bbf",PrimaryDark:"#9a6fd8",SecondaryLight:"#c13ccd",SecondaryDark:"#d48adb"}}}}},{}],77:[function(t,e,o){const n=t("../package.json");if(!n.retold||!n.retold.brand)throw new Error("pict-docuserve: package.json is missing retold.brand — run `npm run brand` (which calls pict-section-theme-brand) before building");e.exports=n.retold.brand},{"../package.json":76}],78:[function(t,e,o){e.exports={Name:"Pict Docuserve",Hash:"Docuserve",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"Docuserve-Pict-Application"}}},{}],79:[function(t,e,o){const n=t("pict-application"),r=t("./providers/Pict-Provider-Docuserve-Documentation.js"),i=t("./providers/Pict-Provider-Docuserve-Demos.js"),a=t("pict-section-modal"),s=t("pict-section-theme"),l=t("./Docuserve-Brand.js"),c=t("./views/PictView-Docuserve-Layout.js"),d=t("./views/PictView-Docuserve-TopBar-Nav.js"),p=t("./views/PictView-Docuserve-TopBar-User.js"),h=t("./views/PictView-Docuserve-Sidebar.js"),u=t("./views/PictView-Docuserve-Splash.js"),m=t("./views/PictView-Docuserve-Content.js"),g=t("./views/PictView-Docuserve-Search.js"),f=t("./views/PictView-Docuserve-Demo.js"),b=t("./views/PictView-Docuserve-Fable-Playground.js");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this.pict.addProvider("Docuserve-Documentation",r.default_configuration,r),this.pict.addProvider("Docuserve-Demos",i.default_configuration,i),this.pict.addView("Pict-Section-Modal",a.default_configuration,a),this.pict.addView("Docuserve-Layout",c.default_configuration,c),this.pict.addView("Docuserve-TopBar-Nav",d.default_configuration,d),this.pict.addView("Docuserve-TopBar-User",p.default_configuration,p),this.pict.addView("Docuserve-Sidebar",h.default_configuration,h),this.pict.addView("Docuserve-Splash",u.default_configuration,u),this.pict.addView("Docuserve-Content",m.default_configuration,m),this.pict.addView("Docuserve-Search",g.default_configuration,g),this.pict.addView("Docuserve-Demo",f.default_configuration,f),this.pict.addView("Docuserve-Fable-Playground",b.default_configuration,b),this._docuserveBrandOverride=e&&e.Brand?e.Brand:null}_resolveBrand(t){return this._docuserveBrandOverride?t(this._docuserveBrandOverride):"function"!=typeof fetch?t(l):void fetch("_brand.json").then(t=>t&&t.ok?t.json():null).then(e=>{if(e&&(e.Name||e.Hash||e.Colors))return t(e);t(l)}).catch(()=>{t(l)})}_addThemeSection(t){this.pict.addProvider("Theme-Section",{ApplyDefault:"retold-default",DefaultMode:"system",DefaultScale:1,Brand:t,Views:["Picker","ModeToggle","ScaleSelect","Button","BrandMark","TopBar"],ViewOptions:{TopBar:{NavView:"Docuserve-TopBar-Nav",UserView:"Docuserve-TopBar-User",Height:56}}},s)}onAfterInitializeAsync(t){this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,VersionLoaded:!1,Version:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"",CatalogURL:"retold-catalog.json",SidebarGroupRecords:[],SidebarSearchSlot:[],SidebarSearchResults:[],SidebarSearchOverflow:[],SidebarSearchEmpty:[],ModuleNavSections:[],FooterSlot:[],SearchResults:[],SearchStatus:""},this._resolveBrand(e=>{this._addThemeSection(e),this._loadCatalogAndRender(t)})}_loadCatalogAndRender(t){this.pict.providers["Docuserve-Documentation"].loadCatalog(()=>{let e=this.pict.AppData.Docuserve,o="";return e.CoverLoaded&&e.Cover&&e.Cover.Title?o=e.Cover.Title.replace(/<[^>]*>/g,"").trim():e.TopBarLoaded&&e.TopBar&&e.TopBar.Brand&&(o=e.TopBar.Brand.replace(/<[^>]*>/g,"").trim()),o&&(e.VersionLoaded&&e.Version&&e.Version.Version?document.title="".concat(o," v").concat(e.Version.Version," Documentation"):document.title=o),this.pict.views["Docuserve-Layout"].render(),super.onAfterInitializeAsync(t)})}resolveHash(){let t=(window.location.hash||"").replace(/^#\/?/,"");if(!t||"Home"===t)return void this.showView("Docuserve-Splash");let e=t.split("/");if("search"===e[0]){let t=decodeURIComponent(e.slice(1).join("/"));return void this.navigateToSearch(t)}if("page"===e[0]&&e.length>=2){let t=e.slice(1).join("/");return void this.navigateToPage(t)}if("doc"===e[0]&&e.length>=3){let t=e[1],o=e[2];if(e.length>=4){let n=e.slice(3).join("/");this.navigateToModulePath(t,o,n)}else this.navigateToModule(t,o);return}if("demo"===e[0]&&e.length>=4){let t=e[1],o=e[2],n=e.slice(3).join("/");return void this.navigateToDemo(t,o,n)}"playground"===e[0]&&e.length>=2?this.navigateToPlayground(e[1]):this.navigateToPage(t)}navigateToDemo(t,e,o){let n=this.pict.views["Docuserve-Demo"],r=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=t,this.pict.AppData.Docuserve.CurrentModule=e,this.pict.AppData.Docuserve.CurrentDemo=o,this.pict.AppData.Docuserve.CurrentPath="",n&&"function"==typeof n.showDemo&&n.showDemo(t,e,o),r&&(r.renderSidebarGroups(),"function"==typeof r.renderModuleNav&&r.renderModuleNav(t,e)),this._syncPlaygroundVisibility()}navigateToPlayground(t){let e=this.pict.views["Docuserve-Layout"];if("fable"===t)return this.navigateToPage("fable-playground"),e&&"function"==typeof e.setPlaygroundEnabled&&e.setPlaygroundEnabled(!0),void(e&&"function"==typeof e.expandPlayground&&e.expandPlayground());let o=this.pict.views["Docuserve-Content"];o&&"function"==typeof o.displayContent&&(o.render(),o.displayContent("<h1>Playground not available</h1><p>No playground is registered for <code>"+t+"</code>.</p>"))}navigateTo(t){window.location.hash=t}showView(t){t in this.pict.views&&(this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",this.pict.views[t].render(),this.pict.views["Docuserve-Sidebar"].clearModuleNav(),this.pict.views["Docuserve-Sidebar"].renderSidebarGroups()),this._syncPlaygroundVisibility()}_syncPlaygroundVisibility(){let t=this.pict.views["Docuserve-Layout"],e=this.pict.providers["Docuserve-Documentation"];if(!t||"function"!=typeof t.setPlaygroundEnabled)return;let o=this.pict.AppData.Docuserve.CurrentGroup,n=this.pict.AppData.Docuserve.CurrentModule,r=!(!e||"function"!=typeof e.isPlaygroundEnabled)&&e.isPlaygroundEnabled(o,n);t.setPlaygroundEnabled(r),"function"==typeof t.setPlaygroundTitle&&t.setPlaygroundTitle(n?"JS Playground: "+n:"JS Playground"),r&&e&&"function"==typeof e.loadPlaygroundConfig?e.loadPlaygroundConfig(o,n).then(t=>{this.pict.AppData.Docuserve.Playground||(this.pict.AppData.Docuserve.Playground={}),this.pict.AppData.Docuserve.Playground.Config=t||null}):this.pict.AppData.Docuserve.Playground&&(this.pict.AppData.Docuserve.Playground.Config=null)}navigateToModule(t,e){this.navigateToModulePath(t,e,"README.md")}navigateToModulePath(t,e,o){let n=this.pict.providers["Docuserve-Documentation"],r=this.pict.views["Docuserve-Content"],i=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=t,this.pict.AppData.Docuserve.CurrentModule=e,this.pict.AppData.Docuserve.CurrentPath=o,r.render(),r.showLoading(),i.renderSidebarGroups(),i.renderModuleNav(t,e),this._syncPlaygroundVisibility();let a=n.resolveDocumentURL(t,e,o||"README.md");if(!a)return void r.displayContent(n.getErrorPageHTML(t+"/"+e));let s=o||"README.md";n.fetchDocument(a,(o,i)=>{if(!o)return void r.displayContent(i);let a=t+"/"+e+"/"+s;n.fetchLocalDocument(a,(t,e)=>{r.displayContent(e)},t,e,s)},t,e,s)}navigateToPage(t){let e=this.pict.providers["Docuserve-Documentation"],o=this.pict.views["Docuserve-Content"],n=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath=t,o.render(),o.showLoading(),n.clearModuleNav(),n.renderSidebarGroups(),this._syncPlaygroundVisibility();let r=t;r.match(/\.md$/)||(r+=".md"),e.fetchLocalDocument(r,(t,e)=>{o.displayContent(e)})}navigateToSearch(t){let e=this.pict.views["Docuserve-Sidebar"],o=this.pict.views["Docuserve-Search"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",e.clearModuleNav(),e.renderSidebarGroups(),o.render(),o.showSearch(t||""),this._syncPlaygroundVisibility()}},e.exports.default_configuration=t("./Pict-Application-Docuserve-Configuration.json")},{"./Docuserve-Brand.js":77,"./Pict-Application-Docuserve-Configuration.json":78,"./providers/Pict-Provider-Docuserve-Demos.js":80,"./providers/Pict-Provider-Docuserve-Documentation.js":81,"./views/PictView-Docuserve-Content.js":82,"./views/PictView-Docuserve-Demo.js":83,"./views/PictView-Docuserve-Fable-Playground.js":84,"./views/PictView-Docuserve-Layout.js":85,"./views/PictView-Docuserve-Search.js":86,"./views/PictView-Docuserve-Sidebar.js":87,"./views/PictView-Docuserve-Splash.js":88,"./views/PictView-Docuserve-TopBar-Nav.js":89,"./views/PictView-Docuserve-TopBar-User.js":90,"pict-application":5,"pict-section-modal":24,"pict-section-theme":30}],80:[function(t,e,o){const n=t("pict-provider");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this._byKey={},this._byModule={},this._all=[]}get maxSchemaVersion(){return 1}register(t){if(!t||"object"!=typeof t)return this.log.warn("Docuserve-Demos.register: entry must be an object"),null;let e="number"==typeof t.DemoSchemaVersion?t.DemoSchemaVersion:1;if(e>1)return this.log.warn("Docuserve-Demos.register: entry schema v"+e+" exceeds this provider's max v1 — skipping "+(t.Group||"?")+"/"+(t.Module||"?")+"/"+(t.Hash||"?")+". Upgrade pict-docuserve to register newer-schema demos."),null;if("string"!=typeof t.Hash||t.Hash.length<1)return this.log.warn("Docuserve-Demos.register: entry.Hash is required"),null;if("string"!=typeof t.Group||t.Group.length<1)return this.log.warn('Docuserve-Demos.register: entry.Group is required (e.g. "pict")'),null;if("string"!=typeof t.Module||t.Module.length<1)return this.log.warn('Docuserve-Demos.register: entry.Module is required (e.g. "pict-section-form")'),null;if("function"!=typeof t.Mount)return this.log.warn("Docuserve-Demos.register: entry.Mount must be a function (pict, container, spec)"),null;let o=t.Group+"/"+t.Module+"/"+t.Hash,n=t.Group+"/"+t.Module,r=this._byKey[o];if(r){let e=this._all.indexOf(r);e>=0&&(this._all[e]=t);let i=this._byModule[n]||[],a=i.indexOf(r);return a>=0&&(i[a]=t),this._byKey[o]=t,t}return this._byKey[o]=t,this._all.push(t),this._byModule[n]||(this._byModule[n]=[]),this._byModule[n].push(t),t}registerAll(t){if(!Array.isArray(t))return 0;let e=0;for(let o=0;o<t.length;o++)this.register(t[o])&&e++;return e}get(t,e,o){return this._byKey[t+"/"+e+"/"+o]||null}listAll(){return this._all.slice()}listByModule(t,e){let o=this._byModule[t+"/"+e];return o?o.slice():[]}hasDemos(t,e){let o=this._byModule[t+"/"+e];return!!(o&&o.length>0)}},e.exports.default_configuration={ProviderIdentifier:"Docuserve-Demos"},e.exports.MAX_DEMO_SCHEMA_VERSION=1},{"pict-provider":7}],81:[function(t,e,o){const n=t("pict-provider"),r=t("lunr"),i=t("pict-section-content").PictContentProvider;e.exports=class extends n{constructor(t,e,o){super(t,e,o),this._Catalog=null,this._ContentCache={},this._PlaygroundConfigCache={},this._ContentProvider=this.pict.addProvider("Pict-Content",i.default_configuration,i)}_createLinkResolver(t,e,o){return(n,r)=>{if(n.match(/^\//)||n.match(/^[^:]+\.md/)){return{href:this.convertDocLink(n,t,e,o)}}let i=this.resolveGitHubURLToRoute(n);return i?{href:i}:null}}_createImageResolver(t){let e="";if(t){let o=t.lastIndexOf("/");o>=0&&(e=t.substring(0,o+1))}return(t,o)=>t.match(/^https?:\/\//)||t.match(/^data:/)||t.match(/^\//)?t:e+t}loadCatalog(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.CatalogURL||"retold-catalog.json",n=()=>{let t=6,o=()=>{if(t--,t<=0){if(this.pict.AppData.Docuserve.SidebarGroups&&!(this.pict.AppData.Docuserve.SidebarGroups.length<1))return e();this.autoDiscoverSidebar(e)}};this.loadCover(o),this.loadSidebar(o),this.loadTopbar(o),this.loadErrorPage(o),this.loadKeywordIndex(o),this.loadVersion(o)};fetch(o).then(t=>t.ok?t.json():(this.log.info("Docuserve: No catalog at [".concat(o,"]; running in standalone mode.")),null)).then(t=>{t&&(this._Catalog=t,this.pict.AppData.Docuserve.Catalog=t,this.pict.AppData.Docuserve.CatalogLoaded=!0,this.buildSidebarData(t)),n()}).catch(t=>{this.log.info("Docuserve: Catalog load error (".concat(t,"); continuing in standalone mode.")),n()})}autoDiscoverSidebar(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(o+"README.md").then(t=>t.ok?t.text():null).then(t=>{if(t){let e=t.match(/^#+\s+(.+)/m),o=e?e[1].trim():"Docs";this.pict.AppData.Docuserve.SidebarGroups=[{Name:o,Key:"docs",Route:"#/page/README",Modules:[]}],this.pict.AppData.Docuserve.CoverLoaded||(this.pict.AppData.Docuserve.Cover={Title:o,Tagline:"",Description:"",Highlights:[],Actions:[{Text:"Read the Docs",Href:"README.md"}]},this.pict.AppData.Docuserve.CoverLoaded=!0)}else this.log.info("Docuserve: No README.md found; sidebar will be empty.");return e()}).catch(t=>(this.log.info("Docuserve: README.md discovery failed (".concat(t,").")),e()))}loadCover(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(o+"_cover.md").then(t=>t.ok?t.text():null).then(t=>t?(this.pict.AppData.Docuserve.Cover=this.parseCover(t),this.pict.AppData.Docuserve.CoverLoaded=!0,e()):(this.log.info("Docuserve: No _cover.md found; splash will use catalog data."),e())).catch(t=>(this.log.warn("Docuserve: Error loading _cover.md: ".concat(t)),e()))}parseCover(t){let e={Title:"",Tagline:"",Description:"",Highlights:[],Actions:[]},o=t.split("\n");for(let t=0;t<o.length;t++){let n=o[t].trim();if(!n)continue;let r=n.match(/^#+\s+(.+)/);if(r){e.Title=r[1].trim();continue}let i=n.match(/^>\s*(.*)/);if(i){e.Tagline=i[1].trim();continue}let a=n.match(/^[-*+]\s+(.*)/);if(a){let t=a[1],o=t.match(/^\*\*([^*]+)\*\*\s*[-—:]\s*(.*)/);o?e.Highlights.push({Label:o[1].trim(),Text:o[2].trim()}):e.Highlights.push({Label:"",Text:t.trim()});continue}let s=n.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);s?e.Actions.push({Text:s[1].trim(),Href:s[2].trim()}):e.Description?e.Description+=" "+n:e.Description=n}return e}loadSidebar(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(o+"_sidebar.md").then(t=>t.ok?t.text():null).then(t=>{if(!t)return this.log.info("Docuserve: No _sidebar.md found; sidebar will use catalog data."),e();let o=this.parseSidebarMarkdown(t);return o&&o.length>0&&(this.pict.AppData.Docuserve.SidebarGroups=o,this.pict.AppData.Docuserve.SidebarLoaded=!0),e()}).catch(t=>(this.log.warn("Docuserve: Error loading _sidebar.md: ".concat(t)),e()))}loadTopbar(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(o+"_topbar.md").then(t=>t.ok?t.text():null).then(t=>t?(this.pict.AppData.Docuserve.TopBar=this.parseTopbar(t),this.pict.AppData.Docuserve.TopBarLoaded=!0,e()):(this.log.info("Docuserve: No _topbar.md found; top bar will use defaults."),e())).catch(t=>(this.log.warn("Docuserve: Error loading _topbar.md: ".concat(t)),e()))}parseTopbar(t){let e={Brand:"",NavLinks:[],ExternalLinks:[]},o=t.split("\n");for(let t=0;t<o.length;t++){let n=o[t].trim();if(!n)continue;let r=n.match(/^#+\s+(.+)/);if(r){e.Brand=r[1].trim();continue}let i=n.match(/^[-*+]\s+(.*)/);if(i){let t=i[1].trim().match(/^\[([^\]]+)\]\(([^)]+)\)/);if(t){let o=t[1].trim(),n=t[2].trim();if(n.match(/^https?:\/\//))e.ExternalLinks.push({Text:o,Href:n});else{let t=this.convertSidebarLink(n);e.NavLinks.push({Text:o,Href:t})}}continue}}return e}loadVersion(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(o+"_version.json").then(t=>t.ok?t.json():null).then(t=>t?(this.pict.AppData.Docuserve.Version=t,this.pict.AppData.Docuserve.VersionLoaded=!0,e()):(this.log.info("Docuserve: No _version.json found; version placard disabled."),e())).catch(t=>(this.log.warn("Docuserve: Error loading _version.json: ".concat(t)),e()))}loadPlaygroundConfig(t,e){let o,n=(t||"")+"/"+(e||"");if(Object.prototype.hasOwnProperty.call(this._PlaygroundConfigCache,n))return Promise.resolve(this._PlaygroundConfigCache[n]);if(t&&e&&this._Catalog&&(o=this.resolveDocumentURL(t,e,"_playground.json")),!o){let t=this.pict.AppData.Docuserve.DocsBaseURL||"";o=t+"_playground.json"}return fetch(o).then(t=>t.ok?t.json():null).then(t=>(this._PlaygroundConfigCache[n]=t||null,this._PlaygroundConfigCache[n])).catch(t=>(this.log.warn("Docuserve: Error loading _playground.json ["+o+"]: "+t),this._PlaygroundConfigCache[n]=null,null))}loadErrorPage(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(o+"errorpage.md").then(t=>t.ok?t.text():null).then(t=>t?(this.pict.AppData.Docuserve.ErrorPageHTML=this._ContentProvider.parseMarkdown(t),this.pict.AppData.Docuserve.ErrorPageLoaded=!0,e()):(this.log.info("Docuserve: No errorpage.md found; errors will use default page."),e())).catch(t=>(this.log.warn("Docuserve: Error loading errorpage.md: ".concat(t)),e()))}loadKeywordIndex(t){let e="function"==typeof t?t:()=>{},o=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(o+"retold-keyword-index.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!t.LunrIndex||!t.Documents)return this.log.info("Docuserve: No keyword index found; search will be unavailable."),e();try{this._LunrIndex=r.Index.load(t.LunrIndex),this._KeywordDocuments=t.Documents,this.pict.AppData.Docuserve.KeywordIndexLoaded=!0,this.pict.AppData.Docuserve.KeywordDocumentCount=t.DocumentCount||0,this.log.info("Docuserve: Keyword index loaded (".concat(t.DocumentCount||0," documents)."))}catch(t){this.log.warn("Docuserve: Error hydrating lunr index: ".concat(t))}return e()}).catch(t=>(this.log.warn("Docuserve: Error loading keyword index: ".concat(t)),e()))}isModuleInCatalog(t,e){if(!this._Catalog||!this._Catalog.Groups)return!1;for(let o=0;o<this._Catalog.Groups.length;o++){let n=this._Catalog.Groups[o];if(n.Key===t)for(let t=0;t<n.Modules.length;t++){if(n.Modules[t].Name===e)return!0}}return!1}findModuleGroupKey(t){if(!this._Catalog||!this._Catalog.Groups)return null;for(let e=0;e<this._Catalog.Groups.length;e++){let o=this._Catalog.Groups[e];for(let e=0;e<o.Modules.length;e++)if(o.Modules[e].Name===t)return o.Key}return null}isGroupInCatalog(t){if(!this._Catalog||!this._Catalog.Groups)return!1;for(let e=0;e<this._Catalog.Groups.length;e++)if(this._Catalog.Groups[e].Key===t)return!0;return!1}search(t){if(!(this._LunrIndex&&this._KeywordDocuments&&t&&t.trim()))return[];let e=[];try{let o=this._LunrIndex.search(t);for(let t=0;t<o.length;t++){let n=o[t].ref,r=o[t].score,i=this._KeywordDocuments[n];if(!i)continue;let a=n.split("/"),s="";if(a.length>=2){let t=a[0],e=a[1];s=this.isModuleInCatalog(t,e)?"#/doc/"+n:"#/page/"+n}e.push({Key:n,Title:i.Title||n,Group:i.Group||"",Module:i.Module||"",DocPath:i.DocPath||"",Score:r,Route:s})}}catch(t){this.log.warn("Docuserve: Search error: ".concat(t))}return e}getErrorPageHTML(t){let e=t||"unknown";return this.pict.AppData.Docuserve.ErrorPageLoaded&&this.pict.AppData.Docuserve.ErrorPageHTML?this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\{\{path\}\}/g,this._ContentProvider.escapeHTML(e)):'<div class="docuserve-not-found"><h2>Page Not Found</h2><p>The document <code>'+this._ContentProvider.escapeHTML(e)+'</code> could not be loaded.</p><p><a href="#/Home">Return to the home page</a></p></div>'}parseSidebarMarkdown(t){let e=[],o=null,n=t.split("\n");for(let t=0;t<n.length;t++){let r=n[t];if(!r.trim())continue;let i=r.match(/^(\s*)/),a=i?i[1].length:0,s=r.trim().match(/^[-*+]\s+(.*)/);if(!s)continue;let l=s[1].trim(),c=l.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(a<2)if(c){let t=c[1].trim(),n=c[2].trim();o={Name:t,Key:this.deriveGroupKey(t,n),Route:this.convertSidebarLink(n),Modules:[]},e.push(o)}else{let t=l,n=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");o={Name:t,Key:n,Route:"",Modules:[]},e.push(o)}else if(o)if(c){let t=c[1].trim(),e=c[2].trim(),n=this.convertSidebarLink(e);o.Modules.push({Name:t,HasDocs:!0,Group:o.Key,Route:n})}else o.Modules.push({Name:l,HasDocs:!1,Group:o.Key,Route:""})}return e}convertSidebarLink(t){if(!t)return"";if("/"===t)return"#/Home";if(t.match(/^#[^/]/)){let t=this.pict.AppData.Docuserve.SidebarGroups;if(t)for(let e=0;e<t.length;e++){let o=t[e].Modules;if(o)for(let t=0;t<o.length;t++)if(o[t].HasDocs&&o[t].Route&&"#/Home"!==o[t].Route)return o[t].Route;if(t[e].Route&&"#/Home"!==t[e].Route)return t[e].Route}return"#/Home"}let e=t.replace(/^\//,"").replace(/\/$/,"");if(!e)return"#/Home";let o=e.split("/");if(o.length>=2){if(this.isGroupInCatalog(o[0])&&this.isModuleInCatalog(o[0],o[1]))return"#/doc/"+e;let t=this.findModuleGroupKey(o[1]);if(t){let e=o.slice(2).join("/");return e?"#/doc/"+t+"/"+o[1]+"/"+e:"#/doc/"+t+"/"+o[1]}}return e.match(/\.md$/)?"#/page/"+e.replace(/\.md$/,""):"#/page/"+e}deriveGroupKey(t,e){if(e&&"/"!==e){let t=e.replace(/^\//,"").replace(/\.md$/,"").replace(/\/$/,"");if(t&&!t.includes("/"))return t.toLowerCase()}return t.split(/[\s—\-:]+/)[0].toLowerCase().replace(/[^a-z0-9]/g,"")}buildSidebarData(t){let e=[];for(let o=0;o<t.Groups.length;o++){let n=t.Groups[o],r={Name:n.Name,Key:n.Key,Description:n.Description,Modules:[]};for(let t=0;t<n.Modules.length;t++){let e=n.Modules[t];r.Modules.push({Name:e.Name,HasDocs:e.HasDocs,Group:n.Key,Route:"#/doc/"+n.Key+"/"+e.Name})}e.push(r)}this.pict.AppData.Docuserve.SidebarGroups=e}resolveDocumentURL(t,e,o){if(!this._Catalog)return null;let n=this._Catalog.GitHubOrg||"stevenvelozo",r=this._Catalog.DefaultBranch||"master";for(let i=0;i<this._Catalog.Groups.length;i++){let a=this._Catalog.Groups[i];if(a.Key===t)for(let t=0;t<a.Modules.length;t++){let i=a.Modules[t];if(i.Name!==e)continue;let s=i.Branch||r,l=o||"README.md";return"https://raw.githubusercontent.com/"+n+"/"+i.Repo+"/"+s+"/docs/"+l}}return null}resolveGitHubURLToRoute(t){if(!this._Catalog||!this._Catalog.Groups||!t)return null;let e=t.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)/);if(!e)return null;let o=e[1],n=e[2];if(o!==this._Catalog.GitHubOrg)return null;for(let t=0;t<this._Catalog.Groups.length;t++){let e=this._Catalog.Groups[t];for(let t=0;t<e.Modules.length;t++){let o=e.Modules[t];if(o.Repo===n)return"#/doc/"+e.Key+"/"+o.Name}}return null}resolveGitHubPagesURL(t,e){if(!this._Catalog||!this._Catalog.Groups)return null;let o=this._Catalog.GitHubOrg||"stevenvelozo";for(let n=0;n<this._Catalog.Groups.length;n++){let r=this._Catalog.Groups[n];if(r.Key===t)for(let t=0;t<r.Modules.length;t++){let n=r.Modules[t];if(n.Name===e)return n.HasDocs?"https://"+o+".github.io/"+n.Repo+"/":null}}return null}getModuleSidebar(t,e){if(!this._Catalog)return null;for(let o=0;o<this._Catalog.Groups.length;o++){let n=this._Catalog.Groups[o];if(n.Key===t)for(let t=0;t<n.Modules.length;t++){let o=n.Modules[t];if(o.Name===e)return o.Sidebar||null}}return null}isPlaygroundEnabled(t,e){if(t&&e){let o=this.getModuleSidebar(t,e);if(Array.isArray(o)&&this._sidebarEntriesIncludePlayground(o))return!0}let o=this.pict.AppData.Docuserve.SidebarGroups;return!(!Array.isArray(o)||!this._sidebarGroupsIncludePlayground(o))}_sidebarEntriesIncludePlayground(t){for(let e=0;e<t.length;e++){let o=t[e];if("string"==typeof o.Path&&/(^|\/)playground\.md$/i.test(o.Path))return!0;if(Array.isArray(o.Children)&&this._sidebarEntriesIncludePlayground(o.Children))return!0}return!1}_sidebarGroupsIncludePlayground(t){let e=/(^|\/)playground(\.md|$)/i;for(let o=0;o<t.length;o++){let n=t[o];if("string"==typeof n.Route&&e.test(n.Route))return!0;if(Array.isArray(n.Modules))for(let t=0;t<n.Modules.length;t++){let o=n.Modules[t];if("string"==typeof o.Route&&e.test(o.Route))return!0}}return!1}fetchDocument(t,e,o,n,r){let i="function"==typeof e?e:()=>{};return t?this._ContentCache[t]?i(null,this._ContentCache[t]):void fetch(t).then(t=>t.ok?t.text():null).then(e=>{if(!e)return i("Document not found",this.getErrorPageHTML(t));let a=this._ContentProvider.parseMarkdown(e,this._createLinkResolver(o,n,r),this._createImageResolver(t));return this._ContentCache[t]=a,i(null,a)}).catch(e=>(this.log.warn("Docuserve: Error fetching document [".concat(t,"]: ").concat(e)),i(e,this.getErrorPageHTML(t)))):i("No URL provided","")}fetchLocalDocument(t,e,o,n,r){let i=(this.pict.AppData.Docuserve.DocsBaseURL||"")+t;this.fetchDocument(i,e,o,n,r)}convertDocLink(t,e,o,n){let r=t.replace(/^\.\//,"");r=r.replace(/^\//,"");let i=r.split("/");if(i.length>=2&&this.isGroupInCatalog(i[0])&&this.isModuleInCatalog(i[0],i[1]))return"#/doc/"+r;if(e&&o){let t="";if(n){let e=n.split("/");e.length>1&&(e.pop(),t=e.join("/")+"/")}return"#/doc/"+e+"/"+o+"/"+t+r}if(r.match(/\.md$/)){return"#/page/"+r.replace(/\.md$/,"")}return"#/page/"+r}},e.exports.default_configuration={ProviderIdentifier:"Docuserve-Documentation",AutoInitialize:!0,AutoInitializeOrdinal:0}},{lunr:3,"pict-provider":7,"pict-section-content":12}],82:[function(t,e,o){const n=t("pict-section-content");e.exports=class extends n{constructor(t,e,o){super(t,e,o)}displayContent(t){let e=t,o=this.pict.AppData.Docuserve.CurrentGroup,n=this.pict.AppData.Docuserve.CurrentModule;if(o&&n){let t=this.pict.providers["Docuserve-Documentation"];if(t){let r=t.resolveGitHubPagesURL(o,n);r&&(e='<div class="docuserve-module-external-link"><a href="'+r+'" target="_blank" rel="noopener">&#x2197; View '+n+" documentation site</a></div>"+e)}}super.displayContent(e,"Docuserve-Content-Body"),this._mountInlineWidgets()}_mountInlineWidgets(){let t=document.getElementById("Docuserve-Content-Body");if(!t)return;let e=t.querySelectorAll("[data-docuserve-playground]:not([data-docuserve-mounted])");for(let t=0;t<e.length;t++){let o=e[t],n=null;"fable"===o.getAttribute("data-docuserve-playground")&&(n=this.pict.views["Docuserve-Fable-Playground"]),n&&"function"==typeof n.mountInto&&(o.setAttribute("data-docuserve-mounted","1"),n.mountInto(o))}this._addPlaygroundButtonsToCodeBlocks()}_addPlaygroundButtonsToCodeBlocks(){let t=document.getElementById("Docuserve-Content-Body");if(!t)return;let e=this.pict.providers["Docuserve-Documentation"];if(e&&"function"==typeof e.isPlaygroundEnabled){let t=this.pict.AppData.Docuserve||{};if(!e.isPlaygroundEnabled(t.CurrentGroup,t.CurrentModule))return}let o=t.querySelectorAll(".pict-content-code-container:not([data-tryplay-wired])");for(let t=0;t<o.length;t++){let e=o[t];if(!e.querySelector("code.language-javascript, code.language-js"))continue;let n=e.querySelector(".pict-content-code-actions");if(!n)continue;let r=document.createElement("button");r.type="button",r.className="pict-content-code-action-btn docuserve-tryplay-btn",r.title="Try in Fable Playground",r.setAttribute("aria-label","Try this code in the Fable Playground"),r.setAttribute("onclick","_Pict.views['Docuserve-Content'].tryInPlayground(this)"),r.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true"><polygon points="5,3 13,8 5,13"></polygon></svg>',n.appendChild(r),e.setAttribute("data-tryplay-wired","true")}}tryInPlayground(t){if(!t)return;let e=t.closest(".pict-content-code-container");if(!e)return;let o=e.querySelector("code");if(!o)return;let n=this.pict.views["Docuserve-Fable-Playground"];n&&"function"==typeof n.loadCode&&n.loadCode(o.textContent)}showLoading(){super.showLoading("Loading documentation...","Docuserve-Content-Body")}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Content",DefaultRenderable:"Docuserve-Content-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* Plain <pre> (no wrap) - rare; keep for safety */\n\t\t.pict-content pre {\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t/* Inline code */\n\t\t.pict-content code {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-syntax-property, #9E3A50);\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t/* Fenced code block wrapper emitted by pict-section-content */\n\t\t.pict-content-code-wrap {\n\t\t\tposition: relative;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: var(--theme-color-background-tertiary, #EFEAE0);\n\t\t\tborder-right: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tcolor: var(--theme-color-text-muted, #A59986);\n\t\t\tfont-family: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tline-height: inherit;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tpadding: 1.25em 1.25em 1.25em 52px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t/* Syntax tokens — these rules must match the span classes emitted by\n\t\t pict-section-code's highlighter. Also apply without .pict-content-code-wrap\n\t\t as a belt-and-suspenders for any <pre><code> not emitted from a fence. */\n\t\t.pict-content-code-wrap .keyword,\n\t\t.pict-content pre code .keyword { color: var(--theme-color-syntax-keyword, #A03472); }\n\t\t.pict-content-code-wrap .string,\n\t\t.pict-content pre code .string { color: var(--theme-color-syntax-string, #1A6640); }\n\t\t.pict-content-code-wrap .number,\n\t\t.pict-content pre code .number { color: var(--theme-color-syntax-number, #B25A00); }\n\t\t.pict-content-code-wrap .comment,\n\t\t.pict-content pre code .comment { color: var(--theme-color-syntax-comment, #8A7F72); font-style: italic; }\n\t\t.pict-content-code-wrap .operator,\n\t\t.pict-content pre code .operator { color: var(--theme-color-syntax-operator, #2E7D74); }\n\t\t.pict-content-code-wrap .punctuation,\n\t\t.pict-content pre code .punctuation { color: var(--theme-color-syntax-punctuation, #2A241E); }\n\t\t.pict-content-code-wrap .function-name,\n\t\t.pict-content pre code .function-name { color: var(--theme-color-syntax-function, #2A5DB0); }\n\t\t.pict-content-code-wrap .property,\n\t\t.pict-content pre code .property { color: var(--theme-color-syntax-property, #9E3A50); }\n\t\t.pict-content-code-wrap .tag,\n\t\t.pict-content pre code .tag { color: var(--theme-color-syntax-tag, #9E3A50); }\n\t\t.pict-content-code-wrap .attr-name,\n\t\t.pict-content pre code .attr-name { color: var(--theme-color-syntax-attrname, #B25A00); }\n\t\t.pict-content-code-wrap .attr-value,\n\t\t.pict-content pre code .attr-value { color: var(--theme-color-syntax-attrvalue, #1A6640); }\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: var(--theme-color-background-secondary, #F7F5F0);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F5F0E8);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: var(--theme-color-background-secondary, #F9F6F0);\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t}\n\t\t/* Force dark text inside mermaid SVGs so diagrams stay readable\n\t\t in dark mode (mermaid bg is always light). */\n\t\t.pict-content pre.mermaid text,\n\t\t.pict-content pre.mermaid .nodeLabel,\n\t\t.pict-content pre.mermaid .edgeLabel,\n\t\t.pict-content pre.mermaid .label,\n\t\t.pict-content pre.mermaid .cluster-label,\n\t\t.pict-content pre.mermaid span,\n\t\t.pict-content pre.mermaid foreignObject p,\n\t\t.pict-content pre.mermaid foreignObject div,\n\t\t.pict-content pre.mermaid foreignObject span {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E) !important;\n\t\t\tfill: var(--theme-color-text-primary, #2A241E) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .edgePath .path {\n\t\t\tstroke: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .arrowheadPath {\n\t\t\tfill: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t/* Mermaid 11's block-beta renderer ignores the themeVariables we\n\t\t pass to mermaid.initialize() — it bakes its own multi-color\n\t\t palette directly into each rect's inline SVG attributes. In\n\t\t light mode that palette is fine: Mermaid's pastel colors on a\n\t\t light page have good contrast and visual hierarchy. In dark\n\t\t mode those same light-pastel fills with dark text appear as a\n\t\t light-mode island stamped onto a dark page — poor contrast and\n\t\t visually jarring.\n\t\t Rather than collapsing the palette to a single theme color\n\t\t (which loses the per-cluster identity the diagram author chose),\n\t\t we invert the entire diagram with a CSS filter in dark mode.\n\t\t The 0.92 factor avoids a harsh pure-white→pure-black flip; the\n\t\t hue-rotate(180deg) compensates for the hue shift invert()\n\t\t introduces, so red stays reddish, green stays greenish, etc.\n\t\t Scoped via :has(g.block) so only block-beta diagrams get\n\t\t filtered — flowchart / sequence / state diagrams already honor\n\t\t themeVariables and render mode-correctly without inversion. */\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) {\n\t\t\tfilter: invert(0.92) hue-rotate(180deg);\n\t\t\tbackground: transparent !important;\n\t\t\tborder-color: transparent !important;\n\t\t}\n\t\t/* When the block-beta inversion is active, the global \"force\n\t\t text to theme-color-text-primary\" rule above would set text\n\t\t to the dark-mode text color (light cream), which the filter\n\t\t then inverts to dark — unreadable against the now-dark fills.\n\t\t Reverting lets Mermaid's natural light-mode text color (dark)\n\t\t pass through the inversion, becoming light text in dark mode. */\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) text,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .nodeLabel,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .edgeLabel,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .label,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .cluster-label,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) span,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) foreignObject p,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) foreignObject div,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) foreignObject span {\n\t\t\t/* Force text to render DARK pre-filter so the dark-mode filter\n\t\t\t inverts it to LIGHT on the now-dark inverted blocks. Using\n\t\t\t the theme's light-mode text-primary hex directly (not the\n\t\t\t var() chain) because the chain would resolve to light cream\n\t\t\t in dark mode, which the filter would then invert BACK to\n\t\t\t dark — unreadable on the inverted dark blocks. */\n\t\t\tcolor: #3D3229 !important;\n\t\t\tfill: #3D3229 !important;\n\t\t}\n\t\t/* Inner blocks (the .basic.label-container rects inside block-beta\n\t\t diagrams, NOT the cluster wrappers) pick up mainBkg from the\n\t\t themeVariables we pass to mermaid.initialize(). In dark mode\n\t\t that's a dark color — which the SVG filter then inverts to\n\t\t light gray, undoing the dark-mode-ification. Force the inner\n\t\t blocks to render with a fixed light fill so the inversion\n\t\t produces dark cards in dark mode. In light mode (no filter)\n\t\t the white fill is effectively the same as Mermaid's default\n\t\t light-theme block bg — so no visual change there. */\n\t\t.pict-content pre.mermaid:has(g.block) rect.basic.label-container:not(.cluster) {\n\t\t\tfill: #FFFFFF !important;\n\t\t\tstroke: #6E6E6E !important;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-module-external-link {\n\t\t\tpadding: 0.5em 0;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t.docuserve-module-external-link a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-module-external-link a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-syntax-property, #9E3A50);\n\t\t}\n\n\t\t/* Fullscreen viewer for images and mermaid diagrams (click-to-zoom) */\n\t\t.pict-content [data-fullscreen-source] {\n\t\t\tcursor: zoom-in;\n\t\t\toutline: 1px solid transparent;\n\t\t\toutline-offset: 3px;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: outline-color 0.15s ease;\n\t\t}\n\t\t.pict-content [data-fullscreen-source]:hover {\n\t\t\toutline-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t/* Code block container with hover-revealed action buttons */\n\t\t.pict-content-code-container {\n\t\t\tposition: relative;\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tgap: 8px;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content-code-container > .pict-content-code-wrap {\n\t\t\tmargin: 0;\n\t\t\tflex: 1 1 auto;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-actions {\n\t\t\tposition: sticky;\n\t\t\ttop: 64px;\n\t\t\talign-self: flex-start;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t\tflex: 0 0 auto;\n\t\t\tpadding-top: 6px;\n\t\t\topacity: 0;\n\t\t\ttransform: translateX(-4px);\n\t\t\ttransition: opacity 0.15s ease, transform 0.15s ease;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-content-code-container:hover .pict-content-code-actions,\n\t\t.pict-content-code-container:focus-within .pict-content-code-actions {\n\t\t\topacity: 1;\n\t\t\ttransform: translateX(0);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-content-code-action-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tpadding: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\tcursor: pointer;\n\t\t\tbox-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;\n\t\t}\n\t\t.pict-content-code-action-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.6;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-content-code-action-btn:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t}\n\t\t.pict-content-code-action-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-content-code-action-btn.is-copied {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.pict-content-code-action-btn.is-copy-failed {\n\t\t\tbackground: #B23A3A;\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: #B23A3A;\n\t\t}\n\t\t/* Try-in-playground button — appended to JS code blocks. The\n\t\t triangle is filled (vs. the other action icons which are\n\t\t stroke-only) to read as a \"play\" affordance. */\n\t\t.docuserve-tryplay-btn svg polygon {\n\t\t\tfill: currentColor;\n\t\t\tstroke: none;\n\t\t}\n\t\t.docuserve-tryplay-btn svg {\n\t\t\twidth: 12px;\n\t\t\theight: 12px;\n\t\t}\n\t\t.pict-fullscreen-overlay {\n\t\t\tposition: fixed;\n\t\t\tinset: 0;\n\t\t\tz-index: 9999;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: rgba(0, 0, 0, 0.62);\n\t\t\tbackdrop-filter: blur(6px);\n\t\t\t-webkit-backdrop-filter: blur(6px);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-fullscreen-overlay[hidden] {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-fullscreen-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 1em;\n\t\t\theight: 48px;\n\t\t\tpadding: 0 1em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t\tflex: 0 0 auto;\n\t\t}\n\t\t.pict-fullscreen-title {\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.01em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-fullscreen-controls {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-fullscreen-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 6px;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n\t\t}\n\t\t.pict-fullscreen-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.75;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-fullscreen-btn:hover {\n\t\t\tbackground: var(--theme-color-border-light, #EAE3D8);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-fullscreen-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-fullscreen-close:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.pict-fullscreen-stage {\n\t\t\tflex: 1 1 auto;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 1.5em;\n\t\t\tcursor: zoom-in;\n\t\t\ttouch-action: none;\n\t\t}\n\t\t.pict-fullscreen-stage.is-zoomed {\n\t\t\tcursor: grab;\n\t\t}\n\t\t.pict-fullscreen-stage.is-panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-fullscreen-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 100%;\n\t\t\ttransform-origin: center center;\n\t\t\ttransition: transform 0.05s linear;\n\t\t\twill-change: transform;\n\t\t}\n\t\t.pict-fullscreen-content > * {\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-img {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tobject-fit: contain;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 12px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg {\n\t\t\twidth: min(90vw, 1400px);\n\t\t\theight: auto;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tpadding: 16px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg text,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg .nodeLabel,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg .edgeLabel,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg .label,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg span,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg foreignObject p,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg foreignObject div,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg foreignObject span {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E) !important;\n\t\t\tfill: var(--theme-color-text-primary, #2A241E) !important;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-codewrap {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tmargin: 0;\n\t\t\toverflow: auto;\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Content-Template",Template:'\n<div class="pict-content" id="Docuserve-Content-Body">\n\t<div class="pict-content-loading">Loading documentation...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Content-Display",TemplateHash:"Docuserve-Content-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-section-content":12}],83:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o)}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender(t,e,o,n)}showEmpty(){let t=this.pict.parseTemplateByHash("Docuserve-Demo-Empty-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Content-Container",t)}showDemo(t,e,o){let n=this.pict.providers["Docuserve-Demos"];if(!n)return this.log.warn("Docuserve-Demo: Docuserve-Demos provider not registered"),void this.showEmpty();let r=n.get(t,e,o);if(!r)return this.log.warn("Docuserve-Demo: no demo registered for "+t+"/"+e+"/"+o),void this.showEmpty();let i=this.pict.parseTemplateByHash("Docuserve-Demo-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Content-Container",i),this.pict.CSSMap.injectCSS();let a=document.getElementById("Docuserve-Demo-Title"),s=document.getElementById("Docuserve-Demo-Meta"),l=document.getElementById("Docuserve-Demo-Description");a&&(a.textContent=r.Name||r.Hash),s&&(s.innerHTML=this._escapeHTML(r.Group)+' · <a href="#/doc/'+this._escapeHTML(r.Group)+"/"+this._escapeHTML(r.Module)+'">'+this._escapeHTML(r.Module)+"</a>"),l&&(l.textContent=r.Description||"");let c=document.getElementById("Docuserve-Demo-Live"),d=document.getElementById("Docuserve-Demo-Sources");if(c){let t=Array.isArray(r.Sources)&&r.Sources.length>0;d&&(d.style.display=t?"":"none",c.classList.toggle("full-width",!t));try{r.Mount(this.pict,c,r.Spec||{})}catch(t){this.log.warn("Docuserve-Demo: Mount() threw for "+o+": "+(t&&t.message?t.message:t)),c.innerHTML='<div class="docuserve-demo-empty">Demo failed to mount: '+this._escapeHTML(t&&t.message?t.message:String(t))+"</div>"}}Array.isArray(r.Sources)&&r.Sources.length>0&&this._renderSources(r.Sources)}_renderSources(t){let e=document.getElementById("Docuserve-Demo-Sources-Tabs"),o=document.getElementById("Docuserve-Demo-Sources-Body");if(!e||!o)return;let n="",r="";for(let e=0;e<t.length;e++){let o=t[e],i=0===e?" active":"";n+='<button type="button" class="docuserve-demo-sources-tab'+i+'" data-source-idx="'+e+"\" onclick=\"_Pict.views['Docuserve-Demo']._switchSourceTab("+e+')">'+this._escapeHTML(o.Name||"source-"+(e+1))+"</button>",r+='<div class="docuserve-demo-source-pane'+i+'" data-source-idx="'+e+'"><pre><code>'+this._escapeHTML(o.Content||"")+"</code></pre></div>"}e.innerHTML=n,o.innerHTML=r}_switchSourceTab(t){let e=document.querySelectorAll(".docuserve-demo-sources-tab"),o=document.querySelectorAll(".docuserve-demo-source-pane");for(let o=0;o<e.length;o++){let n=parseInt(e[o].getAttribute("data-source-idx"),10);e[o].classList.toggle("active",n===t)}for(let e=0;e<o.length;e++){let n=parseInt(o[e].getAttribute("data-source-idx"),10);o[e].classList.toggle("active",n===t)}}_escapeHTML(t){return null==t?"":String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Demo",DefaultRenderable:"Docuserve-Demo-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-demo\n\t\t{\n\t\t\tpadding: 1.5em 2em;\n\t\t\tmax-width: 1200px;\n\t\t\tmargin: 0 auto;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.docuserve-demo-header\n\t\t{\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding-bottom: 0.75em;\n\t\t\tmargin-bottom: 1.25em;\n\t\t}\n\t\t.docuserve-demo-title\n\t\t{\n\t\t\tfont-size: 1.5em;\n\t\t\tfont-weight: 600;\n\t\t\tmargin: 0 0 0.3em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.docuserve-demo-meta\n\t\t{\n\t\t\tfont-size: 0.78em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tletter-spacing: 0.04em;\n\t\t\ttext-transform: uppercase;\n\t\t\tmargin: 0 0 0.6em;\n\t\t}\n\t\t.docuserve-demo-meta a\n\t\t{\n\t\t\tcolor: inherit;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-demo-meta a:hover\n\t\t{\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-demo-description\n\t\t{\n\t\t\tfont-size: 0.95em;\n\t\t\tline-height: 1.55;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.docuserve-demo-body\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 1.5em;\n\t\t\tmin-height: 320px;\n\t\t\talign-items: stretch;\n\t\t}\n\t\t.docuserve-demo-live\n\t\t{\n\t\t\tflex: 1 1 60%;\n\t\t\tmin-width: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 1em;\n\t\t\toverflow: auto;\n\t\t}\n\t\t.docuserve-demo-live.full-width\n\t\t{\n\t\t\tflex: 1 1 100%;\n\t\t}\n\t\t.docuserve-demo-sources\n\t\t{\n\t\t\tflex: 1 1 40%;\n\t\t\tmin-width: 0;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF8F4);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: hidden;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.docuserve-demo-sources-tabs\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0EDE8);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t}\n\t\t.docuserve-demo-sources-tab\n\t\t{\n\t\t\tpadding: 0.55em 0.9em;\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tborder-right: 1px solid var(--theme-color-border-light, #E8E2D7);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tfont-size: 0.8em;\n\t\t\tfont-weight: 500;\n\t\t\tcursor: pointer;\n\t\t\tfont-family: var(--theme-typography-family-mono, ui-monospace, monospace);\n\t\t}\n\t\t.docuserve-demo-sources-tab:hover\n\t\t{\n\t\t\tbackground: var(--theme-color-background-hover, #EDE9E3);\n\t\t}\n\t\t.docuserve-demo-sources-tab.active\n\t\t{\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: inset 0 -2px 0 0 var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-demo-sources-body\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\toverflow: auto;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-demo-source-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tpadding: 0.5em;\n\t\t}\n\t\t.docuserve-demo-source-pane.active\n\t\t{\n\t\t\tdisplay: block;\n\t\t}\n\t\t.docuserve-demo-source-pane pre\n\t\t{\n\t\t\tmargin: 0;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-family: var(--theme-typography-family-mono, ui-monospace, monospace);\n\t\t\tfont-size: 0.82em;\n\t\t\tline-height: 1.5;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tborder: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tborder-radius: 4px;\n\t\t\toverflow: auto;\n\t\t\twhite-space: pre;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.docuserve-demo-empty\n\t\t{\n\t\t\tpadding: 2em;\n\t\t\ttext-align: center;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t@media (max-width: 900px)\n\t\t{\n\t\t\t.docuserve-demo-body { flex-direction: column; }\n\t\t\t.docuserve-demo-live, .docuserve-demo-sources { flex: 1 1 auto; }\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Demo-Template",Template:'\n<div class="docuserve-demo">\n\t<div class="docuserve-demo-header">\n\t\t<div class="docuserve-demo-meta" id="Docuserve-Demo-Meta"></div>\n\t\t<h1 class="docuserve-demo-title" id="Docuserve-Demo-Title">Demo</h1>\n\t\t<div class="docuserve-demo-description" id="Docuserve-Demo-Description"></div>\n\t</div>\n\t<div class="docuserve-demo-body" id="Docuserve-Demo-Body">\n\t\t<div class="docuserve-demo-live" id="Docuserve-Demo-Live"></div>\n\t\t<div class="docuserve-demo-sources" id="Docuserve-Demo-Sources" style="display:none">\n\t\t\t<div class="docuserve-demo-sources-tabs" id="Docuserve-Demo-Sources-Tabs"></div>\n\t\t\t<div class="docuserve-demo-sources-body" id="Docuserve-Demo-Sources-Body"></div>\n\t\t</div>\n\t</div>\n</div>'},{Hash:"Docuserve-Demo-Empty-Template",Template:'<div class="docuserve-demo"><div class="docuserve-demo-empty">No demo registered at this route.</div></div>'}],Renderables:[{RenderableHash:"Docuserve-Demo-Display",TemplateHash:"Docuserve-Demo-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":75}],84:[function(t,e,o){const n=t("pict-view"),r=t("pict-section-code"),i=t("fable-serviceproviderbase"),a="docuserve-fable-playground-code",s="docuserve-fable-playground-auto-capture",l="Docuserve-Fable-Playground-CodeEditor",c="Docuserve-Fable-Playground-Editor-Mount";class d extends r{onCodeChange(t){super.onCodeChange(t),this._lsTimer&&clearTimeout(this._lsTimer),this._lsTimer=setTimeout(()=>{this._lsTimer=null;try{window.localStorage.setItem(a,t)}catch(t){}let e=this.fable.pict.views["Docuserve-Fable-Playground"];e&&"function"==typeof e._setStatus&&e._setStatus("saved")},500)}}const p={ViewIdentifier:"Docuserve-Fable-Playground",DefaultRenderable:"Docuserve-Fable-Playground-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:'\n\t\t/* The shell renders the panel content into a wrapper that has\n\t\t min-height: 100% but no explicit height — which means our\n\t\t percentage-height children would resolve to 0. Promote the\n\t\t destination to a flex column so the playground inside it\n\t\t can use flex: 1 to fill the drawer height. */\n\t\t#Docuserve-Playground-Drawer-Content {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t/* Playground fills the bottom drawer height-wise. The drawer\n\t\t itself owns the outer resize; everything inside flexes to\n\t\t whatever vertical space remains so a thin drawer is usable\n\t\t and a tall drawer just gives the editor more room. */\n\t\t.docuserve-playground {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.docuserve-playground-body {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tgap: 0;\n\t\t}\n\t\t@media (max-width: 900px) {\n\t\t\t.docuserve-playground-body { flex-direction: column; gap: 0; }\n\t\t}\n\t\t.docuserve-playground-pane {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.docuserve-playground-pane-code { border-right: 1px solid var(--theme-color-border-default, #DDD6CA); }\n\t\t.docuserve-playground-pane-log { background: var(--theme-color-background-secondary, #F6F3EE); }\n\n\t\t/* Per-pane header — small uppercase label on the left, controls\n\t\t on the right. Same row height as the doc page section\n\t\t labels so it slots in visually under the topbar. */\n\t\t.docuserve-playground-pane-header {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.9em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-playground-pane-log .docuserve-playground-pane-header {\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t}\n\t\t.docuserve-playground-pane-title {\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.06em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-playground-pane-controls {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.15em;\n\t\t}\n\n\t\t/* Compact icon button — subtle by default, brand-primary on\n\t\t hover. Used for help, copy, copy-log, clear-log, and run.\n\t\t All glyphs are 14px @ 1em via SVG so they ride the font-size\n\t\t set on the parent. */\n\t\t.docuserve-playground-iconbtn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 1.6em;\n\t\t\theight: 1.6em;\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 14px;\n\t\t\ttransition: color 0.12s, background-color 0.12s, border-color 0.12s, opacity 0.12s;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t.docuserve-playground-iconbtn svg {\n\t\t\twidth: 1em;\n\t\t\theight: 1em;\n\t\t\tdisplay: block;\n\t\t\tfill: none;\n\t\t\tstroke: currentColor;\n\t\t\tstroke-width: 2;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.docuserve-playground-iconbtn:hover {\n\t\t\topacity: 1;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbackground: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tborder-color: var(--theme-color-border-default, #DDD6CA);\n\t\t}\n\t\t.docuserve-playground-iconbtn:focus-visible {\n\t\t\topacity: 1;\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 1px;\n\t\t}\n\t\t/* Run is the destination action — slightly brighter at rest so\n\t\t the user\'s eye lands on it, with a filled play triangle that\n\t\t uses fill instead of stroke. */\n\t\t.docuserve-playground-iconbtn-run {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\topacity: 0.7;\n\t\t}\n\t\t.docuserve-playground-iconbtn-run svg { fill: currentColor; stroke: none; }\n\t\t.docuserve-playground-iconbtn-run:hover {\n\t\t\topacity: 1;\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\n\t\t/* The copy-log button only materializes on hover of the log\n\t\t pane — it\'s a "by the way" action, not something the user\n\t\t should be reaching for during normal exploration. */\n\t\t.docuserve-playground-iconbtn-copylog { opacity: 0; pointer-events: none; }\n\t\t.docuserve-playground-pane-log:hover .docuserve-playground-iconbtn-copylog,\n\t\t.docuserve-playground-pane-log:focus-within .docuserve-playground-iconbtn-copylog {\n\t\t\topacity: 0.6;\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.docuserve-playground-pane-log:hover .docuserve-playground-iconbtn-copylog:hover { opacity: 1; }\n\n\t\t/* Auto-attach toggle — compact inline checkbox + label sized\n\t\t to sit alongside the icon buttons without overpowering\n\t\t them. */\n\t\t.docuserve-playground-toggle {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tmargin-right: 0.25em;\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-playground-toggle input[type="checkbox"] {\n\t\t\taccent-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcursor: pointer;\n\t\t\tmargin: 0;\n\t\t\twidth: 0.95em;\n\t\t\theight: 0.95em;\n\t\t}\n\t\t.docuserve-playground-toggle:hover { color: var(--theme-color-text-secondary, #5E5549); }\n\n\t\t/* Editor mount fills the remaining pane height; pict-section-code\n\t\t styles the inner editor + gutter itself. */\n\t\t#'.concat(c," {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t#").concat(c," .pict-code-editor-wrap {\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\theight: 100%;\n\t\t}\n\t\t.docuserve-playground-log {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n\t\t\tfont-size: 12.5px;\n\t\t\tline-height: 1.6;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tpadding: 0.8em 0.9em;\n\t\t\toverflow: auto;\n\t\t\tmargin: 0;\n\t\t\twhite-space: pre-wrap;\n\t\t\tword-break: break-word;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tborder: 0;\n\t\t\tborder-radius: 0;\n\t\t}\n\t\t.docuserve-playground-log-line {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.05em 0;\n\t\t}\n\t\t.docuserve-playground-log-time {\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-playground-log-level {\n\t\t\tdisplay: inline-block;\n\t\t\tmin-width: 5.5ch;\n\t\t\ttext-align: right;\n\t\t\tfont-weight: 600;\n\t\t\tmargin: 0 0.4em 0 0.25em;\n\t\t}\n\t\t.docuserve-playground-log-level-trace { color: var(--theme-color-text-muted, #8A7F72); }\n\t\t.docuserve-playground-log-level-debug { color: var(--theme-color-text-secondary, #5E5549); }\n\t\t.docuserve-playground-log-level-info { color: var(--theme-color-brand-primary, #2E7D74); }\n\t\t.docuserve-playground-log-level-warn { color: var(--theme-color-status-warning, #B25A00); }\n\t\t.docuserve-playground-log-level-error { color: var(--theme-color-status-error, #B23A3A); }\n\t\t.docuserve-playground-log-level-fatal {\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tbackground: var(--theme-color-status-error, #B23A3A);\n\t\t\tpadding: 0 0.3em;\n\t\t\tborder-radius: 2px;\n\t\t}\n\t\t/* Banner records (start / finish) — span the full row width\n\t\t with no level chip or timestamp, since the message itself\n\t\t is the dash-bordered marker. font-size: 0 on the row\n\t\t collapses the literal whitespace text nodes the line\n\t\t template inserts between time/level/message (those are\n\t\t needed for copy-paste of regular rows but would otherwise\n\t\t leak 2 leading spaces onto every banner line); the message\n\t\t span re-asserts the inherited font size so it renders. */\n\t\t.docuserve-playground-log-line-banner\n\t\t{\n\t\t\tfont-size: 0;\n\t\t}\n\t\t.docuserve-playground-log-line-banner .docuserve-playground-log-time,\n\t\t.docuserve-playground-log-line-banner .docuserve-playground-log-level\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-playground-log-line-banner .docuserve-playground-log-message\n\t\t{\n\t\t\tfont-size: 12.5px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-playground-log-message { color: var(--theme-color-text-primary, #2A241E); }\n\t\t.docuserve-playground-log-datum {\n\t\t\tcolor: var(--theme-color-syntax-property, #9E3A50);\n\t\t}\n\t\t.docuserve-playground-log-empty {\n\t\t\tdisplay: block;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-playground-log-meta {\n\t\t\tdisplay: block;\n\t\t\tpadding-top: 0.4em;\n\t\t\tmargin-top: 0.4em;\n\t\t\tborder-top: 1px dashed var(--theme-color-border-light, #E5DED1);\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t"),Templates:[{Hash:"Docuserve-Fable-Playground-Template",Template:'\n<div class="docuserve-playground">\n\t<div class="docuserve-playground-body">\n\t\t<div class="docuserve-playground-pane docuserve-playground-pane-code">\n\t\t\t<div class="docuserve-playground-pane-header">\n\t\t\t\t<span class="docuserve-playground-pane-title">Code</span>\n\t\t\t\t<div class="docuserve-playground-pane-controls">\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" id="Docuserve-Fable-Playground-HelpBtn" aria-label="What\'s the playground?">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M9.5 9a2.5 2.5 0 0 1 5 0c0 1.5-2.5 2-2.5 3.5"/><circle cx="12" cy="17" r="0.5" fill="currentColor" stroke="none"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<label class="docuserve-playground-toggle" title="When on, user code that does new Fable(...) via require(\'fable\') gets the playground\'s log capture pre-attached, so app.log.info(...) calls appear in the panel.">\n\t\t\t\t\t\t<input type="checkbox" id="Docuserve-Fable-Playground-AutoCapture-Toggle" onchange="{~P~}.views[\'Docuserve-Fable-Playground\'].setAutoCapture(this.checked)">\n\t\t\t\t\t\tauto-attach\n\t\t\t\t\t</label>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" title="Copy code" aria-label="Copy code" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].copyCode()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn docuserve-playground-iconbtn-run" title="Run" aria-label="Run code" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].run()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 4l13 8-13 8z"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id="'.concat(c,'"></div>\n\t\t</div>\n\t\t<div class="docuserve-playground-pane docuserve-playground-pane-log">\n\t\t\t<div class="docuserve-playground-pane-header">\n\t\t\t\t<span class="docuserve-playground-pane-title">Log output</span>\n\t\t\t\t<div class="docuserve-playground-pane-controls">\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn docuserve-playground-iconbtn-copylog" title="Copy log" aria-label="Copy log" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].copyLog()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" title="Clear log" aria-label="Clear log" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].clear()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" title="Close playground" aria-label="Close playground" onclick="{~P~}.views[\'Docuserve-Layout\'].collapsePlayground()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<pre class="docuserve-playground-log" id="Docuserve-Fable-Playground-Log">{~T:Docuserve-Fable-Playground-Log-Body-Template:AppData~}</pre>\n\t\t</div>\n\t</div>\n</div>\n')},{Hash:"Docuserve-Fable-Playground-Log-Body-Template",Template:"{~TS:Docuserve-Fable-Playground-Log-Line-Template:AppData.Docuserve.Playground.LogLines~}{~TS:Docuserve-Fable-Playground-Log-Empty-Template:AppData.Docuserve.Playground.LogEmptySlot~}{~TS:Docuserve-Fable-Playground-Log-Meta-Template:AppData.Docuserve.Playground.LogMetaSlot~}"},{Hash:"Docuserve-Fable-Playground-Log-Line-Template",Template:'<span class="docuserve-playground-log-line docuserve-playground-log-line-{~D:Record.Level~}"><span class="docuserve-playground-log-time">{~D:Record.Time~}</span> <span class="docuserve-playground-log-level docuserve-playground-log-level-{~D:Record.Level~}">{~D:Record.Level~}</span> <span class="docuserve-playground-log-message">{~D:Record.Message~}</span>{~TS:Docuserve-Fable-Playground-Log-Datum-Template:Record.DatumSlot~}</span>'},{Hash:"Docuserve-Fable-Playground-Log-Datum-Template",Template:' <span class="docuserve-playground-log-datum">{~D:Record.Datum~}</span>'},{Hash:"Docuserve-Fable-Playground-Log-Empty-Template",Template:'<span class="docuserve-playground-log-empty">(no log output yet — press Run)</span>'},{Hash:"Docuserve-Fable-Playground-Log-Meta-Template",Template:'<span class="docuserve-playground-log-meta">{~D:Record.Meta~}</span>'}],Renderables:[]};e.exports=class extends n{constructor(t,e,o){super(t,e,o),this._DefaultCode="// Fable Playground. 'fable' is a fresh Fable instance.\n// Anything you log lands in the panel to the right.\n\nfable.log.info('Hello from the playground!');\n\n// Each level has its own color:\nfable.log.trace('trace messages (most verbose)');\nfable.log.debug('debug messages');\nfable.log.info('info messages');\nfable.log.warn('warnings stand out');\nfable.log.error('errors are loud');\nfable.log.fatal('FATAL records flag in red');\n\n// Records can carry a data payload:\nfable.log.info('Action completed', { user: 'alice', ms: 42 });\n\n// Full service access:\nfable.log.info('Generated UUID', { id: fable.UUID.getUUID() });\nfable.log.info('Product setting', { product: fable.SettingsManager.settings.Product });\n\n// Async logs work too — the panel updates as records arrive:\nsetTimeout(() => fable.log.info('arrived 100ms later'), 100);\nsetTimeout(() => fable.log.warn('arrived 250ms later'), 250);\n\n// Bonus: require() works for a curated set of Retold modules:\nconst Fable = require('fable');\nlet mine = new Fable({ Product: 'BYO-Fable' });\nfable.log.info('Fable class via require()', { sameAsFableCtor: Fable === fable.constructor });\n",this._codeJarPromise=null,this._asyncRenderTimer=null,this._currentRunRecords=null,this._currentRunStart=0,this._statusClearTimer=null,this._mountedInDrawer=!1,this._registerCodeEditor()}mountIntoDrawer(){if(this._mountedInDrawer)return;let t=document.getElementById("Docuserve-Playground-Drawer-Content");t&&(this.mountInto(t),this._mountedInDrawer=!0)}mountInto(t){if(!t)return;this._setupPlaygroundState();let e=this.pict.parseTemplateByHash("Docuserve-Fable-Playground-Template",{});t.innerHTML=e;let o=document.getElementById("Docuserve-Fable-Playground-AutoCapture-Toggle");o&&(o.checked=!!this.pict.AppData.Docuserve.Playground.AutoCaptureUserFables),this._wireHelpTooltip(),this._mountCodeEditor()}_wireHelpTooltip(){let t=document.getElementById("Docuserve-Fable-Playground-HelpBtn"),e=this.pict.views["Pict-Section-Modal"];if(!t||!e||"function"!=typeof e.richTooltip)return;this._helpTooltip&&"function"==typeof this._helpTooltip.destroy&&this._helpTooltip.destroy();this._helpTooltip=e.richTooltip(t,'<div style="font-size:12px;line-height:1.5;"><strong>JS Playground</strong> &mdash; write JavaScript that receives a fresh <code>fable</code> instance. Every <code>fable.log.*</code> call is captured and shown in the Log Output panel. Toggle <em>auto-attach</em> off to get a raw Fable whose log streams you wire yourself. Press the play button to run; click the copy icon to grab the code or the output.</div>',{position:"bottom",interactive:!0,maxWidth:"340px",delay:80})}copyCode(){this._copyToClipboard(this._getCurrentCode(),"code")}copyLog(){let t=(this.pict.AppData.Docuserve.Playground&&this.pict.AppData.Docuserve.Playground.LogLines||[]).map(function(t){if("banner"===t.Level)return t.Message;let e=t.Time+" "+t.Level.toUpperCase()+" "+t.Message;return Array.isArray(t.DatumSlot)&&t.DatumSlot.length>0&&(e+=" "+t.DatumSlot[0].Datum),e}).join("\n");this._copyToClipboard(t,"log")}_copyToClipboard(t,e){let o=t=>{let o=this.pict.views["Pict-Section-Modal"];o&&"function"==typeof o.toast&&o.toast(t?"log"===e?"Log copied":"Code copied":"Copy failed",{type:t?"success":"error",duration:1500})};if(navigator.clipboard&&"function"==typeof navigator.clipboard.writeText)navigator.clipboard.writeText(t).then(()=>o(!0)).catch(()=>o(!1));else try{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let n=document.execCommand("copy");document.body.removeChild(e),o(n)}catch(t){o(!1)}}setAutoCapture(t){this.pict.AppData.Docuserve.Playground.AutoCaptureUserFables=!!t;try{window.localStorage.setItem(s,t?"1":"0")}catch(t){}}loadCode(t){if("string"!=typeof t)return;let e=this.pict.AppData.Docuserve.Playground||{};e.Code=t,this.pict.AppData.Docuserve.Playground=e,this._saveCode(t);let o=this.pict.views[l];o&&o.codeJar&&"function"==typeof o.setCode&&o.setCode(t);let n=this.pict.views["Docuserve-Layout"];n&&"function"==typeof n.expandPlayground&&n.expandPlayground()}_setupPlaygroundState(){let t=this.pict.AppData.Docuserve.Playground||{};t.Title="Fable Playground",t.Description="Write JavaScript that receives a fresh `fable` instance. Every log call is captured and rendered in the panel on the right.";let e=t.Code,o=this._loadSavedCode();t.Code="string"==typeof e&&e.length>0?e:"string"==typeof o&&o.length>0?o:this._DefaultCode,t.LogLines=[],t.LogEmptySlot=[{}],t.LogMetaSlot=[];let n=null;try{n=window.localStorage.getItem(s)}catch(t){}t.AutoCaptureUserFables=null===n||"1"===n,this.pict.AppData.Docuserve.Playground=t}_mountCodeEditor(){this._loadCodeJar().then(t=>{let e=this.pict.views[l];e&&(e._codeJarPrototype||e.connectCodeJarPrototype(t),e.codeJar&&"function"==typeof e.destroy&&e.destroy(),e.render())}).catch(t=>{let e=document.getElementById(c);e&&(e.innerHTML='<div class="docuserve-playground-codejar-error">Editor failed to load: '+this._escapeHTML(t&&t.message?t.message:String(t))+"</div>")})}run(){this._cancelAsyncRender(),this._cancelFinishBanner();let t=this._getCurrentCode();this.pict.AppData.Docuserve.Playground.Code=t;let e,o=[],n=Date.now();this._currentRunRecords=o,this._currentRunStart=n,o.push({level:"banner",message:this._formatStartBanner(n),datum:null,ms:0});try{let t=this.fable&&this.fable.constructor;if("function"!=typeof t)throw new Error("Fable constructor unavailable on this.fable");e=new t({Product:"FablePlayground",LogStreams:[]}),e.log.addLogger(this._buildCaptureLogger(o,n),"trace")}catch(t){o.push({level:"error",message:"Fable instantiation failed: "+this._errorMessage(t),datum:null,ms:0})}let r=null;if(e)try{let r=this._buildRequireShim(e,o,n),i=this._buildCapturingConsole(o,n),a=new Function("fable","pict","require","console","return (async () => { "+t+"\n})();")(e,this.pict,r,i);if(a&&"function"==typeof a.then){let t=this;a.then(()=>{},e=>{o===t._currentRunRecords&&(o.push({level:"error",message:t._errorMessage(e),datum:null,ms:Date.now()-n}),t._scheduleAsyncLogRender())})}}catch(t){r=t,o.push({level:"error",message:this._errorMessage(t),datum:null,ms:Date.now()-n})}this._setLogRecords(o,Date.now()-n,r),this._renderLogOnly(),this._scheduleFinishBanner(o,n,r)}_scheduleFinishBanner(t,e,o){this._cancelFinishBanner();let n=this,r=t.length,i=(Date.now(),r=>{if(n._finishBannerTimer=null,n._finishBannerMaxTimer&&(clearTimeout(n._finishBannerMaxTimer),n._finishBannerMaxTimer=null),t!==n._currentRunRecords)return;let i=Date.now()-e;t.push({level:"banner",message:n._formatFinishBanner(i,o,r),datum:null,ms:i}),n._setLogRecords(t,i,o),n._renderLogOnly()}),a=()=>{t===n._currentRunRecords?t.length===r?i(!1):(r=t.length,n._finishBannerTimer=setTimeout(a,200)):n._cancelFinishBanner()};this._finishBannerTimer=setTimeout(a,200),this._finishBannerMaxTimer=setTimeout(()=>i(!0),1e4)}_cancelFinishBanner(){this._finishBannerTimer&&(clearTimeout(this._finishBannerTimer),this._finishBannerTimer=null),this._finishBannerMaxTimer&&(clearTimeout(this._finishBannerMaxTimer),this._finishBannerMaxTimer=null)}_buildCapturingConsole(t,e){let o=this,n="undefined"!=typeof console?console:null,r=t=>{if(!n)return function(){};let e=n[t]||n.log;return function(){try{e.apply(n,arguments)}catch(t){}}},i=n=>{let i=r(n);return function(){if(i.apply(null,arguments),t!==o._currentRunRecords)return;let r=Array.prototype.slice.call(arguments),a=[],s=null;for(let t=0;t<r.length;t++){let e=r[t];"string"==typeof e?a.push(e):null===s&&e&&"object"==typeof e?s=e:a.push(o._formatDatum(e))}t.push({level:n,message:"[console] "+a.join(" "),datum:s,ms:Date.now()-e}),o._scheduleAsyncLogRender()}};return{log:i("info"),info:i("info"),warn:i("warn"),error:i("error"),debug:i("debug"),trace:i("trace"),group:r("group"),groupEnd:r("groupEnd"),groupCollapsed:r("groupCollapsed"),table:r("table"),dir:r("dir"),time:r("time"),timeEnd:r("timeEnd"),count:r("count"),countReset:r("countReset"),assert:r("assert"),clear:r("clear")}}_formatStartBanner(t){return"─── run started · "+this._formatWallClock(t)+" "+this._padDashes(40)}_formatFinishBanner(t,e,o){let n;return n=e?"run threw":o?"run still emitting · cut off at cap":"run finished","─── "+n+(" · elapsed "+t+"ms ")+this._padDashes(40)}_formatWallClock(t){let e=new Date(t),o=(t,e)=>{let o=String(t);for(;o.length<e;)o="0"+o;return o};return o(e.getHours(),2)+":"+o(e.getMinutes(),2)+":"+o(e.getSeconds(),2)+"."+o(e.getMilliseconds(),3)}_padDashes(t){let e="";for(let o=0;o<t;o++)e+="─";return e}clear(){this._cancelAsyncRender(),this._cancelFinishBanner(),this._currentRunRecords=null,this._currentRunStart=0,this._setLogRecords([],0,null),this._renderLogOnly()}reset(){let t=this.pict.views[l];t&&"function"==typeof t.setCode&&t.setCode(this._DefaultCode),this.pict.AppData.Docuserve.Playground.Code=this._DefaultCode,this._clearSavedCode(),this._setStatus("reset")}_loadCodeJar(){return this._codeJarPromise||(this._codeJarPromise=new Function("u","return import(u)")("https://cdn.jsdelivr.net/npm/codejar@4.2.0/dist/codejar.min.js").then(t=>{if(!t||"function"!=typeof t.CodeJar)throw new Error("CodeJar export not found in module");return t.CodeJar})),this._codeJarPromise}_registerCodeEditor(){let t={ViewIdentifier:l,DefaultDestinationAddress:"#"+c,Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- pict-section-code mount --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#"+c}],TargetElementAddress:"#"+c,Language:"javascript",LineNumbers:!0,Tab:"\t",AddClosing:!0,CatchTab:!0,CodeDataAddress:"AppData.Docuserve.Playground.Code",DefaultCode:this._DefaultCode,AutoRender:!1,RenderOnLoad:!1};this.pict.addView(l,t,d)}_buildRequireShim(t,e,o){let n=this.pict,r=t.constructor,a=this,s=!!this.pict.AppData.Docuserve.Playground.AutoCaptureUserFables;function l(t){let n=Object.assign({},t||{},{LogStreams:[]}),i=new r(n);return i.log.addLogger(a._buildCaptureLogger(e,o),"trace"),i}let c=t.Logging&&t.Logging.constructor;function d(t,n){let r=new c(t,n);return r.addLogger(a._buildCaptureLogger(e,o),"trace"),r}if(c){let t=Object.getOwnPropertyNames(c);for(let e=0;e<t.length;e++){let o=t[e];if("length"!==o&&"name"!==o&&"prototype"!==o)try{d[o]=c[o]}catch(t){}}d.new=function(t){return d(t)}}let p={fable:()=>s?l:r,pict:()=>n.constructor,"fable-uuid":()=>t.UUID&&t.UUID.constructor,"fable-settings":()=>t.SettingsManager&&t.SettingsManager.constructor,"fable-log":()=>c?d:null,"fable-serviceproviderbase":()=>i},h=this.pict.AppData.Docuserve.Playground.Config,u=null;if(h&&Array.isArray(h.Imports)&&h.Imports.length>0){u={};for(let t=0;t<h.Imports.length;t++){let e=h.Imports[t];e&&"string"==typeof e.Name&&(u[e.Name]=e.Source||"bundled")}}return function(t){let e,o=p[t],n=null===u||Object.prototype.hasOwnProperty.call(u,t);if(o&&n)return o();throw e=null!==u?Object.keys(u):Object.keys(p),new Error("require('"+t+"') is not available in this playground. Allowed here: "+e.map(t=>"'"+t+"'").join(", ")+".")}}_buildCaptureLogger(t,e){let o="playground-"+Date.now()+"-"+Math.floor(1e9*Math.random()),n=this,r=(o,r,i)=>{t.push({level:o,message:null==r?"":String(r),datum:null==i?null:i,ms:Date.now()-e}),t===n._currentRunRecords&&n._scheduleAsyncLogRender()};return{loggerUUID:o,initialize:()=>{},trace:(t,e)=>r("trace",t,e),debug:(t,e)=>r("debug",t,e),info:(t,e)=>r("info",t,e),warn:(t,e)=>r("warn",t,e),error:(t,e)=>r("error",t,e),fatal:(t,e)=>r("fatal",t,e)}}_scheduleAsyncLogRender(){this._asyncRenderTimer||(this._asyncRenderTimer=setTimeout(()=>{if(this._asyncRenderTimer=null,!this._currentRunRecords)return;let t=Date.now()-this._currentRunStart;this._setLogRecords(this._currentRunRecords,t,null),this._renderLogOnly()},60))}_cancelAsyncRender(){this._asyncRenderTimer&&(clearTimeout(this._asyncRenderTimer),this._asyncRenderTimer=null)}_setLogRecords(t,e,o){let n=this.pict.AppData.Docuserve.Playground;if(n.LogLines=t.map(t=>({Time:this._formatTime(t.ms),Level:t.level,Message:this._escapeHTML(t.message),DatumSlot:null==t.datum?[]:[{Datum:this._escapeHTML(this._formatDatum(t.datum))}]})),n.LogEmptySlot=0===t.length?[{}]:[],t.length>0){let r=t.length+" record"+(1===t.length?"":"s")+" · "+e+"ms";o&&(r+=" · run threw"),n.LogMetaSlot=[{Meta:r}]}else n.LogMetaSlot=[]}_renderLogOnly(){let t=this.pict.parseTemplateByHash("Docuserve-Fable-Playground-Log-Body-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Fable-Playground-Log",t)}_loadSavedCode(){try{return window.localStorage.getItem(a)}catch(t){return null}}_saveCode(t){try{window.localStorage.setItem(a,t)}catch(t){}}_clearSavedCode(){try{window.localStorage.removeItem(a)}catch(t){}}_getCurrentCode(){let t=this.pict.views[l];if(t&&"function"==typeof t.getCode){let e=t.getCode();if("string"==typeof e)return e}return this.pict.AppData.Docuserve.Playground.Code||""}_setStatus(t){let e=document.getElementById("Docuserve-Fable-Playground-Status");e&&(e.textContent=t,this._statusClearTimer&&clearTimeout(this._statusClearTimer),this._statusClearTimer=setTimeout(()=>{e.textContent===t&&(e.textContent="")},1200))}_formatTime(t){let e=Math.max(0,Math.floor(t||0)),o=String(e);for(;o.length<4;)o=" "+o;return o+"ms"}_formatDatum(t){if("string"==typeof t)return t;try{return JSON.stringify(t)}catch(t){return"(unserializable: "+this._errorMessage(t)+")"}}_errorMessage(t){return t?t.message?t.message:String(t):""}_escapeHTML(t){return null==t?"":String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}},e.exports.default_configuration=p},{"fable-serviceproviderbase":2,"pict-section-code":10,"pict-view":75}],85:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this._shell=null,this._shellPanelsBuilt=!1}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),this._shellPanelsBuilt||(this._buildShell(),this._shellPanelsBuilt=!0),this.pict.PictApplication.resolveHash(),this._wireHashChangeListener(),super.onAfterRender(t,e,o,n)}_buildShell(){let t=this.pict.views["Pict-Section-Modal"];if(!t||"function"!=typeof t.shell)return void(this.log&&this.log.warn&&this.log.warn("Docuserve-Layout: pict-section-modal.shell not available"));let e=document.getElementById("Docuserve-Layout-Mount");if(!e)return void(this.log&&this.log.warn&&this.log.warn("Docuserve-Layout: #Docuserve-Layout-Mount missing"));this._shell=t.shell(e,{PersistenceKey:"docuserve-shell"}),this._shell.addPanel({Hash:"topbar",Side:"top",Mode:"fixed",Size:56,ContentDestinationId:"Theme-TopBar",ContentView:"Theme-TopBar"}),this._shell.addPanel({Hash:"sidebar",Side:"left",Mode:"resizable",Size:280,MinSize:200,MaxSize:500,Title:"Documentation",ContentDestinationId:"Docuserve-Sidebar-Container",ContentView:"Docuserve-Sidebar",ResponsiveDrawer:900}),this._shell.addPanel({Hash:"playground-drawer",Side:"bottom",Scope:"center",Mode:"resizable",Size:420,MinSize:320,MaxSize:800,Collapsed:!0,Title:"JS Playground",ContentDestinationId:"Docuserve-Playground-Drawer-Content",OnExpand:()=>{this._onPlaygroundDrawerExpand()}}),this._shell.center({ContentDestinationId:"Docuserve-Content-Container"});let o=this._shell.getPanel("playground-drawer");o&&!o.Collapsed&&this._onPlaygroundDrawerExpand()}_onPlaygroundDrawerExpand(){if(this._playgroundMounted)return;let t=this.pict.views["Docuserve-Fable-Playground"];t&&"function"==typeof t.mountIntoDrawer&&(t.mountIntoDrawer(),this._playgroundMounted=!0)}_wireHashChangeListener(){if(this._hashListenerBound)return;this._hashListenerBound=!0;let t=this;window.addEventListener("hashchange",()=>{t.pict.PictApplication.resolveHash()})}getSidebarPanel(){return this._shell?this._shell.getPanel("sidebar"):null}toggleSidebar(){let t=this.getSidebarPanel();t&&t.toggle()}getPlaygroundPanel(){return this._shell?this._shell.getPanel("playground-drawer"):null}setPlaygroundEnabled(t){let e=document.getElementById("Docuserve-Layout-Mount");if(e)if(t)e.classList.remove("docuserve-playground-disabled");else{e.classList.add("docuserve-playground-disabled");let t=this.getPlaygroundPanel();t&&"function"==typeof t.collapse&&t.collapse()}}expandPlayground(){let t=this.getPlaygroundPanel();t&&"function"==typeof t.expand&&t.expand()}setPlaygroundTitle(t){let e=this.getPlaygroundPanel();if(!e||!e.El)return;let o="string"==typeof t&&t.length>0?t:"JS Playground";if(e.Title=o,e._collapseTab){e._collapseTab.setAttribute("aria-label","Toggle "+o),e._collapseTab.title=o;let t=e._collapseTab.querySelector(".pict-modal-shell-panel-collapse-tab-title");t&&(t.textContent=o)}}collapsePlayground(){let t=this.getPlaygroundPanel();t&&"function"==typeof t.collapse&&t.collapse()}togglePlayground(){let t=this.getPlaygroundPanel();t&&"function"==typeof t.toggle&&t.toggle()}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Layout",DefaultRenderable:"Docuserve-Layout-Shell",DefaultDestinationAddress:"#Docuserve-Application-Container",AutoRender:!1,CSS:"\n\t\t/* Global resets — these used to live in css/docuserve.css. Now\n\t\t that docuserve ships its theming entirely through view CSSMap\n\t\t (no external <link> required), the resets travel with the JS\n\t\t bundle so consumers can't forget to load them. */\n\t\t*, *::before, *::after { box-sizing: border-box; }\n\t\thtml, body\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tfont-family: var(--theme-typography-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);\n\t\t\tfont-size: 16px;\n\t\t\tline-height: 1.5;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t}\n\t\tbody\n\t\t{\n\t\t\tbackground: var(--theme-color-background-primary, #FDFBF7);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease;\n\t\t}\n\t\t::-webkit-scrollbar { width: 8px; height: 8px; }\n\t\t::-webkit-scrollbar-track { background: var(--theme-color-scrollbar-track, #F5F0E8); }\n\t\t::-webkit-scrollbar-thumb { background: var(--theme-color-scrollbar-thumb, #D4CCBE); border-radius: 4px; }\n\t\t::-webkit-scrollbar-thumb:hover { background: var(--theme-color-scrollbar-hover, #B5AA9A); }\n\t\t/* height: 100% (not 100vh) — Theme-Scale applies CSS zoom on\n\t\t <html>; vh units render against the un-zoomed viewport and\n\t\t push panels off-screen at non-1.0 scale. */\n\t\t#Docuserve-Application-Container\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.pict-modal-shell-host { height: 100%; }\n\t\t.pict-modal-shell { background: var(--theme-color-background-primary, #FDFBF7); }\n\t\t.pict-modal-shell-panel { background: var(--theme-color-background-panel, #FFFFFF); }\n\t\t.pict-modal-shell-center { background: var(--theme-color-background-primary, #FDFBF7); }\n\n\t\t/* Center workspace — content / splash / search views write into\n\t\t #Docuserve-Content-Container which the shell provisions as the\n\t\t center destination. */\n\t\t#Docuserve-Content-Container\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\toverflow-y: auto;\n\t\t}\n\n\t\t/* The Sidebar view writes into the panel's destination\n\t\t (#Docuserve-Sidebar-Container). Its own CSS lives in\n\t\t PictView-Docuserve-Sidebar — here we just guarantee the panel\n\t\t wrap is scrollable and themed. */\n\t\t#Docuserve-Sidebar-Container\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF7F1);\n\t\t}\n\n\t\t/* Playground panel suppression — the bottom drawer (and its\n\t\t collapsed tab strip) only takes layout space on pages that\n\t\t have opted into the playground via a \"Code Playground\"\n\t\t entry in their module's _sidebar.md. Everywhere else we\n\t\t hide the panel entirely so the doc content gets the full\n\t\t vertical area. The class is toggled by\n\t\t setPlaygroundEnabled() on each navigation. */\n\t\t.docuserve-playground-disabled .pict-modal-shell-center > .pict-modal-shell-panel-bottom\n\t\t{\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t/* Kill the height transition on the playground drawer.\n\t\t pict-section-modal ships a 0.14s height transition on every\n\t\t shell panel for smooth resize handoffs, but when the play\n\t\t button mounts the CodeJar editor mid-expand the synchronous\n\t\t innerHTML rewrite races the transition and the panel gets\n\t\t stuck at its pre-transition size. Snapping the resize\n\t\t avoids the race and the user never sees the in-between\n\t\t frames anyway. */\n\t\t.pict-modal-shell-center > .pict-modal-shell-panel-bottom\n\t\t{\n\t\t\ttransition: none !important;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Layout-Shell-Template",Template:'<div id="Docuserve-Layout-Mount" style="height:100%"></div>'}],Renderables:[{RenderableHash:"Docuserve-Layout-Shell",TemplateHash:"Docuserve-Layout-Shell-Template",DestinationAddress:"#Docuserve-Application-Container",RenderMethod:"replace"}]}},{"pict-view":75}],86:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this._SearchDebounceTimer=null}showSearch(t){this._setIdleStatus(t),this.pict.AppData.Docuserve.SearchResults=[],this.render();let e=document.getElementById("Docuserve-Search-Input");e&&(e.value=t||"",e.focus()),t&&t.trim()&&this.performSearch(t);let o=document.getElementById("Docuserve-Content-Container");o&&(o.scrollTop=0)}onSearchInput(t){this._SearchDebounceTimer&&clearTimeout(this._SearchDebounceTimer),this._SearchDebounceTimer=setTimeout(()=>{this.performSearch(t)},250)}performSearch(t){let e=this.pict.AppData.Docuserve;if(!t||!t.trim())return this._setIdleStatus(t),e.SearchResults=[],this._renderResultsRegion(),void this._renderStatusRegion();let o=this.pict.providers["Docuserve-Documentation"].search(t);if(0===o.length)return e.SearchResults=[],e.SearchStatus="No results found for '"+this._escapeHTML(t)+"'.",this._renderResultsRegion(),void this._renderStatusRegion();let n=[];for(let t=0;t<o.length;t++){let e=o[t];n.push({Title:e.Title,Route:e.Route,Group:e.Group||"",Module:e.Module||"",BreadcrumbSlot:e.Group&&e.Module?[{Group:e.Group,Module:e.Module}]:[],PathSlot:e.DocPath?[{DocPath:e.DocPath}]:[],DocPath:e.DocPath||""})}e.SearchResults=n,e.SearchStatus=o.length+" result"+(1!==o.length?"s":"")+" for '"+this._escapeHTML(t)+"'",this._renderResultsRegion(),this._renderStatusRegion()}_setIdleStatus(t){let e=this.pict.AppData.Docuserve.KeywordDocumentCount||0;this.pict.AppData.Docuserve.SearchStatus=e>0?"Search across "+e+" documents.":"Enter a search term to find documentation."}_renderResultsRegion(){let t=this.pict.parseTemplateByHash("Docuserve-Search-ResultsBody-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results",t)}_renderStatusRegion(){this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",this.pict.AppData.Docuserve.SearchStatus||"")}_escapeHTML(t){return t?String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Search",DefaultRenderable:"Docuserve-Search-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-search {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin: 0 0 0.75em 0;\n\t\t}\n\t\t.docuserve-search-input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-size: 1.1em;\n\t\t\tborder: 2px solid var(--theme-color-border-default, #D4CCBE);\n\t\t\tborder-radius: 6px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\ttransition: border-color 0.15s;\n\t\t}\n\t\t.docuserve-search-input:focus {\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-search-status {\n\t\t\tmargin-top: 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-search-results {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-search-result {\n\t\t\tdisplay: block;\n\t\t\tpadding: 1em 1.25em;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit;\n\t\t\ttransition: border-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.docuserve-search-result:hover {\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: 0 2px 8px rgba(46, 125, 116, 0.1);\n\t\t}\n\t\t.docuserve-search-result-title {\n\t\t\tfont-size: 1.05em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tmargin-bottom: 0.25em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tmargin-bottom: 0.2em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb-sep {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t\tfont-size: 0.85em;\n\t\t\tmargin: 0 0.15em;\n\t\t\topacity: 0.7;\n\t\t}\n\t\t.docuserve-search-result-path {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--theme-color-text-muted, #A39889);\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.docuserve-search-empty {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Search-Template",Template:'<div class="docuserve-search">\n\t<div class="docuserve-search-header">\n\t\t<h1>Search Documentation</h1>\n\t\t<input type="text" class="docuserve-search-input" id="Docuserve-Search-Input" placeholder="Search across all modules..." oninput="{~P~}.views[\'Docuserve-Search\'].onSearchInput(this.value)">\n\t\t<div id="Docuserve-Search-Status" class="docuserve-search-status">{~D:AppData.Docuserve.SearchStatus~}</div>\n\t</div>\n\t<div id="Docuserve-Search-Results" class="docuserve-search-results">\n\t\t{~TS:Docuserve-Search-Result-Template:AppData.Docuserve.SearchResults~}\n\t</div>\n</div>'},{Hash:"Docuserve-Search-ResultsBody-Template",Template:"{~TS:Docuserve-Search-Result-Template:AppData.Docuserve.SearchResults~}"},{Hash:"Docuserve-Search-Result-Template",Template:'<a class="docuserve-search-result" href="{~D:Record.Route~}">\n\t<div class="docuserve-search-result-title">{~D:Record.Title~}</div>\n\t{~TS:Docuserve-Search-Result-Breadcrumb-Template:Record.BreadcrumbSlot~}\n\t{~TS:Docuserve-Search-Result-Path-Template:Record.PathSlot~}\n</a>'},{Hash:"Docuserve-Search-Result-Breadcrumb-Template",Template:'<div class="docuserve-search-result-breadcrumb">{~D:Record.Group~} <span class="docuserve-search-result-breadcrumb-sep">{~I:ChevronRight~}</span> {~D:Record.Module~}</div>'},{Hash:"Docuserve-Search-Result-Path-Template",Template:'<div class="docuserve-search-result-path">{~D:Record.DocPath~}</div>'}],Renderables:[{RenderableHash:"Docuserve-Search-Display",TemplateHash:"Docuserve-Search-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":75}],87:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o),this._SidebarSearchDebounceTimer=null}onBeforeRender(t){return this._refreshSearchSlot(),this._refreshFooterSlot(),this._refreshSidebarGroupRecords(),this._refreshModuleNavSections(),super.onBeforeRender(t)}renderSidebarGroups(){this.render()}renderModuleNav(){this.render()}clearModuleNav(){this.render()}onSidebarSearchInput(t){this._SidebarSearchDebounceTimer&&clearTimeout(this._SidebarSearchDebounceTimer),this._SidebarSearchDebounceTimer=setTimeout(()=>{this.performSidebarSearch(t)},250)}performSidebarSearch(t){this._refreshSearchResults(t);let e=this.pict.parseTemplateByHash("Docuserve-Sidebar-Search-ResultsBody-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Search-Results",e)}toggleSidebar(){let t=this.pict.views["Docuserve-Layout"];if(t&&"function"==typeof t.toggleSidebar)return void t.toggleSidebar();this.pict.AppData.Docuserve.SidebarVisible=!this.pict.AppData.Docuserve.SidebarVisible;let e=document.getElementById("Docuserve-Sidebar-Container");e&&(e.style.display=this.pict.AppData.Docuserve.SidebarVisible?"":"none")}_refreshSearchSlot(){this.pict.AppData.Docuserve.SidebarSearchSlot=this.pict.AppData.Docuserve.KeywordIndexLoaded?[{}]:[]}_refreshFooterSlot(){let t=this.pict.AppData.Docuserve;if(!t.VersionLoaded||!t.Version||!t.Version.Version)return void(t.FooterSlot=[]);let e=t.Version,o={Version:e.Version,NameSlot:e.Name?[{Name:e.Name}]:[],MetaSlot:[]},n=[];if(e.GeneratedAt){let t=String(e.GeneratedAt).match(/^(\d{4}-\d{2}-\d{2})/);t&&n.push("built "+t[1])}e.GitCommit&&n.push(e.GitCommit),n.length>0&&(o.MetaSlot=[{Meta:n.join(" · ")}]),t.FooterSlot=[o]}_refreshSidebarGroupRecords(){let t=this.pict.AppData.Docuserve.SidebarGroups||[],e=this.pict.AppData.Docuserve.CurrentGroup,o=this.pict.AppData.Docuserve.CurrentModule,n="undefined"!=typeof window&&window.location&&window.location.hash||"",r=[];for(let i=0;i<t.length;i++){let a=t[i],s=a.Route||"";if(!s)for(let t=0;t<a.Modules.length;t++)if(a.Modules[t].HasDocs&&a.Modules[t].Route){s=a.Modules[t].Route;break}let l=e===a.Key||n===s,c=[],d=[];s?c.push({Name:a.Name,Route:s,ActiveClass:l?" active":""}):d.push({Name:a.Name});let p=[];for(let t=0;t<a.Modules.length;t++){let n=a.Modules[t];if(n.HasDocs){let t=e===n.Group&&o===n.Name;p.push({LinkSlot:[{Name:n.Name,Route:n.Route,ActiveClass:t?"active":""}],NoDocSlot:[]})}else p.push({LinkSlot:[],NoDocSlot:[{Name:n.Name}]})}r.push({TitleLink:c,TitlePlain:d,Modules:p})}this.pict.AppData.Docuserve.SidebarGroupRecords=r}_refreshModuleNavSections(){let t=this.pict.AppData.Docuserve.CurrentGroup,e=this.pict.AppData.Docuserve.CurrentModule;if(!t||!e)return void(this.pict.AppData.Docuserve.ModuleNavSections=[]);let o=this.pict.providers["Docuserve-Documentation"],n=this.pict.providers["Docuserve-Demos"],r=o?o.getModuleSidebar(t,e):null,i=n?n.listByModule(t,e):[];if((!r||r.length<1)&&i.length<1)return void(this.pict.AppData.Docuserve.ModuleNavSections=[]);let a="#/doc/"+t+"/"+e+"/",s="#/demo/"+t+"/"+e+"/",l=this.pict.AppData.Docuserve.CurrentDemo||"",c=[];if(r&&r.length>0){let t=null;for(let e=0;e<r.length;e++){let o=r[e];if(o.Children){t={TitleSlot:[{Title:o.Title}],Items:[]},c.push(t);for(let e=0;e<o.Children.length;e++){let n=o.Children[e];n.Path&&t.Items.push({Title:n.Title,Route:a+n.Path,ActiveClass:""})}}else o.Path&&((!t||t.TitleSlot.length>0)&&(t={TitleSlot:[],Items:[]},c.push(t)),t.Items.push({Title:o.Title,Route:a+o.Path,ActiveClass:""}))}}if(i.length>0){let t={TitleSlot:[{Title:"Demos"}],Items:[]};for(let e=0;e<i.length;e++){let o=i[e];t.Items.push({Title:o.Name||o.Hash,Route:s+o.Hash,ActiveClass:o.Hash===l?"active":""})}c.push(t)}this.pict.AppData.Docuserve.ModuleNavSections=c}_refreshSearchResults(t){let e=this.pict.AppData.Docuserve;if(!t||!t.trim())return e.SidebarSearchResults=[],e.SidebarSearchOverflow=[],void(e.SidebarSearchEmpty=[]);let o=this.pict.providers["Docuserve-Documentation"].search(t);if(0===o.length)return e.SidebarSearchResults=[],e.SidebarSearchOverflow=[],void(e.SidebarSearchEmpty=[{}]);let n=[];for(let t=0;t<o.length&&t<8;t++){let e=o[t],r=e.Group&&e.Module?e.Group+" / "+e.Module:"";n.push({Title:e.Title,Route:e.Route,MetaSlot:r?[{Meta:r}]:[]})}e.SidebarSearchResults=n,e.SidebarSearchEmpty=[],o.length>8?e.SidebarSearchOverflow=[{EncodedQuery:encodeURIComponent(t),TotalCount:o.length}]:e.SidebarSearchOverflow=[]}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Sidebar",DefaultRenderable:"Docuserve-Sidebar-Content",DefaultDestinationAddress:"#Docuserve-Sidebar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-sidebar {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF7F1);\n\t\t\tborder-right: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 1em 0;\n\t\t\tpadding-top: 0;\n\t\t\tmin-height: 100%;\n\t\t\tposition: relative;\n\t\t\ttransition: background-color 0.15s ease;\n\t\t}\n\t\t.docuserve-sidebar-header {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t.docuserve-sidebar-close {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1.1em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.2em 0.4em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-sidebar-close:hover {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.docuserve-sidebar-search input:focus {\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search-results {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-results a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\tborder-radius: 3px;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover {\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-sidebar-search-all {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tmargin-top: 0.25em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-all:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-sidebar-search-empty {\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-sidebar-home {\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t}\n\t\t.docuserve-sidebar-home a {\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-home a:hover {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-group {\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.docuserve-sidebar-group-title {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t}\n\t\t.docuserve-sidebar-group-title:hover {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t}\n\t\ta.docuserve-sidebar-group-title.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbackground-color: var(--theme-color-background-tertiary, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-modules {\n\t\t\tlist-style: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules li {\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-modules a:hover {\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: var(--theme-color-background-tertiary, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-modules .no-docs {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tmargin-top: 0.5em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav:empty {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-sidebar-module-nav-section {\n\t\t\tpadding: 0.4em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.25em 1.25em 0.25em 2.25em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a:hover {\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-module-nav a.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: var(--theme-color-background-tertiary, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-footer {\n\t\t\tmargin-top: auto;\n\t\t\tpadding: 0.9em 1.25em 1em 1.25em;\n\t\t\tborder-top: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-footer:empty {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-version-placard {\n\t\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n\t\t\tline-height: 1.35;\n\t\t}\n\t\t.docuserve-version-name {\n\t\t\tfont-size: 0.78em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-version-number {\n\t\t\tfont-size: 0.82em;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-version-meta {\n\t\t\tfont-size: 0.7em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tmargin-top: 0.15em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Sidebar-Template",Template:'\n<div class="docuserve-sidebar">\n\t<div class="docuserve-sidebar-header">\n\t\t<button class="docuserve-sidebar-close" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()" aria-label="Close sidebar">{~I:Close~}</button>\n\t</div>\n\t{~TS:Docuserve-Sidebar-Search-Slot-Template:AppData.Docuserve.SidebarSearchSlot~}\n\t<div class="docuserve-sidebar-home">\n\t\t<a onclick="{~P~}.PictApplication.navigateTo(\'/Home\')">Home</a>\n\t</div>\n\t<div id="Docuserve-Sidebar-Groups">\n\t\t{~TS:Docuserve-Sidebar-Group-Template:AppData.Docuserve.SidebarGroupRecords~}\n\t</div>\n\t<div id="Docuserve-Sidebar-ModuleNav" class="docuserve-sidebar-module-nav">\n\t\t{~TS:Docuserve-Sidebar-ModuleNav-Section-Template:AppData.Docuserve.ModuleNavSections~}\n\t</div>\n\t<div class="docuserve-sidebar-footer">\n\t\t{~TS:Docuserve-Sidebar-Footer-Template:AppData.Docuserve.FooterSlot~}\n\t</div>\n</div>\n'},{Hash:"Docuserve-Sidebar-Search-Slot-Template",Template:'<div id="Docuserve-Sidebar-Search" class="docuserve-sidebar-search">\n\t<input type="text" placeholder="Search docs..." id="Docuserve-Sidebar-Search-Input" oninput="{~P~}.views[\'Docuserve-Sidebar\'].onSidebarSearchInput(this.value)">\n\t<div id="Docuserve-Sidebar-Search-Results" class="docuserve-sidebar-search-results"></div>\n</div>'},{Hash:"Docuserve-Sidebar-Group-Template",Template:'<div class="docuserve-sidebar-group">\n\t{~TS:Docuserve-Sidebar-Group-Title-Link-Template:Record.TitleLink~}{~TS:Docuserve-Sidebar-Group-Title-Plain-Template:Record.TitlePlain~}\n\t<ul class="docuserve-sidebar-modules">\n\t\t{~TS:Docuserve-Sidebar-Module-Doc-Template:Record.Modules~}\n\t</ul>\n</div>'},{Hash:"Docuserve-Sidebar-Group-Title-Link-Template",Template:'<a class="docuserve-sidebar-group-title{~D:Record.ActiveClass~}" href="{~D:Record.Route~}">{~D:Record.Name~}</a>'},{Hash:"Docuserve-Sidebar-Group-Title-Plain-Template",Template:'<div class="docuserve-sidebar-group-title">{~D:Record.Name~}</div>'},{Hash:"Docuserve-Sidebar-Module-Doc-Template",Template:"<li>{~TS:Docuserve-Sidebar-Module-Link-Template:Record.LinkSlot~}{~TS:Docuserve-Sidebar-Module-NoDoc-Template:Record.NoDocSlot~}</li>"},{Hash:"Docuserve-Sidebar-Module-Link-Template",Template:'<a class="{~D:Record.ActiveClass~}" href="{~D:Record.Route~}">{~D:Record.Name~}</a>'},{Hash:"Docuserve-Sidebar-Module-NoDoc-Template",Template:'<span class="no-docs">{~D:Record.Name~}</span>'},{Hash:"Docuserve-Sidebar-ModuleNav-Section-Template",Template:"{~TS:Docuserve-Sidebar-ModuleNav-SectionTitle-Template:Record.TitleSlot~}{~TS:Docuserve-Sidebar-ModuleNav-Item-Template:Record.Items~}"},{Hash:"Docuserve-Sidebar-ModuleNav-SectionTitle-Template",Template:'<div class="docuserve-sidebar-module-nav-section">{~D:Record.Title~}</div>'},{Hash:"Docuserve-Sidebar-ModuleNav-Item-Template",Template:'<a class="{~D:Record.ActiveClass~}" href="{~D:Record.Route~}">{~D:Record.Title~}</a>'},{Hash:"Docuserve-Sidebar-Footer-Template",Template:'<div class="docuserve-version-placard">\n\t{~TS:Docuserve-Sidebar-Footer-Name-Template:Record.NameSlot~}\n\t<div class="docuserve-version-number">v{~D:Record.Version~}</div>\n\t{~TS:Docuserve-Sidebar-Footer-Meta-Template:Record.MetaSlot~}\n</div>'},{Hash:"Docuserve-Sidebar-Footer-Name-Template",Template:'<div class="docuserve-version-name">{~D:Record.Name~}</div>'},{Hash:"Docuserve-Sidebar-Footer-Meta-Template",Template:'<div class="docuserve-version-meta">{~D:Record.Meta~}</div>'},{Hash:"Docuserve-Sidebar-Search-ResultsBody-Template",Template:"{~TS:Docuserve-Sidebar-Search-Result-Template:AppData.Docuserve.SidebarSearchResults~}{~TS:Docuserve-Sidebar-Search-Overflow-Template:AppData.Docuserve.SidebarSearchOverflow~}{~TS:Docuserve-Sidebar-Search-Empty-Template:AppData.Docuserve.SidebarSearchEmpty~}"},{Hash:"Docuserve-Sidebar-Search-Result-Template",Template:'<a href="{~D:Record.Route~}">\n\t<div class="docuserve-sidebar-search-result-title">{~D:Record.Title~}</div>\n\t{~TS:Docuserve-Sidebar-Search-Result-Meta-Template:Record.MetaSlot~}\n</a>'},{Hash:"Docuserve-Sidebar-Search-Result-Meta-Template",Template:'<div class="docuserve-sidebar-search-result-meta">{~D:Record.Meta~}</div>'},{Hash:"Docuserve-Sidebar-Search-Overflow-Template",Template:'<a class="docuserve-sidebar-search-all" href="#/search/{~D:Record.EncodedQuery~}">See all {~D:Record.TotalCount~} results</a>'},{Hash:"Docuserve-Sidebar-Search-Empty-Template",Template:'<div class="docuserve-sidebar-search-empty">No results found.</div>'}],Renderables:[{RenderableHash:"Docuserve-Sidebar-Content",TemplateHash:"Docuserve-Sidebar-Template",DestinationAddress:"#Docuserve-Sidebar-Container",RenderMethod:"replace"}]}},{"pict-view":75}],88:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o)}onAfterRender(t,e,o,n){let r=this.pict.AppData.Docuserve;return r.CoverLoaded&&r.Cover?this.renderFromCover(r.Cover):this.renderFromCatalog(r),super.onAfterRender(t,e,o,n)}renderFromCover(t){this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.sanitizeTitle(t.Title)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(t.Tagline)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description",this.escapeHTML(t.Description));let e="";for(let o=0;o<t.Highlights.length;o++){let n=t.Highlights[o];e+='<div class="docuserve-splash-highlight-card">',n.Label&&(e+="<h3>"+this.escapeHTML(n.Label)+"</h3>"),e+="<p>"+this.escapeHTML(n.Text)+"</p>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",e);let o="",n=this.pict.providers["Docuserve-Documentation"];for(let e=0;e<t.Actions.length;e++){let r=t.Actions[e],i=0===e?"primary":"secondary",a=r.Href;if(a.match(/^https?:\/\//))o+='<a class="'+i+'" href="'+this.escapeHTML(a)+'" target="_blank" rel="noopener">'+this.escapeHTML(r.Text)+"</a>";else{let t=n.convertSidebarLink(a);o+='<a class="'+i+'" href="'+this.escapeHTML(t)+'">'+this.escapeHTML(r.Text)+"</a>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions",o)}renderFromCatalog(t){let e="Documentation",o="";t.CatalogLoaded&&t.Catalog&&t.Catalog.Name?e=t.Catalog.Name:t.TopBarLoaded&&t.TopBar&&t.TopBar.Brand?e=t.TopBar.Brand:"undefined"!=typeof document&&document.title&&(e=document.title),t.CatalogLoaded&&t.Catalog&&t.Catalog.Description&&(o=t.Catalog.Description),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.escapeHTML(e)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(o)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description","");let n="",r=t.SidebarGroups||[];for(let t=0;t<r.length;t++){let e=r[t];if(!e.Modules||e.Modules.length<1)continue;let o=e.Description||e.Modules.length+" modules";n+='<div class="docuserve-splash-highlight-card">',n+="<h3>"+this.escapeHTML(e.Name)+"</h3>",n+="<p>"+this.escapeHTML(o)+"</p>",n+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",n),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions","")}sanitizeTitle(t){return t?this.escapeHTML(t).replace(/&lt;small&gt;/gi,"<small>").replace(/&lt;\/small&gt;/gi,"</small>"):""}escapeHTML(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Splash",DefaultRenderable:"Docuserve-Splash-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: var(--theme-color-background-primary, #FDFBF7);\n\t\t}\n\t\t.docuserve-splash h1 {\n\t\t\tfont-size: 3em;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin: 0 0 0.25em 0;\n\t\t}\n\t\t.docuserve-splash h1 small {\n\t\t\tfont-size: 0.4em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tvertical-align: middle;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.docuserve-splash-tagline {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-bottom: 1.5em;\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-splash-description {\n\t\t\tfont-size: 1em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmax-width: 600px;\n\t\t\tline-height: 1.7;\n\t\t\tmargin-bottom: 2em;\n\t\t}\n\t\t.docuserve-splash-highlights {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\t\tgap: 1.25em;\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t.docuserve-splash-highlight-card {\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 1.25em;\n\t\t\ttext-align: left;\n\t\t\ttransition: box-shadow 0.2s, border-color 0.2s;\n\t\t}\n\t\t.docuserve-splash-highlight-card:hover {\n\t\t\tbox-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-splash-highlight-card h3 {\n\t\t\tmargin: 0 0 0.5em 0;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-splash-highlight-card p {\n\t\t\tmargin: 0;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tfont-size: 0.85em;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.docuserve-splash-actions {\n\t\t\tdisplay: flex;\n\t\t\tgap: 1em;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.docuserve-splash-actions a {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.7em 1.5em;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-splash-actions .primary {\n\t\t\tbackground-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #fff);\n\t\t}\n\t\t.docuserve-splash-actions .primary:hover {\n\t\t\tbackground-color: var(--theme-color-brand-primary-hover, #236660);\n\t\t}\n\t\t.docuserve-splash-actions .secondary {\n\t\t\tbackground-color: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-splash-actions .secondary:hover {\n\t\t\tborder-color: var(--theme-color-brand-primary-hover, #236660);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Splash-Template",Template:'\n<div class="docuserve-splash">\n\t<h1 id="Docuserve-Splash-Title"></h1>\n\t<div class="docuserve-splash-tagline" id="Docuserve-Splash-Tagline"></div>\n\t<div class="docuserve-splash-description" id="Docuserve-Splash-Description"></div>\n\t<div class="docuserve-splash-highlights" id="Docuserve-Splash-Highlights"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":75}],89:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o)}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),this._renderNavLinks(),this._renderVersionChip(),super.onAfterRender(t,e,o,n)}_renderNavLinks(){let t=this.pict.AppData.Docuserve||{},e=document.getElementById("Docuserve-Nav-Links");if(!e)return;let o='<a href="#/Home">Home</a>';if(t.TopBarLoaded&&t.TopBar&&Array.isArray(t.TopBar.NavLinks))for(let e=0;e<t.TopBar.NavLinks.length;e++){let n=t.TopBar.NavLinks[e];o+='<a href="'+this._escapeHTML(n.Href||"#")+'">'+this._escapeHTML(n.Text||"")+"</a>"}e.innerHTML=o}_renderVersionChip(){let t=this.pict.AppData.Docuserve||{},e=document.getElementById("Docuserve-Nav-Version");if(!e)return;if(!t.VersionLoaded||!t.Version||!t.Version.Version)return e.innerHTML="",void e.setAttribute("title","");let o=t.Version;e.innerHTML="v"+this._escapeHTML(o.Version);let n=[];if(n.push((o.Name?o.Name+" ":"")+"v"+o.Version),o.GeneratedAt){let t=String(o.GeneratedAt).match(/^(\d{4}-\d{2}-\d{2})/);n.push("built "+(t?t[1]:o.GeneratedAt))}o.GitCommit&&n.push(o.GitCommit),e.setAttribute("title",n.join(" · "))}_escapeHTML(t){return null==t?"":String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},e.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar-Nav",DefaultRenderable:"Docuserve-TopBar-Nav-Display",DefaultDestinationAddress:"#Theme-TopBar-Nav",AutoRender:!1,CSS:"\n\t\t.docuserve-nav\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\theight: 100%;\n\t\t\tgap: 0.6em;\n\t\t\tpadding: 0 0.75em;\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-primary, #E8E0D4));\n\t\t}\n\t\t.docuserve-nav-links\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.docuserve-nav-links a\n\t\t{\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-secondary, #B5AA9A));\n\t\t\ttext-decoration: none;\n\t\t\tpadding: 0.45em 0.7em;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-nav-links a:hover\n\t\t{\n\t\t\tbackground-color: var(--theme-color-background-hover, rgba(255, 255, 255, 0.06));\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-background-panel, #fff));\n\t\t}\n\t\t.docuserve-nav-version\n\t\t{\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-muted, #B5AA9A));\n\t\t\tbackground: var(--theme-color-background-hover, rgba(255, 255, 255, 0.06));\n\t\t\tborder: 1px solid var(--theme-color-border-light, rgba(255, 255, 255, 0.08));\n\t\t\tpadding: 0.12em 0.55em;\n\t\t\tborder-radius: 10px;\n\t\t\tfont-family: var(--theme-typography-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n\t\t\tletter-spacing: 0.02em;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.docuserve-nav-version:empty\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-Nav-Template",Template:'\n<div class="docuserve-nav">\n\t<div id="Docuserve-Nav-Links" class="docuserve-nav-links"></div>\n\t<span id="Docuserve-Nav-Version" class="docuserve-nav-version" title=""></span>\n</div>'}],Renderables:[{RenderableHash:"Docuserve-TopBar-Nav-Display",TemplateHash:"Docuserve-TopBar-Nav-Template",DestinationAddress:"#Theme-TopBar-Nav",RenderMethod:"replace"}]}},{"pict-view":75}],90:[function(t,e,o){const n=t("pict-view");e.exports=class extends n{constructor(t,e,o){super(t,e,o)}onAfterRender(t,e,o,n){return this.pict.CSSMap.injectCSS(),this._renderLinks(),super.onAfterRender(t,e,o,n)}_renderLinks(){let t=this.pict.AppData.Docuserve||{},e=document.getElementById("Docuserve-User-Links");if(!e)return;let o="";if(t.KeywordIndexLoaded&&(o+='<a href="#/search/">Search</a>'),t.TopBarLoaded&&t.TopBar&&Array.isArray(t.TopBar.ExternalLinks))for(let e=0;e<t.TopBar.ExternalLinks.length;e++){let n=t.TopBar.ExternalLinks[e],r=this._escapeHTML(n.Href||"#"),i=this._escapeHTML(n.Text||"");o+='<a href="'+r+'"'+(/^https?:/i.test(n.Href||"")?' target="_blank" rel="noopener"':"")+">"+i+"</a>"}e.innerHTML=o}_escapeHTML(t){return null==t?"":String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},e.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar-User",DefaultRenderable:"Docuserve-TopBar-User-Display",DefaultDestinationAddress:"#Theme-TopBar-User",AutoRender:!1,CSS:"\n\t\t.docuserve-user\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\theight: 100%;\n\t\t\tgap: 0.25em;\n\t\t\tpadding: 0 0.75em;\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-secondary, #B5AA9A));\n\t\t}\n\t\t.docuserve-user a\n\t\t{\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-secondary, #B5AA9A));\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.4em 0.6em;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.docuserve-user a:hover\n\t\t{\n\t\t\tbackground-color: var(--theme-color-background-hover, rgba(255, 255, 255, 0.06));\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-primary, #E8E0D4));\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-User-Template",Template:'<div class="docuserve-user" id="Docuserve-User-Links"></div>'}],Renderables:[{RenderableHash:"Docuserve-TopBar-User-Display",TemplateHash:"Docuserve-TopBar-User-Template",DestinationAddress:"#Theme-TopBar-User",RenderMethod:"replace"}]}},{"pict-view":75}]},{},[79])(79)});
90
+ const n=e("pict-provider"),o="pict-theme",i="theme-light",a="theme-dark",s="--theme-";class l extends n{constructor(t,r,n){if(super(t,r,n),this.serviceType="PictProviderTheme",this._themes={},this._themeOrder=[],this._activeHash=null,this._activeMode=null,this._resolvedMode=null,this._systemMediaQuery=null,this._systemListener=null,this._registeredCSSHashes=[],this._applyListeners=[],this.pict&&"function"==typeof this.pict.addTemplate)try{this.pict.addTemplate(e("./templates/Pict-Template-Theme.js")),this.pict.addTemplate(e("./templates/Pict-Template-ThemeVar.js")),this.pict.addTemplate(e("./templates/Pict-Template-ThemeAsset.js")),this.pict.addTemplate(e("./templates/Pict-Template-ThemeImage.js"))}catch(e){this.log&&this.log.warn("PictProviderTheme: template registration skipped: "+e.message)}}registerTheme(e){return e&&"object"==typeof e?e.Hash&&"string"==typeof e.Hash?(this._themes[e.Hash]||this._themeOrder.push(e.Hash),this._themes[e.Hash]=e,!0):(this.log&&this.log.warn("PictProviderTheme.registerTheme: bundle missing required string Hash"),!1):(this.log&&this.log.warn("PictProviderTheme.registerTheme: bundle is not an object"),!1)}listThemes(){let e=[];for(let t=0;t<this._themeOrder.length;t++){let r=this._themeOrder[t],n=this._themes[r],o=n.Modes||{};e.push({Hash:n.Hash,Name:n.Name||n.Hash,Version:n.Version||null,Strategy:o.Strategy||"single",DefaultMode:o.Default||"light",Comprehensive:!1!==n.Comprehensive})}return e}getTheme(e){return this._themes[e]||null}applyTheme(e,t){let r=this._themes[e];if(!r)return this.log&&this.log.warn("PictProviderTheme.applyTheme: unknown theme hash [".concat(e,"]")),!1;let n=this._resolveBundle(r),o=n.Modes&&n.Modes.Strategy||"single",i=n.Modes&&n.Modes.Default||"light",a=t||i;"single"===o&&(a=i),this._activeHash=e,this._activeMode=a;let s=this._buildThemeCSS(n);return this._injectStyleElement(s),this._registerAuxiliaryCSS(n),this._applyMode(a,o),this._fireApplyListeners(n),!0}setMode(e){if(!this._activeHash)return!1;let t=this._resolveBundle(this._themes[this._activeHash]),r=t.Modes&&t.Modes.Strategy||"single";return"single"!==r&&(this._activeMode=e,this._applyMode(e,r),this._fireApplyListeners(t),!0)}onApply(e){if("function"!=typeof e)return function(){};this._applyListeners.push(e);let t=this;return function(){t.offApply(e)}}offApply(e){let t=this._applyListeners.indexOf(e);t>=0&&this._applyListeners.splice(t,1)}_fireApplyListeners(e){if(0===this._applyListeners.length)return;let t={Hash:this._activeHash,Mode:this._activeMode,ResolvedMode:this._resolvedMode};for(let r=0;r<this._applyListeners.length;r++)try{this._applyListeners[r](e,t)}catch(e){this.log&&this.log.warn("PictProviderTheme: onApply listener threw: "+e.message)}}unapplyTheme(){if(this._detachSystemListener(),"undefined"!=typeof document){let e=document.getElementById(o);e&&e.parentNode&&e.parentNode.removeChild(e),document.documentElement&&document.documentElement.classList&&(document.documentElement.classList.remove(i),document.documentElement.classList.remove(a))}if(this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.removeCSS)for(let e=0;e<this._registeredCSSHashes.length;e++)this.pict.CSSMap.removeCSS(this._registeredCSSHashes[e]);return this._registeredCSSHashes=[],this._activeHash=null,this._activeMode=null,this._resolvedMode=null,!0}getActiveTheme(){return{Hash:this._activeHash,Mode:this._activeMode,ResolvedMode:this._resolvedMode}}token(e){if(!this._activeHash)return null;let t=this._resolveBundle(this._themes[this._activeHash]),r=this._walkPath(t,e);return this._resolveModedValue(r)}cssVar(e){return"var("+this._cssVarName(e)+")"}asset(e,t){if(!this._activeHash)return null;let r=this._resolveBundle(this._themes[this._activeHash])[e];return r?this._walkPath(r,t):null}image(e){return this.asset("Image",e)}svg(e){return this.asset("SVG",e)}_resolveBundle(e){let t=[],r=e,n={};for(;r&&!n[r.Hash];){n[r.Hash]=!0,t.unshift(r);let e=r.BasedOn;r=e?this._themes[e]:null}if(1===t.length)return t[0];let o={};for(let e=0;e<t.length;e++)o=this._deepMerge(o,t[e]);return o}_deepMerge(e,t){let r=Object.assign({},e),n=Object.keys(t);for(let e=0;e<n.length;e++){let o=n[e],i=t[o];null===i||"object"!=typeof i||Array.isArray(i)||null===r[o]||"object"!=typeof r[o]||Array.isArray(r[o])?r[o]=i:r[o]=this._deepMerge(r[o],i)}return r}_walkPath(e,t){if(!e||!t)return null;let r=t.split("."),n=e;for(let e=0;e<r.length;e++){if(null===n||"object"!=typeof n)return null;if(n=n[r[e]],void 0===n)return null}return n}_resolveModedValue(e){if(this._isPairedValue(e)){return e["dark"===(this._resolvedMode||"light")?"Dark":"Light"]}return e}_isPairedValue(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>"Light"===e||"Dark"===e)}_buildThemeCSS(e){let t=e.Tokens||{},r=this._flattenTokens(t,""),n=e.Modes&&e.Modes.Strategy||"single",o=r.some(e=>this._isPairedValue(e.Value)),i=this._buildAliasLines(e.Aliases);if("single"===n||!o){let e=":root {\n";for(let t=0;t<r.length;t++){let n=r[t],o=this._isPairedValue(n.Value)?n.Value.Light:n.Value;e+="\t"+this._cssVarName(n.Path)+": "+this._formatCSSValue(o)+";\n"}return e+=i,e+="}\n",e}let s=":root {\n",l="."+a+" {\n";for(let e=0;e<r.length;e++){let t=r[e],n=this._cssVarName(t.Path);this._isPairedValue(t.Value)?(void 0!==t.Value.Light&&(s+="\t"+n+": "+this._formatCSSValue(t.Value.Light)+";\n"),void 0!==t.Value.Dark&&(l+="\t"+n+": "+this._formatCSSValue(t.Value.Dark)+";\n")):s+="\t"+n+": "+this._formatCSSValue(t.Value)+";\n"}return s+=i,s+="}\n",l+="}\n",s+l}_buildAliasLines(e){if(!e||"object"!=typeof e)return"";let t=Object.keys(e),r="";for(let n=0;n<t.length;n++){let o=t[n],i=e[o];"string"==typeof i&&0!==i.length&&(r+="\t"+o+": var("+this._cssVarName(i)+");\n")}return r}_flattenTokens(e,t){let r=[];if(null===e||"object"!=typeof e||Array.isArray(e))return t&&r.push({Path:t,Value:e}),r;if(this._isPairedValue(e))return r.push({Path:t,Value:e}),r;let n=Object.keys(e);for(let o=0;o<n.length;o++){let i=n[o],a=t?t+"."+i:i,s=e[i];r=r.concat(this._flattenTokens(s,a))}return r}_cssVarName(e){return s+e.toLowerCase().replace(/\./g,"-")}_formatCSSValue(e){return null==e?"":String(e)}_injectStyleElement(e){if("undefined"==typeof document)return;let t=document.getElementById(o);t||(t=document.createElement("style"),t.id=o,document.head.appendChild(t)),t.textContent=e}_registerAuxiliaryCSS(e){if(this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.removeCSS)for(let e=0;e<this._registeredCSSHashes.length;e++)this.pict.CSSMap.removeCSS(this._registeredCSSHashes[e]);if(this._registeredCSSHashes=[],Array.isArray(e.CSS)&&this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.addCSS)for(let t=0;t<e.CSS.length;t++){let r=e.CSS[t];if(!r||!r.Hash||"string"!=typeof r.Content)continue;let n="number"==typeof r.Priority?r.Priority:500;this.pict.CSSMap.addCSS(r.Hash,r.Content,n),this._registeredCSSHashes.push(r.Hash)}}_applyMode(e,t){this._detachSystemListener();let r=e;"system"===e&&(r=this._readSystemPreference(),this._attachSystemListener(t)),this._resolvedMode="dark"===r?"dark":"light",this._writeHTMLClass(this._resolvedMode)}_writeHTMLClass(e){if("undefined"==typeof document||!document.documentElement||!document.documentElement.classList)return;let t=document.documentElement.classList;"dark"===e?(t.remove(i),t.add(a)):(t.remove(a),t.add(i))}_readSystemPreference(){if("undefined"==typeof window||"function"!=typeof window.matchMedia)return"light";try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return"light"}}_attachSystemListener(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia)try{let e=this,t=window.matchMedia("(prefers-color-scheme: dark)"),r=function(){let r=t.matches?"dark":"light";e._resolvedMode=r,e._writeHTMLClass(r)};"function"==typeof t.addEventListener?t.addEventListener("change",r):"function"==typeof t.addListener&&t.addListener(r),this._systemMediaQuery=t,this._systemListener=r}catch(e){}}_detachSystemListener(){if(this._systemMediaQuery&&this._systemListener){try{"function"==typeof this._systemMediaQuery.removeEventListener?this._systemMediaQuery.removeEventListener("change",this._systemListener):"function"==typeof this._systemMediaQuery.removeListener&&this._systemMediaQuery.removeListener(this._systemListener)}catch(e){}this._systemMediaQuery=null,this._systemListener=null}}}l.default_configuration={ProviderIdentifier:"Theme",AutoInitialize:!0,AutoInitializeOrdinal:0},t.exports=l,t.exports.STYLE_ELEMENT_ID=o,t.exports.HTML_CLASS_LIGHT=i,t.exports.HTML_CLASS_DARK=a,t.exports.CSS_VAR_PREFIX=s},{"./templates/Pict-Template-Theme.js":167,"./templates/Pict-Template-ThemeAsset.js":168,"./templates/Pict-Template-ThemeImage.js":169,"./templates/Pict-Template-ThemeVar.js":170,"pict-provider":143}],167:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~Theme:","~}")}render(e){let t=(e||"").trim();if(!t)return"";let r=this._findThemeProvider();if(!r)return"";let n=r.token(t);return null==n?"":String(n)}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":214}],168:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~ThemeAsset:","~}")}render(e){let t=(e||"").trim();if(!t)return"";let r=t.indexOf(".");if(r<0)return"";let n=t.substring(0,r),o=t.substring(r+1),i=this._findThemeProvider();if(!i)return"";let a=i.asset(n,o);return null==a?"":String(a)}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":214}],169:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~ThemeImage:","~}")}render(e){let t=(e||"").trim();if(!t)return"";let r=this._findThemeProvider();if(!r)return"";let n=r.image(t);return null==n?"":String(n)}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":214}],170:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~ThemeVar:","~}")}render(e){let t=(e||"").trim();if(!t)return"";let r=this._findThemeProvider();return r?r.cssVar(t):""}_findThemeProvider(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}},{"pict-template":214}],171:[function(e,t,r){const n=e("pict-provider"),o=e("pict-provider-theme"),i=e("./views/PictView-Theme-Picker.js"),a=e("./views/PictView-Theme-ModeToggle.js"),s=e("./views/PictView-Theme-ScaleSelect.js"),l=e("./views/PictView-Theme-Button.js"),c=e("./views/PictView-Theme-BrandStrip.js"),d=e("./views/PictView-Theme-Brand-Mark.js"),h=e("./views/PictView-Theme-TopBar.js"),p=e("./views/PictView-Theme-BottomBar.js"),u=e("./Theme-Persistence.js"),f=e("./Theme-Scale.js"),m=e("./Theme-Brand.js"),g=e("./themes/_catalog.js"),y={Picker:{lib:i,hash:"Theme-Picker"},ModeToggle:{lib:a,hash:"Theme-ModeToggle"},ScaleSelect:{lib:s,hash:"Theme-ScaleSelect"},Button:{lib:l,hash:"Theme-Button"},BrandStrip:{lib:c,hash:"Theme-BrandStrip"},BrandMark:{lib:d,hash:"Theme-Brand-Mark"},TopBar:{lib:h,hash:"Theme-TopBar"},BottomBar:{lib:p,hash:"Theme-BottomBar"}};function b(e){if(!e||!e.providers||!e.providers.Theme)return e&&e.log&&e.log.warn&&e.log.warn("pict-section-theme.registerCatalog: pict.providers.Theme not found — register the runtime first"),0;let t=e.providers.Theme,r=g.list(),n=0;for(let e=0;e<r.length;e++)t.registerTheme(r[e].Bundle)&&n++;return n}function v(e,t){if(!e||"function"!=typeof e.addProvider)throw new Error("pict-section-theme: requires a Pict instance");let r=t||{};if(!e.providers||!e.providers.Theme){let t=Object.assign({},o.default_configuration,r.ProviderOptions||{});e.addProvider("Theme",t,o)}!1!==r.RegisterCatalog&&b(e);let n=Array.isArray(r.Views)?r.Views:Object.keys(y);for(let t=0;t<n.length;t++){let o=y[n[t]];if(!o){e.log&&e.log.warn&&e.log.warn('pict-section-theme: unknown view name "'+n[t]+'" — skipped');continue}if(e.views&&e.views[o.hash])continue;let i=Object.assign({},o.lib.default_configuration,r.ViewOptions&&r.ViewOptions[n[t]]||{});e.addView(o.hash,i,o.lib)}let i=e.providers.Theme,a=!1!==r.Persistence,s=null,l=r.ApplyDefault||null,c=r.DefaultMode||null,d="number"==typeof r.DefaultScale?r.DefaultScale:null;if(a&&i){s=u.resolveKey(r.PersistenceKey);let e=u.load(s);e&&e.ThemeHash&&"function"==typeof i.getTheme&&i.getTheme(e.ThemeHash)?(l=e.ThemeHash,e.Mode&&(c=e.Mode),e.Scale&&(d=e.Scale)):e&&e.Scale&&(d=e.Scale);let t=function(){let e="function"==typeof i.getActiveTheme?i.getActiveTheme():{Hash:null,Mode:null};u.save(s,{ThemeHash:e.Hash,Mode:e.Mode,Scale:f.getActive()})};i.onApply(t),f.onChange(t)}return l&&i&&i.applyTheme(l,c),null!==d&&f.applyScale(d),r.Brand&&m.applyBrand(r.Brand),i&&s&&(i._persistenceKey=s),i}class S extends n{constructor(e,t,r){super(e,t,r),this.serviceType="PictSectionTheme",v(this.pict,this.options)}mount(e){let t=e||{},r=t.Container;if(!r)return null;let n="string"==typeof r?this.pict&&this.pict.ContentAssignment?this.pict.ContentAssignment.getElement(r):document.querySelector(r):r;if(n&&n.length&&!n.tagName&&(n=n[0]),!n)return this.pict&&this.pict.log&&this.pict.log.warn&&this.pict.log.warn("pict-section-theme.mount: container not found for "+r),null;let o=Array.isArray(t.Views)&&t.Views.length?t.Views:["Picker","ModeToggle","ScaleSelect"],i=[],a=[];for(let e=0;e<o.length;e++){let t=y[o[e]];if(!t)continue;let r=(t.lib.default_configuration.DefaultDestinationAddress||"").replace(/^#/,"");r&&(i.push('<div class="pict-theme-mount-row pict-theme-mount-row-'+t.hash.toLowerCase()+'"><div id="'+r+'"></div></div>'),a.push(t.hash))}let s="pict-theme-mount"+(t.WrapperClass?" "+t.WrapperClass:"");n.innerHTML='<div class="'+s+'">'+i.join("")+"</div>";for(let e=0;e<a.length;e++){let t=this.pict.views[a[e]];if(t&&"function"==typeof t.render)try{t.render()}catch(e){}}return{container:n,viewsRendered:a}}}t.exports=S,t.exports.default_configuration={ProviderIdentifier:"Theme-Section",AutoInitialize:!1,ApplyDefault:null,DefaultMode:null,DefaultScale:null,Persistence:!0,PersistenceKey:null,RegisterCatalog:!0,Views:null,ViewOptions:null,Brand:null,ProviderOptions:null},t.exports.Provider=o,t.exports.PictSectionThemeProvider=S,t.exports.PickerView=i,t.exports.ModeToggleView=a,t.exports.ButtonView=l,t.exports.ScaleSelectView=s,t.exports.BrandStripView=c,t.exports.BrandMarkView=d,t.exports.TopBarView=h,t.exports.BottomBarView=p,t.exports.Catalog=g,t.exports.Brand=m,t.exports.Scale=f,t.exports.Persistence=u,t.exports.registerCatalog=b,t.exports.listCatalog=function(){let e=g.list(),t=[];for(let r=0;r<e.length;r++){let n=e[r],o=n.Bundle||{},i=o.Modes||{};t.push({Hash:n.Hash,Name:o.Name||n.Hash,Category:n.Category||"Other",Strategy:i.Strategy||"single",DefaultMode:i.Default||"light",IsDefault:!!n.IsDefault})}return t},t.exports.install=function(e,t){if(!e||"function"!=typeof e.addProvider)throw new Error("pict-section-theme.install: first arg must be a Pict instance");return v(e,t||{})},t.exports.clearPersistence=function(e){let t=e&&e.providers&&e.providers.Theme&&e.providers.Theme._persistenceKey||u.resolveKey(null);return u.clear(t)}},{"./Theme-Brand.js":172,"./Theme-Persistence.js":174,"./Theme-Scale.js":175,"./themes/_catalog.js":179,"./views/PictView-Theme-BottomBar.js":205,"./views/PictView-Theme-Brand-Mark.js":206,"./views/PictView-Theme-BrandStrip.js":207,"./views/PictView-Theme-Button.js":208,"./views/PictView-Theme-ModeToggle.js":209,"./views/PictView-Theme-Picker.js":210,"./views/PictView-Theme-ScaleSelect.js":211,"./views/PictView-Theme-TopBar.js":212,"pict-provider":143,"pict-provider-theme":166}],172:[function(e,t,r){const n="pict-brand",o="pict-brand-favicon",i="pict-brand-favicon-dark";let a=null,s=[];function l(e){return"string"==typeof e&&/^\s*<svg[\s>]/i.test(e)}function c(e){return"string"==typeof e&&/^(data:|https?:|\/|\.\.?\/)/.test(e)}function d(e){return e&&"string"==typeof e.IconType?e.IconType:e&&e.Icon?l(e.Icon)?"svg":c(e.Icon)?"image":null:null}function h(e){if("string"==typeof e&&e.length>0)return{Light:e,Dark:e,Base:e};if(e&&"object"==typeof e){let t="string"==typeof e.Light&&e.Light.length>0?e.Light:null,r="string"==typeof e.Dark&&e.Dark.length>0?e.Dark:null;return t||r?(t=t||r,r=r||t,{Light:t,Dark:r,Base:"string"==typeof e.Base&&e.Base.length>0?e.Base:t}):null}return null}function p(e){if(!e||"string"!=typeof e)return null;if(l(e)){return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e).replace(/'/g,"%27").replace(/"/g,"%22")}return c(e)?e:null}function u(){"undefined"!=typeof document&&[o,i].forEach(e=>{let t=document.getElementById(e);t&&t.parentNode&&t.parentNode.removeChild(t)})}function f(e){let t=e.Colors;var r;return":root {\n\t--brand-color-primary: "+t.Primary+";\n\t--brand-color-secondary: "+t.Secondary+";\n\t--brand-color-primary-light: "+t.PrimaryLight+";\n\t--brand-color-primary-dark: "+t.PrimaryDark+";\n\t--brand-color-secondary-light: "+t.SecondaryLight+";\n\t--brand-color-secondary-dark: "+t.SecondaryDark+";\n\t--brand-color-primary-mode: "+t.PrimaryLight+";\n\t--brand-color-secondary-mode: "+t.SecondaryLight+";\n\t--brand-name: "+(r=e.Name,'"'+String(r||"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'";\n}\n')+(".theme-dark {\n\t--brand-color-primary-mode: "+t.PrimaryDark+";\n\t--brand-color-secondary-mode: "+t.SecondaryDark+";\n}\n")}function m(e){let t=a;if(null===e){if(a=null,"undefined"!=typeof document){let e=document.getElementById(n);e&&e.parentNode&&e.parentNode.removeChild(e)}return u(),y(null,t),null}let r=function(e){if(!e||"object"!=typeof e)return null;let t=e.Colors||{},r=h(t.Primary),n=h(t.Secondary);if(!r||!n)return null;let o=t.PrimaryLight||r.Light,i=t.PrimaryDark||r.Dark,a=t.SecondaryLight||n.Light,s=t.SecondaryDark||n.Dark;return{Hash:e.Hash||"brand",Name:e.Name||e.Hash||"Brand",Icon:e.Icon||null,IconType:d(e),Tagline:"string"==typeof e.Tagline?e.Tagline:null,Favicon:e.Favicon||null,FaviconDark:e.FaviconDark||null,Colors:{Primary:r.Base,Secondary:n.Base,PrimaryLight:o,PrimaryDark:i,SecondaryLight:a,SecondaryDark:s}}}(e);return r?(a=r,function(e){if("undefined"==typeof document)return;let t=document.getElementById(n);t||(t=document.createElement("style"),t.id=n,document.head.appendChild(t)),t.textContent=e}(f(r)),function(e){if("undefined"==typeof document)return;u();let t=p(e.Favicon),r=p(e.FaviconDark);if(!t&&!r)return;let n=!(!t||!r);if(t){let e=document.createElement("link");e.id=o,e.rel="icon",e.href=t,/^data:image\/svg\+xml/.test(t)&&(e.type="image/svg+xml"),n&&(e.media="(prefers-color-scheme: light)"),document.head.appendChild(e)}if(r){let e=document.createElement("link");e.id=i,e.rel="icon",e.href=r,/^data:image\/svg\+xml/.test(r)&&(e.type="image/svg+xml"),n&&(e.media="(prefers-color-scheme: dark)"),document.head.appendChild(e)}}(r),y(r,t),r):("undefined"!=typeof console&&console.warn&&console.warn("Theme-Brand.applyBrand: bad brand object — needs Colors.Primary + Colors.Secondary as strings."),a)}function g(e){let t=s.indexOf(e);t>=0&&s.splice(t,1)}function y(e,t){for(let r=0;r<s.length;r++)try{s[r](e,t)}catch(e){}}t.exports={applyBrand:m,getActive:function(){return a},onChange:function(e){return"function"!=typeof e?function(){}:(s.push(e),function(){g(e)})},offChange:g,reset:function(){m(null),s=[]},STYLE_ELEMENT_ID:n,FAVICON_LINK_ID:o,FAVICON_DARK_LINK_ID:i}},{}],173:[function(e,t,r){function n(e,t){let r="number"==typeof e&&e>0?e:14;return'<svg class="pict-theme-icon" width="'+r+'" height="'+r+'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'+t+"</svg>"}function o(e){return n(e,'<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>')}function i(e){return n(e,'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>')}function a(e){let t="number"==typeof e&&e>0?e:14;return'<svg class="pict-theme-icon pict-theme-icon-paired" width="'+1.6*t+'" height="'+t+'" viewBox="0 0 38 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="12" r="3"/><path d="M8 4v1.5M8 18.5V20M2.5 12H4M12 12h1.5M4.1 7.1l1 1M11.1 7.1l-1 1M4.1 16.9l1-1M11.1 16.9l-1-1"/><path d="M33 13.5A6.5 6.5 0 1 1 26 6a5 5 0 0 0 7 7.5z"/></svg>'}t.exports={iconSun:o,iconMoon:i,iconSystem:function(e){return n(e,'<rect x="2" y="4" width="20" height="14" rx="2"/><path d="M8 21h8M12 18v3"/>')},iconPaired:a,iconChevronDown:function(e){let t="number"==typeof e&&e>0?e:10;return'<svg class="pict-theme-icon pict-theme-icon-chevron" width="'+t+'" height="'+t+'" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 4.5l3 3 3-3"/></svg>'},iconForTheme:function(e,t,r){return"single"===e?"dark"===t?i(r):o(r):a(r)},DEFAULT_SIZE_PX:14}},{}],174:[function(e,t,r){const n="pict-section-theme:";function o(){try{if("undefined"!=typeof window&&window.localStorage)return window.localStorage}catch(e){}return null}t.exports={resolveKey:function(e){let t="string"==typeof e&&e.length>0?e:function(){try{if("undefined"!=typeof window&&window.location&&window.location.hostname)return window.location.hostname}catch(e){}return"default"}();return n+t},load:function(e){let t,r,n=o();if(!n)return null;try{t=n.getItem(e)}catch(e){return null}if(!t)return null;try{r=JSON.parse(t)}catch(e){return null}if(!r||"object"!=typeof r)return null;if(1!==r.Version)return null;if("string"!=typeof r.ThemeHash||0===r.ThemeHash.length)return null;let i=null;return"number"==typeof r.Scale&&isFinite(r.Scale)&&r.Scale>0&&(i=r.Scale),{ThemeHash:r.ThemeHash,Mode:"string"==typeof r.Mode&&r.Mode.length>0?r.Mode:null,Scale:i}},save:function(e,t){let r=o();if(!r)return!1;if(!t||"string"!=typeof t.ThemeHash||0===t.ThemeHash.length)return!1;let n={Version:1,ThemeHash:t.ThemeHash,Mode:"string"==typeof t.Mode&&t.Mode.length>0?t.Mode:null,Scale:"number"==typeof t.Scale&&isFinite(t.Scale)&&t.Scale>0?t.Scale:null,SavedAt:(new Date).toISOString()};try{return r.setItem(e,JSON.stringify(n)),!0}catch(e){return!1}},clear:function(e){let t=o();if(!t)return!1;try{return t.removeItem(e),!0}catch(e){return!1}},STORAGE_PREFIX:n,SCHEMA_VERSION:1}},{}],175:[function(e,t,r){const n="pict-theme-scale",o="--theme-scale";let i=1,a=[];function s(e){let t=a.indexOf(e);t>=0&&a.splice(t,1)}t.exports={applyScale:function(e){let t=i,r=function(e){let t=Number(e);return!isFinite(t)||t<=0?1:t<.5?.5:t>3?3:t}(e);return i=r,function(e){if("undefined"==typeof document)return;let t=document.getElementById(n);t||(t=document.createElement("style"),t.id=n,document.head.appendChild(t)),t.textContent=e}(function(e){return":root {\n\t"+o+": "+e+";\n}\nhtml {\n\tzoom: "+e+";\n}\n"}(r)),t!==r&&function(e,t){for(let r=0;r<a.length;r++)try{a[r](e,t)}catch(e){}}(r,t),r},getActive:function(){return i},onChange:function(e){return"function"!=typeof e?function(){}:(a.push(e),function(){s(e)})},offChange:s,reset:function(){if(i=1,"undefined"!=typeof document){let e=document.getElementById(n);e&&e.parentNode&&e.parentNode.removeChild(e)}a=[]},PRESETS:[{Value:.75,Label:"Tiny (75%)"},{Value:.85,Label:"Small (85%)"},{Value:1,Label:"Default (100%)"},{Value:1.15,Label:"Comfortable (115%)"},{Value:1.25,Label:"Large (125%)"},{Value:1.5,Label:"Huge (150%)"},{Value:1.75,Label:"Extra Huge (175%)"},{Value:2,Label:"Massive (200%)"}],DEFAULT_SCALE:1,MIN_SCALE:.5,MAX_SCALE:3,STYLE_ELEMENT_ID:n,CSS_VAR_NAME:o}},{}],176:[function(e,t,r){t.exports={Hash:"1970s-console",Name:"1970s Console",Category:"Fun",Version:"0.0.1",Description:"Amber phosphor on brown-black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A1000",Secondary:"#140C00",Tertiary:"#1E1400",Panel:"#1C1200",Viewer:"#100A00",Hover:"#2A1C00",Selected:"#3A2800",Thumb:"#140C00"},Text:{Primary:"#FFAA00",Secondary:"#DD8800",Muted:"#AA6600",Dim:"#884400",Placeholder:"#663300"},Brand:{Accent:"#FFCC00",AccentHover:"#FFDD44"},Border:{Default:"#2A1800",Light:"#3A2200"},Status:{Danger:"#FF4400",DangerMuted:"#AA3300"},Scrollbar:{Track:"#2A1800",Hover:"#3A2800"},Selection:{Background:"rgba(255, 204, 0, 0.2)"},Focus:{Outline:"#FFCC00"},Syntax:{Keyword:"#FFB000",String:"#FFD080",Number:"#FFB000",Comment:"#806020",Operator:"#FFB000",Punctuation:"#FFD080",Function:"#FFB000",Variable:"#FFE090",Type:"#FFB000",Builtin:"#FFB000",Property:"#FF6E40",Tag:"#FF6E40",AttrName:"#FFB000",AttrValue:"#FFD080"}},Typography:{Family:{Sans:"'Courier New', 'Lucida Console', monospace",Mono:"'Courier New', 'Lucida Console', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#DD8800",Accent:"#FFCC00",Muted:"#884400",Light:"#1E1400",WarmBeige:"#201800",TealTint:"#1A1000",Lavender:"#1C1200",AmberTint:"#221800",PdfFill:"#201000",PdfText:"#FF4400"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.405Z",CompilerVersion:1}},{}],177:[function(e,t,r){t.exports={Hash:"1980s-console",Name:"1980s Console",Category:"Fun",Version:"0.0.1",Description:"Green phosphor on black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#001200",Secondary:"#000E00",Tertiary:"#001600",Panel:"#001400",Viewer:"#000A00",Hover:"#002200",Selected:"#003800",Thumb:"#000E00"},Text:{Primary:"#00FF00",Secondary:"#00CC00",Muted:"#009900",Dim:"#006600",Placeholder:"#004400"},Brand:{Accent:"#00FF66",AccentHover:"#44FF88"},Border:{Default:"#002A00",Light:"#003A00"},Status:{Danger:"#FF0000",DangerMuted:"#AA0000"},Scrollbar:{Track:"#002A00",Hover:"#004400"},Selection:{Background:"rgba(0, 255, 102, 0.2)"},Focus:{Outline:"#00FF66"},Syntax:{Keyword:"#00FF00",String:"#90FF90",Number:"#FFFF00",Comment:"#208020",Operator:"#00FF00",Punctuation:"#90FF90",Function:"#00FF00",Variable:"#C0FFC0",Type:"#FFFF00",Builtin:"#FFFF00",Property:"#FF4040",Tag:"#FF4040",AttrName:"#FFFF00",AttrValue:"#90FF90"}},Typography:{Family:{Sans:"'Courier New', monospace",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#00CC00",Accent:"#00FF66",Muted:"#006600",Light:"#001600",WarmBeige:"#001A00",TealTint:"#001200",Lavender:"#001400",AmberTint:"#001800",PdfFill:"#140000",PdfText:"#FF0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],178:[function(e,t,r){t.exports={Hash:"1990s-website",Name:"1990s Web Site",Category:"Fun",Version:"0.0.1",Description:"Blue links on grey, beveled Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#C0C0C0",Secondary:"#B0B0B0",Tertiary:"#A8A8A8",Panel:"#B8B8B8",Viewer:"#D0D0D0",Hover:"#B8B8D0",Selected:"#000080",Thumb:"#B0B0B0"},Text:{Primary:"#000000",Secondary:"#000080",Muted:"#404040",Dim:"#606060",Placeholder:"#808080"},Brand:{Accent:"#0000FF",AccentHover:"#0000CC"},Border:{Default:"#808080",Light:"#A0A0A0"},Status:{Danger:"#FF0000",DangerMuted:"#990000"},Scrollbar:{Track:"#808080",Hover:"#606060"},Selection:{Background:"rgba(0, 0, 128, 0.3)"},Focus:{Outline:"#0000FF"},Syntax:{Keyword:"#0000FF",String:"#008000",Number:"#A52A2A",Comment:"#808080",Operator:"#000080",Punctuation:"#000000",Function:"#0000A0",Variable:"#000000",Type:"#A52A2A",Builtin:"#A52A2A",Property:"#800080",Tag:"#800080",AttrName:"#A52A2A",AttrValue:"#008000"}},Typography:{Family:{Sans:"'Times New Roman', Times, serif",Mono:"'Courier New', Courier, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#000080",Accent:"#0000FF",Muted:"#606060",Light:"#A8A8A8",WarmBeige:"#B0B0B0",TealTint:"#A0A0A0",Lavender:"#ABABD0",AmberTint:"#B8B0A0",PdfFill:"#C0A0A0",PdfText:"#FF0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],179:[function(e,t,r){class n{constructor(){this._themes=new Map,this._loadStarterSet()}_loadStarterSet(){const t=[{Hash:"retold-default",Category:"Default",IsDefault:!0,Bundle:e("./retold-default.json")},{Hash:"retold-mono",Category:"Default",Bundle:e("./retold-mono.json")},{Hash:"retold-manager",Category:"App",Bundle:e("./retold-manager.json")},{Hash:"retold-content-system",Category:"App",Bundle:e("./retold-content-system.json")},{Hash:"ultravisor-desert-dusk",Category:"App",Bundle:e("./ultravisor-desert-dusk.json")},{Hash:"ultravisor-desert-day",Category:"App",Bundle:e("./ultravisor-desert-day.json")},{Hash:"ultravisor-desert-sunset",Category:"App",Bundle:e("./ultravisor-desert-sunset.json")},{Hash:"ultravisor-professional-light",Category:"App",Bundle:e("./ultravisor-professional-light.json")},{Hash:"ultravisor-professional-dark",Category:"App",Bundle:e("./ultravisor-professional-dark.json")},{Hash:"ultravisor-desert-canyon",Category:"App",Bundle:e("./ultravisor-desert-canyon.json")},{Hash:"playground-corp",Category:"Paired",Bundle:e("./playground-corp.json")},{Hash:"playground-starter",Category:"Paired",Bundle:e("./playground-starter.json")},{Hash:"twilight",Category:"Grey",Bundle:e("./twilight.json")},{Hash:"night",Category:"Grey",Bundle:e("./night.json")},{Hash:"evening",Category:"Grey",Bundle:e("./evening.json")},{Hash:"afternoon",Category:"Grey",Bundle:e("./afternoon.json")},{Hash:"daylight",Category:"Grey",Bundle:e("./daylight.json")},{Hash:"cyberpunk",Category:"Fun",Bundle:e("./cyberpunk.json")},{Hash:"synthwave",Category:"Fun",Bundle:e("./synthwave.json")},{Hash:"neo-tokyo",Category:"Fun",Bundle:e("./neo-tokyo.json")},{Hash:"solarized-dark",Category:"Fun",Bundle:e("./solarized-dark.json")},{Hash:"forest",Category:"Fun",Bundle:e("./forest.json")},{Hash:"hotdog",Category:"Fun",Bundle:e("./hotdog.json")},{Hash:"1970s-console",Category:"Fun",Bundle:e("./1970s-console.json")},{Hash:"1980s-console",Category:"Fun",Bundle:e("./1980s-console.json")},{Hash:"1990s-website",Category:"Fun",Bundle:e("./1990s-website.json")},{Hash:"early-2000s",Category:"Fun",Bundle:e("./early-2000s.json")},{Hash:"mobile-debug",Category:"Debug",Bundle:e("./mobile-debug.json")}];for(let e=0;e<t.length;e++){let r=Object.assign({},t[e],{Source:t[e].Source||"starter"});this._themes.set(r.Hash,r)}}register(e){if(!e||"object"!=typeof e)throw new Error("ThemeRegistry.register: entry must be an object");if("string"!=typeof e.Hash||0===e.Hash.length)throw new Error("ThemeRegistry.register: entry.Hash is required");if(!e.Bundle||"object"!=typeof e.Bundle)throw new Error("ThemeRegistry.register: entry.Bundle is required");let t=Object.assign({Source:"host"},e);return this._themes.set(e.Hash,t),t}unregister(e){return this._themes.delete(e)}get(e){return this._themes.get(e)}has(e){return this._themes.has(e)}list(){return Array.from(this._themes.values())}clear(){this._themes.clear()}loadStarterSet(){this._loadStarterSet()}get count(){return this._themes.size}async registerFromURL(e,t){if("function"!=typeof fetch)throw new Error("ThemeRegistry.registerFromURL: fetch is not available in this environment");let r=await fetch(e);if(!r.ok)throw new Error("ThemeRegistry.registerFromURL: HTTP "+r.status+" for "+e);let n=await r.json();if(!n||"object"!=typeof n||"string"!=typeof n.Hash)throw new Error("ThemeRegistry.registerFromURL: payload missing Hash");let o=t||{};return this.register({Hash:o.Hash||n.Hash,Bundle:n,Category:o.Category||"Garden",IsDefault:!!o.IsDefault,Source:e})}get length(){return this._themes.size}[Symbol.iterator](){return this._themes.values()}}const o=new n,i=new Proxy(o,{get(e,t,r){if("string"==typeof t&&/^\d+$/.test(t)){let r=parseInt(t,10);return e.list()[r]}return Reflect.get(e,t,r)},has:(e,t)=>"string"==typeof t&&/^\d+$/.test(t)?parseInt(t,10)<e.length:Reflect.has(e,t)});t.exports=i,t.exports.ThemeRegistry=n},{"./1970s-console.json":176,"./1980s-console.json":177,"./1990s-website.json":178,"./afternoon.json":180,"./cyberpunk.json":181,"./daylight.json":182,"./early-2000s.json":183,"./evening.json":184,"./forest.json":185,"./hotdog.json":186,"./mobile-debug.json":187,"./neo-tokyo.json":188,"./night.json":189,"./playground-corp.json":190,"./playground-starter.json":191,"./retold-content-system.json":192,"./retold-default.json":193,"./retold-manager.json":194,"./retold-mono.json":195,"./solarized-dark.json":196,"./synthwave.json":197,"./twilight.json":198,"./ultravisor-desert-canyon.json":199,"./ultravisor-desert-day.json":200,"./ultravisor-desert-dusk.json":201,"./ultravisor-desert-sunset.json":202,"./ultravisor-professional-dark.json":203,"./ultravisor-professional-light.json":204}],180:[function(e,t,r){t.exports={Hash:"afternoon",Name:"Afternoon",Category:"Grey",Version:"0.0.1",Description:"Warm light grey, softer contrast Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#E8E4E0",Secondary:"#DAD6D2",Tertiary:"#D0CCC8",Panel:"#DDD9D5",Viewer:"#F0ECE8",Hover:"#CCC8C4",Selected:"#B8B4B0",Thumb:"#DAD6D2"},Text:{Primary:"#2A2A2A",Secondary:"#404040",Muted:"#707070",Dim:"#909090",Placeholder:"#B0B0B0"},Brand:{Accent:"#555555",AccentHover:"#333333"},Border:{Default:"#C0BCB8",Light:"#D0CCC8"},Status:{Danger:"#AA3333",DangerMuted:"#886655"},Scrollbar:{Track:"#B8B4B0",Hover:"#A0A09C"},Selection:{Background:"rgba(85, 85, 85, 0.2)"},Focus:{Outline:"#555555"},Syntax:{Keyword:"#7038A0",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#666666",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"Georgia, 'Times New Roman', serif",Mono:"'Courier New', Courier, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#404040",Accent:"#555555",Muted:"#909090",Light:"#D0CCC8",WarmBeige:"#DAD6D2",TealTint:"#CCC8C4",Lavender:"#D2D0CE",AmberTint:"#D8D2C8",PdfFill:"#D8C8C0",PdfText:"#AA3333"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],181:[function(e,t,r){t.exports={Hash:"cyberpunk",Name:"Cyberpunk",Category:"Fun",Version:"0.0.1",Description:"Electric green on black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0A0E0A",Secondary:"#060806",Tertiary:"#0E120E",Panel:"#0C100C",Viewer:"#040604",Hover:"#142014",Selected:"#1A3A1A",Thumb:"#060806"},Text:{Primary:"#C8FFC8",Secondary:"#A0D8A0",Muted:"#608860",Dim:"#406040",Placeholder:"#305030"},Brand:{Accent:"#00FF41",AccentHover:"#44FF77"},Border:{Default:"#1A2A1A",Light:"#224022"},Status:{Danger:"#FF3333",DangerMuted:"#AA2222"},Scrollbar:{Track:"#1A2A1A",Hover:"#2A4A2A"},Selection:{Background:"rgba(0, 255, 65, 0.2)"},Focus:{Outline:"#00FF41"},Syntax:{Keyword:"#FF00FF",String:"#00FF41",Number:"#FFFF00",Comment:"#406040",Operator:"#00FFFF",Punctuation:"#A0D8A0",Function:"#FF00FF",Variable:"#C8FFC8",Type:"#FFFF00",Builtin:"#FFFF00",Property:"#FF3333",Tag:"#FF3333",AttrName:"#FFFF00",AttrValue:"#00FF41"}},Typography:{Family:{Sans:"'Lucida Console', 'Courier New', monospace",Mono:"'Lucida Console', 'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#A0D8A0",Accent:"#00FF41",Muted:"#406040",Light:"#0E120E",WarmBeige:"#101610",TealTint:"#0C140C",Lavender:"#0E120E",AmberTint:"#141810",PdfFill:"#181010",PdfText:"#FF3333"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],182:[function(e,t,r){t.exports={Hash:"daylight",Name:"Daylight",Category:"Grey",Version:"0.0.1",Description:"Bright white, dark text Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#FFFFFF",Secondary:"#F0F0F0",Tertiary:"#E8E8E8",Panel:"#F5F5F5",Viewer:"#FAFAFA",Hover:"#E0E0E0",Selected:"#C8C8C8",Thumb:"#F0F0F0"},Text:{Primary:"#1A1A1A",Secondary:"#333333",Muted:"#666666",Dim:"#888888",Placeholder:"#AAAAAA"},Brand:{Accent:"#444444",AccentHover:"#222222"},Border:{Default:"#D0D0D0",Light:"#E0E0E0"},Status:{Danger:"#CC0000",DangerMuted:"#884444"},Scrollbar:{Track:"#C0C0C0",Hover:"#A0A0A0"},Selection:{Background:"rgba(68, 68, 68, 0.2)"},Focus:{Outline:"#444444"},Syntax:{Keyword:"#7038A0",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#444444",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"'Segoe UI', system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#333333",Accent:"#444444",Muted:"#888888",Light:"#E8E8E8",WarmBeige:"#F0F0F0",TealTint:"#E0E0E0",Lavender:"#EBEBEB",AmberTint:"#F0EDE8",PdfFill:"#F0E0E0",PdfText:"#CC0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],183:[function(e,t,r){t.exports={Hash:"early-2000s",Name:"Early 2000s Web",Category:"Fun",Version:"0.0.1",Description:"Teal and silver, Web 2.0 Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#E8F4F8",Secondary:"#D0E8EE",Tertiary:"#C0DDE6",Panel:"#D8EEF2",Viewer:"#F0F8FA",Hover:"#B0D4E0",Selected:"#88C4D8",Thumb:"#D0E8EE"},Text:{Primary:"#1A3A4A",Secondary:"#2A4A5A",Muted:"#5A7A8A",Dim:"#7A9AAA",Placeholder:"#9ABACA"},Brand:{Accent:"#0099CC",AccentHover:"#00AADD"},Border:{Default:"#A0C8D8",Light:"#B8D8E4"},Status:{Danger:"#CC3300",DangerMuted:"#994422"},Scrollbar:{Track:"#A0C8D8",Hover:"#88B8CC"},Selection:{Background:"rgba(0, 153, 204, 0.2)"},Focus:{Outline:"#0099CC"},Syntax:{Keyword:"#1A4080",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#333333",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"Verdana, Geneva, Tahoma, sans-serif",Mono:"'Lucida Console', Monaco, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#2A4A5A",Accent:"#0099CC",Muted:"#7A9AAA",Light:"#C0DDE6",WarmBeige:"#D0E8EE",TealTint:"#B0D8E4",Lavender:"#C8DCE6",AmberTint:"#D8E0D0",PdfFill:"#E0C8C0",PdfText:"#CC3300"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],184:[function(e,t,r){t.exports={Hash:"evening",Name:"Evening",Category:"Grey",Version:"0.0.1",Description:"Medium grey, transitional Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#484848",Secondary:"#3C3C3C",Tertiary:"#424242",Panel:"#454545",Viewer:"#363636",Hover:"#525252",Selected:"#606060",Thumb:"#3C3C3C"},Text:{Primary:"#E0E0E0",Secondary:"#D0D0D0",Muted:"#A0A0A0",Dim:"#888888",Placeholder:"#707070"},Brand:{Accent:"#C0C0C0",AccentHover:"#E0E0E0"},Border:{Default:"#585858",Light:"#606060"},Status:{Danger:"#FF6666",DangerMuted:"#AA6666"},Scrollbar:{Track:"#585858",Hover:"#686868"},Selection:{Background:"rgba(192, 192, 192, 0.25)"},Focus:{Outline:"#C0C0C0"},Syntax:{Keyword:"#B894FF",String:"#A8D8B0",Number:"#FFB880",Comment:"#8A8A8A",Operator:"#7EC0FF",Punctuation:"#BBBBBB",Function:"#FFCC80",Variable:"#DDDDDD",Type:"#FFB880",Builtin:"#FFB880",Property:"#FF9494",Tag:"#FF9494",AttrName:"#FFB880",AttrValue:"#A8D8B0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0D0D0",Accent:"#C0C0C0",Muted:"#888888",Light:"#424242",WarmBeige:"#484848",TealTint:"#3E3E3E",Lavender:"#444444",AmberTint:"#4A4640",PdfFill:"#4A3C3C",PdfText:"#FF6666"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],185:[function(e,t,r){t.exports={Hash:"forest",Name:"Forest",Category:"Fun",Version:"0.0.1",Description:"Deep greens and earth browns Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A2018",Secondary:"#141A12",Tertiary:"#1E2620",Panel:"#1C221A",Viewer:"#101410",Hover:"#283828",Selected:"#344834",Thumb:"#141A12"},Text:{Primary:"#D0DCC8",Secondary:"#B0C4A8",Muted:"#809878",Dim:"#607858",Placeholder:"#486040"},Brand:{Accent:"#6AAF5C",AccentHover:"#88CC78"},Border:{Default:"#2A3A28",Light:"#3A4A38"},Status:{Danger:"#CC4422",DangerMuted:"#884422"},Scrollbar:{Track:"#2A3A28",Hover:"#3A4A38"},Selection:{Background:"rgba(106, 175, 92, 0.25)"},Focus:{Outline:"#6AAF5C"},Syntax:{Keyword:"#D4E157",String:"#A5D6A7",Number:"#FFB74D",Comment:"#5D6F58",Operator:"#80CBC4",Punctuation:"#A8C8A0",Function:"#FFCC80",Variable:"#C8E6C9",Type:"#FFB74D",Builtin:"#FFB74D",Property:"#FF8A65",Tag:"#FF8A65",AttrName:"#FFB74D",AttrValue:"#A5D6A7"}},Typography:{Family:{Sans:"'Palatino Linotype', 'Book Antiqua', Palatino, serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#B0C4A8",Accent:"#6AAF5C",Muted:"#607858",Light:"#1E2620",WarmBeige:"#22281E",TealTint:"#1A221A",Lavender:"#1E2420",AmberTint:"#262218",PdfFill:"#261A18",PdfText:"#CC4422"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],186:[function(e,t,r){t.exports={Hash:"hotdog",Name:"Hotdog",Category:"Fun",Version:"0.0.1",Description:"Red and mustard yellow, garish Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#8B0000",Secondary:"#6B0000",Tertiary:"#7B0000",Panel:"#750000",Viewer:"#550000",Hover:"#AA1111",Selected:"#BB3300",Thumb:"#6B0000"},Text:{Primary:"#FFD700",Secondary:"#FFC000",Muted:"#CC9900",Dim:"#AA7700",Placeholder:"#886600"},Brand:{Accent:"#FFD700",AccentHover:"#FFEE44"},Border:{Default:"#AA2222",Light:"#BB3333"},Status:{Danger:"#FFFF00",DangerMuted:"#CCCC00"},Scrollbar:{Track:"#AA2222",Hover:"#CC3333"},Selection:{Background:"rgba(255, 215, 0, 0.3)"},Focus:{Outline:"#FFD700"},Syntax:{Keyword:"#FFD800",String:"#FFFFFF",Number:"#FFD800",Comment:"#9C2828",Operator:"#FFD800",Punctuation:"#FFFFFF",Function:"#FFD800",Variable:"#FFFFFF",Type:"#FFD800",Builtin:"#FFD800",Property:"#FFD800",Tag:"#FFD800",AttrName:"#FFD800",AttrValue:"#FFFFFF"}},Typography:{Family:{Sans:"Impact, 'Arial Black', sans-serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#FFC000",Accent:"#FFD700",Muted:"#AA7700",Light:"#7B0000",WarmBeige:"#800000",TealTint:"#6B0000",Lavender:"#780000",AmberTint:"#7A1000",PdfFill:"#6B0000",PdfText:"#FFFF00"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],187:[function(e,t,r){t.exports={Hash:"mobile-debug",Name:"Mobile Container Debug",Category:"Debug",Version:"0.0.1",Description:"Unique color per container for layout debugging Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#FF0000",Secondary:"#00CCCC",Tertiary:"#00AA00",Panel:"#FFAA00",Viewer:"#333333",Hover:"rgba(255, 255, 255, 0.2)",Selected:"rgba(255, 255, 255, 0.3)",Thumb:"#AA00AA"},Text:{Primary:"#FFFFFF",Secondary:"#EEEEEE",Muted:"#CCCCCC",Dim:"#AAAAAA",Placeholder:"#888888"},Brand:{Accent:"#FFFF00",AccentHover:"#FFFF88"},Border:{Default:"#FFFFFF",Light:"#CCCCCC"},Status:{Danger:"#FF0000",DangerMuted:"#CC4444"},Scrollbar:{Track:"#888888",Hover:"#AAAAAA"},Selection:{Background:"rgba(255, 255, 0, 0.3)"},Focus:{Outline:"#FFFF00"},Syntax:{Keyword:"#A626A4",String:"#50A14F",Number:"#986801",Comment:"#A0A1A7",Operator:"#0184BC",Punctuation:"#383A42",Function:"#4078F2",Variable:"#383A42",Type:"#C18401",Builtin:"#986801",Property:"#E45649",Tag:"#E45649",AttrName:"#986801",AttrValue:"#50A14F"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#FFFFFF",Accent:"#FFFF00",Muted:"#CCCCCC",Light:"#333333",WarmBeige:"#FFAA00",TealTint:"#00CCCC",Lavender:"#AA00AA",AmberTint:"#FFAA00",PdfFill:"#FF4444",PdfText:"#FFFFFF"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],188:[function(e,t,r){t.exports={Hash:"neo-tokyo",Name:"Neo-Tokyo",Category:"Fun",Version:"0.0.1",Description:"Neon pink on dark navy Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0D0D2B",Secondary:"#080820",Tertiary:"#121235",Panel:"#0F0F28",Viewer:"#060615",Hover:"#1A1A42",Selected:"#2A1845",Thumb:"#080820"},Text:{Primary:"#E8E0F0",Secondary:"#D0C8E0",Muted:"#9088A8",Dim:"#6860A0",Placeholder:"#504888"},Brand:{Accent:"#FF2D8A",AccentHover:"#FF5AA0"},Border:{Default:"#2A2050",Light:"#382868"},Status:{Danger:"#FF4466",DangerMuted:"#AA3355"},Scrollbar:{Track:"#2A2050",Hover:"#3A3068"},Selection:{Background:"rgba(255, 45, 138, 0.25)"},Focus:{Outline:"#FF2D8A"},Syntax:{Keyword:"#FF4E9F",String:"#A1FFCE",Number:"#FFD93D",Comment:"#807A9E",Operator:"#7DF9FF",Punctuation:"#C0BCEB",Function:"#FFCC80",Variable:"#E0D8FF",Type:"#FFD93D",Builtin:"#FFD93D",Property:"#FF6E6E",Tag:"#FF6E6E",AttrName:"#FFD93D",AttrValue:"#A1FFCE"}},Typography:{Family:{Sans:"'Courier New', monospace",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0C8E0",Accent:"#FF2D8A",Muted:"#6860A0",Light:"#121235",WarmBeige:"#141438",TealTint:"#100E30",Lavender:"#141232",AmberTint:"#1A1228",PdfFill:"#1A1028",PdfText:"#FF4466"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],189:[function(e,t,r){t.exports={Hash:"night",Name:"Night",Category:"Grey",Version:"0.0.1",Description:"Near-black, minimal contrast Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0A0A0A",Secondary:"#060606",Tertiary:"#0E0E0E",Panel:"#0C0C0C",Viewer:"#040404",Hover:"#161616",Selected:"#252525",Thumb:"#060606"},Text:{Primary:"#888888",Secondary:"#707070",Muted:"#555555",Dim:"#444444",Placeholder:"#333333"},Brand:{Accent:"#666666",AccentHover:"#808080"},Border:{Default:"#1A1A1A",Light:"#222222"},Status:{Danger:"#AA4444",DangerMuted:"#663333"},Scrollbar:{Track:"#1A1A1A",Hover:"#2A2A2A"},Selection:{Background:"rgba(102, 102, 102, 0.2)"},Focus:{Outline:"#666666"},Syntax:{Keyword:"#C28FFF",String:"#B0E0B0",Number:"#FFA070",Comment:"#888888",Operator:"#80C8FF",Punctuation:"#BBBBBB",Function:"#FFD080",Variable:"#DDDDDD",Type:"#FFB870",Builtin:"#FFB870",Property:"#FF9090",Tag:"#FF9090",AttrName:"#FFB870",AttrValue:"#B0E0B0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#707070",Accent:"#666666",Muted:"#444444",Light:"#0E0E0E",WarmBeige:"#121212",TealTint:"#0C0C0C",Lavender:"#101010",AmberTint:"#141210",PdfFill:"#141010",PdfText:"#AA4444"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],190:[function(e,t,r){t.exports={Hash:"playground-corp",Name:"Playground Corp",Version:"0.0.1",Description:"A different paired starter — corporate teal palette, rounder corners.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#fbfbfd",Dark:"#0e1416"},Secondary:{Light:"#eef3f6",Dark:"#152024"},Tertiary:{Light:"#dde7ec",Dark:"#1e2c30"},Panel:{Light:"#ffffff",Dark:"#162126"},Hover:{Light:"#e5edf1",Dark:"#1d292e"}},Text:{Primary:{Light:"#0a1d22",Dark:"#e3edf0"},Secondary:{Light:"#3a5b65",Dark:"#a8c0c8"},Muted:{Light:"#647e87",Dark:"#7a929a"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Brand:{Primary:{Light:"#117a8b",Dark:"#3ec0d4"},PrimaryHover:{Light:"#0e6271",Dark:"#5fd0e0"},Accent:{Light:"#d97706",Dark:"#fb923c"}},Border:{Default:{Light:"#cfdce1",Dark:"#2c3a3f"},Strong:{Light:"#86a3ac",Dark:"#4d5e64"}},Status:{Success:{Light:"#0f7a52",Dark:"#34d399"},Warning:{Light:"#b45309",Dark:"#fbbf24"},Error:{Light:"#9f1239",Dark:"#fb7185"},Info:{Light:"#1e6fbe",Dark:"#60a5fa"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}}},Typography:{Family:{Sans:"Inter, system-ui, sans-serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{SM:"0.875rem",MD:"1rem",LG:"1.25rem"},Weight:{Regular:"400",Bold:"700"}},Spacing:{XS:"4px",SM:"8px",MD:"14px",LG:"20px",XL:"28px"},Radius:{SM:"4px",MD:"10px",LG:"16px"}},Brand:{Name:"Corp"},Aliases:{"--pict-modal-overlay-bg":"Color.Background.Tertiary","--pict-modal-bg":"Color.Background.Panel","--pict-modal-fg":"Color.Text.Primary","--pict-modal-border":"Color.Border.Default","--pict-modal-shadow":"Color.Border.Strong","--pict-modal-header-bg":"Color.Background.Secondary","--pict-modal-header-fg":"Color.Text.Primary","--pict-modal-header-border":"Color.Border.Default","--pict-modal-btn-bg":"Color.Background.Secondary","--pict-modal-btn-fg":"Color.Text.Primary","--pict-modal-btn-hover-bg":"Color.Background.Hover","--pict-modal-btn-primary-bg":"Color.Brand.Primary","--pict-modal-btn-primary-fg":"Color.Text.OnBrand","--pict-modal-btn-primary-hover-bg":"Color.Brand.PrimaryHover","--pict-modal-btn-danger-bg":"Color.Status.Error","--pict-modal-btn-danger-fg":"Color.Text.OnBrand","--pict-modal-btn-danger-hover-bg":"Color.Status.Error","--pict-modal-toast-bg":"Color.Background.Panel","--pict-modal-toast-fg":"Color.Text.Primary","--pict-modal-toast-shadow":"Color.Border.Strong","--pict-modal-toast-success-bg":"Color.Status.Success","--pict-modal-toast-error-bg":"Color.Status.Error","--pict-modal-toast-warning-bg":"Color.Status.Warning","--pict-modal-toast-info-bg":"Color.Status.Info","--pict-modal-tooltip-bg":"Color.Background.Tertiary","--pict-modal-tooltip-fg":"Color.Text.Primary","--pict-modal-font-family":"Typography.Family.Sans","--pict-um-bg":"Color.Background.Panel","--pict-um-fg":"Color.Text.Primary","--pict-um-muted":"Color.Text.Muted","--pict-um-accent":"Color.Brand.Primary","--pict-um-border":"Color.Border.Default","--pict-um-border-soft":"Color.Border.Light","--pict-um-input-bg":"Color.Background.Primary","--pict-um-pill-bg":"Color.Background.Tertiary","--pict-um-font":"Typography.Family.Sans"}}},{}],191:[function(e,t,r){t.exports={Hash:"playground-starter",Name:"Playground Starter",Version:"0.0.1",Description:"A complete paired light/dark starter theme. Edit any token and watch the gallery reflow.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#1a1a1a"},Secondary:{Light:"#f5f5f5",Dark:"#242424"},Tertiary:{Light:"#ebebeb",Dark:"#2e2e2e"},Panel:{Light:"#ffffff",Dark:"#222222"},Hover:{Light:"#f0f0f0",Dark:"#2a2a2a"}},Text:{Primary:{Light:"#1a1a1a",Dark:"#ededed"},Secondary:{Light:"#454545",Dark:"#bdbdbd"},Muted:{Light:"#6b6b6b",Dark:"#888888"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Brand:{Primary:{Light:"#3357c7",Dark:"#6b8eff"},PrimaryHover:{Light:"#2848b3",Dark:"#88a4ff"},Accent:{Light:"#c75033",Dark:"#ff8a6b"}},Border:{Default:{Light:"#d6d6d6",Dark:"#3a3a3a"},Strong:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Status:{Success:{Light:"#2e7a3a",Dark:"#5fc377"},Warning:{Light:"#a86b00",Dark:"#f0b84a"},Error:{Light:"#b62828",Dark:"#ff7373"},Info:{Light:"#1f6fb5",Dark:"#5fb4ff"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}}},Typography:{Family:{Sans:"system-ui, -apple-system, Segoe UI, Roboto, sans-serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{SM:"0.875rem",MD:"1rem",LG:"1.25rem"},Weight:{Regular:"400",Bold:"700"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px"},Radius:{SM:"2px",MD:"6px",LG:"10px"}},Brand:{Name:"Playground"},Aliases:{"--pict-modal-overlay-bg":"Color.Background.Tertiary","--pict-modal-bg":"Color.Background.Panel","--pict-modal-fg":"Color.Text.Primary","--pict-modal-border":"Color.Border.Default","--pict-modal-shadow":"Color.Border.Strong","--pict-modal-header-bg":"Color.Background.Secondary","--pict-modal-header-fg":"Color.Text.Primary","--pict-modal-header-border":"Color.Border.Default","--pict-modal-btn-bg":"Color.Background.Secondary","--pict-modal-btn-fg":"Color.Text.Primary","--pict-modal-btn-hover-bg":"Color.Background.Hover","--pict-modal-btn-primary-bg":"Color.Brand.Primary","--pict-modal-btn-primary-fg":"Color.Text.OnBrand","--pict-modal-btn-primary-hover-bg":"Color.Brand.PrimaryHover","--pict-modal-btn-danger-bg":"Color.Status.Error","--pict-modal-btn-danger-fg":"Color.Text.OnBrand","--pict-modal-btn-danger-hover-bg":"Color.Status.Error","--pict-modal-toast-bg":"Color.Background.Panel","--pict-modal-toast-fg":"Color.Text.Primary","--pict-modal-toast-shadow":"Color.Border.Strong","--pict-modal-toast-success-bg":"Color.Status.Success","--pict-modal-toast-error-bg":"Color.Status.Error","--pict-modal-toast-warning-bg":"Color.Status.Warning","--pict-modal-toast-info-bg":"Color.Status.Info","--pict-modal-tooltip-bg":"Color.Background.Tertiary","--pict-modal-tooltip-fg":"Color.Text.Primary","--pict-modal-font-family":"Typography.Family.Sans","--pict-um-bg":"Color.Background.Panel","--pict-um-fg":"Color.Text.Primary","--pict-um-muted":"Color.Text.Muted","--pict-um-accent":"Color.Brand.Primary","--pict-um-border":"Color.Border.Default","--pict-um-border-soft":"Color.Border.Light","--pict-um-input-bg":"Color.Background.Primary","--pict-um-pill-bg":"Color.Background.Tertiary","--pict-um-font":"Typography.Family.Sans"}}},{}],192:[function(e,t,r){t.exports={Hash:"retold-content-system",Name:"Retold Content System",Version:"0.0.1",Description:"Default palette for the Retold Content System editor — warm beige with teal accents. Light side preserves the original retold-content-system.css palette verbatim; dark side keeps the teal accent and warms the backgrounds into a deep walnut/charcoal range so dark mode reads as the same family of values rather than a generic dark theme.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#F5F3EE",Dark:"#1F1B17"},Secondary:{Light:"#FAF8F4",Dark:"#2A251F"},Tertiary:{Light:"#F0EDE8",Dark:"#332D26"},Panel:{Light:"#FFFFFF",Dark:"#26221C"},Hover:{Light:"#EDE9E3",Dark:"#383028"},Selected:{Light:"#DCE9E7",Dark:"#1E3833"}},Text:{Primary:{Light:"#3D3229",Dark:"#E8DCC8"},Secondary:{Light:"#5E5549",Dark:"#C0B5A4"},Muted:{Light:"#8A7F72",Dark:"#8E8478"},Placeholder:{Light:"#A89E91",Dark:"#6E6457"},OnBrand:{Light:"#FFFFFF",Dark:"#1F1B17"}},Brand:{Primary:{Light:"#2E7D74",Dark:"#4FB3A6"},PrimaryHover:{Light:"#3A9E92",Dark:"#65CBBE"},Accent:{Light:"#2E7D74",Dark:"#4FB3A6"},AccentHover:{Light:"#3A9E92",Dark:"#65CBBE"}},Border:{Default:{Light:"#DDD6CA",Dark:"#3F362C"},Light:{Light:"#E8E2D7",Dark:"#33291F"},Strong:{Light:"#C4BDB0",Dark:"#5A4F40"}},Status:{Success:{Light:"#7BC47F",Dark:"#8FD493"},Warning:{Light:"#E8A94D",Dark:"#F0BE6E"},Error:{Light:"#D9534F",Dark:"#E87B78"},Info:{Light:"#5DA6C7",Dark:"#7FBDD8"}},Scrollbar:{Track:{Light:"#F5F0E8",Dark:"#26221C"},Thumb:{Light:"#C4BDB0",Dark:"#4A4036"},Hover:{Light:"#8A7F72",Dark:"#6A5F50"}},Selection:{Background:{Light:"#CDE3E0",Dark:"#2E5B55"},Text:{Light:"#3D3229",Dark:"#E8DCC8"}},Focus:{Outline:{Light:"#2E7D74",Dark:"#4FB3A6"}},Shadow:{Color:{Light:"rgba(61, 50, 41, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#A0532E",Dark:"#E89A6E"},String:{Light:"#3F8A52",Dark:"#8FD493"},Number:{Light:"#A86B00",Dark:"#E8A94D"},Comment:{Light:"#8A7F72",Dark:"#8E8478"},Operator:{Light:"#2E7D74",Dark:"#4FB3A6"},Punctuation:{Light:"#5E5549",Dark:"#C0B5A4"},Function:{Light:"#2E5E96",Dark:"#7FBDD8"},Variable:{Light:"#3D3229",Dark:"#E8DCC8"},Type:{Light:"#A86B00",Dark:"#E8A94D"},Builtin:{Light:"#A86B00",Dark:"#E8A94D"},Property:{Light:"#A0532E",Dark:"#E89A6E"},Tag:{Light:"#A0532E",Dark:"#E89A6E"},AttrName:{Light:"#A86B00",Dark:"#E8A94D"},AttrValue:{Light:"#3F8A52",Dark:"#8FD493"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"250px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"Retold Content",Tagline:"Author content for the Retold ecosystem."}}},{}],193:[function(e,t,r){t.exports={Hash:"retold-default",Name:"Retold Default",Version:"0.0.1",Description:"The reference paired light/dark theme for the Retold ecosystem. Neutral palette suitable for any app; dark mode is mid-grey rather than pure black to reduce eye strain.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#1a1a1a"},Secondary:{Light:"#f5f5f5",Dark:"#242424"},Tertiary:{Light:"#ebebeb",Dark:"#2e2e2e"},Panel:{Light:"#ffffff",Dark:"#222222"},Hover:{Light:"#f0f0f0",Dark:"#2a2a2a"},Selected:{Light:"#e0eaff",Dark:"#2a3550"}},Text:{Primary:{Light:"#1a1a1a",Dark:"#ededed"},Secondary:{Light:"#454545",Dark:"#bdbdbd"},Muted:{Light:"#6b6b6b",Dark:"#888888"},Placeholder:{Light:"#9a9a9a",Dark:"#6a6a6a"}},Brand:{Primary:{Light:"#3357c7",Dark:"#6b8eff"},PrimaryHover:{Light:"#2848b3",Dark:"#88a4ff"},Accent:{Light:"#c75033",Dark:"#ff8a6b"}},Border:{Default:{Light:"#d6d6d6",Dark:"#3a3a3a"},Light:{Light:"#e9e9e9",Dark:"#2c2c2c"},Strong:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Status:{Success:{Light:"#2e7a3a",Dark:"#5fc377"},Warning:{Light:"#a86b00",Dark:"#f0b84a"},Error:{Light:"#b62828",Dark:"#ff7373"},Info:{Light:"#1f6fb5",Dark:"#5fb4ff"}},Scrollbar:{Track:{Light:"#ebebeb",Dark:"#1f1f1f"},Thumb:{Light:"#c2c2c2",Dark:"#3f3f3f"},Hover:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Selection:{Background:{Light:"#bcd2ff",Dark:"#3a4f7a"},Text:{Light:"#1a1a1a",Dark:"#ededed"}},Focus:{Outline:{Light:"#3357c7",Dark:"#6b8eff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}},Editor:{LineNumberBackground:{Light:"#f5f5f5",Dark:"#1f1f1f"},LineNumberText:{Light:"#9a9a9a",Dark:"#6a6a6a"},CurrentLineHighlight:{Light:"#f0f0f0",Dark:"#2a2a2a"},SelectionBackground:{Light:"#bcd2ff",Dark:"#3a4f7a"},GutterBorder:{Light:"#e9e9e9",Dark:"#2c2c2c"}}},Typography:{Family:{Sans:"system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif",Serif:"Georgia, Cambria, Times New Roman, Times, serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.45",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Shadow:{SM:"0 1px 2px var(--theme-color-shadow-color)",MD:"0 2px 6px var(--theme-color-shadow-color)",LG:"0 6px 18px var(--theme-color-shadow-color)"},ZIndex:{Base:"0",Dropdown:"100",Sticky:"200",Overlay:"900",Modal:"1000",Toast:"2000",Tooltip:"3000"},Duration:{Fast:"100ms",Normal:"200ms",Slow:"400ms"}},Brand:{Name:"Retold",Tagline:"A suite of JavaScript modules for building web applications and APIs."},CSS:[{Hash:"retold-default-brand-accents",Priority:600,Content:"/* retold-default — subtle brand-aware accents.\n Falls back gracefully to theme-color tokens when no brand is registered,\n so non-branded apps still look right. */\na { text-decoration-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, currentColor)); text-decoration-thickness: 2px; text-underline-offset: 3px; }\nh1 { border-bottom: 2px solid var(--brand-color-primary-mode, var(--theme-color-border-default, transparent)); padding-bottom: 6px; }\nh2 { border-bottom: 1px solid var(--brand-color-secondary-mode, var(--theme-color-border-light, transparent)); padding-bottom: 4px; }"}]}},{}],194:[function(e,t,r){t.exports={Hash:"retold-manager",Name:"Retold Manager",Description:"Default palette for the Retold Manager application — GitHub-style dark on slate with a parallel light variant. Dark side mirrors retold-manager.css's original colors verbatim; light side is a sympathetic translation tuned for daytime use. The retold-manager.css :root block proxies its --color-* names through these --theme-color-* tokens (with the original hexes as fallbacks), so this theme drives the whole app cleanly and other catalog themes still skin most of it.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#f6f8fa",Dark:"#0e1116"},Secondary:{Light:"#eef1f4",Dark:"#161b22"},Tertiary:{Light:"#e4e8ec",Dark:"#1c2128"},Panel:{Light:"#ffffff",Dark:"#161b22"},PanelAlt:{Light:"#f0f3f6",Dark:"#1c2128"},Hover:{Light:"#eaeef2",Dark:"#1c2128"},Selected:{Light:"#dbe7ff",Dark:"#243454"}},Border:{Default:{Light:"#d0d7de",Dark:"#30363d"},Light:{Light:"#e1e4e8",Dark:"#21262d"},Strong:{Light:"#a8b1bb",Dark:"#484f58"}},Brand:{Primary:{Light:"#0969da",Dark:"#2f81f7"},PrimaryHover:{Light:"#0550ae",Dark:"#1f6feb"},Accent:{Light:"#0969da",Dark:"#2f81f7"},AccentHover:{Light:"#0550ae",Dark:"#1f6feb"}},Text:{Primary:{Light:"#1f2328",Dark:"#e6edf3"},Secondary:{Light:"#3b424a",Dark:"#c9d1d9"},Muted:{Light:"#656d76",Dark:"#8b949e"},Placeholder:{Light:"#8c959f",Dark:"#6e7681"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Status:{Success:{Light:"#1a7f37",Dark:"#3fb950"},Danger:{Light:"#cf222e",Dark:"#f85149"},Warning:{Light:"#9a6700",Dark:"#d29922"},Error:{Light:"#cf222e",Dark:"#f85149"},Info:{Light:"#0969da",Dark:"#2f81f7"}},Scrollbar:{Track:{Light:"#eef1f4",Dark:"#161b22"},Thumb:{Light:"#c1c8cf",Dark:"#30363d"},Hover:{Light:"#a8b1bb",Dark:"#484f58"}},Selection:{Background:{Light:"#cfe6ff",Dark:"#243454"},Text:{Light:"#1f2328",Dark:"#e6edf3"}},Focus:{Outline:{Light:"#0969da",Dark:"#2f81f7"}},Syntax:{Keyword:{Light:"#cf222e",Dark:"#ff7b72"},String:{Light:"#0a3069",Dark:"#a5d6ff"},Number:{Light:"#0550ae",Dark:"#79c0ff"},Comment:{Light:"#6e7781",Dark:"#8b949e"},Operator:{Light:"#cf222e",Dark:"#ff7b72"},Punctuation:{Light:"#24292f",Dark:"#c9d1d9"},Function:{Light:"#8250df",Dark:"#d2a8ff"},Variable:{Light:"#24292f",Dark:"#c9d1d9"},Type:{Light:"#953800",Dark:"#ffa657"},Builtin:{Light:"#0550ae",Dark:"#79c0ff"},Property:{Light:"#0550ae",Dark:"#79c0ff"},Tag:{Light:"#116329",Dark:"#7ee787"},AttrName:{Light:"#8250df",Dark:"#d2a8ff"},AttrValue:{Light:"#0a3069",Dark:"#a5d6ff"}}},Typography:{Family:{Sans:'-apple-system, BlinkMacSystemFont, "SF Pro", "Segoe UI", sans-serif',Mono:'ui-monospace, "SF Mono", Menlo, Monaco, "Courier New", monospace'}},Layout:{SidebarWidth:"280px",TopbarHeight:"44px",StatusbarHeight:"28px"}}}},{}],195:[function(e,t,r){t.exports={Hash:"retold-mono",Name:"Retold Mono",Version:"0.0.2",Description:"High-contrast monochrome theme — black on white in light mode, white on black in dark mode. Useful for print, simple admin tooling, and as a paired-mode reference theme that proves the toggle works on something visually unmistakable.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#000000"},Secondary:{Light:"#f0f0f0",Dark:"#101010"},Tertiary:{Light:"#e2e2e2",Dark:"#1c1c1c"},Panel:{Light:"#ffffff",Dark:"#000000"},Hover:{Light:"#ebebeb",Dark:"#1a1a1a"},Selected:{Light:"#d6d6d6",Dark:"#2a2a2a"}},Text:{Primary:{Light:"#000000",Dark:"#ffffff"},Secondary:{Light:"#222222",Dark:"#dddddd"},Muted:{Light:"#555555",Dark:"#aaaaaa"},Placeholder:{Light:"#888888",Dark:"#777777"}},Brand:{Primary:{Light:"#000000",Dark:"#ffffff"},PrimaryHover:{Light:"#222222",Dark:"#dddddd"},Accent:{Light:"#444444",Dark:"#bbbbbb"}},Border:{Default:{Light:"#888888",Dark:"#666666"},Light:{Light:"#cccccc",Dark:"#333333"},Strong:{Light:"#000000",Dark:"#ffffff"}},Status:{Success:{Light:"#000000",Dark:"#ffffff"},Warning:{Light:"#000000",Dark:"#ffffff"},Error:{Light:"#000000",Dark:"#ffffff"},Info:{Light:"#000000",Dark:"#ffffff"}},Scrollbar:{Track:{Light:"#e0e0e0",Dark:"#101010"},Thumb:{Light:"#888888",Dark:"#666666"},Hover:{Light:"#444444",Dark:"#bbbbbb"}},Selection:{Background:{Light:"#000000",Dark:"#ffffff"},Text:{Light:"#ffffff",Dark:"#000000"}},Focus:{Outline:{Light:"#000000",Dark:"#ffffff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.18)",Dark:"rgba(255, 255, 255, 0.18)"}},Syntax:{Keyword:{Light:"#000000",Dark:"#ffffff"},String:{Light:"#555555",Dark:"#cccccc"},Number:{Light:"#000000",Dark:"#ffffff"},Comment:{Light:"#888888",Dark:"#888888"},Operator:{Light:"#000000",Dark:"#ffffff"},Punctuation:{Light:"#444444",Dark:"#bbbbbb"},Function:{Light:"#000000",Dark:"#ffffff"},Variable:{Light:"#000000",Dark:"#ffffff"},Type:{Light:"#222222",Dark:"#dddddd"},Builtin:{Light:"#222222",Dark:"#dddddd"},Property:{Light:"#444444",Dark:"#bbbbbb"},Tag:{Light:"#000000",Dark:"#ffffff"},AttrName:{Light:"#444444",Dark:"#bbbbbb"},AttrValue:{Light:"#555555",Dark:"#cccccc"}}},Typography:{Family:{Sans:"Helvetica, Arial, sans-serif",Serif:"Georgia, Times New Roman, serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"600",Bold:"700"},LineHeight:{Tight:"1.15",Normal:"1.4",Loose:"1.65"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"0",MD:"0",LG:"0",XL:"0",Pill:"999px"},Shadow:{SM:"0 1px 0 var(--theme-color-shadow-color)",MD:"0 2px 0 var(--theme-color-shadow-color)",LG:"0 4px 0 var(--theme-color-shadow-color)"},ZIndex:{Base:"0",Dropdown:"100",Sticky:"200",Overlay:"900",Modal:"1000",Toast:"2000",Tooltip:"3000"},Duration:{Fast:"0ms",Normal:"0ms",Slow:"0ms"}},Brand:{Name:"Retold Mono",Tagline:"Black on white. White on black. Nothing else."},CSS:[{Hash:"retold-mono-brand-accents",Priority:600,Content:"/* retold-mono — keeps the all-monochrome aesthetic but lets brand colors\n in for narrow accent moments. The thick rule under H1 is brand primary;\n the hair rule under H2 is brand secondary. Without a brand registered\n they fall back to mono black/grey. */\na { text-decoration-color: var(--brand-color-primary-mode, currentColor); text-decoration-thickness: 2px; text-underline-offset: 3px; }\nh1 { border-bottom: 3px solid var(--brand-color-primary-mode, var(--theme-color-text-primary, #000)); padding-bottom: 6px; }\nh2 { border-bottom: 1px solid var(--brand-color-secondary-mode, var(--theme-color-border-default, #888)); padding-bottom: 4px; }"}]}},{}],196:[function(e,t,r){t.exports={Hash:"solarized-dark",Name:"Solarized Dark",Category:"Fun",Version:"0.0.1",Description:"Schoonover's classic palette Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#002B36",Secondary:"#073642",Tertiary:"#003B4A",Panel:"#00303C",Viewer:"#001E28",Hover:"#0A4858",Selected:"#155868",Thumb:"#073642"},Text:{Primary:"#FDF6E3",Secondary:"#EEE8D5",Muted:"#93A1A1",Dim:"#839496",Placeholder:"#657B83"},Brand:{Accent:"#268BD2",AccentHover:"#45A0E0"},Border:{Default:"#0A4050",Light:"#125868"},Status:{Danger:"#DC322F",DangerMuted:"#AA2A28"},Scrollbar:{Track:"#0A4050",Hover:"#125868"},Selection:{Background:"rgba(38, 139, 210, 0.25)"},Focus:{Outline:"#268BD2"},Syntax:{Keyword:"#859900",String:"#2AA198",Number:"#D33682",Comment:"#586E75",Operator:"#268BD2",Punctuation:"#93A1A1",Function:"#B58900",Variable:"#FDF6E3",Type:"#B58900",Builtin:"#CB4B16",Property:"#268BD2",Tag:"#268BD2",AttrName:"#B58900",AttrValue:"#2AA198"}},Typography:{Family:{Sans:"'Source Code Pro', 'Fira Code', monospace",Mono:"'Source Code Pro', 'Fira Code', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#EEE8D5",Accent:"#268BD2",Muted:"#839496",Light:"#003B4A",WarmBeige:"#073642",TealTint:"#004050",Lavender:"#003848",AmberTint:"#0A3A30",PdfFill:"#0A3028",PdfText:"#DC322F"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],197:[function(e,t,r){t.exports={Hash:"synthwave",Name:"Synthwave",Category:"Fun",Version:"0.0.1",Description:"Purple and pink neon Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A0A2E",Secondary:"#140824",Tertiary:"#200E38",Panel:"#1C0C32",Viewer:"#100620",Hover:"#2A1848",Selected:"#3A2060",Thumb:"#140824"},Text:{Primary:"#E8C0F8",Secondary:"#D0A8E8",Muted:"#9878B8",Dim:"#7858A8",Placeholder:"#584088"},Brand:{Accent:"#FF71CE",AccentHover:"#FF99DD"},Border:{Default:"#302050",Light:"#402868"},Status:{Danger:"#FF4488",DangerMuted:"#AA3366"},Scrollbar:{Track:"#302050",Hover:"#402868"},Selection:{Background:"rgba(255, 113, 206, 0.25)"},Focus:{Outline:"#FF71CE"},Syntax:{Keyword:"#FF6AD5",String:"#FFE066",Number:"#FF6AD5",Comment:"#9C8AC1",Operator:"#26F0F1",Punctuation:"#C8B6E2",Function:"#26F0F1",Variable:"#FFE0FF",Type:"#FFD93D",Builtin:"#FFD93D",Property:"#FF477E",Tag:"#FF477E",AttrName:"#FFD93D",AttrValue:"#FFE066"}},Typography:{Family:{Sans:"'Trebuchet MS', sans-serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0A8E8",Accent:"#FF71CE",Muted:"#7858A8",Light:"#200E38",WarmBeige:"#221040",TealTint:"#1A0C30",Lavender:"#1E0E36",AmberTint:"#241028",PdfFill:"#241020",PdfText:"#FF4488"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],198:[function(e,t,r){t.exports={Hash:"twilight",Name:"Twilight",Category:"Grey",Version:"0.0.1",Description:"Dark grey, low light. Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format. Single-mode (no light/dark bifurcation). Aliases preserve the legacy `--retold-*` variable names so existing CSS keeps working through the migration.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1E1E1E",Secondary:"#181818",Tertiary:"#252525",Panel:"#202020",Viewer:"#141414",Hover:"#2E2E2E",Selected:"#404040",Thumb:"#181818"},Text:{Primary:"#E0E0E0",Secondary:"#C8C8C8",Muted:"#909090",Dim:"#707070",Placeholder:"#585858"},Brand:{Accent:"#A0A0A0",AccentHover:"#C0C0C0"},Border:{Default:"#333333",Light:"#404040"},Status:{Danger:"#FF6666",DangerMuted:"#AA6666"},Scrollbar:{Track:"#404040",Hover:"#505050"},Selection:{Background:"rgba(160, 160, 160, 0.25)"},Focus:{Outline:"#A0A0A0"},Syntax:{Keyword:"#B58FFF",String:"#9CDFB0",Number:"#FFB870",Comment:"#6E6E6E",Operator:"#7CC5FF",Punctuation:"#C0C0C0",Function:"#FFD080",Variable:"#E0E0E0",Type:"#FFB870",Builtin:"#FFB870",Property:"#FF8B8B",Tag:"#FF8B8B",AttrName:"#FFB870",AttrValue:"#9CDFB0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#C8C8C8",Accent:"#A0A0A0",Muted:"#707070",Light:"#252525",WarmBeige:"#2A2A2A",TealTint:"#222222",Lavender:"#282828",AmberTint:"#2E2A24",PdfFill:"#2E2224",PdfText:"#E06060"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],199:[function(e,t,r){t.exports={Hash:"ultravisor-desert-canyon",Name:"Ultravisor — Desert Canyon",Version:"0.0.1",Description:"Vibrant desert palette — orange brand and teal accents on deep canyon-brown backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#18120e",Secondary:"#221a14",Tertiary:"#2e2018",Panel:"#221a14",Hover:"#3a2a1e",Selected:"#3a2a1e"},Text:{Primary:"#d8c8b0",Secondary:"#e8d8c0",Muted:"#a09080",Placeholder:"#685040",OnBrand:"#18120e"},Brand:{Primary:"#e8943a",PrimaryHover:"#f0a44a",Accent:"#18a0a0",AccentHover:"#30b0b0"},Border:{Default:"#3a2a1e",Light:"#2e2018",Strong:"#4a3a2e"},Status:{Success:"#18a0a0",Warning:"#e0c870",Error:"#e05830",Info:"#18a0a0"},Scrollbar:{Track:"#221a14",Thumb:"#3a2a1e",Hover:"#4a3a2e"},Selection:{Background:"#3a2a1e",Text:"#e8d8c0"},Focus:{Outline:"#e8943a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#221a14",LineNumberText:"#685040",CurrentLineHighlight:"#2e2018",SelectionBackground:"#3a2a1e",GutterBorder:"#2e2018"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],200:[function(e,t,r){t.exports={Hash:"ultravisor-desert-day",Name:"Ultravisor — Desert Day",Version:"0.0.1",Description:"Ultravisor's warm light palette — cream backgrounds, deep walnut text, teal accents. Single-mode light.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#faf6f0",Secondary:"#f0e6d6",Tertiary:"#e8ddd0",Panel:"#ffffff",Hover:"#f0e6d6",Selected:"#e8ddd0"},Text:{Primary:"#3d2b1f",Secondary:"#2e1e14",Muted:"#8a7560",Placeholder:"#a09080",OnBrand:"#ffffff"},Brand:{Primary:"#5c3d2e",PrimaryHover:"#7a5040",Accent:"#3a8a8c",AccentHover:"#2a7070"},Border:{Default:"#e0d0b8",Light:"#e8ddd0",Strong:"#c8b8a0"},Status:{Success:"#5a7a30",Warning:"#b08020",Error:"#a03040",Info:"#3a8a8c"},Scrollbar:{Track:"#f0e6d6",Thumb:"#d0c0a8",Hover:"#c0b098"},Selection:{Background:"#e8ddd0",Text:"#2e1e14"},Focus:{Outline:"#c2703e"},Shadow:{Color:"rgba(92, 61, 46, 0.10)"},Syntax:{Keyword:"#A0532E",String:"#3F8A52",Number:"#A86B00",Comment:"#8A7F72",Operator:"#2E7D74",Punctuation:"#5E5549",Function:"#2E5E96",Variable:"#3D3229",Type:"#A86B00",Builtin:"#A86B00",Property:"#A0532E",Tag:"#A0532E",AttrName:"#A86B00",AttrValue:"#3F8A52"},Editor:{LineNumberBackground:"#f0e6d6",LineNumberText:"#a09080",CurrentLineHighlight:"#f5ede0",SelectionBackground:"#e8ddd0",GutterBorder:"#e0d0b8"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],201:[function(e,t,r){t.exports={Hash:"ultravisor-desert-dusk",Name:"Ultravisor — Desert Dusk",Version:"0.0.1",Description:"Ultravisor's original default — warm tan brand on muted dark desert backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1a1714",Secondary:"#252018",Tertiary:"#302818",Panel:"#252018",Hover:"#3a3028",Selected:"#3a3028"},Text:{Primary:"#c8b8a0",Secondary:"#d8c8a8",Muted:"#907860",Placeholder:"#706050",OnBrand:"#FFFFFF"},Brand:{Primary:"#c4956a",PrimaryHover:"#d4a57a",Accent:"#4a9090",AccentHover:"#5aacac"},Border:{Default:"#3a3028",Light:"#302818",Strong:"#4a4038"},Status:{Success:"#8a9a5a",Warning:"#c0a050",Error:"#b04050",Info:"#4a9090"},Scrollbar:{Track:"#252018",Thumb:"#3a3028",Hover:"#4a4038"},Selection:{Background:"#3a3028",Text:"#d8c8a8"},Focus:{Outline:"#c4956a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#252018",LineNumberText:"#706050",CurrentLineHighlight:"#302818",SelectionBackground:"#3a3028",GutterBorder:"#302818"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],202:[function(e,t,r){t.exports={Hash:"ultravisor-desert-sunset",Name:"Ultravisor — Desert Sunset",Version:"0.0.1",Description:"Ultravisor's golden-hour palette — orange brand on rust-warmed dark backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1e1610",Secondary:"#2a2018",Tertiary:"#342818",Panel:"#2a2018",Hover:"#3a2e22",Selected:"#3a2e22"},Text:{Primary:"#d4c4aa",Secondary:"#e0d0b8",Muted:"#8a7560",Placeholder:"#6a5840",OnBrand:"#1e1610"},Brand:{Primary:"#e8943a",PrimaryHover:"#f0a44a",Accent:"#2a8a8a",AccentHover:"#3a9a9a"},Border:{Default:"#3a2e22",Light:"#342818",Strong:"#4a3e32"},Status:{Success:"#6a9a3a",Warning:"#d4a46a",Error:"#c44e2a",Info:"#2a8a8a"},Scrollbar:{Track:"#2a2018",Thumb:"#3a2e22",Hover:"#4a3e32"},Selection:{Background:"#3a2e22",Text:"#e0d0b8"},Focus:{Outline:"#e8943a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#2a2018",LineNumberText:"#6a5840",CurrentLineHighlight:"#342818",SelectionBackground:"#3a2e22",GutterBorder:"#342818"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],203:[function(e,t,r){t.exports={Hash:"ultravisor-professional-dark",Name:"Ultravisor — Professional Dark",Version:"0.0.1",Description:"Dark modern palette — slate-blue text on inky surfaces, sky-blue brand. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#111318",Secondary:"#1a1d24",Tertiary:"#22252e",Panel:"#1a1d24",Hover:"#282c34",Selected:"#282c34"},Text:{Primary:"#c8cdd5",Secondary:"#e0e4ea",Muted:"#8b92a0",Placeholder:"#5a6070",OnBrand:"#ffffff"},Brand:{Primary:"#60a5fa",PrimaryHover:"#93c5fd",Accent:"#60a5fa",AccentHover:"#93c5fd"},Border:{Default:"#282c34",Light:"#22252e",Strong:"#3a3f4a"},Status:{Success:"#34d399",Warning:"#fbbf24",Error:"#f87171",Info:"#60a5fa"},Scrollbar:{Track:"#1a1d24",Thumb:"#282c34",Hover:"#3a3f4a"},Selection:{Background:"#1e2230",Text:"#e0e4ea"},Focus:{Outline:"#60a5fa"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#1a1d24",LineNumberText:"#5a6070",CurrentLineHighlight:"#22252e",SelectionBackground:"#1e2230",GutterBorder:"#22252e"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],204:[function(e,t,r){t.exports={Hash:"ultravisor-professional-light",Name:"Ultravisor — Professional Light",Version:"0.0.1",Description:"Bright modern palette — slate text on near-white backgrounds, royal-blue brand. Single-mode light.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#f5f6f8",Secondary:"#ffffff",Tertiary:"#e4e7ec",Panel:"#ffffff",Hover:"#f0f1f4",Selected:"#e4e7ec"},Text:{Primary:"#2d3748",Secondary:"#1a202c",Muted:"#6b7280",Placeholder:"#9ca3af",OnBrand:"#ffffff"},Brand:{Primary:"#3b82f6",PrimaryHover:"#2563eb",Accent:"#3b82f6",AccentHover:"#2563eb"},Border:{Default:"#e2e5ea",Light:"#eceef2",Strong:"#c8cdd5"},Status:{Success:"#10b981",Warning:"#f59e0b",Error:"#ef4444",Info:"#3b82f6"},Scrollbar:{Track:"#f0f1f4",Thumb:"#d1d5db",Hover:"#b0b5bd"},Selection:{Background:"#dbeafe",Text:"#1a202c"},Focus:{Outline:"#3b82f6"},Shadow:{Color:"rgba(0, 0, 0, 0.06)"},Syntax:{Keyword:"#A0532E",String:"#3F8A52",Number:"#A86B00",Comment:"#8A7F72",Operator:"#2E7D74",Punctuation:"#5E5549",Function:"#2E5E96",Variable:"#3D3229",Type:"#A86B00",Builtin:"#A86B00",Property:"#A0532E",Tag:"#A0532E",AttrName:"#A86B00",AttrValue:"#3F8A52"},Editor:{LineNumberBackground:"#f5f6f8",LineNumberText:"#9ca3af",CurrentLineHighlight:"#f0f1f4",SelectionBackground:"#dbeafe",GutterBorder:"#e2e5ea"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],205:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}onAfterRender(e,t,r,n){if(this.pict.CSSMap.injectCSS(),"undefined"!=typeof document&&this.options.Height){let e=document.querySelector(".pict-theme-bottombar");e&&(e.style.minHeight=this.options.Height+"px")}let o=e=>{if(!e)return;let t=this.pict.views[e];t?t.render():this.log&&this.log.warn&&this.log.warn('Theme-BottomBar: slot view "'+e+'" not registered')};return o(this.options.StatusView),o(this.options.InfoView),o(this.options.ActionsView),super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}setStatusView(e){this._setSlotView("StatusView","#Theme-BottomBar-Status",e)}setInfoView(e){this._setSlotView("InfoView","#Theme-BottomBar-Info",e)}setActionsView(e){this._setSlotView("ActionsView","#Theme-BottomBar-Actions",e)}_setSlotView(e,t,r){if(this.options[e]=r||null,"undefined"!=typeof document){let e=document.querySelector(t);e&&(e.innerHTML="")}if(!r)return;let n=this.pict.views[r];n?n.render():this.log&&this.log.warn&&this.log.warn('Theme-BottomBar: view "'+r+'" not registered')}},t.exports.default_configuration={ViewIdentifier:"Theme-BottomBar",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-BottomBar",DefaultRenderable:"Theme-BottomBar-Renderable",StatusView:null,InfoView:null,ActionsView:null,Height:32,Templates:[{Hash:"Theme-BottomBar-Template",Template:'\n<div class="pict-theme-bottombar">\n\t<div class="pict-theme-bottombar-status" id="Theme-BottomBar-Status"></div>\n\t<div class="pict-theme-bottombar-info" id="Theme-BottomBar-Info"></div>\n\t<div class="pict-theme-bottombar-actions" id="Theme-BottomBar-Actions"></div>\n</div>'}],Renderables:[{RenderableHash:"Theme-BottomBar-Renderable",TemplateHash:"Theme-BottomBar-Template",ContentDestinationAddress:"#Theme-BottomBar",RenderMethod:"replace"}],CSS:"\n.pict-theme-bottombar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\t/* The min-height is rewritten per-instance in onAfterRender from the\n\t Height option (default 32). A fixed px value avoids the\n\t percent-height resolution trap the pict-section-modal shell sets\n\t up — see the comment on Theme-TopBar's CSS for the full story. */\n\tmin-height: 32px;\n\tpadding: 0 14px;\n\tbox-sizing: border-box;\n\tbackground: var(--theme-color-background-secondary, transparent);\n\tfont-size: var(--theme-typography-size-xs, 12px);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\t/* Single medium brand-primary stripe at the top of the bottombar.\n\t The topbar carries the full two-stripe identifier; on the\n\t bottombar (which is only 32px tall) a single 2px primary line is\n\t enough to seat the brand colour at the bottom of the page\n\t without competing for visual weight against the content row. */\n\tborder-top: 2px solid var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n.pict-theme-bottombar-status {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tmax-width: 50%;\n}\n.pict-theme-bottombar-info {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 12px;\n\tmin-width: 0;\n\toverflow: hidden;\n}\n.pict-theme-bottombar-actions {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}",CSSPriority:500}},{"pict-view":216}],206:[function(e,t,r){const n=e("pict-view"),o=e("../Theme-Brand.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._unsubscribeFromBrand=null}onAfterInitialize(){return this._subscribeToBrand(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(e){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(e):void 0}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}_subscribeToBrand(){if(this._unsubscribeFromBrand)return;let e=this;this._unsubscribeFromBrand=o.onChange(function(){e.render()})}_refreshAppData(){let e=o.getActive();if(this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},!e)return void(this.pict.AppData.PictSectionTheme.BrandMark={BodySlot:[]});let t=!1!==this.options.ShowIcon,r=!1!==this.options.ShowName,n=t&&"svg"===e.IconType&&e.Icon?[{IconHTML:e.Icon}]:[],i=t&&"image"===e.IconType&&e.Icon?[{IconURL:e.Icon}]:[],a=r&&e.Name?[{Name:e.Name}]:[];this.pict.AppData.PictSectionTheme.BrandMark={BodySlot:[{Tooltip:e.Tagline||e.Name||"",IconSVGSlot:n,IconImgSlot:i,NameSlot:a}]}}},t.exports.default_configuration={ViewIdentifier:"Theme-Brand-Mark",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Brand-Mark",DefaultRenderable:"Theme-Brand-Mark-Renderable",ShowIcon:!0,ShowName:!0,Templates:[{Hash:"Theme-Brand-Mark-Template",Template:"{~TS:Theme-Brand-Mark-Body-Template:AppData.PictSectionTheme.BrandMark.BodySlot~}"},{Hash:"Theme-Brand-Mark-Body-Template",Template:'\n<span class="pict-theme-brand-mark" title="{~D:Record.Tooltip~}">\n\t{~TS:Theme-Brand-Mark-IconSVG-Template:Record.IconSVGSlot~}\n\t{~TS:Theme-Brand-Mark-IconImg-Template:Record.IconImgSlot~}\n\t{~TS:Theme-Brand-Mark-Name-Template:Record.NameSlot~}\n</span>'},{Hash:"Theme-Brand-Mark-IconSVG-Template",Template:'<span class="pict-theme-brand-mark-icon">{~D:Record.IconHTML~}</span>'},{Hash:"Theme-Brand-Mark-IconImg-Template",Template:'<span class="pict-theme-brand-mark-icon"><img src="{~D:Record.IconURL~}" alt=""></span>'},{Hash:"Theme-Brand-Mark-Name-Template",Template:'<span class="pict-theme-brand-mark-name">{~D:Record.Name~}</span>'}],Renderables:[{RenderableHash:"Theme-Brand-Mark-Renderable",TemplateHash:"Theme-Brand-Mark-Template",ContentDestinationAddress:"#Theme-Brand-Mark",RenderMethod:"replace"}],CSS:"\n.pict-theme-brand-mark {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\t/* line-height: 1 collapses the inherited ~1.2 line-box around the\n\t name glyphs. Without this the inline-flex container is taller\n\t than its visible content, the line-box adds asymmetric space\n\t above the caps, and the whole mark looks pushed up vs.\n\t neighbouring buttons that sit on standard 12px-text baselines. */\n\tline-height: 1;\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-text-primary, #1a1a1a));\n\tuser-select: none;\n}\n.pict-theme-brand-mark-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 22px;\n\theight: 22px;\n\tcolor: currentColor;\n}\n.pict-theme-brand-mark-icon img,\n.pict-theme-brand-mark-icon svg {\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: block;\n}\n.pict-theme-brand-mark-name {\n\t/* Font size dropped from 15 → 14 so the brand name reads closer\n\t to the typical 12px action-button text height; bigger glyphs\n\t reaching higher into the row are why the mark looked optically\n\t high. The 2px brand-secondary underline keeps the mark feeling\n\t distinctly branded; padding-bottom: 1px was an asymmetric nudge\n\t that shifted the visual center up — removed. */\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\tborder-bottom: 2px solid var(--brand-color-secondary-mode, transparent);\n\twhite-space: nowrap;\n}\n/* Compact form — at narrow viewports the brand mark collapses to\n icon-only. The icon alone still reads as the brand (the deterministic\n logo is designed to be recognisable without the wordmark) and freeing\n up the wordmark's width keeps the nav buttons reachable on tablet /\n small-laptop widths. The threshold matches the topbar's compact\n breakpoint in Theme-TopBar. */\n@media (max-width: 720px) {\n\t.pict-theme-brand-mark-name {\n\t\tdisplay: none;\n\t}\n}",CSSPriority:500}},{"../Theme-Brand.js":172,"pict-view":216}],207:[function(e,t,r){const n=e("pict-view"),o=e("../Theme-Brand.js");class i extends n{constructor(e,t,r){super(e,t,r),this._unsubscribeFromBrand=null}onAfterInitialize(){return this._subscribeToBrand(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(e){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(e):void 0}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}_subscribeToBrand(){if(this._unsubscribeFromBrand)return;let e=this;this._unsubscribeFromBrand=o.onChange(function(){e.render()})}_refreshAppData(){let e=o.getActive();if(this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},!e)return void(this.pict.AppData.PictSectionTheme.BrandStrip={BodySlot:[]});let t=!1!==this.options.ShowName,r=[],n=[];"svg"===e.IconType&&e.Icon?r=[{IconHTML:e.Icon}]:"image"===e.IconType&&e.Icon&&(n=[{IconURL:e.Icon}]);let i=t?[{Name:e.Name,IconSVGSlot:r,IconImgSlot:n}]:[],a=e.Name+(e.Tagline?" — "+e.Tagline:"");this.pict.AppData.PictSectionTheme.BrandStrip={BodySlot:[{Tooltip:a,NameRowSlot:i,PrimaryHeight:this.options.PrimaryStripeHeight||3,SecondaryHeight:this.options.SecondaryStripeHeight||1}]}}}i.default_configuration={ViewIdentifier:"Theme-BrandStrip",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-BrandStrip",DefaultRenderable:"Theme-BrandStrip-Renderable",PrimaryStripeHeight:3,SecondaryStripeHeight:1,ShowName:!0,Templates:[{Hash:"Theme-BrandStrip-Template",Template:"\n{~TS:Theme-BrandStrip-Body-Template:AppData.PictSectionTheme.BrandStrip.BodySlot~}"},{Hash:"Theme-BrandStrip-Body-Template",Template:'\n<div class="pict-theme-brandstrip" title="{~D:Record.Tooltip~}">\n\t{~TS:Theme-BrandStrip-NameRow-Template:Record.NameRowSlot~}\n\t<div class="pict-theme-brandstrip-stripes">\n\t\t<div class="pict-theme-brandstrip-stripe pict-theme-brandstrip-stripe-primary"\n\t\t style="height: {~D:Record.PrimaryHeight~}px;"></div>\n\t\t<div class="pict-theme-brandstrip-stripe pict-theme-brandstrip-stripe-secondary"\n\t\t style="height: {~D:Record.SecondaryHeight~}px;"></div>\n\t</div>\n</div>'},{Hash:"Theme-BrandStrip-NameRow-Template",Template:'\n<div class="pict-theme-brandstrip-row">\n\t{~TS:Theme-BrandStrip-IconSVG-Template:Record.IconSVGSlot~}\n\t{~TS:Theme-BrandStrip-IconImg-Template:Record.IconImgSlot~}\n\t<span class="pict-theme-brandstrip-name">{~D:Record.Name~}</span>\n</div>'},{Hash:"Theme-BrandStrip-IconSVG-Template",Template:'<span class="pict-theme-brandstrip-icon">{~D:Record.IconHTML~}</span>'},{Hash:"Theme-BrandStrip-IconImg-Template",Template:'<span class="pict-theme-brandstrip-icon"><img src="{~D:Record.IconURL~}" alt=""></span>'}],Renderables:[{RenderableHash:"Theme-BrandStrip-Renderable",TemplateHash:"Theme-BrandStrip-Template",ContentDestinationAddress:"#Theme-BrandStrip",RenderMethod:"replace"}],CSS:"\n.pict-theme-brandstrip {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tuser-select: none;\n}\n.pict-theme-brandstrip-row {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 6px 12px 4px;\n\tfont-size: 12px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcolor: var(--brand-color-primary, var(--theme-color-text-muted, #6b6b6b));\n}\n.pict-theme-brandstrip-name {\n\tborder-bottom: 2px solid var(--brand-color-secondary, transparent);\n\tpadding-bottom: 1px;\n}\n.pict-theme-brandstrip-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 16px; height: 16px;\n\tcolor: var(--brand-color-primary, currentColor);\n}\n.pict-theme-brandstrip-icon img,\n.pict-theme-brandstrip-icon svg {\n\twidth: 100%; height: 100%;\n\tdisplay: block;\n}\n.pict-theme-brandstrip-stripes {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n}\n.pict-theme-brandstrip-stripe {\n\twidth: 100%;\n}\n.pict-theme-brandstrip-stripe-primary {\n\tbackground: var(--brand-color-primary, transparent);\n}\n.pict-theme-brandstrip-stripe-secondary {\n\tbackground: var(--brand-color-secondary, transparent);\n}",CSSPriority:500},t.exports=i},{"../Theme-Brand.js":172,"pict-view":216}],208:[function(e,t,r){const n=e("pict-view"),o=e("../Theme-Icons.js"),i={ViewIdentifier:"Theme-Button",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Button",DefaultRenderable:"Theme-Button-Renderable",ProviderHash:"Theme",ModalViewHash:"Pict-Section-Modal",PickerViewHash:"Theme-Picker",ModeToggleViewHash:"Theme-ModeToggle",ScaleSelectViewHash:"Theme-ScaleSelect",Title:"Theme",AriaLabel:"Open theme menu",ModalTitle:"Theme",ModalWidth:"320px",Templates:[{Hash:"Theme-Button-Template",Template:'\n<button type="button"\n class="pict-theme-button"\n aria-label="{~D:AppData.PictSectionTheme.Button.AriaLabel~}"\n title="{~D:AppData.PictSectionTheme.Button.Title~}"\n onclick="_Pict.views[\'Theme-Button\'].openMenu();">\n\t'.concat(o.iconSun(16),"\n</button>")},{Hash:"Theme-Button-Modal-Template",Template:'\n<div class="pict-theme-button-menu">\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Theme</label>\n\t\t<div id="Theme-Picker"></div>\n\t</div>\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Mode</label>\n\t\t<div id="Theme-ModeToggle"></div>\n\t</div>\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Scale</label>\n\t\t<div id="Theme-ScaleSelect"></div>\n\t</div>\n</div>'}],Renderables:[{RenderableHash:"Theme-Button-Renderable",TemplateHash:"Theme-Button-Template",ContentDestinationAddress:"#Theme-Button",RenderMethod:"replace"}],CSS:"\n.pict-theme-button {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\t/* Sized to match a typical 12px-font / 6px-12px-padding text button\n\t (~28px tall) so this drops cleanly into a topbar row alongside\n\t action buttons without standing taller and crashing the row's\n\t visual rhythm. Squareish — width matches height for the icon. */\n\twidth: 28px;\n\theight: 28px;\n\tpadding: 0;\n\tborder-radius: 6px;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\ttransition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;\n}\n.pict-theme-button:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n}\n.pict-theme-button-icon { width: 16px; height: 16px; }\n.pict-theme-button-menu { display: flex; flex-direction: column; gap: 14px; }\n.pict-theme-button-menu-row { display: flex; flex-direction: column; gap: 6px; }\n.pict-theme-button-menu-label {\n\tfont-size: 11px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}",CSSPriority:500};class a extends n{onBeforeRender(e){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(e):void 0}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}openMenu(){let e=this._modal();if(!e)return"undefined"!=typeof console&&console.warn('Theme-Button: pict-section-modal view not found at "'+(this.options.ModalViewHash||"Pict-Section-Modal")+'" — cannot open theme menu.'),null;let t=this.pict.parseTemplateByHash("Theme-Button-Modal-Template",{}),r=this;return e.show({title:this.options.ModalTitle||"Theme",content:t,width:this.options.ModalWidth||"320px",closeable:!0,buttons:[],onOpen:function(){r._mountSubViews()}})}_modal(){let e=this.options.ModalViewHash||"Pict-Section-Modal";return this.pict&&this.pict.views&&this.pict.views[e]}_mountSubViews(){let e=this.pict.views[this.options.PickerViewHash||"Theme-Picker"];e&&e.render();let t=this.pict.views[this.options.ModeToggleViewHash||"Theme-ModeToggle"];t&&t.render();let r=this.pict.views[this.options.ScaleSelectViewHash||"Theme-ScaleSelect"];r&&r.render()}_refreshAppData(){this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.Button={Title:this.options.Title||"Theme",AriaLabel:this.options.AriaLabel||"Open theme menu"}}}a.default_configuration=i,t.exports=a},{"../Theme-Icons.js":173,"pict-view":216}],209:[function(e,t,r){const n=e("pict-view"),o=e("../Theme-Icons.js"),i={ViewIdentifier:"Theme-ModeToggle",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-ModeToggle",DefaultRenderable:"Theme-ModeToggle-Renderable",ProviderHash:"Theme",Labels:{Light:"Light",Dark:"Dark",System:"System"},ShowIcons:!0,Templates:[{Hash:"Theme-ModeToggle-Template",Template:'\n<div class="pict-theme-modetoggle-wrap">\n\t<div class="pict-theme-modetoggle{~NE:AppData.PictSectionTheme.ModeToggle.Disabled^ pict-theme-modetoggle-disabled~}"\n\t role="group" aria-label="Color mode"\n\t title="{~D:AppData.PictSectionTheme.ModeToggle.WrapTitle~}">\n\t\t{~TS:Theme-ModeToggle-Button-Template:AppData.PictSectionTheme.ModeToggle.Buttons~}\n\t</div>\n\t{~TS:Theme-ModeToggle-LockedNote-Template:AppData.PictSectionTheme.ModeToggle.LockedNoteSlot~}\n</div>'},{Hash:"Theme-ModeToggle-Button-Template",Template:'\n<button type="button"\n class="pict-theme-modetoggle-btn{~NE:Record.Active^ pict-theme-modetoggle-btn-active~}{~NE:Record.LockedOut^ pict-theme-modetoggle-btn-lockedout~}"\n title="{~D:Record.Title~}"\n aria-pressed="{~D:Record.Active~}"\n aria-disabled="{~D:Record.LockedOut~}"\n onclick="_Pict.views[\'Theme-ModeToggle\'].pickMode(\'{~D:Record.Mode~}\');">\n\t{~TS:Theme-ModeToggle-Icon-Light:Record.IconLight~}{~TS:Theme-ModeToggle-Icon-Dark:Record.IconDark~}{~TS:Theme-ModeToggle-Icon-System:Record.IconSystem~}<span class="pict-theme-modetoggle-label">{~D:Record.Label~}</span>\n</button>'},{Hash:"Theme-ModeToggle-LockedNote-Template",Template:'\n<div class="pict-theme-modetoggle-locked-note" role="note">\n\t<svg class="pict-theme-modetoggle-locked-icon" viewBox="0 0 24 24" fill="none"\n\t stroke="currentColor" stroke-width="2" stroke-linecap="round"\n\t stroke-linejoin="round" aria-hidden="true">\n\t\t<rect x="4" y="11" width="16" height="9" rx="2"/>\n\t\t<path d="M8 11V7a4 4 0 0 1 8 0v4"/>\n\t</svg>\n\t<span>{~D:Record.Message~}</span>\n</div>'},{Hash:"Theme-ModeToggle-Icon-Light",Template:o.iconSun()},{Hash:"Theme-ModeToggle-Icon-Dark",Template:o.iconMoon()},{Hash:"Theme-ModeToggle-Icon-System",Template:o.iconSystem()}],Renderables:[{RenderableHash:"Theme-ModeToggle-Renderable",TemplateHash:"Theme-ModeToggle-Template",ContentDestinationAddress:"#Theme-ModeToggle",RenderMethod:"replace"}],CSS:"\n.pict-theme-modetoggle-wrap { display: inline-flex; flex-direction: column; gap: 6px; }\n.pict-theme-modetoggle {\n\tdisplay: inline-flex;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tborder-radius: 6px;\n\toverflow: hidden;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tfont-size: 12px;\n}\n.pict-theme-modetoggle-btn {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 4px 10px;\n\tborder: 0;\n\tbackground: transparent;\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\tborder-right: 1px solid var(--theme-color-border-default, #cfd5dd);\n\ttransition: background-color 120ms ease, color 120ms ease;\n}\n.pict-theme-modetoggle-btn:last-child { border-right: 0; }\n.pict-theme-modetoggle-btn:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n}\n.pict-theme-modetoggle-btn-active {\n\tbackground: var(--theme-color-brand-primary, #2563eb);\n\tcolor: var(--theme-color-text-on-brand, #ffffff);\n}\n.pict-theme-modetoggle-btn-active:hover {\n\tbackground: var(--theme-color-brand-primary-hover, #1e54cc);\n\tcolor: var(--theme-color-text-on-brand, #ffffff);\n}\n/* When the active theme is single-mode the entire group becomes\n non-interactive. The locked-out buttons (the ones the theme cannot\n switch to) get a strikethrough so the cause is unmistakable; the\n active button stays styled normally so users can still see which\n mode the theme IS using. */\n.pict-theme-modetoggle-disabled .pict-theme-modetoggle-btn {\n\tpointer-events: none;\n\tcursor: not-allowed;\n}\n.pict-theme-modetoggle-disabled .pict-theme-modetoggle-btn-lockedout {\n\topacity: 0.45;\n\ttext-decoration: line-through;\n\ttext-decoration-thickness: 1.5px;\n}\n/* Icons come from Theme-Icons.js with explicit width/height baked into\n the <svg>. We only need to nudge their vertical alignment with the\n button label. */\n.pict-theme-modetoggle .pict-theme-icon {\n\tdisplay: inline-block; vertical-align: -2px;\n}\n.pict-theme-modetoggle-label { line-height: 1; }\n.pict-theme-modetoggle-locked-note {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tfont-size: 11px;\n\tline-height: 1.3;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n\tpadding: 0 2px;\n}\n.pict-theme-modetoggle-locked-icon {\n\twidth: 12px; height: 12px;\n\tflex: 0 0 12px;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}",CSSPriority:500};class a extends n{constructor(e,t,r){super(e,t,r),this._unsubscribeFromProvider=null}onAfterInitialize(){return this._subscribeToProvider(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(e){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(e):void 0}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}pickMode(e){let t=this._provider();if(!t)return!1;let r=t.setMode(e);if(r&&"function"==typeof this.options.OnModeChange)try{this.options.OnModeChange(e)}catch(e){}return r||this.render(),r}_subscribeToProvider(){if(this._unsubscribeFromProvider)return;let e=this._provider();if(!e||"function"!=typeof e.onApply)return;let t=this;this._unsubscribeFromProvider=e.onApply(function(){t.render()})}_provider(){let e=this.options.ProviderHash||"Theme";return this.pict&&this.pict.providers&&this.pict.providers[e]}_refreshAppData(){let e=this._provider(),t=e?e.getActiveTheme():null,r=t&&t.Mode||"light",n=!1,o=null,a=null;if(t&&t.Hash&&e&&"function"==typeof e.getTheme){let i=e.getTheme(t.Hash);n="single"===(i&&i.Modes&&i.Modes.Strategy||"single"),n&&(o=i.Modes&&i.Modes.Default||r||"light",a=i.Name||i.Hash||"this theme")}let s=this.options.Labels||i.Labels,l=!1!==this.options.ShowIcons,c=[{Mode:"light",Label:s.Light||"Light"},{Mode:"dark",Label:s.Dark||"Dark"},{Mode:"system",Label:s.System||"System"}],d=[];for(let e=0;e<c.length;e++){let t,i=c[e],s=r===i.Mode,h=n&&i.Mode!==o;if(h){t=a+" is fixed to "+(o.charAt(0).toUpperCase()+o.slice(1))+" mode — pick a different theme to switch."}else t=i.Label+" mode";d.push({Mode:i.Mode,Label:i.Label,Title:t,Active:s,LockedOut:h,IconLight:l&&"light"===i.Mode?[{}]:[],IconDark:l&&"dark"===i.Mode?[{}]:[],IconSystem:l&&"system"===i.Mode?[{}]:[]})}let h=[],p="";if(n){let e=a+" is fixed to "+(o.charAt(0).toUpperCase()+o.slice(1))+" mode";h=[{Message:e}],p=e+" — pick a different theme to switch modes."}this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.ModeToggle={ActiveMode:r,Disabled:n,LockedToMode:o,ThemeName:a,Buttons:d,LockedNoteSlot:h,WrapTitle:p}}}a.default_configuration=i,t.exports=a},{"../Theme-Icons.js":173,"pict-view":216}],210:[function(e,t,r){const n=e("pict-view"),o=e("../Theme-Icons.js");class i extends n{constructor(e,t,r){super(e,t,r),this._unsubscribeFromProvider=null}onAfterInitialize(){return this._subscribeToProvider(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(e){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(e):void 0}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}openMenu(e){let t=this._modal();if(!t)return"undefined"!=typeof console&&console.warn&&console.warn("Theme-Picker: pict-section-modal not registered — cannot open menu."),null;let r=this._buildMenuItems(),n=this;return t.dropdown(e,{items:r,align:"left",minWidth:"260px",maxHeight:"60vh",className:"pict-theme-picker-menu",closeOnSelect:!0,onSelect:function(e){n.pick(e)}})}pick(e){let t=this._provider();if(!t)return!1;let r=t.getActiveTheme(),n=r?r.Mode:null,o=t.applyTheme(e,n);if(o&&"function"==typeof this.options.OnPick)try{this.options.OnPick(e)}catch(e){}return o}_subscribeToProvider(){if(this._unsubscribeFromProvider)return;let e=this._provider();if(!e||"function"!=typeof e.onApply)return;let t=this;this._unsubscribeFromProvider=e.onApply(function(){t.render()})}_provider(){let e=this.options.ProviderHash||"Theme";return this.pict&&this.pict.providers&&this.pict.providers[e]}_modal(){let e=this.options.ModalViewHash||"Pict-Section-Modal";return this.pict&&this.pict.views&&this.pict.views[e]}_buildMenuItems(){let e=this._provider(),t=e?e.listThemes():[],r=e?e.getActiveTheme():{Hash:null},n=r&&r.Hash||null,i=this._loadCatalog(),a={},s=[];Array.isArray(this.options.Categories)&&(s=this.options.Categories.slice());for(let e=0;e<i.length;e++){let t=i[e],r=t.Category||"Other";a[t.Hash]=r,s.indexOf(r)<0&&s.push(r)}let l={};for(let e=0;e<t.length;e++){let r=t[e],n=a[r.Hash]||"Other";l[n]||(l[n]=[],s.indexOf(n)<0&&s.push(n)),l[n].push(r)}let c=!1!==this.options.ShowModeIcons,d=[];for(let e=0;e<s.length;e++){let t=s[e];if(l[t]&&0!==l[t].length){d.push({Header:t});for(let e=0;e<l[t].length;e++){let r=l[t][e],i=c?o.iconForTheme(r.Strategy,r.DefaultMode,14):"";d.push({Hash:r.Hash,Label:r.Name||r.Hash,Icon:i,Style:r.Hash===n?"active":null,Tooltip:this._capabilityLabel(r)})}}}return d}_capabilityLabel(e){if("single"===(e.Strategy||"single")){let t=e.DefaultMode||"light";return(e.Name||e.Hash)+" — "+("dark"===t?"dark only":"light only")}return(e.Name||e.Hash)+" — light + dark"}_refreshAppData(){let e=this._provider(),t=e?e.listThemes():[],r=e?e.getActiveTheme():{Hash:null},n=r&&r.Hash||null,i=null;for(let e=0;e<t.length;e++)if(t[e].Hash===n){i=t[e];break}let a=[];!1!==this.options.ShowModeIcons&&i&&(a=[{IconHTML:o.iconForTheme(i.Strategy,i.DefaultMode,14)}]),this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.Picker={ActiveHash:n,ActiveLabel:i?i.Name||i.Hash:"Choose a theme",TriggerTooltip:i?this._capabilityLabel(i)+" — click to change":"Choose a theme",TriggerGlyphSlot:a,ChevronHTML:o.iconChevronDown(10)},this.pict.AppData.PictSectionTheme.AllThemes=t}_loadCatalog(){try{return e("../themes/_catalog.js")}catch(e){return[]}}}i.default_configuration={ViewIdentifier:"Theme-Picker",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Picker",DefaultRenderable:"Theme-Picker-Renderable",ProviderHash:"Theme",ModalViewHash:"Pict-Section-Modal",Categories:null,ShowModeIcons:!0,Templates:[{Hash:"Theme-Picker-Template",Template:'\n<button type="button" class="pict-theme-picker"\n title="{~D:AppData.PictSectionTheme.Picker.TriggerTooltip~}"\n onclick="_Pict.views[\'Theme-Picker\'].openMenu(this);">\n\t{~TS:Theme-Picker-Trigger-Glyph:AppData.PictSectionTheme.Picker.TriggerGlyphSlot~}\n\t<span class="pict-theme-picker-name">{~D:AppData.PictSectionTheme.Picker.ActiveLabel~}</span>\n\t<span class="pict-theme-picker-chevron">{~D:AppData.PictSectionTheme.Picker.ChevronHTML~}</span>\n</button>'},{Hash:"Theme-Picker-Trigger-Glyph",Template:'<span class="pict-theme-picker-trigger-glyph">{~D:Record.IconHTML~}</span>'}],Renderables:[{RenderableHash:"Theme-Picker-Renderable",TemplateHash:"Theme-Picker-Template",ContentDestinationAddress:"#Theme-Picker",RenderMethod:"replace"}],CSS:"\n.pict-theme-picker {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tmin-width: 200px;\n\tmax-width: 100%;\n\tpadding: 6px 10px;\n\tborder-radius: 6px;\n\tfont: inherit;\n\tfont-size: 13px;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tcursor: pointer;\n\ttext-align: left;\n\ttransition: border-color 120ms ease, box-shadow 120ms ease;\n}\n.pict-theme-picker:hover { border-color: var(--theme-color-text-muted, #6b6b6b); }\n.pict-theme-picker:focus, .pict-theme-picker:focus-visible {\n\toutline: none;\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n\tbox-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}\n.pict-theme-picker .pict-theme-picker-name {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n.pict-theme-picker .pict-theme-picker-chevron {\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n\tdisplay: inline-flex;\n\talign-items: center;\n}\n.pict-theme-picker-trigger-glyph {\n\tdisplay: inline-flex; align-items: center;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}\n\n/* Skin the modal-dropdown items with cleaner spacing for our glyphs. */\n.pict-theme-picker-menu .pict-modal-dropdown-item-icon {\n\twidth: 28px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}\n.pict-theme-picker-menu .pict-modal-dropdown-item--active {\n\tbackground: var(--theme-color-background-selected, #e0eaff);\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n}\n.pict-theme-picker-menu .pict-modal-dropdown-item--active .pict-modal-dropdown-item-icon {\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n}",CSSPriority:500},i.APPDATA_ADDRESS="PictSectionTheme.Picker",t.exports=i},{"../Theme-Icons.js":173,"../themes/_catalog.js":179,"pict-view":216}],211:[function(e,t,r){const n=e("pict-view"),o=e("../Theme-Scale.js");class i extends n{constructor(e,t,r){super(e,t,r),this._unsubscribeFromScale=null}onAfterInitialize(){return this._subscribeToScale(),super.onAfterInitialize?super.onAfterInitialize():void 0}onBeforeRender(e){return this._refreshAppData(),super.onBeforeRender?super.onBeforeRender(e):void 0}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}pickScale(e){let t=o.applyScale(e);if("function"==typeof this.options.OnScaleChange)try{this.options.OnScaleChange(t)}catch(e){}return t}_subscribeToScale(){if(this._unsubscribeFromScale)return;let e=this;this._unsubscribeFromScale=o.onChange(function(){e.render()})}_refreshAppData(){let e=Array.isArray(this.options.Presets)?this.options.Presets:o.PRESETS,t=o.getActive(),r=0,n=1/0;for(let o=0;o<e.length;o++){let i=Math.abs(e[o].Value-t);i<n&&(n=i,r=o)}let i=[];for(let t=0;t<e.length;t++){let n=e[t];i.push({Value:n.Value,Label:n.Label,Selected:t===r})}let a="Viewport scale — currently "+Math.round(100*t)+"%";this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.ScaleSelect={ActiveScale:t,Tooltip:a,Options:i}}}i.default_configuration={ViewIdentifier:"Theme-ScaleSelect",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-ScaleSelect",DefaultRenderable:"Theme-ScaleSelect-Renderable",Presets:null,Templates:[{Hash:"Theme-ScaleSelect-Template",Template:'\n<select class="pict-theme-scaleselect"\n title="{~D:AppData.PictSectionTheme.ScaleSelect.Tooltip~}"\n onchange="_Pict.views[\'Theme-ScaleSelect\'].pickScale(parseFloat(this.value));">\n\t{~TS:Theme-ScaleSelect-Option-Template:AppData.PictSectionTheme.ScaleSelect.Options~}\n</select>'},{Hash:"Theme-ScaleSelect-Option-Template",Template:'\n<option value="{~D:Record.Value~}"{~NE:Record.Selected^ selected~}>{~D:Record.Label~}</option>'}],Renderables:[{RenderableHash:"Theme-ScaleSelect-Renderable",TemplateHash:"Theme-ScaleSelect-Template",ContentDestinationAddress:"#Theme-ScaleSelect",RenderMethod:"replace"}],CSS:"\n.pict-theme-scaleselect {\n\tmin-width: 180px;\n\tpadding: 6px 10px;\n\tborder-radius: 6px;\n\tfont: inherit;\n\tfont-size: 13px;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tcursor: pointer;\n}\n.pict-theme-scaleselect:focus {\n\toutline: none;\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n\tbox-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}",CSSPriority:500},t.exports=i},{"../Theme-Scale.js":175,"pict-view":216}],212:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}onAfterRender(e,t,r,n){if(this.pict.CSSMap.injectCSS(),"undefined"!=typeof document&&this.options.Height){let e=document.querySelector(".pict-theme-topbar");e&&(e.style.minHeight=this.options.Height+"px")}if(this._applyCompactBreakpoint(),"undefined"!=typeof document&&this.options.NavAlign){let e={left:"flex-start",right:"flex-end",center:"center"}[this.options.NavAlign];if(e){let t=document.querySelector(".pict-theme-topbar-nav");t&&(t.style.justifyContent=e)}}if(!1!==this.options.MountBrandMark){let e=this.pict.views["Theme-Brand-Mark"];e&&e.render()}if(this.options.NavView){let e=this.pict.views[this.options.NavView];e?e.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: NavView "'+this.options.NavView+'" not registered')}if(this.options.UserView){let e=this.pict.views[this.options.UserView];e?e.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: UserView "'+this.options.UserView+'" not registered')}if(!1!==this.options.MountThemeButton){let e=this.pict.views["Theme-Button"];e&&e.render()}return super.onAfterRender?super.onAfterRender(e,t,r,n):void 0}setNavView(e){this.options.NavView=e||null,this._mountSlot("#Theme-TopBar-Nav",this.options.NavView)}setUserView(e){this.options.UserView=e||null,this._mountSlot("#Theme-TopBar-User",this.options.UserView)}_mountSlot(e,t){if("undefined"!=typeof document){let t=document.querySelector(e);t&&(t.innerHTML="")}if(!t)return;let r=this.pict.views[t];r?r.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: view "'+t+'" not registered')}_applyCompactBreakpoint(){if("undefined"==typeof document)return;let e=this.options.CompactBreakpoint;if(null==e)return;if(900===e)return;let t="pict-theme-topbar-compact-"+this.UUID,r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,document.head.appendChild(r)),r.textContent="number"!=typeof e||e<=0?".pict-theme-topbar-nav { display: flex !important; }\n.pict-theme-topbar-user-slot { display: flex !important; }\n.pict-theme-topbar-burger { display: none !important; }\n.pict-theme-topbar-user { margin-left: 0 !important; }\n":"@media (max-width: "+e+"px) {\n\t.pict-theme-topbar-nav { display: none !important; }\n\t.pict-theme-topbar-user-slot { display: none !important; }\n\t.pict-theme-topbar-burger { display: inline-flex !important; }\n\t.pict-theme-topbar-user { margin-left: auto !important; }\n}\n@media (min-width: "+(e+1)+"px) {\n\t.pict-theme-topbar-nav { display: flex !important; }\n\t.pict-theme-topbar-user-slot { display: flex !important; }\n\t.pict-theme-topbar-burger { display: none !important; }\n\t.pict-theme-topbar-user { margin-left: 0 !important; }\n}\n"}openBurgerMenu(){if("undefined"==typeof document)return null;let e=this.pict.views["Pict-Section-Modal"];if(!e||"function"!=typeof e.show)return"undefined"!=typeof console&&console.warn&&console.warn("Theme-TopBar: pict-section-modal not registered — burger menu unavailable."),null;let t=[],r=document.querySelector("#Theme-TopBar-Nav"),n=document.querySelector("#Theme-TopBar-User");r&&r.innerHTML.trim()&&t.push('<div class="pict-theme-burger-menu-section">'+r.innerHTML+"</div>"),n&&n.innerHTML.trim()&&t.push('<div class="pict-theme-burger-menu-section">'+n.innerHTML+"</div>"),0===t.length&&t.push('<div class="pict-theme-burger-menu-empty">No menu items configured.</div>');let o='<div class="pict-theme-burger-menu">'+t.join("")+"</div>";return e.show({title:"Menu",content:o,width:"280px",closeable:!0,buttons:[]})}},t.exports.default_configuration={ViewIdentifier:"Theme-TopBar",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-TopBar",DefaultRenderable:"Theme-TopBar-Renderable",MountBrandMark:!0,MountThemeButton:!0,NavView:null,UserView:null,Height:56,NavAlign:"right",CompactBreakpoint:900,Templates:[{Hash:"Theme-TopBar-Template",Template:'\n<div class="pict-theme-topbar">\n\t<div class="pict-theme-topbar-mark"><div id="Theme-Brand-Mark"></div></div>\n\t<div class="pict-theme-topbar-nav" id="Theme-TopBar-Nav"></div>\n\t<div class="pict-theme-topbar-user">\n\t\t<div class="pict-theme-topbar-user-slot" id="Theme-TopBar-User"></div>\n\t\t<div class="pict-theme-topbar-user-button"><div id="Theme-Button"></div></div>\n\t\t<button type="button" class="pict-theme-topbar-burger"\n\t\t\taria-label="More navigation"\n\t\t\ttitle="Menu"\n\t\t\tonclick="_Pict.views[\'Theme-TopBar\'].openBurgerMenu();">\n\t\t\t<svg width="20" height="20" viewBox="0 0 24 24" fill="none"\n\t\t\t\tstroke="currentColor" stroke-width="2"\n\t\t\t\tstroke-linecap="round" stroke-linejoin="round"\n\t\t\t\taria-hidden="true">\n\t\t\t\t<path d="M3 6h18M3 12h18M3 18h18"/>\n\t\t\t</svg>\n\t\t</button>\n\t</div>\n</div>'}],Renderables:[{RenderableHash:"Theme-TopBar-Renderable",TemplateHash:"Theme-TopBar-Template",ContentDestinationAddress:"#Theme-TopBar",RenderMethod:"replace"}],CSS:'\n.pict-theme-topbar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\t/* The min-height is rewritten per-instance in onAfterRender from the\n\t Height option (default 56). Avoids the percent-height resolution\n\t trap: pict-section-modal\'s panel destination uses min-height: 100%\n\t on its inner div, which means a child\'s height: 100% / min-height:\n\t 100% resolves against the parent\'s *property* (auto), not its\n\t resolved size — and collapses the row to its content. A fixed px\n\t value gives align-items: center real space to centre into. */\n\tmin-height: 56px;\n\tpadding: 0 14px;\n\tbox-sizing: border-box;\n\tbackground: var(--theme-color-background-panel, transparent);\n\t/* Brand stripes are drawn by .pict-theme-topbar::after as an absolute\n\t element overlaying the bottom 5px of the row. Using ::after rather\n\t than border-bottom + box-shadow lets us put a transparent gap\n\t between the two stripes (border / box-shadow can\'t draw gaps).\n\t Position relative so the ::after positions to this row. */\n\tposition: relative;\n}\n/* Two-stripe brand identifier at the bottom of the topbar:\n 4px brand-primary (thicker — the dominant identifier)\n 2px transparent gap (clearly readable separation)\n 3px brand-secondary (thinner than primary but still substantial)\n Earlier iterations used 1–2px stripes; both read clearly at light\n mode but dark-mode secondary colors are often desaturated (lifted)\n so the eye can miss a thin band against a dark background. The\n current sizes push the secondary above the perception threshold\n regardless of palette. Stripes overlay the bottom 9px of the row;\n content (which centres in the full row via align-items: center)\n keeps its visual position. */\n.pict-theme-topbar::after {\n\tcontent: \'\';\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\theight: 9px;\n\tpointer-events: none;\n\tbackground: linear-gradient(\n\t\tto bottom,\n\t\tvar(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)) 0,\n\t\tvar(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)) 4px,\n\t\ttransparent 4px,\n\t\ttransparent 6px,\n\t\tvar(--brand-color-secondary-mode, var(--theme-color-brand-secondary, transparent)) 6px,\n\t\tvar(--brand-color-secondary-mode, var(--theme-color-brand-secondary, transparent)) 9px\n\t);\n}\n.pict-theme-topbar-mark {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n}\n.pict-theme-topbar-nav {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\talign-items: center;\n\t/* Default to right-aligning nav items inside the stretched slot —\n\t the convention retold-* apps converged on. Overridden per-instance\n\t from the NavAlign option in onAfterRender. */\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tmin-width: 0;\n\t/* Horizontally scrollable when the nav overflows (narrow viewports\n\t with many buttons) — better than overflow:hidden which would\n\t silently clip buttons offscreen. The vertical axis stays clipped\n\t so a tall accidental child doesn\'t blow up the row height. A\n\t proper overflow menu is a future enhancement; this gets us safe\n\t degradation today. */\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\t/* Hide the scrollbar by default; modern browsers pick up the\n\t trackpad scroll without it. Apps wanting a visible scrollbar\n\t can override at higher specificity. */\n\tscrollbar-width: none;\n}\n.pict-theme-topbar-nav::-webkit-scrollbar { display: none; }\n/* Active-route indicator. The convention every host app should follow:\n put aria-current="page" on the button (or anchor) representing the\n current route. The W3C-standard attribute reads correctly to screen\n readers and gets a brand-tinted highlight here. Apps that already\n ship their own active styling can override these rules — they\'re\n keyed off attribute selectors so no class collision is possible. */\n.pict-theme-topbar-nav [aria-current="page"],\n.pict-theme-topbar-user [aria-current="page"] {\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbackground: var(--theme-color-background-hover, rgba(37, 99, 235, 0.08));\n}\n.pict-theme-topbar-user {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n.pict-theme-topbar-user-slot {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n.pict-theme-topbar-user-button {\n\tdisplay: flex;\n\talign-items: center;\n}\n/* Burger button — hidden by default; the media query (or the inline\n per-instance JS that swaps it via CompactBreakpoint) shows it once\n the viewport drops below the host\'s compact threshold. Sized to\n match Theme-Button (28×28) so the row\'s rhythm is preserved. */\n.pict-theme-topbar-burger {\n\tdisplay: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 28px;\n\theight: 28px;\n\tpadding: 0;\n\tborder-radius: 6px;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\ttransition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;\n}\n.pict-theme-topbar-burger:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n/* Burger menu popup — applied to the cloned nav + user DOM inside\n pict-section-modal. The cloned children inherit their original\n styling (action buttons, badges, etc.) so the popup looks visually\n consistent with what was on the topbar. */\n.pict-theme-burger-menu {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n.pict-theme-burger-menu-section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n/* Cloned children render as a vertical stack inside the popup — flip\n the horizontal flex layouts to column so each button takes a full\n row instead of cramming side-by-side at narrow width. */\n.pict-theme-burger-menu .rm-topbar-nav,\n.pict-theme-burger-menu .rm-topbar-user,\n.pict-theme-burger-menu [class*="-topbar-nav"],\n.pict-theme-burger-menu [class*="-topbar-user"] {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: stretch;\n\tgap: 6px;\n}\n.pict-theme-burger-menu button { width: 100%; text-align: left; }\n.pict-theme-burger-menu .rm-topbar-nav-divider,\n.pict-theme-burger-menu [class*="divider"] { display: none; }\n/* Compact mode — defaults to a 900px breakpoint. The onAfterRender\n handler injects a per-instance <style> rule when the host passes a\n different CompactBreakpoint, so this @media block is the fallback\n for hosts that accept the default. */\n@media (max-width: 900px) {\n\t.pict-theme-topbar-nav { display: none !important; }\n\t.pict-theme-topbar-user-slot { display: none !important; }\n\t.pict-theme-topbar-burger { display: inline-flex; }\n\t/* In wide mode the flex-1 nav slot pushes the user-area to the\n\t right edge. With the nav hidden the user-area would collapse\n\t left of the now-empty middle; the auto-margin re-creates the\n\t "push right" effect so the theme button + burger stay flush\n\t against the right edge of the topbar. */\n\t.pict-theme-topbar-user { margin-left: auto; }\n}',CSSPriority:500}},{"pict-view":216}],213:[function(e,t,r){t.exports={name:"pict-template",version:"1.0.15",description:"Pict Template Base Class",main:"source/Pict-Template.js",scripts:{start:"node source/Pict-Template.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ."},types:"types/source/Pict-Template.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],214:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("../package.json");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.fable,this.pict=this.fable,this.serviceType="PictTemplate",this._Package=o}render(e,t,r,n,o){return""}renderAsync(e,t,r,n,o,i){return r(null,this.render(e,t,n,o,i))}addPattern(e,t){return this.pict.MetaTemplate.addPatternBoth(e,t,this.render,this.renderAsync,this)}resolveStateFromAddress(e,t,r,n,o,i){return this.pict.resolveStateFromAddress(e,t,r,n,o,i)}},t.exports.template_hash="Default"},{"../package.json":213,"fable-serviceproviderbase":59}],215:[function(e,t,r){t.exports={name:"pict-view",version:"1.0.68",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.363",quackage:"^1.0.65",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.67","fable-serviceproviderbase":"^3.0.19"}}},{}],216:[function(e,t,r){const n=e("fable-serviceproviderbase"),o=e("../package.json"),i={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},JSON.parse(JSON.stringify(i)),t),r),this.fable,this.options,this.UUID,this.Hash,this.log;const n=this.Hash===this.UUID;this.UUID="V-".concat(this.UUID),n&&(this.Hash=this.UUID),this.options.ViewIdentifier||(this.options.ViewIdentifier="AutoViewID-".concat(this.fable.getUUID())),this.serviceType="PictView",this._Package=o,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1,this.lastRenderedTimestamp=!1,this.lastMarshalFromViewTimestamp=!1,this.lastMarshalToViewTimestamp=!1,this.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(let e=0;e<this.options.Templates.length;e++){let t=this.options.Templates[e];"Hash"in t&&"Template"in t?(t.Source||(t.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addTemplate(t.Hash,t.Template,t.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Template ").concat(e," in the options array."),t)}for(let e=0;e<this.options.DefaultTemplates.length;e++){let t=this.options.DefaultTemplates[e];"Postfix"in t&&"Template"in t?(t.Source||(t.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(t.Prefix,t.Postfix,t.Template,t.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Default Template ").concat(e," in the options array."),t)}if(this.options.CSS){let e=this.options.CSSHash?this.options.CSSHash:"View-".concat(this.options.ViewIdentifier),t=this.options.CSSProvider?this.options.CSSProvider:e;this.pict.CSSMap.addCSS(e,this.options.CSS,t,this.options.CSSPriority)}this.renderables={};for(let e=0;e<this.options.Renderables.length;e++){let t=this.options.Renderables[e];this.addRenderable(t)}}addRenderable(e,t,r,n,o){let i;if("object"==typeof e)i=e;else{i={RenderableHash:e,TemplateHash:t,DefaultTemplateRecordAddress:r,ContentDestinationAddress:n,RenderMethod:"string"!=typeof o?o:"replace"}}"string"!=typeof i.RenderableHash||"string"!=typeof i.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),i):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(i.RenderableHash,"] pointed to template ").concat(i.TemplateHash,".")),this.renderables[i.RenderableHash]=i)}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(e){return this.onBeforeInitialize(),e()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}onInitializeAsync(e){return this.onInitialize(),e()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(e){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),e();{let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),t.anticipate(this.onBeforeInitializeAsync.bind(this)),t.anticipate(this.onInitializeAsync.bind(this)),t.anticipate(this.onAfterInitializeAsync.bind(this)),t.wait(t=>(t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization failed: ").concat(t.message||t),{stack:t.stack}),this.initializeTimestamp=this.pict.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization complete.")),e()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(e){return this.onAfterInitialize(),e()}onBeforeRender(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}onBeforeRenderAsync(e,t){return this.onBeforeRender(t),e()}onBeforeProject(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}onBeforeProjectAsync(e,t){return this.onBeforeProject(t),e()}buildRenderOptions(e,t,r){let n={Valid:!0};return n.RenderableHash="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,n.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(n.RenderableHash," (param ").concat(e,"because it is not a valid renderable.")),n.Valid=!1),n.Renderable=this.renderables[n.RenderableHash],n.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(e,") because it does not exist.")),n.Valid=!1),n.DestinationAddress="string"==typeof t?t:"string"==typeof n.Renderable.ContentDestinationAddress?n.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,n.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(e,") because it does not have a valid destination address (param ").concat(t,").")),n.Valid=!1),"object"==typeof r?(n.RecordAddress="Passed in as object",n.Record=r):(n.RecordAddress="string"==typeof r?r:"string"==typeof n.Renderable.DefaultTemplateRecordAddress?n.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,n.Record="string"==typeof n.RecordAddress?this.pict.DataProvider.getDataByAddress(n.RecordAddress):void 0),n}assignRenderContent(e,t,r){return this.pict.ContentAssignment.projectContent(e.RenderMethod,t,r,e.TestAddress)}render(e,t,r,n){return this.renderWithScope(this,e,t,r,n)}renderWithScope(e,t,r,n,o){let i,a,s,l="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return l?("__Virtual"==l?i={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof r?r:"string"==typeof i.ContentDestinationAddress?i.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&o.TransactionHash,RootRenderableViewHash:o&&o.RootRenderableViewHash}:(i=Object.assign({},this.renderables[l]),i.ContentDestinationAddress="string"==typeof r?r:"string"==typeof i.ContentDestinationAddress?i.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),i.TransactionHash||(i.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),i.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(i.TransactionHash)),i?i.ContentDestinationAddress?("object"==typeof n?(s=n,a="Passed in as object"):(a="string"==typeof n?n:"string"==typeof i.DefaultTemplateRecordAddress?i.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,s="string"==typeof a?this.pict.DataProvider.getDataByAddress(a):void 0),this.onBeforeRender(i),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(i.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(l,"] to Destination [").concat(i.ContentDestinationAddress,"]...")),i.Content=this.pict.parseTemplateByHash(i.TemplateHash,s,null,[this],e,{RootRenderable:"object"==typeof o?o:i}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(l,"] content length ").concat(i.Content.length," to Destination [").concat(i.ContentDestinationAddress,"] using render method [").concat(i.RenderMethod,"].")),this.onBeforeProject(i),this.onProject(i),"virtual-assignment"!==i.RenderMethod&&(this.onAfterProject(i),this.onAfterRender(i)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(t,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(t,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(t,") because it is not a valid renderable.")),!1)}renderAsync(e,t,r,n,o){return this.renderWithScopeAsync(this,e,t,r,n,o)}renderWithScopeAsync(e,t,r,n,o,i){let a,s,l,c="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,d="function"==typeof i?i:"function"==typeof n?n:"function"==typeof r?r:"function"==typeof t?t:"function"==typeof o?o:null;if(d||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(e),e)}),!c)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(c," (param ").concat(t,"because it is not a valid renderable.")),d(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(c," (param ").concat(t,"because it is not a valid renderable.")));if("__Virtual"==c?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof r?r:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&"function"!=typeof o&&o.TransactionHash,RootRenderableViewHash:o&&"function"!=typeof o&&o.RootRenderableViewHash}:(a=Object.assign({},this.renderables[c]),a.ContentDestinationAddress="string"==typeof r?r:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(c,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(t,") because it does not exist.")),d(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(t,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(t,") because it does not have a valid destination address.")),d(new Error("Could not render ".concat(c)));"object"==typeof n?(l=n,s="Passed in as object"):(s="string"==typeof n?n:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,l="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(c,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));let h=this.fable.newAnticipate();h.anticipate(e=>{this.onBeforeRenderAsync(e,a)}),h.anticipate(r=>{this.pict.parseTemplateByHash(a.TemplateHash,l,(e,n)=>e?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(c," (param ").concat(t,") because it did not parse the template."),e),r(e)):(a.Content=n,r()),[this],e,{RootRenderable:"object"==typeof o?o:a})}),h.anticipate(e=>{this.onBeforeProjectAsync(e,a)}),h.anticipate(e=>{this.onProjectAsync(e,a)}),"virtual-assignment"!==a.RenderMethod&&(h.anticipate(e=>{this.onAfterProjectAsync(e,a)}),h.anticipate(e=>{this.onAfterRenderAsync(e,a)})),h.wait(d)}renderDefaultAsync(e){this.renderAsync(e)}basicRender(e,t,r){return this.basicRenderWithScope(this,e,t,r)}basicRenderWithScope(e,t,r,n){let o=this.buildRenderOptions(t,r,n);return o.Valid?(this.assignRenderContent(o.Renderable,o.DestinationAddress,this.pict.parseTemplateByHash(o.Renderable.TemplateHash,o.Record,null,[this],e,{RootRenderable:o.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(o.RenderableHash," because it is not valid.")),!1)}basicRenderAsync(e,t,r,n){return this.basicRenderWithScopeAsync(this,e,t,r,n)}basicRenderWithScopeAsync(e,t,r,n,o){let i="function"==typeof o?o:"function"==typeof n?n:"function"==typeof r?r:"function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync Auto Callback Error: ").concat(e),e)});const a=this.buildRenderOptions(t,r,n);if(!a.Valid){let e="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(a.RenderableHash," because it is not valid.");return this.log.error(e),i(new Error(e))}this.pict.parseTemplateByHash(a.Renderable.TemplateHash,a.Record,(e,t)=>e?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(a.RenderableHash," because it did not parse the template."),e),i(e)):(this.assignRenderContent(a.Renderable,a.DestinationAddress,t),i()),[this],e,{RootRenderable:a.Renderable})}onProject(e){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===e.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(e.TransactionHash,{ViewHash:this.Hash,Renderable:e},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(e.RenderableHash,"] content length ").concat(e.Content.length," to Destination [").concat(e.ContentDestinationAddress,"] using Async render method ").concat(e.RenderMethod,".")),this.pict.ContentAssignment.projectContent(e.RenderMethod,e.ContentDestinationAddress,e.Content,e.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}onProjectAsync(e,t){return this.onProject(t),e()}onAfterRender(e){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),e&&e.RootRenderableViewHash===this.Hash){const t=this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[];for(const r of t){const t=this.pict.views[r.Data.ViewHash];t?(t.onAfterProject(),t.onAfterRender(r.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(r.Data.ViewHash,"."))}this.pict.TransactionTracking.unregisterTransaction(e.TransactionHash)}return!0}onAfterRenderAsync(e,t){this.onAfterRender(t);const r=this.fable.newAnticipate(),n=t&&t.RootRenderableViewHash===this.Hash;if(n){const e=this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[];for(const n of e){const e=this.pict.views[n.Data.ViewHash];e?(r.anticipate(e.onAfterProjectAsync.bind(e)),r.anticipate(t=>{e.onAfterRenderAsync(t,n.Data.Renderable)})):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(n.Data.ViewHash,"."))}}return r.wait(r=>(n&&t&&t.TransactionHash&&this.pict.TransactionTracking.unregisterTransaction(t.TransactionHash),e(r)))}onAfterProject(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}onAfterProjectAsync(e,t){return e()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}onBeforeSolveAsync(e){return this.onBeforeSolve(),e()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}onSolveAsync(e){return this.onSolve(),e()}solve(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}solveAsync(e){let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e?e:null;r||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeSolveAsync.bind(this)),t.anticipate(this.onSolveAsync.bind(this)),t.anticipate(this.onAfterSolveAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," solveAsync() complete.")),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),r(e)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}onAfterSolveAsync(e){return this.onAfterSolve(),e()}onBeforeMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}onBeforeMarshalFromViewAsync(e){return this.onBeforeMarshalFromView(),e()}onMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}onMarshalFromViewAsync(e){return this.onMarshalFromView(),e()}marshalFromView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalFromViewAsync(e){let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e?e:null;r||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),t.anticipate(this.onMarshalFromViewAsync.bind(this)),t.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalFromViewAsync() complete.")),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),r(e)))}onAfterMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}onAfterMarshalFromViewAsync(e){return this.onAfterMarshalFromView(),e()}onBeforeMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}onBeforeMarshalToViewAsync(e){return this.onBeforeMarshalToView(),e()}onMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}onMarshalToViewAsync(e){return this.onMarshalToView(),e()}marshalToView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalToViewAsync(e){let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e?e:null;r||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),t.anticipate(this.onMarshalToViewAsync.bind(this)),t.anticipate(this.onAfterMarshalToViewAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalToViewAsync() complete.")),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),r(e)))}onAfterMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}onAfterMarshalToViewAsync(e){return this.onAfterMarshalToView(),e()}get isPictView(){return!0}}},{"../package.json":215,"fable-serviceproviderbase":59}],217:[function(e,t,r){t.exports={name:"pict",version:"1.0.368",description:"Pict browser library.",main:"source/Pict.js",scripts:{start:"node source/Pict.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",prepublishOnly:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":'docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-image:local',"docker-dev-shell":"docker exec -it pict-dev /bin/bash",lint:"eslint source/**/*.js test/**/*.js",types:"tsc -p ."},files:["source/","dist/","types/"],types:"types/source/Pict.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict/issues"},homepage:"https://github.com/stevenvelozo/pict#readme",devDependencies:{"@eslint/js":"^9.39.1","@types/jquery":"^3.5.33","@types/sinon":"^17.0.4",eslint:"^9.39.1",globals:"^16.5.0","pict-docuserve":"^1.0.0",quackage:"^1.2.3",sinon:"^20.0.0",typescript:"^5.9.3"},dependencies:{cachetrax:"^1.0.6",fable:"^3.1.72","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-template":"^1.0.15","pict-view":"^1.0.68"}}},{}],218:[function(e,t,r){t.exports=function(e,t){let r=void 0===t?0:t;e&&"object"==typeof e.default_configuration&&"pict_configuration"in e.default_configuration?window._Pict=new Pict(e.default_configuration.pict_configuration):window._Pict=new Pict,window._Pict.LogNoisiness=r;let n="DefaultApplication",o={};"default_configuration"in e&&(o=e.default_configuration,"Hash"in o&&"string"==typeof o.Hash&&(n=o.Hash)),_Pict.log.info("Loading the pict application [".concat(n,"] and associated views.")),_Pict.addApplication(n,o,e),_Pict.PictApplication.initializeAsync(function(e){e&&console.log("Error initializing the pict application: "+e),_Pict.log.info("Loading the Application and associated views.")})}},{}],219:[function(e,t,r){t.exports=function(e){document?"loading"!=document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",function(){e()}):document.attachEvent("onreadystatechange",function(){"complete"==document.readyState&&e()}):console.log("No document object found; no initialization happening.")}},{}],220:[function(e,t,r){const n=e("fable").ServiceProviderBase,o="#PICT-CSS";t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.services,this.fable,void 0===this.options.CSSElementAddress&&(this.options.CSSElementAddress=o),this.inlineCSSMap={},this.fable.addSolverFunction(this.fable.expressionParser,"createcsscolorrgbfromnumeric",this.createCssColorRGBFromNumeric.bind(this),"Create a CSS color from RGB components")}addCSS(e,t,r,n){let o=void 0!==r?r:1e3,i="string"==typeof n?n:"Unknown";this.inlineCSSMap[e]={Hash:e,Content:t,Provider:i,Priority:o}}removeCSS(e){delete this.inlineCSSMap[e]}createCssColorRGBFromNumeric(e,t,r){let n=parseFloat(e),o=parseFloat(t),i=parseFloat(r);if(isNaN(n)||isNaN(o)||isNaN(i))return"#000000";if(n<=1&&o<=1&&i<=1)n=Math.round(255*n),o=Math.round(255*o),i=Math.round(255*i);else if(n<=255&&o<=255&&i<=255)n=Math.round(n),o=Math.round(o),i=Math.round(i);else{let e=Math.max(Math.max(n,o),i);n=Math.round(n/e*255),o=Math.round(o/e*255),i=Math.round(i/e*255)}n=Math.abs(n),o=Math.abs(o),i=Math.abs(i);let a=n.toString(16).padStart(2,"0"),s=o.toString(16).padStart(2,"0"),l=i.toString(16).padStart(2,"0");return"#".concat(a).concat(s).concat(l)}generateCSS(){let e="",t=Object.keys(this.inlineCSSMap);t.sort((e,t)=>this.inlineCSSMap[e].Priority-this.inlineCSSMap[t].Priority);for(let r=0;r<t.length;r++){let n=this.inlineCSSMap[t[r]],o=n.Hash;n.Hash!=n.Provider&&(o="".concat(o," from ").concat(n.Provider)),e+="/* ".concat(o," */\n").concat(n.Content,"\n")}return e}injectCSS(){this.services.ContentAssignment.assignContent(this.options.CSSElementAddress,this.generateCSS())}}},{fable:68}],221:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.fable,this.serviceType="PictContentAssignment",this.manifest=e.newManyfest(),this.inBrowser=!1,this.hasDocument=!1,"object"==typeof window&&(this.inBrowser=!0,void 0!==window.document&&"function"==typeof window.document.querySelectorAll&&(this.hasDocument=!0)),this.hasJquery=!1,this.jQuery=!1,this.inBrowser&&void 0!==window.jQuery&&(this.hasJquery=!0),this.customAssignFunction=null,this.customPrependFunction=null,this.customAppendFunction=null,this.customInsertBeforeFunction=null,this.customInsertAfterFunction=null,this.customReadFunction=null,this.customGetElementFunction=null,this.customReadAttributeFunction=null,this.customSetAttributeFunction=null,this.customRemoveAttributeFunction=null,this.customReadClassFunction=null,this.customSetClassFunction=null,this.customRemoveClassFunction=null}getElement(e){if(this.customGetElementFunction)return this.customGetElementFunction(e);if(this.hasJquery){let t=window.jQuery(e);if(0==t.length)return[];let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}if(this.inBrowser&&this.hasDocument){const t=window.document.querySelectorAll(e);let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}return this.log.trace("PICT Content GET ELEMENT for [".concat(e,"] will return empty because none of the browser methods are available")),[]}assignContent(e,t){if(this.customAssignFunction)return this.customAssignFunction(e,t);if(this.hasJquery){const r=window.jQuery(e);for(let e=0;e<r.length;e++){const n=r[e];switch(n.tagName){case"INPUT":n instanceof HTMLInputElement&&"checkbox"==n.type&&(n.checked=Boolean(t));case"SELECT":case"TEXTAREA":(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement)&&(n.value=String(t));break;case"SCRIPT":n instanceof HTMLScriptElement&&(n.text=String(t));break;default:n.innerHTML=String(t)}}}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++){const n=r[e];switch(r[e].tagName){case"INPUT":n instanceof HTMLInputElement&&"checkbox"==n.type&&(n.checked=Boolean(t));case"SELECT":case"TEXTAREA":(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement)&&(n.value=String(t));break;case"SCRIPT":n instanceof HTMLScriptElement&&(n.text=String(t));break;default:n.innerHTML=String(t)}}}else this.log.trace("PICT Content ASSIGN to [".concat(e,"]:"),t)}appendContent(e,t){if(this.customAppendFunction)return this.customAppendFunction(e,t);if(this.hasJquery){window.jQuery(e).append(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforeend",t)}else this.log.trace("PICT Content APPEND to [".concat(e,"]:"),t)}insertContentBefore(e,t){if(this.customInsertBeforeFunction)return this.customInsertBeforeFunction(e,t);if(this.hasJquery)window.jQuery(t).insertBefore(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforebegin",t)}else this.log.trace("PICT Content INSERT BEFORE [".concat(e,"]:"),t)}insertContentAfter(e,t){if(this.customInsertAfterFunction)return this.customInsertAfterFunction(e,t);if(this.hasJquery)window.jQuery(t).insertAfter(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterend",t)}else this.log.trace("PICT Content INSERT AFTER [".concat(e,"]:"),t)}prependContent(e,t){if(this.customAppendFunction)return this.customPrependFunction(e,t);if(this.hasJquery){window.jQuery(e).prepend(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterbegin",t)}else this.log.trace("PICT Content PREPEND in [".concat(e,"]:"),t)}projectContent(e,t,r,n){switch(e){case"virtual-assignment":return this.manifest.setValueByHash(this.fable,t,r);case"append":return this.appendContent(t,r);case"prepend":return this.prependContent(t,r);case"append_once":{if("string"==typeof n&&n.length>0){if(this.getElement(n).length<1)return this.appendContent(t,r);break}let e=this.readContent(t);if(null==e||""===String(e).trim())return this.appendContent(t,r);break}default:return this.assignContent(t,r)}}readContent(e){if(this.customReadFunction)return this.customReadFunction(e);if(this.hasJquery){const t=window.jQuery(e);switch(t.prop("tagName")){case"INPUT":if("checkbox"==t.attr("type"))return t.prop("checked");case"SELECT":case"TEXTAREA":return t.val();case"SCRIPT":return t.text();default:return t.html()}}else{if(!this.inBrowser||!this.hasDocument)return this.log.trace("PICT Content READ from [".concat(e,"]...")),"";{let t="string"==typeof e?window.document.querySelectorAll(e):[e];if(t.length<1)return null;if(1==t.length){const e=t[0];switch(e.tagName){case"INPUT":if(e instanceof HTMLInputElement&&"checkbox"==e.type)return e.checked;case"SELECT":case"TEXTAREA":if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return e.value;case"SCRIPT":if(e instanceof HTMLScriptElement)return e.text;default:return e.innerHTML}}}}}addClass(e,t){if(this.customSetClassFunction)return this.customSetClassFunction(e,t);if(this.hasJquery){window.jQuery(e).addClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const n of t)r[e].classList.add(n);else r[e].classList.add(t)}else this.log.trace("PICT Content ADDCLASS to [".concat(e,"]:"),t)}removeClass(e,t){if(this.customRemoveClassFunction)return this.customRemoveClassFunction(e,t);if(this.hasJquery){window.jQuery(e).removeClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const n of t)r[e].classList.remove(n);else r[e].classList.remove(t)}else this.log.trace("PICT Content REMOVECLASS from [".concat(e,"]:"),t)}readAttribute(e,t){if(this.customReadAttributeFunction)return this.customReadAttributeFunction(e,t);if(this.hasJquery){return window.jQuery(e).attr(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].getAttribute(t);return r}this.log.trace("PICT Content READATTRIBUTE from [".concat(e,"]:"),t)}setAttribute(e,t,r){if(this.customSetAttributeFunction)return this.customSetAttributeFunction(e,t,r);if(this.hasJquery){window.jQuery(e).attr(t,r)}else if(this.inBrowser&&this.hasDocument){const n="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<n.length;e++)n[e].setAttribute(t,r)}else this.log.trace("PICT Content SETATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]:"),r)}removeAttribute(e,t){if(this.customRemoveAttributeFunction)return this.customRemoveAttributeFunction(e,t);if(this.hasJquery){window.jQuery(e).removeAttr(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].removeAttribute(t)}else this.log.trace("PICT Content REMOVEATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]"))}hasClass(e,t){if(this.customReadClassFunction)return this.customReadClassFunction(e,t);if(this.hasJquery){return window.jQuery(e).hasClass(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(r[e].classList.contains(t))return!0;return!1}return this.log.trace("PICT Content HASCLASS for [".concat(e,"] CLASS [").concat(t,"]:")),!1}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}}},{fable:68}],222:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.fable,this.serviceType="PictDataProvider"}getDataByAddress(e,t){let r=void 0===t?{}:t;const n={Fable:this.fable,Pict:this.fable,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Record:r};return this.fable.manifest.getValueByHash(n,e)}}},{fable:68}],223:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){var n;super(e,t,r),this.options,this.fable,this.log,this.serviceType="PictMeadowProvider",this.fable.settings.PictDefaultURLPrefix?this.options.urlPrefix=this.fable.settings.PictDefaultURLPrefix:this.options.urlPrefix||(this.options.urlPrefix="/1.0/"),this.options.downloadBatchSize||("number"==typeof this.fable.settings.PictDefaultDownloadBatchSize?this.options.downloadBatchSize=this.fable.settings.PictDefaultDownloadBatchSize:this.options.downloadBatchSize=100),"number"!=typeof this.options.downloadPageConcurrency&&(this.options.downloadPageConcurrency="number"==typeof this.fable.settings.PictDefaultDownloadPageConcurrency?this.fable.settings.PictDefaultDownloadPageConcurrency:4),"number"!=typeof this.options.maxBundleConcurrency&&(this.options.maxBundleConcurrency="number"==typeof this.fable.settings.PictDefaultMaxBundleConcurrency?this.fable.settings.PictDefaultMaxBundleConcurrency:8),this.restClient=null!==(n=this.fable.RestClient)&&void 0!==n?n:this.fable.instantiateServiceProviderWithoutRegistration("RestClient"),this.recordCache={},this.recordSetCache={},this.entityColumnTranslations={CreatingIDUser:"User",UpdatingIDUser:"User",DeletingIDUser:"User"},this.prepareRequestOptions=e=>e,this.lastBundleWaves=null}initializeCache(e){e in this.recordCache||(this.recordCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordCache[e].maxAge=3e4,this.recordCache[e].maxLength=1e4,this.fable.Bundle[e]=this.recordCache[e].RecordMap),e in this.recordSetCache||(this.recordSetCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordSetCache[e].maxAge=1e4,this.recordSetCache[e].maxLength=100)}gatherEntitySetCount(e,t,r){return e.CountOnly=!0,this.gatherEntitySet(e,t,r)}gatherEntitySet(e,t,r){if(!("Entity"in e)||"string"!=typeof e.Entity)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain an Entity string."),r();if(!("Destination"in e)||"string"!=typeof e.Destination)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain a Destination string."),r();"Filter"in e&&"string"==typeof e.Filter||(e.Filter=""),"FilterData"in e&&"object"==typeof e.FilterData||(e.FilterData={}),t.StepData=e.FilterData,"RecordStartCursor"in e&&"number"==typeof e.RecordStartCursor||(e.RecordStartCursor=0),"PageSize"in e&&"number"==typeof e.PageSize||(e.PageSize=1e4),"AllRecords"in e&&"boolean"==typeof e.AllRecords||(e.AllRecords=!1);let n=null,o=null;e.PageSize&&(n=e.RecordStartCursor,o=e.PageSize);const i=this.fable.parseTemplate(e.Filter,t),a=(a,s)=>a?(this.log.error("EntityBundleRequest request Error getting entity set for [".concat(e.Entity,"] with filter [").concat(i,"]: ").concat(a),a),r(a)):(e.CountOnly?(this.log.trace("EntityBundleRequest counted ".concat(s," records for ").concat(e.Entity," filtered to [").concat(i,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(o,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,s)):e.SingleRecord?(this.log.trace("EntityBundleRequest found ".concat(s.length," records for ").concat(e.Entity," filtered to [").concat(i,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(o,"]"))),s.length>1&&this.log.warn("EntityBundleRequest found more than one record for ".concat(e.Entity," filtered to [").concat(i,"] but SingleRecord is true; setting the first record.")),s.length<1&&this.fable.manifest.setValueByHash(t,e.Destination,!1),this.fable.manifest.setValueByHash(t,e.Destination,s[0])):(this.log.trace("EntityBundleRequest found ".concat(s.length," records for ").concat(e.Entity," filtered to [").concat(i,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(n,"/").concat(o,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,s)),r());e.CountOnly?this.getEntitySetRecordCount(e.Entity,i,a,e.Postfix):o&&!e.AllRecords?this.getEntitySetPage(e.Entity,i,n,o,a,e.Postfix):this.getEntitySet(e.Entity,i,a,e.Postfix,e)}mapJoinSingleDestination(e,t,r){const n=this.fable.manifest.getValueByHash(r,t.JoinRecordSetAddress);if(!Array.isArray(n))throw new Error("EntityBundleRequest failed to map join because the source [".concat(t.JoinRecordSetAddress,"] did not return an array."));const o={};for(const e of n){o[e[t.JoinValue]]=e}for(const r of n)if(r)if(t.BucketBy||t.BucketByTemplate){const n=[];if(t.BucketBy){const e=Array.isArray(t.BucketBy)?t.BucketBy:[t.BucketBy];for(const t of e){const e=this.fable.manifest.getValueByHash(r,t);n.push(e)}}else{const e=Array.isArray(t.BucketByTemplate)?t.BucketByTemplate:[t.BucketByTemplate];for(const t of e){const e=this.fable.parseTemplate(t,r);e&&n.push(e)}}if(n.length<1)this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to map join because no bucket values were found.",{pCustomRequestInformation:t,tmpSourceEntity:r});else{const o="".concat(t.RecordDestinationAddress,".").concat(n.join("."));if(t.SingleRecord)this.fable.manifest.setValueByHash(e,o,r);else{let t=this.fable.manifest.getValueByHash(e,o,r);t||(t=[],this.fable.manifest.setValueByHash(e,o,t)),t.push(r)}}}else t.SingleRecord?(e[t.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(t.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),e[t.RecordDestinationAddress]=r):(e[t.RecordDestinationAddress]=e[t.RecordDestinationAddress]||[],e[t.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the source entity was not found in the source lookup.");return[e]}mapJoin(e,t){const r=e.DestinationRecordAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordAddress):null,n=e.DestinationRecordSetAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordSetAddress):null;if(!Array.isArray(n)&&!r)throw new Error("EntityBundleRequest failed to map join because the destination [".concat(e.DestinationRecordSetAddress,"] did not return an array."));if(r)return this.mapJoinSingleDestination(r,e,t);const o=this.fable.manifest.getValueByHash(t,e.Joins);if(!Array.isArray(o))throw new Error("EntityBundleRequest failed to map join because the join [".concat(e.Joins,"] did not return an array."));const i=this.fable.manifest.getValueByHash(t,e.JoinRecordSetAddress);if(!Array.isArray(i))throw new Error("EntityBundleRequest failed to map join because the source [".concat(e.JoinRecordSetAddress,"] did not return an array."));const a=e.JoinJoinValueLHS||e.DestinationJoinValue,s=e.JoinJoinValueRHS||e.JoinValue,l={},c={},d={};for(const t of n||[]){l[t[e.DestinationJoinValue]]=t}for(const t of i){c[t[e.JoinValue]]=t}for(const e of o){const t=e[a],r=e[s];d[t]=d[t]||new Set,d[t].add(r)}for(const t of Object.keys(d)){const r=Array.from(d[t]),n=l[t];if(n)for(const t of r){const r=c[t];if(r)if(e.BucketBy||e.BucketByTemplate){const t=[];if(e.BucketBy){const n=Array.isArray(e.BucketBy)?e.BucketBy:[e.BucketBy];for(const e of n){const n=this.fable.manifest.getValueByHash(r,e);t.push(n)}}else{const n=Array.isArray(e.BucketByTemplate)?e.BucketByTemplate:[e.BucketByTemplate];for(const e of n){const n=this.fable.parseTemplate(e,r);t.push(n)}}n[e.RecordDestinationAddress]||(n[e.RecordDestinationAddress]={});const o="".concat(e.RecordDestinationAddress,".").concat(t.join("."));if(e.SingleRecord)this.fable.manifest.setValueByHash(n,o,r);else{let e=this.fable.manifest.getValueByHash(n,o,r);e||(e=[],this.fable.manifest.setValueByHash(n,o,e)),e.push(r)}}else e.SingleRecord?(n[e.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(e.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),n[e.RecordDestinationAddress]=r):(n[e.RecordDestinationAddress]=n[e.RecordDestinationAddress]||[],n[e.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the RHS join value [".concat(t,"] was not found in the source lookup."))}else this.log.error("EntityBundleRequest failed to map join because the LHS join value [".concat(t,"] was not found in the destination lookup."))}return n}projectDataset(e,t){let r=this.fable.manifest.getValueByHash(t,e.InputRecordsetAddress);if(null==typeof r||"object"!=typeof r)throw new Error("EntityBundleRequest failed to project dataset because the input recordset [".concat(e.InputRecordsetAddress,"] did not return an valid object."));Array.isArray(r)||(r=[r]);let n=this.fable.manifest.getValueByHash(t,e.OutputRecordsetAddress);n||(n=[],this.fable.manifest.setValueByHash(t,e.OutputRecordsetAddress,n));for(const o of r){let r,i=n;"object"==typeof e.OutputRecordsetAddressMapping&&(r=this._resolveOutputRecordsetAddressMapping(e,t,o),r&&(i=this.fable.manifest.getValueByHash(t,r),i||(i=[],this.fable.manifest.setValueByHash(t,r,i))),i&&Array.isArray(i)||(i=n));const a=this.fable.parseTemplate(e.RecordPrototypeAddress,Object.assign({InputRecord:o},t)),s=this.fable.manifest.getValueByHash(Object.assign({InputRecord:o,OutputRecordset:i},t),a);let l={};Array.isArray(s)&&s.length>0?l=s[0]:i.push(l);let c=e.RecordFieldMapping[r]||e.RecordFieldMapping.Default;if(c||(c=e.RecordFieldMapping[Object.keys(e.RecordFieldMapping)[0]]),!c)throw new Error("EntityBundleRequest failed to project dataset because the record field mapping for [".concat(r,"] did not return a mapping."));for(const e of Object.keys(c)){const r=c[e],n=this.fable.manifest.getValueByHash(Object.assign({InputRecord:o},t),e);this.fable.manifest.setValueByHash(Object.assign({OutputRecord:l},t),r,n)}}}_resolveOutputRecordsetAddressMapping(e,t,r){const n=Object.assign({InputRecord:r},t);for(const t of Object.keys(e.OutputRecordsetAddressMapping)){const[r,o,i]=t.split(","),a=this.fable.manifest.getValueByHash(n,r);if(a){if("AnyContains"===o){if(!Array.isArray(a)){this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return an array."));continue}for(const r of a)if(String(r).includes(i))return e.OutputRecordsetAddressMapping[t]}}else this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return a value."))}return null}gatherCustomDataSet(e,t,r){if(!("URL"in e)||"string"!=typeof e.URL)return this.log.warn("EntityBundleRequest failed to parse custom data request because the stanza did not contain a URL string."),r();"URLData"in e&&"object"==typeof e.URLData||(e.URLData={}),t.StepData=e.URLData;const n=this.fable.parseTemplate(e.URL,t);""==n&&this.log.warn("EntityBundleRequest failed to parse custom data request because the entity Filter did not return a string for FilterBy");let o="";const i=!!e.Host&&e.Host,a=e.Protocol?e.Protocol:"https",s=!!e.Port&&e.Port;i?(o="".concat(a,"://").concat(i),s&&(o+=":".concat(s))):o=this.fable.EntityProvider.options.urlPrefix;let l={url:"".concat(o).concat(n)};return l=this.fable.EntityProvider.prepareRequestOptions(l),this.fable.EntityProvider.restClient.getJSON(l,(o,i,a)=>o?(this.log.error("EntityBundleRequest request Error getting data set for [".concat(e.Entity,"] with filter [").concat(n,"]: ").concat(o),o),r(o)):(this.log.trace("EntityBundleRequest completed request for ".concat(e.Entity," filtered to [").concat(n,"]")),e.Destination&&this.fable.manifest.setValueByHash(t,e.Destination,a),r()))}processBundle(e){if(!Array.isArray(e))throw this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");const t=[];let r={};for(const n of e)try{switch(n.Type){case"SetStateAddress":t.push(r),r=this.fable.manifest.getValueByHash(this.fable,n.StateAddress),void 0===r&&(r={},this.fable.manifest.setValueByHash(this.fable,n.StateAddress,r));break;case"PopState":t.length>0?r=t.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");break;case"MapJoin":this.mapJoin(n,this.prepareState(r,n));break;case"ProjectDataset":this.projectDataset(n,this.prepareState(r,n));break;default:this.log.error("EntityBundleRequest encountered an unsupported type [".concat(n.Type,"] in the entity bundle description."))}}catch(e){this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack})}}extractStepDependencies(e){const t=new Set,r=[];"string"==typeof e.Filter&&r.push(e.Filter),"string"==typeof e.URL&&r.push(e.URL),"string"==typeof e.BucketByTemplate&&r.push(e.BucketByTemplate);const n=e=>{"string"==typeof e&&e.startsWith("Record.")?t.add(e.substring(7)):t.add(e)};for(const e of r){const t=e.matchAll(/\^([^~}^]+)~\}/g);for(const e of t)n(e[1]);const r=e.matchAll(/\{~D:([^~}]+)~\}/g);for(const e of r)n(e[1])}if("MapJoin"===e.Type&&("string"==typeof e.DestinationRecordSetAddress&&n(e.DestinationRecordSetAddress),"string"==typeof e.DestinationRecordAddress&&n(e.DestinationRecordAddress),"string"==typeof e.Joins&&n(e.Joins),"string"==typeof e.JoinRecordSetAddress&&n(e.JoinRecordSetAddress)),"ProjectDataset"===e.Type&&"string"==typeof e.InputRecordsetAddress){n(e.InputRecordsetAddress.split("[]")[0])}return t}buildBundleWaves(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r],o="MapJoin"===n.Type||"ProjectDataset"===n.Type;t.push({Index:r,Step:n,Destination:"string"==typeof n.Destination?n.Destination:null,Dependencies:this.extractStepDependencies(n),IsBarrier:"SetStateAddress"===n.Type||"PopState"===n.Type,ForceSequential:o?!0!==n.Parallel:!1===n.Parallel})}const r=[],n=new Set,o=new Set(t.map(e=>e.Index));for(;o.size>0;){const e=[];for(const r of o){const i=t[r];if(i.IsBarrier){0===e.length&&e.push(i);break}if(e.length>0&&e[0].IsBarrier)break;let a=!0;for(const r of i.Dependencies){let s=!1;for(const e of n)if(r===e||r.startsWith(e+".")){s=!0;break}if(s)continue;let l=!1;for(const e of o){if(e===i.Index)continue;const n=t[e];if(n.Destination&&(r===n.Destination||r.startsWith(n.Destination+"."))){l=!0;break}}if(!l)for(const t of e)if(t.Destination&&(r===t.Destination||r.startsWith(t.Destination+"."))){l=!0;break}if(l){a=!1;break}}if(a)if(i.ForceSequential){if(0===e.length){e.push(i);break}}else e.push(i)}if(0===e.length){const r=o.values().next().value;e.push(t[r])}r.push(e.map(e=>({Index:e.Index,Step:e.Step})));for(const t of e)o.delete(t.Index),t.Destination&&n.add(t.Destination)}return r}gatherDataFromServer(e,t){if(!Array.isArray(e))return this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),t(new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."));const r=[];let n={};const o=this.buildBundleWaves(e);this.lastBundleWaves=o;const i="number"==typeof this.options.maxBundleConcurrency?this.options.maxBundleConcurrency:8;let a=0;const s=()=>{if(a>=o.length)return t();const e=o[a];a++;let l=this.fable.newAnticipate();l.maxOperations=Math.min(e.length,i);for(let t=0;t<e.length;t++){const o=e[t].Step;l.anticipate(e=>{try{switch(o.Type){case"SetStateAddress":return r.push(n),n=this.fable.manifest.getValueByHash(this.fable,o.StateAddress),void 0===n&&(n={},this.fable.manifest.setValueByHash(this.fable,o.StateAddress,n)),e();case"PopState":return r.length>0?n=r.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress."),e();case"Custom":return this.gatherCustomDataSet(o,this.prepareState(n,o),e);case"MapJoin":return this.mapJoin(o,this.prepareState(n,o)),e();case"ProjectDataset":return this.projectDataset(o,this.prepareState(n,o)),e();case"MeadowEntityCount":return this.gatherEntitySetCount(o,this.prepareState(n,o),e);default:return this.gatherEntitySet(o,this.prepareState(n,o),e)}}catch(t){return this.log.error("EntityBundleRequest error gathering entity set: ".concat(t),{Stack:t.stack}),e()}})}l.wait(e=>e?(this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack}),t(e)):s())};s()}prepareState(e,t){return{State:e,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Pict:this.fable,Fable:this.fable,StepConfiguration:t}}getEntity(e,t,r){this.initializeCache(e),this.recordCache[e].prune(function(){let n=this.recordCache[e].read(t);if(n)return r(null,n);let o={url:"".concat(this.options.urlPrefix).concat(e,"/").concat(t)};return o=this.prepareRequestOptions(o),this.restClient.getJSON(o,(n,o,i)=>(i&&this.recordCache[e].put(i,t),r(n,i)))}.bind(this))}cacheConnectedEntityRecords(e,t,r,n,o){if(!Array.isArray(e)||e.length<1)return o();if(!Array.isArray(t)||t.length<1)return o();const i=this.fable.newAnticipate(),a=r||[];for(let r=0;r<t.length;r++){const n=t[r],o=a[r]||n.replace(/^ID/,""),s=("ID".concat(o),new Set);this.initializeCache(o);for(const t of e){const e=t[n];if(e){this.recordCache[o].read(e)||s.add(e)}}s.size>0&&i.anticipate(function(e){const t=Array.from(s),r="FBL~ID".concat(o,"~INN~").concat(t.join(","));this.getEntitySet(o,r,(r,n)=>r?(this.log.error("cacheConnectedEntityRecords error getting connected entity records for [".concat(o,"] with IDs [").concat(t.join(","),"]: ").concat(r),{Stack:r.stack}),e(r)):e())}.bind(this))}i.wait(e=>e?(this.log.error("cacheConnectedEntityRecords error gathering connected entity records: ".concat(e),{Stack:e.stack}),o(e)):o())}cacheIndividualEntityRecords(e,t){this.initializeCache(e);const r=t;if(Array.isArray(r)&&r.length>0){const t="ID".concat(e);if(r[0]&&"object"==typeof r[0]&&t in r[0])for(let n=0;n<r.length;n++){const o=r[n],i=o[t];i&&this.recordCache[e].put(o,i)}}}getEntitySetPage(e,t,r,n,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";const a=t?"/FilteredTo/".concat(t):"",s="".concat(this.options.urlPrefix).concat(e,"s").concat(a,"/").concat(r,"/").concat(n);return this.restClient.getJSON(s+(i||""),function(i,a,l){return a&&a.statusCode&&a.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(n,"] from url [").concat(s,"]: ").concat(a.statusCode," ").concat(a.statusMessage)),o(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(n,"] from url [").concat(s,"]: ").concat(a.statusCode," ").concat(JSON.stringify(l||{}))))):(this.cacheIndividualEntityRecords(e,l),o(i,l))}.bind(this))}getEntitySetRecordCount(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const o=t?"/FilteredTo/".concat(t):"",i="".concat(this.options.urlPrefix).concat(e,"s/Count").concat(o);return this.restClient.getJSON(i+(n||""),function(n,o,a){if(o&&o.statusCode&&o.statusCode>=400)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(o.statusCode," ").concat(o.statusMessage)),r(new Error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(o.statusCode," ").concat(JSON.stringify(a||{}))));if(n)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(i,"]: ").concat(n)),r(n);let s=0;return a.Count&&(s=a.Count),r(n,s)}.bind(this))}getEntitySetWithAutoCaching(e,t,r){let n=this.fable.newAnticipate(),o={Entity:e,MeadowFilterExpression:t,EntitySet:null};n.anticipate(function(r){this.getEntitySet(e,t,(n,i)=>n?(this.log.error("getEntitySetWithAutoCaching error getting entity set for [".concat(e,"] filtered to [").concat(t,"]: ").concat(n),{Stack:n.stack}),r(n)):(o.EntitySet=i,r()))}.bind(this)),n.anticipate(function(r){if("object"==typeof o.EntitySet&&Array.isArray(o.EntitySet)&&o.EntitySet.length>0){const n=o.EntitySet[0],i=[],a=[];for(const e of Object.keys(n))if(e.startsWith("ID")&&e.length>2){i.push(e);const t=e.substring(2);a.push(t)}else e in this.entityColumnTranslations&&(i.push(e),a.push(this.entityColumnTranslations[e]));return i.length>0?this.cacheConnectedEntityRecords(o.EntitySet,i,a,!1,n=>n?(this.log.error("getEntitySetWithAutoCaching error caching connected entity records for [".concat(e,"] filtered to [").concat(t,"]: ").concat(n),{Stack:n.stack}),r(n)):r()):r()}return r()}.bind(this)),n.wait(function(n){return n?(this.log.error("getEntitySetWithAutoCaching error gathering entity set for [".concat(e,"] filtered to [").concat(t,"]: ").concat(n),{Stack:n.stack}),r(n)):r(null,o.EntitySet)}.bind(this))}getEntitySet(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};this.initializeCache(e),this.recordSetCache[e].prune(function(){let i=this.recordSetCache[e].read(t);return i?r(null,i):this.getEntitySetRecordCount(e,t,(i,a)=>{if(i)return r(i);let s=a;if(isNaN(a))return this.log.error("Entity count did not return a number for [".concat(e,"] filtered to [").concat(t,"]... something is fatally wrong from the server accessed in getEntitySet call.")),r(new Error("Entity count did not return a number in getEntitySet."));let l=this.options.downloadBatchSize;const c=t?"/FilteredTo/".concat(t):"",d=Math.ceil(s/l),h=[];for(let t=0;t<d;t++)h.push({Index:t,URL:"".concat(this.options.urlPrefix).concat(e,"s").concat(c,"/").concat(t*l,"/").concat(l),Records:null});const p="number"==typeof o.DownloadPageConcurrency?o.DownloadPageConcurrency:"number"==typeof this.options.downloadPageConcurrency?this.options.downloadPageConcurrency:4;this.fable.Utility.eachLimit(h,p,(r,o)=>{this.restClient.getJSON(r.URL+(n||""),(n,i,a)=>i&&i.statusCode&&i.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r.URL,"]: ").concat(i.statusCode," ").concat(i.statusMessage)),o(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r.URL,"]: ").concat(i.statusCode," ").concat(JSON.stringify(a||{}))))):(Array.isArray(a)&&(r.Records=a),o(n)))},n=>{let o=[];for(let e=0;e<h.length;e++)Array.isArray(h[e].Records)&&(o=o.concat(h[e].Records));return o&&this.recordSetCache[e].put(o,t),this.cacheIndividualEntityRecords(e,o),r(n,o)})},n)}.bind(this))}formatUrl(e){return"".concat(this.options.urlPrefix).concat(e)}createEntity(e,t,r){let n={url:this.formatUrl(e),body:t};this.restClient.postJSON(n,(t,n,o)=>(t?this.log.error("Error creating ".concat(e," record: ").concat(t.message)):this.log.info("Created ".concat(e," record ID ").concat(o["ID".concat(e)])),r(t,o)))}updateEntity(e,t,r){let n={url:this.formatUrl(e),body:t};this.restClient.putJSON(n,(t,n,o)=>(t?this.log.error("Error updating ".concat(e," record: ").concat(t.message)):this.log.info("Updated ".concat(e," record ID ").concat(o["ID".concat(e)])),r(t,o)))}upsertEntity(e,t,r){let n={url:this.formatUrl("".concat(e,"/Upsert")),body:t};this.restClient.putJSON(n,(t,n,o)=>(t?this.log.error("Error upserting ".concat(e," record: ").concat(t.message)):this.log.info("Upserted ".concat(e," record ID ").concat(o["ID".concat(e)])),r(t,o)))}upsertEntities(e,t,r){let n={url:this.formatUrl("".concat(e,"/Upserts")),body:t};this.restClient.putJSON(n,(t,n,o)=>(t?this.log.error("Error upserting ".concat(e," records: ").concat(t.message)):this.log.info("Upserted multiple ".concat(e," records (count: ").concat(o.length,")")),r(t,o)))}deleteEntity(e,t,r){let n={url:this.formatUrl("".concat(e,"/").concat(t))};this.restClient.delJSON(n,(n,o,i)=>(n?this.log.error("Error deleting ".concat(e," record ID ").concat(t,": ").concat(n.message)):this.log.info("Deleted ".concat(e," record ID ").concat(t)),r(n,i)))}}},{fable:68}],224:[function(e,t,r){const n=e("fable").ServiceProviderBase;class o extends n{constructor(e,t,r){super(e,t,r),this.log,this.UUID,this.Hash,this.serviceType="PictTemplateAudit",this.fable,this.auditLog=[]}prepareAuditing(){this._installWrappers()}_installWrappers(){let e=this.fable,t=this;this._originalParseTemplate=e.parseTemplate.bind(e),this._originalParseTemplateByHash=e.parseTemplateByHash.bind(e),this._originalParseTemplateSet=e.parseTemplateSet.bind(e),this._originalParseTemplateSetByHash=e.parseTemplateSetByHash.bind(e),this._originalParseTemplateSetWithPayload=e.parseTemplateSetWithPayload.bind(e),this._originalParseTemplateSetWithPayloadByHash=e.parseTemplateSetWithPayloadByHash.bind(e),e.parseTemplate=function(r,n,o,i,a,s){if(!e.TemplateDebug)return t._originalParseTemplate(r,n,o,i,a,s);let l=t.prepareState(s,r.substring(0,80)),c=l.state,d=t.beginAudit(c,l.identifier,"parseTemplate",n);if("function"==typeof o){let e=function(e,r){return t.endAudit(c,d),o(e,r)};return t._originalParseTemplate(r,n,e,i,a,c)}{let e=t._originalParseTemplate(r,n,null,i,a,c);return t.endAudit(c,d),e}},e.parseTemplateByHash=function(r,n,o,i,a,s){if(!e.TemplateDebug)return t._originalParseTemplateByHash(r,n,o,i,a,s);let l=t.setHashHint(s,r);return t._originalParseTemplateByHash(r,n,o,i,a,l)},e.parseTemplateSet=function(r,n,o,i,a,s){if(!e.TemplateDebug)return t._originalParseTemplateSet(r,n,o,i,a,s);let l=t.prepareState(s,r.substring(0,80)),c=l.state,d=t.beginAudit(c,l.identifier,"parseTemplateSet",n);if("function"==typeof o){let e=function(e,r){return t.endAudit(c,d),o(e,r)};return t._originalParseTemplateSet(r,n,e,i,a,c)}{let e=t._originalParseTemplateSet(r,n,null,i,a,c);return t.endAudit(c,d),e}},e.parseTemplateSetByHash=function(r,n,o,i,a,s){if(!e.TemplateDebug)return t._originalParseTemplateSetByHash(r,n,o,i,a,s);let l=t.setHashHint(s,r);return t._originalParseTemplateSetByHash(r,n,o,i,a,l)},e.parseTemplateSetWithPayload=function(r,n,o,i,a,s,l){if(!e.TemplateDebug)return t._originalParseTemplateSetWithPayload(r,n,o,i,a,s,l);let c=t.prepareState(l,r.substring(0,80)),d=c.state,h=t.beginAudit(d,c.identifier,"parseTemplateSetWithPayload",n);if("function"==typeof i){let e=function(e,r){return t.endAudit(d,h),i(e,r)};return t._originalParseTemplateSetWithPayload(r,n,o,e,a,s,d)}{let e=t._originalParseTemplateSetWithPayload(r,n,o,null,a,s,d);return t.endAudit(d,h),e}},e.parseTemplateSetWithPayloadByHash=function(r,n,o,i,a,s,l){if(!e.TemplateDebug)return t._originalParseTemplateSetWithPayloadByHash(r,n,o,i,a,s,l);let c=t.setHashHint(l,r);return t._originalParseTemplateSetWithPayloadByHash(r,n,o,i,a,s,c)}}unwrapTemplateFunctions(){let e=this.fable;this._originalParseTemplate&&"function"==typeof this._originalParseTemplate&&(e.parseTemplate=this._originalParseTemplate,this._originalParseTemplate=null),this._originalParseTemplateByHash&&"function"==typeof this._originalParseTemplateByHash&&(e.parseTemplateByHash=this._originalParseTemplateByHash,this._originalParseTemplateByHash=null),this._originalParseTemplateSet&&"function"==typeof this._originalParseTemplateSet&&(e.parseTemplateSet=this._originalParseTemplateSet,this._originalParseTemplateSet=null),this._originalParseTemplateSetByHash&&"function"==typeof this._originalParseTemplateSetByHash&&(e.parseTemplateSetByHash=this._originalParseTemplateSetByHash,this._originalParseTemplateSetByHash=null),this._originalParseTemplateSetWithPayload&&"function"==typeof this._originalParseTemplateSetWithPayload&&(e.parseTemplateSetWithPayload=this._originalParseTemplateSetWithPayload,this._originalParseTemplateSetWithPayload=null)}beginAudit(e,t,r,n){if(!this.fable.TemplateDebug)return null;let o={TemplateHash:t,Entrypoint:r,StartTime:Date.now(),FinishTime:null,Duration:null,DataSize:"object"==typeof n&&null!==n?JSON.stringify(n).length:0,StackTrace:null,ChildTemplates:[]};this.fable.TemplateDebugStack&&(o.StackTrace=(new Error).stack),e&&e._TemplateAuditParent?e._TemplateAuditParent.ChildTemplates.push(o):this.auditLog.push(o);let i=e&&e._TemplateAuditParent?e._TemplateAuditParent:null;return e&&(e._TemplateAuditParent=o),{AuditNode:o,PreviousParent:i}}endAudit(e,t){t&&(t.AuditNode.FinishTime=Date.now(),t.AuditNode.Duration=t.AuditNode.FinishTime-t.AuditNode.StartTime,e&&(e._TemplateAuditParent=t.PreviousParent))}prepareState(e,t){let r=e;this.fable.TemplateDebug&&!r&&(r={});let n=t;return r&&r._TemplateAuditHashHint&&(n=r._TemplateAuditHashHint,delete r._TemplateAuditHashHint),{state:r,identifier:n}}setHashHint(e,t){let r=e;return this.fable.TemplateDebug&&(r||(r={}),r._TemplateAuditHashHint=t),r}clear(){this.auditLog=[]}getSummary(){let e=0,t=0,r=0,n=(o,i)=>{e++,t+=o.Duration||0,i>r&&(r=i);for(let e=0;e<o.ChildTemplates.length;e++)n(o.ChildTemplates[e],i+1)};for(let e=0;e<this.auditLog.length;e++)n(this.auditLog[e],0);return{RootCalls:this.auditLog.length,TotalCalls:e,TotalDuration:t,MaxDepth:r}}}t.exports=o,o.default_configuration={}},{fable:68}],225:[function(e,t,r){const n=e("fable").ServiceProviderBase;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.UUID,this.Hash,this.serviceType="PictTemplateProvider",this.templates={},this.templateSources={},this.defaultTemplates=[],this.loadTemplateFunction=()=>null}addTemplate(e,t,r){this.templates[e]=t,this.templateSources[e]="string"==typeof r?r:"Direct addTemplate('".concat(e,"') function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")}addDefaultTemplate(e,t,r,n){let o={prefix:e,postfix:t,template:r,source:"string"==typeof n?n:"Direct addDefaultTemplate('".concat(e,"','").concat(t,"',..) function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")};"string"!=typeof r&&this.log.error("PictTemplateProvider.addDefaultTemplate: pTemplate is not a string."),this.defaultTemplates.push(o)}checkDefaultTemplateHash(e){for(let t=0;t<this.defaultTemplates.length;t++)if(e.indexOf(this.defaultTemplates[t].postfix)==e.length-this.defaultTemplates[t].postfix.length&&0==e.indexOf(this.defaultTemplates[t].prefix))return this.templates[e]=this.defaultTemplates[t].template,this.templateSources[e]="Auto created in checkDefaultTemplateHash('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(this.defaultTemplates[t].prefix,"]...[").concat(this.defaultTemplates[t].postfix,"]"),this.templates[e];return null}getTemplate(e){return e in this.templates||this.loadTemplate(e),e in this.templates||this.checkDefaultTemplateHash(e),e in this.templates?this.templates[e]:null}loadTemplate(e){let t=this.loadTemplateFunction(e);return t&&(this.templates[e]=t.template,this.templateSources[e]="Loaded in loadTemplate('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(t.source,"]")),t}}},{fable:68}],226:[function(e,t,r){const n=e("./services/Fable-Service-TransactionTracking.js"),o=e("fable"),i=e("../package.json"),a=e("./providers/Provider-Filter-Manager.js"),s=e("./providers/Provider-DataBroker.js"),l=e("./providers/Provider-Icon.js"),c=e("./Pict-Template-Provider.js"),d=e("./Pict-Template-Audit.js"),h=e("./Pict-Content-Assignment.js"),p=e("./Pict-DataProvider.js"),u=e("./Pict-CSS.js"),f=e("./Pict-Meadow-EntityProvider.js");t.exports=class extends o{constructor(t){super(t),this.settings,this.services,this.servicesMap,this.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),this._PackageFable=this._Package,this._Package=i,this.browserAddress="window._Pict","BrowserAddress"in this.settings&&(this.browserAddress=this.settings.BrowserAddress),this.children=[],this.PictApplication=null,this.log,this.instantiateServiceProvider("RestClient"),this.TemplateProvider=null,this.addAndInstantiateServiceType("TemplateProvider",c),this.TemplateAudit=null,this.addAndInstantiateServiceType("TemplateAudit",d),this.EntityProvider=null,this.addAndInstantiateServiceType("EntityProvider",f),this.DataProvider=null,this.addAndInstantiateServiceType("DataProvider",p),this.addServiceTypeIfNotExists("TransactionTracking",n),this.ContentAssignment=null,this.expressionParser=this.instantiateServiceProvider("ExpressionParser"),this.addAndInstantiateServiceType("ContentAssignment",h),this.CSSMap=null,this.addAndInstantiateServiceType("CSSMap",u),this.addServiceType("PictTemplate",e("pict-template")),this.instantiateServiceProvider("MetaTemplate"),this.instantiateServiceProvider("DataGeneration"),this.manifest=this.instantiateServiceProvider("Manifest"),this.AppData={},"DefaultAppData"in this.fable.settings&&(this.AppData=this.fable.settings.DefaultAppData),this.TempData={},this.Bundle={},"DefaultBundle"in this.fable.settings&&(this.Bundle=this.fable.settings.DefaultBundle),this.LogNoisiness=0,this.LogControlFlow=!1,this.LogControlFlowWatchAddressList=[],this.TemplateDebug=!1,this.TemplateDebugStack=!1,this.settings.Manifests&&this.loadManifestSet(this.settings.Manifests),this._DefaultPictTemplatesInitialized=!1,this.initializePictTemplateEngine(),this.addServiceType("PictView",e("pict-view")),this.addServiceType("PictProvider",e("pict-provider")),this.addServiceType("PictApplication",e("pict-application")),this.providers=this.servicesMap.PictProvider,this.views=this.servicesMap.PictView,this.addProvider("FilterManager",{},a),this.addProvider("DataBroker",{},s),this.addProvider("Icon",{},l)}icon(e,t){return this.providers&&this.providers.Icon?this.providers.Icon.get(e,t):""}loadManifestSet(e){if("object"!=typeof e)return void this.log.warn("PICT [".concat(this.UUID,"] could not load Manifest Set; pManifestSet was not an object."));let t=Object.keys(e);if(t.length>0)for(let r=0;r<t.length;r++){let n=t[r];this.instantiateServiceProvider("Manifest",e[n],n)}}addTemplate(e){if("function"!=typeof e)return this.log.warn("PICT [".concat(this.UUID,"] could not add Template; pTemplatePrototype was not a class it was ").concat(typeof e,".")),null;let t=e.template_hash;return this.LogNoisiness>1&&this.log.info("PICT-ControlFlow addTemplate [".concat(t,"]")),this.instantiateServiceProviderFromPrototype("PictTemplate",{},t,e)}addView(e,t,r){let n="object"==typeof t?t:{},o="string"==typeof e?e:this.fable.getUUID(),i=r;if(this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addView [".concat(o,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addView [".concat(o,"]"))),i){const e=i.default_configuration;return e&&(n=this.fable.Utility.extend({},JSON.parse(JSON.stringify(e)),n)),this.instantiateServiceProviderFromPrototype("PictView",n,o,i)}return this.instantiateServiceProvider("PictView",n,o)}addViewSingleton(e,t,r){return e in this.views?this.views[e]:this.addView(e,t,r)}addProviderSingleton(e,t,r){return e in this.providers?this.providers[e]:this.addProvider(e,t,r)}newTransactionTracker(){return this.instantiateServiceProviderWithoutRegistration("TransactionTracking")}addSolverFunction(e,t,r,n){let o=(t||"").trim().toLowerCase(),i=e;return i&&"object"==typeof i&&i.functionMap||(i=this.expressionParser),i.functionMap.hasOwnProperty(o)&&this.log.warn("Pict: Function ".concat(o," already exists in the solver, overwriting with address [").concat(r,"].")),i.functionMap[o]={Name:n||"Autogenerated PICT function ".concat(o),Address:r},i.functionMap[o]}addProvider(e,t,r){let n="object"==typeof t?t:{},o="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addProvider [".concat(o,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addProvider [".concat(o,"]"))),void 0!==r?("default_configuration"in r&&(n=this.fable.Utility.extend({},r.default_configuration,n)),this.instantiateServiceProviderFromPrototype("PictProvider",n,o,r)):this.instantiateServiceProvider("PictProvider",n,o)}addApplication(e,t,r){let n="object"==typeof t?t:{},o="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addApplication [".concat(o,"]:"),{Options:n}):this.log.info("PICT-ControlFlow addApplication [".concat(o,"]"))),void 0!==r?("default_configuration"in r&&(n=this.fable.Utility.extend({},r.default_configuration,n)),this.instantiateServiceProviderFromPrototype("PictApplication",n,o,r)):this.instantiateServiceProvider("PictApplication",n,o)}initializePictTemplateEngine(){this._DefaultPictTemplatesInitialized||(this.addTemplate(e("./templates/Pict-Template-Data.js")),this.addTemplate(e("./templates/Pict-Template-DataWithTemplateFallback.js")),this.addTemplate(e("./templates/Pict-Template-DataWithAbsoluteFallback.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByReference.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromAddress.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByTypes.js")),this.addTemplate(e("./templates/Pict-Template-DataValueByKey.js")),this.addTemplate(e("./templates/Pict-Template-View.js")),this.addTemplate(e("./templates/data/Pict-Template-DataEncodeJavascriptString.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentStart.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentEnd.js")),this.addTemplate(e("./templates/Pict-Template-Self.js")),this.addTemplate(e("./templates/Pict-Template-Icon.js")),this.addTemplate(e("./templates/Pict-Template-Entity.js")),this.addTemplate(e("./templates/Pict-Template-Template.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByDataAddress.js")),this.addTemplate(e("./templates/Pict-Template-SolveByReference.js")),this.addTemplate(e("./templates/Pict-Template-Solve.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateValueSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetWithPayload.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromMap.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetFromMap.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIf.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIfAbsolute.js")),this.addTemplate(e("./templates/logic/Pict-Template-NotEmpty.js")),this.addTemplate(e("./templates/data/Pict-Template-DataJson.js")),this.addTemplate(e("./templates/data/Pict-Template-PascalCaseIdentifier.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-Digits.js")),this.addTemplate(e("./templates/data/Pict-Template-Dollars.js")),this.addTemplate(e("./templates/data/Pict-Template-Join.js")),this.addTemplate(e("./templates/data/Pict-Template-JoinUnique.js")),this.addTemplate(e("./templates/data/Pict-Template-PluckJoinUnique.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumber.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumberString.js")),this.addTemplate(e("./templates/debugging/Pict-Template-Breakpoint.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogStatement.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValue.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValueTree.js")),this.addTemplate(e("./templates/debugging/Pict-Template-DataValueTree.js")),this._DefaultPictTemplatesInitialized=!0)}resolveStateFromAddress(e,t,r,n,o,i){let a=Array.isArray(r)?r:[this],s=o||this,l="object"==typeof n&&null!=n?n:{};return l.Fable=this,l.Pict=this,l.AppData=this.AppData,l.TempData=this.TempData,l.Bundle=this.Bundle,l.Context=a,l.Record=t,l.Scope=s,l.__State=i,this.manifest.getValueByHash(l,e)}setStateValueAtAddress(e,t,r,n,o){let i=Array.isArray(n)?n:[this],a=o||this;const s={Fable:this.fable,Pict:this,AppData:this.AppData,TempData:this.TempData,Bundle:this.Bundle,Context:i,Record:t,Scope:a};return this.manifest.setValueByHash(s,e,r)}parseTemplate(e,t,r,n,o,i){let a,s="object"==typeof t?t:{},l=Array.isArray(n)?n:[this],c=o||this;if(this.LogControlFlow&&(a=this.fable.getUUID(),this.log.info("PICT-ControlFlow parseTemplate ".concat(a," [").concat(e.substring(0,50).replace("\n","\\n"),"...").concat(e.length,"] (fCallback: ").concat(typeof r,") with data size [").concat(JSON.stringify(s).length,"]")),this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(a," template:\n").concat(e)),this.LogControlFlowWatchAddressList.length>0))for(let e=0;e<this.LogControlFlowWatchAddressList.length;e++)this.log.info("PICT-ControlFlow parseTemplate ".concat(a," Watch Value: [").concat(this.LogControlFlowWatchAddressList[e],"]=>[").concat(this.resolveStateFromAddress(this.LogControlFlowWatchAddressList[e],s),"]"));if("function"!=typeof r){let t=this.MetaTemplate.parseString(e,s,null,l,c,i);return this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(a," Template Return Value:\n").concat(t)),t}this.MetaTemplate.parseString(e,s,(e,t)=>(this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(a," Template Async Return Value:\n").concat(t)),r(e,t)),l,c,i)}parseTemplateByHash(e,t,r,n,o,i){let a=this.TemplateProvider.getTemplate(e);return a||(a=""),this.parseTemplate(a,t,r,n,o,i)}parseTemplateSet(e,t,r,n,o,i){let a="";if("function"!=typeof r){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let r=0;r<t.length;r++)a+=this.parseTemplate(e,t[r],null,n,o,i);else{let r=Object.keys(t);for(let s=0;s<r.length;s++)a+=this.parseTemplate(e,t[r[s]],null,n,o,i)}return a}return""}if(!Array.isArray(t)&&"object"!=typeof t)return r(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,(t,r)=>this.parseTemplate(e,t,(e,t)=>(a+=t,r()),n,o,i),e=>r(e,a))}parseTemplateSetByHash(e,t,r,n,o,i){let a=this.TemplateProvider.getTemplate(e);return a||(a=""),this.parseTemplateSet(a,t,r,n,o,i)}parseTemplateSetWithPayload(e,t,r,n,o,i,a){let s="";if("function"!=typeof n){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let n=0;n<t.length;n++)s+=this.parseTemplate(e,{Data:t[n],Payload:r},null,o,i,a);else{let n=Object.keys(t);for(let l=0;l<n.length;l++)s+=this.parseTemplate(e,{Data:t[n[l]],Payload:r},null,o,i,a)}return s}return""}if(!Array.isArray(t)&&"object"!=typeof t)return n(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,(t,n)=>this.parseTemplate(e,{Data:t,Payload:r},(e,t)=>(s+=t,n()),o,i,a),e=>n(e,s))}parseTemplateSetWithPayloadByHash(e,t,r,n,o,i,a){let s=this.TemplateProvider.getTemplate(e);return s||(s=""),this.parseTemplateSetWithPayload(s,t,r,n,o,i,a)}},t.exports.ServiceProviderBase=e("fable-serviceproviderbase"),t.exports.PictApplicationClass=e("pict-application"),t.exports.PictViewClass=e("pict-view"),t.exports.PictProviderClass=e("pict-provider"),t.exports.PictTemplateClass=e("pict-template"),t.exports.EnvironmentLog=e("./environments/Pict-Environment-Log.js"),t.exports.EnvironmentObject=e("./environments/Pict-Environment-Object.js"),t.exports.FilterClauseBase=e("./filters/FilterClauseBase.js"),t.exports.FilterClauseLocal=e("./filters/FilterClauseLocal.js"),t.exports.FilterClauseInternalJoin=e("./filters/FilterClauseInternalJoin.js"),t.exports.FilterClauseExternalJoin=e("./filters/FilterClauseExternalJoin.js"),t.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),t.exports.safeOnDocumentReady=e("./Pict-Browser-SafeOnDocumentReady.js"),t.exports.safeLoadPictApplication=e("./Pict-Browser-SafeLoad.js")},{"../package.json":217,"./Pict-Browser-SafeLoad.js":218,"./Pict-Browser-SafeOnDocumentReady.js":219,"./Pict-CSS.js":220,"./Pict-Content-Assignment.js":221,"./Pict-DataProvider.js":222,"./Pict-Meadow-EntityProvider.js":223,"./Pict-Template-Audit.js":224,"./Pict-Template-Provider.js":225,"./environments/Pict-Environment-Log.js":227,"./environments/Pict-Environment-Object.js":228,"./filters/FilterClauseBase.js":230,"./filters/FilterClauseExternalJoin.js":231,"./filters/FilterClauseInternalJoin.js":232,"./filters/FilterClauseLocal.js":233,"./providers/Provider-DataBroker.js":235,"./providers/Provider-Filter-Manager.js":236,"./providers/Provider-Icon.js":237,"./services/Fable-Service-TransactionTracking.js":238,"./templates/Pict-Template-Data.js":239,"./templates/Pict-Template-DataValueByKey.js":240,"./templates/Pict-Template-DataWithAbsoluteFallback.js":241,"./templates/Pict-Template-DataWithTemplateFallback.js":242,"./templates/Pict-Template-Entity.js":243,"./templates/Pict-Template-Icon.js":244,"./templates/Pict-Template-Self.js":245,"./templates/Pict-Template-Solve.js":246,"./templates/Pict-Template-SolveByReference.js":247,"./templates/Pict-Template-Template.js":248,"./templates/Pict-Template-TemplateByDataAddress.js":249,"./templates/Pict-Template-TemplateByReference.js":250,"./templates/Pict-Template-TemplateByTypes.js":251,"./templates/Pict-Template-TemplateFromAddress.js":252,"./templates/Pict-Template-TemplateFromMap.js":253,"./templates/Pict-Template-TemplateSet.js":254,"./templates/Pict-Template-TemplateSetFromMap.js":255,"./templates/Pict-Template-TemplateSetWithPayload.js":256,"./templates/Pict-Template-TemplateValueSet.js":257,"./templates/Pict-Template-View.js":258,"./templates/data-generation/Pict-Template-RandomNumber.js":259,"./templates/data-generation/Pict-Template-RandomNumberString.js":260,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":261,"./templates/data/Pict-Template-DataJson.js":262,"./templates/data/Pict-Template-DateOnlyFormat.js":263,"./templates/data/Pict-Template-DateOnlyYMD.js":264,"./templates/data/Pict-Template-DateTimeFormat.js":265,"./templates/data/Pict-Template-DateTimeYMD.js":266,"./templates/data/Pict-Template-Digits.js":267,"./templates/data/Pict-Template-Dollars.js":268,"./templates/data/Pict-Template-HtmlCommentEnd.js":269,"./templates/data/Pict-Template-HtmlCommentStart.js":270,"./templates/data/Pict-Template-Join.js":271,"./templates/data/Pict-Template-JoinUnique.js":272,"./templates/data/Pict-Template-PascalCaseIdentifier.js":273,"./templates/data/Pict-Template-PluckJoinUnique.js":274,"./templates/debugging/Pict-Template-Breakpoint.js":275,"./templates/debugging/Pict-Template-DataValueTree.js":276,"./templates/debugging/Pict-Template-LogStatement.js":277,"./templates/debugging/Pict-Template-LogValue.js":278,"./templates/debugging/Pict-Template-LogValueTree.js":279,"./templates/logic/Pict-Template-NotEmpty.js":280,"./templates/logic/Pict-Template-TemplateIf.js":282,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":283,fable:68,"fable-serviceproviderbase":59,"pict-application":141,"pict-provider":143,"pict-template":214,"pict-view":216}],227:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,this.eventLog={},this.eventLog.GetElement=[],this.eventLog.Read=[],this.eventLog.Prepend=[],this.eventLog.Append=[],this.eventLog.Assign=[],this.pict.ContentAssignment.customGetElementFunction=this.customGetElementFunction.bind(this),this.pict.ContentAssignment.customReadFunction=this.customReadFunction.bind(this),this.pict.ContentAssignment.customAppendFunction=this.customAppendFunction.bind(this),this.pict.ContentAssignment.customPrependFunction=this.customPrependFunction.bind(this),this.pict.ContentAssignment.customAssignFunction=this.customAssignFunction.bind(this),this.pict.ContentAssignment.customReadAttributeFunction=this.customReadAttributeFunction.bind(this),this.pict.ContentAssignment.customSetAttributeFunction=this.customSetAttributeFunction.bind(this)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}customReadAttributeFunction(e,t){return this.pict.log.info("Mocking an READ ATTRIBUTE from Address -> [".concat(e,"]"),{Attribute:t}),""}customSetAttributeFunction(e,t,r){return r.length>this.truncateContentLength?this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Attribute:t,Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"]"),{Attribute:t,Content:r}),""}}},{}],228:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.contentMap._ATTRIBUTE_MAP={},this.contentMap._CLASS_MAP={},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,this.eventLog={},this.eventLog.GetElement=[],this.eventLog.Read=[],this.eventLog.Prepend=[],this.eventLog.Append=[],this.eventLog.Assign=[],this.eventLog.ReadAttribute=[],this.eventLog.SetAttribute=[],this.eventLog.RemoveAttribute=[],this.eventLog.ReadClass=[],this.eventLog.SetClass=[],this.eventLog.RemoveClass=[],this.pict.ContentAssignment.customGetElementFunction=this.customGetElementFunction.bind(this),this.pict.ContentAssignment.customReadFunction=this.customReadFunction.bind(this),this.pict.ContentAssignment.customAppendFunction=this.customAppendFunction.bind(this),this.pict.ContentAssignment.customPrependFunction=this.customPrependFunction.bind(this),this.pict.ContentAssignment.customAssignFunction=this.customAssignFunction.bind(this),this.pict.ContentAssignment.customReadAttributeFunction=this.customReadAttributeFunction.bind(this),this.pict.ContentAssignment.customSetAttributeFunction=this.customSetAttributeFunction.bind(this),this.pict.ContentAssignment.customRemoveAttributeFunction=this.customRemoveAttributeFunction.bind(this),this.pict.ContentAssignment.customReadClassFunction=this.customReadClassFunction.bind(this),this.pict.ContentAssignment.customSetClassFunction=this.customSetClassFunction.bind(this),this.pict.ContentAssignment.customRemoveClassFunction=this.customRemoveClassFunction.bind(this)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:this.contentMap[e]+t,this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:t+this.contentMap[e],this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.contentMap[e]=t,this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}initializeAttributeMapLocation(e,t){e in this.contentMap._ATTRIBUTE_MAP||(this.contentMap._ATTRIBUTE_MAP[e]={}),t in this.contentMap._ATTRIBUTE_MAP[e]||(this.contentMap._ATTRIBUTE_MAP[e][t]=!1)}initializeClassMapLocation(e){e in this.contentMap._CLASS_MAP||(this.contentMap._CLASS_MAP[e]=[])}customReadAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetAttributeFunction(e,t,r){return this.initializeAttributeMapLocation(e,t),this.contentMap._ATTRIBUTE_MAP[e][t]=r,this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customRemoveAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),delete this.contentMap._ATTRIBUTE_MAP[e][t],!0}customReadClassFunction(e,t){this.initializeClassMapLocation(e);const r=this.contentMap._CLASS_MAP[e].indexOf(t)>-1;return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return-1==this.contentMap._CLASS_MAP[e].indexOf(t)&&this.contentMap._CLASS_MAP[e].push(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}customRemoveClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return this.contentMap._CLASS_MAP[e].splice(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}}},{}],229:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log}generateMeadowFilterStanzas(e){let t=[];e.UserFilters=[];const r={};if(Array.isArray(e.Groups))for(let t of e.Groups)r[t.GUIDGroup]=Object.assign({PreparedFilters:[],Junction:"AND",Ordinal:0},t);for(const n of e.FilterConfiguration||[]){if(!1===n.Enabled){this.pict.LogNoisiness>1&&this.log.info("Skipping disabled filter configuration: ".concat(n.Type),{FilterConfig:n});continue}const o={GUID:this.pict.getUUID(),Filters:[],Ordinal:n.Ordinal||0,Junction:n.Junction||"AND"},i=Array.isArray(n.Values)?n.Values:null==n.Value||""==n.Value||"ExternalJoinDateMatch"==n.Type&&0==n.Value?[]:[n.Value];let a;switch(n.Type){case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":a=[n.ExternalFilterTableLookupColumn||"ID".concat(n.ExternalFilterByTable)];case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":a||(a=n.ExternalFilterByColumns||(n.ExternalFilterByColumn?[n.ExternalFilterByColumn]:["Name"]));for(const e of a)for(const t of i){const r={Index:-1,Entity:n.ExternalFilterByTable,Instruction:"FBVOR",Field:e};n.ExactMatch||void 0===n.ExactMatch&&("ExternalJoinNumericMatch"==n.Type||"ExternalJoinDateMatch"==n.Type||"ExternalJoinSelectedValue"==n.Type||"ExternalJoinSelectedValueList"==n.Type)?(r.Operator="EQ",r.Value=t):(r.Operator="LK",r.Value="%25".concat(t,"%25")),o.Filters.push(r)}if(!n.JoinTable){this.log.error("".concat(n.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:n});break}if(!n.JoinTableExternalConnectionColumn){this.log.error("".concat(n.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(n.JoinTable,"]."));break}if(o.Filters.length>0){if(o.Filters.push({Index:0,Fulcrum:!0,Entity:n.JoinTable,Instruction:"FBL",Field:n.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(n.ExternalFilterByTableConnectionColumn||n.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),n.PolyJoinRemoteType&&o.Filters.push({Index:0,Fulcrum:!0,Entity:n.JoinTable,Instruction:"FBV",Field:n.PolyJoinRemoteColumn||"RemoteType",Operator:"EQ",ValueTemplate:n.PolyJoinRemoteType}),!n.CoreConnectionColumn){this.log.error("".concat(n.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}o.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[n.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(n.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"ExternalJoinStringRange":case"ExternalJoinNumericRange":case"ExternalJoinDateRange":case"ExternalJoinRange":if(!n.Values||null==n.Values.Start&&null==n.Values.End)break;if("ExternalJoinDateRange"==n.Type&&!(n.Values.Start&&"0"!=n.Values.Start||n.Values.End&&"0"!=n.Values.End))break;for(const e of n.ExternalFilterByColumns||(n.ExternalFilterByColumn?[n.ExternalFilterByColumn]:["Name"])){const t=n.Values&&n.Values.Start&&("ExternalJoinDateRange"!=n.Type||"0"!=n.Values.Start),r=n.Values&&n.Values.End&&("ExternalJoinDateRange"!=n.Type||"0"!=n.Values.End);t&&o.Filters.push({Index:-1,Entity:n.ExternalFilterByTable,Instruction:"FBVOR",OpenParen:!0,OpenParenOr:!0,CloseParen:!r,Field:e,Operator:n.StartExclusive?"GT":"GE",Value:n.Values.Start}),r&&o.Filters.push({Index:-1,Entity:n.ExternalFilterByTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:n.EndExclusive?"LT":"LE",Value:n.Values.End})}if(!n.JoinTable){this.log.error("".concat(n.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:n});break}if(!n.JoinTableExternalConnectionColumn){this.log.error("".concat(n.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(n.JoinTable,"]."));break}if(o.Filters.length>0){if(o.Filters.push({Index:0,Fulcrum:!0,Entity:n.JoinTable,Instruction:"FBL",Field:n.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(n.ExternalFilterByTableConnectionColumn||n.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),n.PolyJoinRemoteType&&o.Filters.push({Index:0,Fulcrum:!0,Entity:n.JoinTable,Instruction:"FBV",Field:n.PolyJoinRemoteColumn||"RemoteType",Operator:"EQ",ValueTemplate:n.PolyJoinRemoteType}),!n.CoreConnectionColumn){this.log.error("".concat(n.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}if(!n.JoinTableCoreConnectionColumn){this.log.error("".concat(n.Type," filter missing JoinTableCoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}o.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[n.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(n.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"StringRange":case"DateRange":case"NumericRange":case"Range":if(!n.Values||null==n.Values.Start&&null==n.Values.End)break;if("DateRange"==n.Type&&!(n.Values.Start&&"0"!=n.Values.Start||n.Values.End&&"0"!=n.Values.End))break;for(const t of n.FilterByColumns||(n.FilterByColumn?[n.FilterByColumn]:["Name"])){const r=n.Values&&n.Values.Start&&("DateRange"!=n.Type||"0"!=n.Values.Start),i=n.Values&&n.Values.End&&("DateRange"!=n.Type||"0"!=n.Values.End);r&&o.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t,OpenParen:!0,OpenParenOr:!0,CloseParen:!i,Operator:n.StartExclusive?"GT":"GE",Value:n.Values.Start}),i&&o.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBV",OpenParen:!r,OpenParenOr:!r,CloseParen:!0,Field:t,Operator:n.EndExclusive?"LT":"LE",Value:n.Values.End})}break;case"StringMatch":case"DateMatch":case"NumericMatch":case"Match":for(const t of n.FilterByColumns||(n.FilterByColumn?[n.FilterByColumn]:["Name"]))for(const r of i){const i={Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t};n.ExactMatch||void 0===n.ExactMatch&&("NumericMatch"==n.Type||"DateMatch"==n.Type)?(i.Operator="EQ",i.Value=r):(i.Operator="LK",i.Value="%25".concat(r,"%25")),o.Filters.push(i)}break;case"InternalJoinStringRange":case"InternalJoinNumericRange":case"InternalJoinDateRange":case"InternalJoinRange":if(!n.Values||null==n.Values.Start&&null==n.Values.End)break;if("InternalJoinDateRange"==n.Type&&!(n.Values.Start&&"0"!=n.Values.Start||n.Values.End&&"0"!=n.Values.End))break;for(const e of n.ExternalFilterByColumns||(n.ExternalFilterByColumn?[n.ExternalFilterByColumn]:["Name"])){const t=n.Values&&n.Values.Start&&("InternalJoinDateRange"!=n.Type||"0"!=n.Values.Start),r=n.Values&&n.Values.End&&("InternalJoinDateRange"!=n.Type||"0"!=n.Values.End);t&&o.Filters.push({Index:0,Entity:n.RemoteTable,Instruction:"FBVOR",Field:e,OpenParen:!0,OpenParenOr:!0,CloseParen:!r,Operator:n.StartExclusive?"GT":"GE",Value:n.Values.Start}),r&&o.Filters.push({Index:0,Entity:n.RemoteTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:n.EndExclusive?"LT":"LE",Value:n.Values.End})}if(o.Filters.length>0){if(!n.JoinInternalConnectionColumn){this.log.error("".concat(n.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}o.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[n.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(n.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":a=[n.ExternalFilterTableLookupColumn||"ID".concat(n.RemoteTable)];case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":a||(a=n.ExternalFilterByColumns||(n.ExternalFilterByColumn?[n.ExternalFilterByColumn]:["Name"]));for(const e of a)for(const t of i){const r={Index:0,Entity:n.RemoteTable,Instruction:"FBVOR",Field:e};n.ExactMatch||void 0===n.ExactMatch&&("InternalJoinNumericMatch"==n.Type||"InternalJoinDateMatch"==n.Type||"InternalJoinSelectedValue"==n.Type||"InternalJoinSelectedValueList"==n.Type)?(r.Operator="EQ",r.Value=t):(r.Operator="LK",r.Value="%25".concat(t,"%25")),o.Filters.push(r)}if(o.Filters.length>0){if(!n.JoinInternalConnectionColumn){this.log.error("".concat(n.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}o.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[n.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(n.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"RawFilter":if(!n.Value){this.log.warn("RawFilter configuration missing Value, not adding filter.",{FilterConfig:n});break}e.UserFilters.push(n.Value);break;default:this.log.warn("Unknown filter type ".concat(n.Type," in filter configuration."),{FilterConfig:n})}o.Filters.length>0&&(n.GUIDGroup?r[n.GUIDGroup]?r[n.GUIDGroup].PreparedFilters.push(o):r[n.GUIDGroup]={PreparedFilters:[o],Junction:"AND",Ordinal:0}:t.push(o))}const n=e=>{for(let t=0;t<e.length;t++)e[t].Ordinal=e[t].Ordinal||0;return e.sort((e,t)=>e.Ordinal>t.Ordinal?1:t.Ordinal>e.Ordinal?-1:0)};for(let e of Object.keys(r)){var o;null!==(o=r[e].PreparedFilters)&&void 0!==o&&o.length&&(r[e].PreparedFilters=n(r[e].PreparedFilters)),t.push(r[e])}t=(e=>{const t=[];for(const r of e)if(r.PreparedFilters){r.PreparedFilters[0].GroupOpen=!0,r.PreparedFilters[0].GroupJunction=r.Junction,r.PreparedFilters[r.PreparedFilters.length-1].GroupClose=!0;for(let e=0;e<r.PreparedFilters.length;e++)t.push(r.PreparedFilters[e])}else t.push(r);return t})(n(t)),e.PreparedFilters=t}linkPreparedFilters(e){const t=[];for(const r of e.PreparedFilters||[])if(r.JoinConfig){const e=r.Filters,n=r.JoinConfig;for(const t of n.Fields||[]){const o={Index:1,CoreEntity:!0,Entity:r.JoinConfig.CoreEntity,Instruction:r.JoinConfig.Instruction||"FBVOR",Field:t,Operator:n.Operator,Value:n.Value,ValueTemplate:n.ValueTemplate};e.push(o)}t.push(e)}else t.push(r.Filters);return t}normalizeMeadowFilterStanzas(e){let t=0;for(const r of e.PreparedFilters){const e=new Set;r.Filters.sort((e,t)=>e.Index-t.Index);for(const t of r.Filters)t.CoreEntity||e.add(t.Index);t+=e.size}let r=-t-1;for(const t of e.PreparedFilters){let e=null;for(const n of t.Filters)n.Index!==e&&(++r,e=n.Index),n.ComputedIndex=r;for(const e of t.Filters)e.ValueTemplate&&(e.ValueTemplate=e.ValueTemplate.replace(/\[([^\]]+)\]/g,e=>{var r;const n=e.substring(5,e.length-1),o=null===(r=t.Filters.find(e=>e.Index==n))||void 0===r?void 0:r.ComputedIndex;if(null==o)throw new Error("Filter index ".concat(n," not found in group filters."));return e.replace(n,o)}))}}compileMeadowFilterStanzas(e){const t=[];e.Filter||(e.Filter="".concat(e.Entity||"Unknown","-").concat(this.pict.getUUID())),t.push({Type:"SetStateAddress",StateAddress:"Bundle[".concat(e.Filter,"]")});const r={},n=[],o=[],i=[];let a;const s=[];for(const s of e.PreparedFilters){for(const e of s.Filters)if(e.CoreEntity){a=e.Entity;const t="".concat(s.GUID,"-").concat(e.ComputedIndex);i.find(e=>e==t)||i.push(t),o[t]||(o[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity,Junction:s.Junction||"AND",GroupOpen:s.GroupOpen||!1,GroupJunction:s.GroupJunction||"AND",GroupClose:s.GroupClose||!1}),o[t].Stanzas.push(this._compileSimpleFilterToString(e))}else{const t="".concat(s.GUID,"-").concat(e.ComputedIndex);n.find(e=>e==t)||n.push(t),r[t]||(r[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity}),r[t].Stanzas.push(this._compileSimpleFilterToString(e))}for(const e of n)r[e].Stanzas=r[e].Stanzas.filter(e=>e.length>0),r[e].Stanzas.length>0&&t.push({Type:"MeadowEntity",AllRecords:!0,Entity:r[e].Entity,Filter:r[e].Stanzas.join("~"),Destination:"State[Step".concat(r[e].ComputedIndex,"]")})}for(const e of i)if(o[e].Stanzas=o[e].Stanzas.filter(e=>e.length>0),o[e].Stanzas.length>0){let t="";o[e].GroupOpen&&(t+="OR"==o[e].GroupJunction?"FOPOR~0~(~0~":"FOP~0~(~0~"),t+=["OR"==o[e].Junction?"FOPOR~0~(~0":"FOP~0~(~0",...o[e].Stanzas,"FCP~0~)~0"].join("~"),o[e].GroupClose&&(t+="~FCP~0~)~0"),s.push(t)}a||(a=e.Entity);const l={Type:"Count"===e.Mode?"MeadowEntityCount":"MeadowEntity",Entity:a,Filter:s.join("~"),AllRecords:void 0===e.PageSize,RecordStartCursor:e.RecordOffset,Postfix:e.Postfix||"",PageSize:e.PageSize,Destination:e.ResultDestinationAddress};if(e.UserFilters.length>0){let t="",r="";for(const n of e.UserFilters){let o,i=n;if("Count"===e.Mode)i=this._sanitizeFilterForCount(n);else if([i,o]=this._extractSortsFromFilter(n),o&&(t.length>0&&(t+="~"),t+=o),!i)continue;i&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=i,r+="~FCP~0~)~0")}l.Filter&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=l.Filter,r+="~FCP~0~)~0"),t&&(r.length>0&&(r+="~"),r+=t),l.Filter=r}t.push(l),e.BundleConfig=t}_sanitizeFilterForCount(e){if(!e||"string"!=typeof e)return e;let t=e.split("~");for(let e=0;e<t.length;e+=4)"FSF"===t[e]&&(t=t.slice(0,e).concat(t.slice(e+4)),e-=4);return t.join("~")}_extractSortsFromFilter(e){if(!e||"string"!=typeof e)return[e,""];let t=[],r=e.split("~");for(let e=0;e<r.length;e+=4)"FSF"===r[e]&&(t.push(r.slice(e,e+4).join("~")),r=r.slice(0,e).concat(r.slice(e+4)),e-=4);return[r.join("~"),t.join("~")]}_compileSimpleFilterToString(e){let t="".concat(e.Instruction);return t+="~".concat(e.Field),t+="~".concat(e.Operator),e.ValueTemplate?t+="~".concat(e.ValueTemplate):t+="~".concat(e.Value||""),e.OpenParen&&(t="".concat(e.OpenParenOr?"FOPOR":"FOP","~0~(~0~").concat(t)),e.CloseParen&&(t="".concat(t,"~FCP~0~)~0")),t}}},{}],230:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log,this._type="None",this.values=[]}set type(e){this._type=e,e.includes("Range")?("object"!=typeof this.values||null===this.values||Array.isArray(this.values))&&(this.values={Start:void 0,End:void 0}):Array.isArray(this.values)||(this.values=[])}get type(){return this._type}generateFilterClauseConfig(){return{Type:"None"}}}},{}],231:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this.type="ExternalJoinMatch",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.externalFilterByColumn,this.externalFilterByColumns,this.coreConnectionColumn="",this.joinTable="",this.joinTableExternalConnectionColumn="",this.joinTableCoreConnectionColumn="",this.externalFilterByTable="",this.externalFilterTableLookupColumn="",this.externalFilterByTableConnectionColumn="",this.polyJoinRemoteType="",this.polyJoinRemoteColumn=""}generateFilterClauseConfig(){switch(this.type){case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":return{Type:this.type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn,PolyJoinRemoteType:this.polyJoinRemoteType,PolyJoinRemoteColumn:this.polyJoinRemoteColumn};case"ExternalJoinRange":case"ExternalJoinStringRange":case"ExternalJoinDateRange":case"ExternalJoinNumericRange":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn,PolyJoinRemoteType:this.polyJoinRemoteType,PolyJoinRemoteColumn:this.polyJoinRemoteColumn};case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn,PolyJoinRemoteType:this.polyJoinRemoteType,PolyJoinRemoteColumn:this.polyJoinRemoteColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":230}],232:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this.type="None",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.remoteTable="",this.externalFilterByColumn,this.externalFilterByColumns,this.externalFilterTableLookupColumn,this.joinExternalConnectionColumn="",this.joinInternalConnectionColumn=""}generateFilterClauseConfig(){switch(this._type){case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinRange":case"InternalJoinStringRange":case"InternalJoinDateRange":case"InternalJoinNumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":230}],233:[function(e,t,r){const n=e("./FilterClauseBase.js");t.exports=class extends n{constructor(e){super(e),this._type="Match",this.filterByColumn,this.exactMatch,this.startExclusive,this.endExclusive}generateFilterClauseConfig(){switch(this._type){case"Match":case"StringMatch":case"DateMatch":case"NumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case"Range":case"StringRange":case"DateRange":case"NumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":230}],234:[function(e,t,r){t.exports={Outline:{Folder:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7.5V18a1.5 1.5 0 0 0 1.5 1.5h15A1.5 1.5 0 0 0 21 18V9a1.5 1.5 0 0 0-1.5-1.5h-7L10.5 6H4.5A1.5 1.5 0 0 0 3 7.5z"/></svg>',FolderOpen:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7.5V18a1.5 1.5 0 0 0 1.5 1.5h15A1.5 1.5 0 0 0 21 18v-7H3"/><path d="M3 7.5h7L11.5 9h8A1.5 1.5 0 0 1 21 10.5"/></svg>',File:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>',FileText:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="14" y2="17"/></svg>',Spreadsheet:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="1.5"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="14" x2="21" y2="14"/><line x1="9" y1="4" x2="9" y2="20"/></svg>',Image:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="10" r="1.5"/><path d="m21 16-5-5L7 20"/></svg>',Code:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>',ChevronUp:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 15 12 9 18 15"/></svg>',ChevronDown:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>',ChevronLeft:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 6 9 12 15 18"/></svg>',ChevronRight:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 6 15 12 9 18"/></svg>',ArrowUp:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="19" x2="12" y2="5"/><polyline points="5 12 12 5 19 12"/></svg>',ArrowDown:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><polyline points="19 12 12 19 5 12"/></svg>',ArrowLeft:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>',ArrowRight:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>',Save:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>',Close:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',Check:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>',Plus:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>',Minus:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/></svg>',Edit:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>',Trash:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>',Copy:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>',Share:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/></svg>',Search:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',Refresh:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg>',Download:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',Upload:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>',Link:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>',ExternalLink:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>',Info:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',Warning:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',Error:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>',Success:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>',Home:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-7h-6v7H4a1 1 0 0 1-1-1v-9.5z"/></svg>',Settings:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>',Menu:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>',More:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><circle cx="5" cy="12" r="1.6"/><circle cx="12" cy="12" r="1.6"/><circle cx="19" cy="12" r="1.6"/></svg>',Eye:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',EyeOff:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',Lock:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>',User:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',Help:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>'},Filled:{Folder:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M3 7.5V18a1.5 1.5 0 0 0 1.5 1.5h15A1.5 1.5 0 0 0 21 18V9a1.5 1.5 0 0 0-1.5-1.5h-7L10.5 6H4.5A1.5 1.5 0 0 0 3 7.5z"/></svg>',FolderOpen:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M3 8a1 1 0 0 1 1-1h6.5l2 2H20a1 1 0 0 1 1 1v8.5A1.5 1.5 0 0 1 19.5 20h-15A1.5 1.5 0 0 1 3 18.5V8z" fill-opacity="0.92"/></svg>',File:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-.5 7V3.5L19.5 9.5H14a.5.5 0 0 1-.5-.5z"/></svg>',FileText:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-.5 7V3.5L19.5 9.5H14a.5.5 0 0 1-.5-.5zM8 12.4a.6.6 0 0 1 .6-.6h6.8a.6.6 0 0 1 0 1.2H8.6a.6.6 0 0 1-.6-.6zm0 4a.6.6 0 0 1 .6-.6h4.8a.6.6 0 0 1 0 1.2H8.6a.6.6 0 0 1-.6-.6z"/></svg>',Spreadsheet:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M4 4h16a1.5 1.5 0 0 1 1.5 1.5v13A1.5 1.5 0 0 1 20 20H4a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 4 4zm5 1.2H4.2v3.6H9V5.2zm10.8 0H10.2v3.6h9.6V5.2zM9 9.7H4.2v3.6H9V9.7zm10.8 0H10.2v3.6h9.6V9.7zM9 14.2H4.2v4.6H9v-4.6zm10.8 0H10.2v4.6h9.6v-4.6z"/></svg>',Home:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M11.3 2.2a1 1 0 0 1 1.4 0l9 7.5a1 1 0 0 1 .3.7V20a1 1 0 0 1-1 1h-5a.5.5 0 0 1-.5-.5V14a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 1-.5.5H4a1 1 0 0 1-1-1v-9.5a1 1 0 0 1 .3-.7l8-7.6z"/></svg>',Settings:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M19.43 12.98c.04-.32.07-.65.07-.98s-.03-.66-.07-.98l2.11-1.65a.5.5 0 0 0 .12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1a7.3 7.3 0 0 0-1.69-.98l-.38-2.65A.49.49 0 0 0 14 2h-4a.49.49 0 0 0-.49.42l-.38 2.65a7.6 7.6 0 0 0-1.69.98l-2.49-1a.51.51 0 0 0-.61.22l-2 3.46a.493.493 0 0 0 .12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65a.5.5 0 0 0-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65A.49.49 0 0 0 10 22h4a.49.49 0 0 0 .49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46a.5.5 0 0 0-.12-.64l-2.11-1.65zM12 15.5A3.5 3.5 0 1 1 12 8.5a3.5 3.5 0 0 1 0 7z"/></svg>',Trash:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M9 3a1 1 0 0 0-1 1v1H4.5a.5.5 0 0 0 0 1H5v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h.5a.5.5 0 0 0 0-1H16V4a1 1 0 0 0-1-1H9zm1 5a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-1 0v-9a.5.5 0 0 1 .5-.5zm4 0a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-1 0v-9a.5.5 0 0 1 .5-.5z"/></svg>',User:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><circle cx="12" cy="7" r="4"/><path d="M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1H4z"/></svg>',Lock:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 5a3 3 0 0 1 6 0v3H9V7z"/></svg>',Info:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-.99 5.99a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM10.5 11h2a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V12h-1.5a.5.5 0 0 1 0-1z"/></svg>',Warning:'<svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM11.5 9a.5.5 0 0 1 1 0v4a.5.5 0 0 1-1 0V9zM12 17.5a.9.9 0 1 1 0-1.8.9.9 0 0 1 0 1.8z"/></svg>'}}},{}],235:[function(e,t,r){const n=e("pict-provider"),o={ProviderIdentifier:"Pict-Provider-DataBroker",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},o,t),r),this.options,this.pict,this.marshalDestination="AppData"}getValue(e){return this.getValueByHash(e)}getValueByHash(e){return this.pict.manifest.getValueByHash(this.getMarshalDestinationObject(),e)}setValue(e,t){return this.setValueByHash(e,t)}setValueByHash(e,t){return this.pict.manifest.setValueByHash(this.getMarshalDestinationObject(),e,t)}get marshalDestination(){return this._marshalDestination}set marshalDestination(e){this._marshalDestination=e}get marshalDestinationObject(){const e=this.marshalDestination;if(!e)throw new Error("Attempt to access marshal destination object with no marshal destination set.");let t=this.pict.resolveStateFromAddress(e);if(!t&&(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(e)),this.pict.setStateValueAtAddress(e,null,{}),t=this.pict.resolveStateFromAddress(e),!t))throw new Error("Attempt to access marshal destination object with no marshal destination set.");return t}getMarshalDestinationObject(){return this.marshalDestinationObject}resolveMarshalDestinationObject(e){const t=e||this.marshalDestination;if(!t)throw new Error("Attempt to resolve marshal destination object with no marshal destination set.");let r;return e?(r=this.pict.resolveStateFromAddress(e),r||(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(t)),this.pict.setStateValueAtAddress(t,null,{}))):r=this.getMarshalDestinationObject(),r}},t.exports.default_configuration=o},{"pict-provider":143}],236:[function(e,t,r){const n=e("pict-provider"),o=e("../filters/Filter.js"),i={ProviderIdentifier:"Pict-RecordSet-FilterManager",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},i,t),r),this.options,this.pict,this.filters={},this.filterCriteria={}}addFilter(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter hash provided. It must be a non-empty string.");if(!t||"object"!=typeof t||!t.Type)return void this.log.error("Invalid filter configuration provided. It must be an object with a Type property.");const r=JSON.parse(JSON.stringify(t));r.Hash&&r.Hash!==e&&this.log.warn("Filter configuration hash mismatch: provided ".concat(r.Hash,", expected ").concat(e,". Overriding with provided hash.")),r.Hash=e,this.filters[r.Hash]=r}addFilterCriteria(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter criteria hash provided. It must be a non-empty string.");if(!t||!Array.isArray(t))return void this.log.error("Invalid filter criteria configuration provided. It must be an array of filter clauses.");const r=JSON.parse(JSON.stringify(t));this.filterCriteria[e]=r}getFilter(e){return this.filters[e]}getFilterCriteria(e){return this.filterCriteria[e]}loadRecordsByFilter(e,t,r){return this.loadRecordsByFilterUsingProvider(this.pict.EntityProvider,e,t,r)}loadRecordsByFilterUsingProvider(e,t,r,n){if(!e||"function"!=typeof e.gatherDataFromServer)return n(new Error("loadRecordsByFilter: Missing or invalid EntityProvider."));const i=JSON.parse(JSON.stringify(r));i.Mode="Records",i.FilterConfiguration=t;const a=new o(this.pict);a.generateMeadowFilterStanzas(i),a.linkPreparedFilters(i),a.normalizeMeadowFilterStanzas(i),a.compileMeadowFilterStanzas(i),e.gatherDataFromServer(i.BundleConfig,n)}loadRecordPageByFilter(e,t,r,n,o){return this.loadRecordPageByFilterUsingProvider(this.pict.EntityProvider,e,t,r,n,o)}loadRecordPageByFilterUsingProvider(e,t,r,n,i,a){if(!e||"function"!=typeof e.gatherDataFromServer)return a(new Error("loadRecordPageByFilter: Missing or invalid EntityProvider."));const s="function"==typeof n?n:"function"==typeof i?i:a;let l="function"==typeof n?0:parseInt(String(n));(isNaN(l)||l<0)&&(l=0);let c="function"==typeof i?0:parseInt(String(i));(isNaN(c)||c<0)&&(c=1e4);const d=JSON.parse(JSON.stringify(r));d.Mode="Records",d.RecordOffset=l,d.PageSize=c,d.FilterConfiguration=t;const h=new o(this.pict);h.generateMeadowFilterStanzas(d),h.linkPreparedFilters(d),h.normalizeMeadowFilterStanzas(d),h.compileMeadowFilterStanzas(d),e.gatherDataFromServer(d.BundleConfig,s)}countRecordsByFilter(e,t,r){return this.countRecordsByFilterUsingProivider(this.pict.EntityProvider,e,t,r)}countRecordsByFilterUsingProivider(e,t,r,n){const i=JSON.parse(JSON.stringify(r));i.Mode="Count",i.FilterConfiguration=t;const a=new o(this.pict);a.generateMeadowFilterStanzas(i),a.linkPreparedFilters(i),a.normalizeMeadowFilterStanzas(i),a.compileMeadowFilterStanzas(i),e.gatherDataFromServer(i.BundleConfig,n)}executeFilter(e,t,r){return this.executeFilterUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterUsingProvider(e,t,r,n){if(!e||"function"!=typeof e.gatherDataFromServer)return n(new Error("executeFilter: Missing or invalid EntityProvider."));const o=this.pict.resolveStateFromAddress(t);if(!Array.isArray(o))return n(new Error("Filter configuration at address ".concat(t," is not an array.")));const i=this.pict.resolveStateFromAddress(r);return i&&"object"==typeof i?this.loadRecordsByFilterUsingProvider(e,o,i,n):n(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterPage(e,t,r,n,o){return this.executeFilterPageUsingProvider(this.pict.EntityProvider,e,t,r,n,o)}executeFilterPageUsingProvider(e,t,r,n,o,i){const a="function"==typeof n?n:"function"==typeof o?o:i,s=this.pict.resolveStateFromAddress(t);if(!Array.isArray(s))return a(new Error("Filter configuration at address ".concat(t," is not an array.")));const l=this.pict.resolveStateFromAddress(r);return l&&"object"==typeof l?this.loadRecordPageByFilterUsingProvider(e,s,l,n,o,i):a(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterCount(e,t,r){return this.executeFilterCountUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterCountUsingProvider(e,t,r,n){const o=this.pict.resolveStateFromAddress(t);if(!Array.isArray(o))return n(new Error("Filter configuration at address ".concat(t," is not an array.")));const i=this.pict.resolveStateFromAddress(r);return i&&"object"==typeof i?this.countRecordsByFilterUsingProivider(e,o,i,n):n(new Error("Filter experience at address ".concat(r," is not an object.")))}},t.exports.default_configuration=i},{"../filters/Filter.js":229,"pict-provider":143}],237:[function(e,t,r){const n=e("pict-provider"),o=e("./Pict-Icons-Base.js"),i={ProviderIdentifier:"Pict-Provider-Icon",AutoInitialize:!0,AutoInitializeOrdinal:0,DefaultVariant:"Outline",DefaultIconClass:"pict-icon",DefaultSize:null,RegisterBaseIcons:!0},a={Gear:"Settings",Cog:"Settings",House:"Home",X:"Close",Cross:"Close",Hamburger:"Menu",Pencil:"Edit",Bin:"Trash",Magnifier:"Search",Reload:"Refresh",Person:"User",Padlock:"Lock"},s='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>';t.exports=class extends n{constructor(e,t,r){super(e,Object.assign({},i,t),r),this.options,this.pict,this._registry={},this._defaultsByName={},this.options.RegisterBaseIcons&&this.registerSet(o),this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.addCSS&&this.pict.CSSMap.addCSS("Pict-Provider-Icon-CSS",".pict-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: -0.125em; flex-shrink: 0; line-height: 0; color: inherit; }.pict-icon > svg { width: 1em; height: 1em; display: block; }",100)}register(e,t,r){if("string"!=typeof e||e.length<1)return this.log.warn("Pict-Provider-Icon.register requires a non-empty name."),!1;if("string"!=typeof t||t.indexOf("<svg")<0)return this.log.warn("Pict-Provider-Icon.register requires an SVG string for ["+e+"]."),!1;let n=r||{},o=n.variant||this.options.DefaultVariant,i=!!n.force,a=!!n.default;return this._registry[o]||(this._registry[o]={}),this._registry[o][e]&&!i?(this.log.warn("Pict-Provider-Icon: refusing to overwrite ["+e+":"+o+"] (pass { force: true } to replace)."),!1):(this._registry[o][e]=t,this._defaultsByName[e]&&!a||(this._defaultsByName[e]=o),!0)}registerSet(e,t){if(!e||"object"!=typeof e)return;let r=!(!t||!t.force),n=Object.keys(e);for(let t=0;t<n.length;t++){let o=n[t],i=e[o];if(!i)continue;let a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];this.register(t,i[t],{variant:o,force:r})}}}has(e,t){let r=a[e]||e;return t?!(!this._registry[t]||!this._registry[t][r]):!!this._defaultsByName[r]}get(e,t){let r="string"==typeof e?e.trim():"";if(r.length<1)return this.log.warn("Pict-Provider-Icon.get called with empty name."),this._wrap(s,t);let n=a[r]||r,o=t||{},i=o.variant;if(i&&this._registry[i]&&this._registry[i][n])return this._wrap(this._registry[i][n],o);let l=this._defaultsByName[n];if(l&&this._registry[l]&&this._registry[l][n])return i&&this.log.trace("Pict-Provider-Icon: variant ["+i+"] missing for ["+n+"], using ["+l+"]."),this._wrap(this._registry[l][n],o);let c=this.options.DefaultVariant;return this._registry[c]&&this._registry[c][n]?this._wrap(this._registry[c][n],o):(this.log.warn("Pict-Provider-Icon: unknown icon ["+r+"]"+(i?" (variant "+i+")":"")+"."),this._wrap(s,o))}_wrap(e,t){let r=t||{},n=this.options.DefaultIconClass;"string"==typeof r.class&&r.class.length>0&&(n+=" "+r.class);let o="";"number"==typeof r.size&&r.size>0?o=' style="font-size:'+r.size+'px"':"string"==typeof r.size&&r.size.length>0&&(o=' style="font-size:'+r.size+'"');let i=' aria-hidden="true"';return"string"==typeof r.ariaLabel&&r.ariaLabel.length>0&&(i=' role="img" aria-label="'+r.ariaLabel.replace(/"/g,"&quot;")+'"'),'<span class="'+n+'"'+o+i+">"+e+"</span>"}},t.exports.default_configuration=i},{"./Pict-Icons-Base.js":234,"pict-provider":143}],238:[function(e,t,r){const n=e("fable-serviceproviderbase");class o extends n{constructor(e,t,r){super(e,t,r),this.fable,this.log,this.UUID,this.transactionMap={}}get transactions(){return this.transactionMap}logToTransaction(e,t,r){let n=this.transactionMap[e];null==n&&(this.log.warn("TransactionTracking logToTransaction key [".concat(e,"] does not exist; auto creating...")),n=this.registerTransaction(e));let o="string"==typeof r?r:"General";return this.transactionMap[e].Log.push({TimeStamp:new Date,Category:o,Message:t}),!0}registerTransaction(e){return null!=this.transactionMap[e]||(this.transactionMap[e]={TransactionKey:e,Events:{},Log:[],TransactionQueue:[]}),this.transactionMap[e]}unregisterTransaction(e,t){const r=this.transactionMap[e];return null!=r&&(!t&&r.TransactionQueue&&r.TransactionQueue.length>0?(this.log.warn("TransactionTracking unregisterTransaction [".concat(e,"] refused: queue has ").concat(r.TransactionQueue.length," item(s) still pending. Pass pForce=true if you explicitly want to discard them.")),!1):(delete this.transactionMap[e],!0))}pushToTransactionQueue(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Entry",n=this.transactionMap[e];return null==n&&(this.log.warn("TransactionTracking pushToTransactionQueue key [".concat(e,"] does not exist; auto creating...")),n=this.registerTransaction(e)),n.TransactionQueue.push({Timestamp:Date.now(),Data:t,Type:r}),this.logToTransaction(e,"Pushed data to transaction queue","Queue"),n.TransactionQueue.length}checkTransactionQueue(e){let t=this.transactionMap[e];return null==t&&(this.log.warn("TransactionTracking checkTransactionQueue key [".concat(e,"] does not exist; auto creating...")),t=this.registerTransaction(e)),null==t.TransactionQueue&&(t.TransactionQueue=[]),this.logToTransaction(e,"Checked transaction queue","Queue"),t.TransactionQueue}getTransactionQueue(e){return this.checkTransactionQueue(e).map(e=>e.Data)}clearTransactionQueue(e){let t=this.transactionMap[e];if(null==t)return void this.log.warn("TransactionTracking clearTransactionQueue key [".concat(e,"] does not exist; skipping..."));const r=t.TransactionQueue;return t.TransactionQueue=[],this.logToTransaction(e,"Cleared transaction queue","Queue"),r}checkEvent(e,t,r){let n="string"==typeof r?r:"",o=this.transactionMap[e];return null==o&&(this.log.warn("TransactionTracking checkTransactionEvent event [".concat(t,"]->[").concat(n,"] key [").concat(e,"] does not exist; auto creating...")),o=this.registerTransaction(e)),null==o.Events[t]&&(o.Events[t]={}),n in o.Events[t]?(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(n,"] already exists in transaction [").concat(e,"]"),"Event"),!1):(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(n,"] registered in transaction [").concat(e,"]"),"Event"),o.Events[t][n]=!0,!0)}}t.exports=o,o.default_configuration={}},{"fable-serviceproviderbase":59}],239:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Data:","~}"),this.addPattern("{~D:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(i,"]"));let s="";i.indexOf(":")>-1&&(s=i.split(":")[1],i=i.split(":")[0]);let l="";return null!=i&&(l=this.resolveStateFromAddress(i,a,r,null,n,o)),null==l||"undefined"==l||void 0===l||""===l?s:l}}},{"pict-template":214}],240:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataValueByKey:","~}"),this.addPattern("{~DVBK:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(i,"]"));let s=i.split(":");if(s.length<2)return this.log.trace("PICT Template [fDataRender]::[".concat(i,"] failed because there were not two stanzas in the expression [").concat(e,"]")),"";let l="";s.length>2&&(l=s[2]);let c=this.resolveStateFromAddress(s[0],a,r,null,n,o),d=this.resolveStateFromAddress(s[1],a,r,null,n,o),h=this.pict.manifest.getValueByHash(c,d);return null==h||"undefined"==h||void 0===h?l:h}}},{"pict-template":214}],241:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataWithAbsoluteFallback:","~}"),this.addPattern("{~DWAF:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(i,"] with tmpRecord:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(i,"]"));let s="";i.indexOf(":")>-1&&(s=i.split(":")[1],i=i.split(":")[0]);let l="";return null!=i&&(l=this.resolveStateFromAddress(i,a,r,null,n,o),l&&"undefined"!==l)?(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(i,"] - Found value: ").concat(l)),l):s}renderAsync(e,t,r,n,o,i){let a=e.trim(),s="object"==typeof t?t:{},l="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(a,"] with tmpRecord:"),s):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(a,"]"));let c="";a.indexOf(":")>-1&&(c=a.split(":")[1],a=a.split(":")[0]);let d="";return null!=a&&(d=this.resolveStateFromAddress(a,s,n,null,o,i),d&&"undefined"!==d)?(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(a,"] - Found value: ").concat(d)),l(null,d)):l(null,c)}}},{"pict-template":214}],242:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataWithTemplateFallback:","~}"),this.addPattern("{~DWTF:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(i,"] with tmpRecord:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(i,"]"));let s="";i.indexOf(":")>-1&&(s=i.split(":")[1],i=i.split(":")[0]);let l="";if(null!=i&&(l=this.resolveStateFromAddress(i,a,r,null,n,o),l&&"undefined"!==l))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(i,"] - Found value: ").concat(l)),l;const c=this.pict.parseTemplateByHash(s,a,null,r,n,o);return null==c||""===c?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(i,"] - No fallback template found at address: ").concat(s)),""):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(i,"] - Using fallback template from address: ").concat(s)),c)}renderAsync(e,t,r,n,o,i){let a=e.trim(),s="object"==typeof t?t:{},l="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(a,"] with tmpRecord:"),s):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(a,"]"));let c="";a.indexOf(":")>-1&&(c=a.split(":")[1],a=a.split(":")[0]);let d="";if(null!=a&&(d=this.resolveStateFromAddress(a,s,n,null,o,i),d&&"undefined"!==d))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(a,"] - Found value: ").concat(d)),l(null,d);this.pict.parseTemplateByHash(c,s,(e,t)=>e?l(e,""):null==t||""===t?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(a,"] - No fallback template found at address: ").concat(c)),l(null,"")):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(a,"] - Using fallback template from address: ").concat(c)),l(null,t)),n,o,i)}}},{"pict-template":214}],243:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~E:","~}"),this.addPattern("{~Entity:","~}")}render(e,t,r,n,o){return this.log.error("Pict: Entity Render [".concat(e,"]: Render called in a non-asynchronous fashion. This should not happen.")),""}renderAsync(e,t,r,n,o,i){let a,s=e.trim(),l="object"==typeof t?t:{},c="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fEntityRender]::[".concat(s,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fEntityRender]::[".concat(s,"]"));let d,h="",p=s.split("^");if(p.length<2)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(s,"]")),c(null,"");if(a=p[0].trim(),h=p[1].trim(),d=p[2].trim(),isNaN(Number(h)))h=this.resolveStateFromAddress(String(h),l,n,null,o,i);else try{h=parseInt(String(h))}catch(e){this.log.warn("Pict: Entity Render: Could not parse entity ID."),h=0}if(!a||!h)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(s,"] Entity: ").concat(a," ID: ").concat(h)),c(null,"");this.pict.LogNoisiness>3&&this.log.trace("Pict: Entity Render: Entity [".concat(a,"] with ID [").concat(h,"] as template [").concat(d,"] from [").concat(s,"]")),this.pict.EntityProvider.getEntity(a,h,function(e,t){if(e)return this.log.error("Pict: Entity Render: Error getting entity [".concat(a,"] with ID [").concat(h,"] for [").concat(s,"]: ").concat(e),e),c(e,"");d?this.pict.parseTemplateByHash(d,t,c,n,o,i):c(null,"")}.bind(this))}}},{"pict-template":214}],244:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~Icon:","~}"),this.addPattern("{~I:","~}")}render(e){let t=(e||"").trim();if(t.length<1)return"";let r=t,n=null,o=t.indexOf(":");o>-1&&(r=t.slice(0,o).trim(),n=t.slice(o+1).trim());let i=this.pict&&this.pict.providers&&this.pict.providers.Icon;if(!i||"function"!=typeof i.get)return"";let a=n?{variant:n}:void 0;return i.get(r,a)}}},{"pict-template":214}],245:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.addPattern("{~Pict","~}"),this.addPattern("{~P","~}"),this.addPattern("{~p","~}")}render(e,t,r,n,o){return this.pict.browserAddress}}},{"pict-template":214}],246:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Solve:","~}"),this.addPattern("{~S:","~}")}render(e,t,r,n,o){const[i,a,s]=e.trim().split(":",3),l="object"==typeof t?t:{};if(this.pict.LogNoisiness>4?this.log.trace("PICT Solve [fTemplateRender]::[".concat(e,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Solve [fTemplateRender]::[".concat(e,"]")),!i)return this.pict.LogNoisiness>2&&this.log.warn("Pict: Solve: Equation not found for [".concat(i,"]")),"";const c=a&&this.pict.resolveStateFromAddress(a,l,r,null,n,o)||l,d=s&&this.pict.resolveStateFromAddress(s,l,r,null,n,o)||this.pict.manifest;return this.fable.instantiateServiceProviderIfNotExists("ExpressionParser").solve(i,c,{},d,c)}}},{"pict-template":214}],247:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~SolveByReference:","~}"),this.addPattern("{~SBR:","~}")}render(e,t,r,n,o){const[i,a,s]=e.trim().split(":",3),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"]"));const c=this.pict.resolveStateFromAddress(i,l,r,null,n,o);if(!c)return this.pict.LogNoisiness>2&&this.log.warn("Pict: SolveByReference: Equation not found for [".concat(i,"]")),"";const d=a&&this.pict.resolveStateFromAddress(a,l,r,null,n,o)||l,h=s&&this.pict.resolveStateFromAddress(s,l,r,null,n,o)||this.pict.manifest;return this.fable.instantiateServiceProviderIfNotExists("ExpressionParser").solve(c,d,{},h,d)}}},{"pict-template":214}],248:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Template:","~}"),this.addPattern("{~T:","~}")}render(e,t,r,n,o){let i,a,s=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(s,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(s,"]"));let c=s.indexOf(":");return i=s.substring(0,c),c>-1?a=s.substring(c+1):i=s,i?a?this.pict.parseTemplateByHash(i,this.resolveStateFromAddress(a,l,r,null,n,o),null,r,n,o):this.pict.parseTemplateByHash(i,t,null,r,n,o):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(s,"]")),"")}renderAsync(e,t,r,n,o,i){let a,s,l=e.trim(),c="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(l,"]"));let h=l.indexOf(":");if(a=l.substring(0,h),h>-1?s=l.substring(h+1):a=l,!a)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(l,"]")),r(null,"");s?this.pict.parseTemplateByHash(a,this.resolveStateFromAddress(s,c,n,null,o,i),(e,t)=>e?d(e,""):d(null,t),n,o,i):this.pict.parseTemplateByHash(a,t,(e,t)=>e?d(e,""):d(null,t),n,o,i)}}},{"pict-template":214}],249:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByDataAddress:","~}"),this.addPattern("{~TBDA:","~}")}render(e,t,r,n,o){let i,a,s=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(s,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(s,"]"));let c=s.indexOf(":");if(i=s.substring(0,c),c>-1?a=s.substring(c+1):i=s,!i)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(s,"]")),"";let d=this.pict.resolveStateFromAddress(i,t,r,null,n,o);return d||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(i,"]")),d=""),a?this.pict.parseTemplate(d,this.resolveStateFromAddress(a,l,r,null,n,o),null,r,n,o):this.pict.parseTemplate(d,t,null,r,n,o)}renderAsync(e,t,r,n,o,i){let a,s,l=e.trim(),c="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(l,"]"));let h=l.indexOf(":");if(a=l.substring(0,h),h>-1?s=l.substring(h+1):a=l,!a)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(l,"]")),d(null,"");let p=this.pict.resolveStateFromAddress(a,t,n,null,o,i)||"";p||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(a,"]")),p=""),s?this.pict.parseTemplate(p,this.resolveStateFromAddress(s,c,n,null,o,i),(e,t)=>e?d(e,""):d(null,t),n,o,i):this.pict.parseTemplate(p,t,(e,t)=>e?d(e,""):d(null,t),n,o,i)}}},{"pict-template":214}],250:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByReference:","~}"),this.addPattern("{~TBR:","~}")}render(e,t,r,n,o){let i,a,s=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(s,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(s,"]"));let c=s.indexOf(":");if(i=s.substring(0,c),c>-1?a=s.substring(c+1):i=s,!i)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(s,"]")),"";let d=this.resolveStateFromAddress(i,t,r,null,n,o);return d?a?this.pict.parseTemplateByHash(d,this.resolveStateFromAddress(a,l,r,null,n,o),null,r,n,o):this.pict.parseTemplateByHash(d,t,null,r,n,o):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(s,"]")),"")}renderAsync(e,t,r,n,o,i){let a,s,l=e.trim(),c="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(l,"]"));let h=l.indexOf(":");if(a=l.substring(0,h),h>-1?s=l.substring(h+1):a=l,!a)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(l,"]")),r(null,"");let p=this.resolveStateFromAddress(a,t,n,null,o,i);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(l,"]")),r(null,"");s?this.pict.parseTemplateByHash(p,this.resolveStateFromAddress(s,c,n,null,o,i),(e,t)=>e?d(e,""):d(null,t),n,o,i):this.pict.parseTemplateByHash(p,t,(e,t)=>e?d(e,""):d(null,t),n,o,i)}}},{"pict-template":214}],251:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByType:","~}"),this.addPattern("{~TBT:","~}")}render(e,t,r,n,o){let i,a,s,l,c,d=e.trim(),h="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(d,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(d,"]"));let p=d.trim().split(":");if(p.length<3)return"";if(i=p[0],a=p[1].split(","),s=p[2],p.length>3&&(l=p[3]),p.length>4&&(c=p[4]),!s)return"";let u=t;l&&(u=this.resolveStateFromAddress(l,h,r,null,n,o));const f=this.resolveStateFromAddress(i,h,r,null,n,o);let m=typeof f;if("object"==m&&Array.isArray(f)&&(m="array"),-1===a.indexOf(m)){if(!c)return"";s=c}return this.pict.parseTemplateByHash(s,u,null,r,n,o)}renderAsync(e,t,r,n,o,i){let a,s,l,c,d,h=e.trim(),p="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(h,"] with tmpData:"),p):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(h,"]"));let f=h.trim().split(":");if(f.length<3)return r(null,"");if(a=f[0],s=f[1].split(","),l=f[2],f.length>3&&(c=f[3]),f.length>4&&(d=f[4]),!l)return r(null,"");let m=t;c&&(m=this.resolveStateFromAddress(c,p,n,null,o,i));const g=this.resolveStateFromAddress(a,p,n,null,o,i);let y=typeof g;if("object"==y&&Array.isArray(g)&&(y="array"),-1===s.indexOf(y)){if(!d)return r(null,"");l=d}this.pict.parseTemplateByHash(l,m,(e,t)=>e?u(e,""):u(null,t),n,o,i)}}},{"pict-template":214}],252:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateFromAddress:","~}"),this.addPattern("{~TFA:","~}")}render(e,t,r,n,o){let i,a,s=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(s,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(s,"]"));let c=s.indexOf(":");if(i=s.substring(0,c),c>-1?a=s.substring(c+1):i=s,!i)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(s,"]")),"";let d=this.resolveStateFromAddress(i,t,r,null,n,o);return d?a?this.pict.parseTemplate(d,this.resolveStateFromAddress(a,l,r,null,n,o),null,r,n,o):this.pict.parseTemplate(d,t,null,r,n,o):(this.log.warn("Pict: Template Render: Template not resolved for [".concat(s,"]")),"")}renderAsync(e,t,r,n,o,i){let a,s,l=e.trim(),c="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(l,"]"));let h=l.indexOf(":");if(a=l.substring(0,h),h>-1?s=l.substring(h+1):a=l,!a)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(l,"]")),r(null,"");let p=this.resolveStateFromAddress(a,t,n,null,o,i);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(l,"]")),r(null,"");s?this.pict.parseTemplate(p,this.resolveStateFromAddress(s,c,n,null,o,i),(e,t)=>e?d(e,""):d(null,t),n,o,i):this.pict.parseTemplate(p,t,(e,t)=>e?d(e,""):d(null,t),n,o,i)}}},{"pict-template":214}],253:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TFM:","~}"),this.addPattern("{~TemplateFromMap:","~}")}render(e,t,r,n,o){let i,a,s,l=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(l,"]"));let d=l.split(":");if(d.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(i=d[0],a=d[1],s=d[2],!i)return this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(l,"]")),"";let h=this.resolveStateFromAddress(a,c,r,null,n,o),p=this.resolveStateFromAddress(s,c,r,null,n,o);return h?(c=h[p],c?this.pict.parseTemplateByHash(i,c,null,r,n,o):this.pict.parseTemplateByHash(i,t,null,r,n,o)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(l,"]")),"")}renderAsync(e,t,r,n,o,i){let a,s,l,c=e.trim(),d="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] with tmpData:"),d):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"]"));let p=c.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(a=p[0],s=p[1],l=p[2],!a)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"");let u=this.resolveStateFromAddress(s,d,n,null,o,i),f=this.resolveStateFromAddress(l,d,n,null,o,i);if(!u)return this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(c,"]")),r(null,"");d=u[f],d?this.pict.parseTemplateByHash(a,d,(e,t)=>e?h(e,""):h(null,t),n,o,i):this.pict.parseTemplateByHash(a,t,(e,t)=>e?h(e,""):h(null,t),n,o,i)}}},{"pict-template":214}],254:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSet:","~}"),this.addPattern("{~TS:","~}")}render(e,t,r,n,o){let i,a,s=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRender]::[".concat(s,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRender]::[".concat(s,"]"));let c=s.indexOf(":");return i=s.substring(0,c),c>-1?a=s.substring(c+1):i=s,i?a?this.pict.parseTemplateSetByHash(i,this.resolveStateFromAddress(a,l,r,null,n,o),null,r,n,o):this.pict.parseTemplateSetByHash(i,t,null,r,n,o):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(s,"]")),"")}renderAsync(e,t,r,n,o,i){let a,s,l=e.trim(),c="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(l,"]"));let h=l.split(":");return h.length<2?(this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"")):(a=h[0],s=h[1],a?(c=this.resolveStateFromAddress(s,c,n,null,o,i),void(c?this.pict.parseTemplateSetByHash(a,c,(e,t)=>e?d(e,""):d(null,t),n,o,i):this.pict.parseTemplateSetByHash(a,t,(e,t)=>e?d(e,""):d(null,t),n,o,i))):(this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"")))}}},{"pict-template":214}],255:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TSFM:","~}"),this.addPattern("{~TemplateSetFromMap:","~}")}render(e,t,r,n,o){let i,a,s,l=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(l,"]"));let d=l.split(":");if(d.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(i=d[0],a=d[1],s=d[2],!i)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),"";let h=this.resolveStateFromAddress(a,c,r,null,n,o),p=this.resolveStateFromAddress(s,c,r,null,n,o);return h?(c=h[p],c?this.pict.parseTemplateSetByHash(i,c,null,r,n,o):this.pict.parseTemplateSetByHash(i,t,null,r,n,o)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(l,"]")),"")}renderAsync(e,t,r,n,o,i){let a,s,l,c=e.trim(),d="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(c,"] with tmpData:"),d):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(c,"]"));let p=c.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(a=p[0],s=p[1],l=p[2],!a)return this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"");let u=this.resolveStateFromAddress(s,d,n,null,o,i),f=this.resolveStateFromAddress(l,d,n,null,o,i);if(!u)return this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(c,"]")),r(null,"");d=u[f],d?this.pict.parseTemplateSetByHash(a,d,(e,t)=>e?h(e,""):h(null,t),n,o,i):this.pict.parseTemplateSetByHash(a,t,(e,t)=>e?h(e,""):h(null,t),n,o,i)}}},{"pict-template":214}],256:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSetWithPayload:","~}"),this.addPattern("{~TSWP:","~}")}render(e,t,r,n,o){let i,a,s,l=e.trim();this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(l,"] with record:"),t):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(l,"]"));let c=l.trim().split(":");if(c.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";i=c[0],a=c[1],s=c[2];let d=this.resolveStateFromAddress(a,t,r,null,n,o);d||(d=t),d||(d={});let h=this.resolveStateFromAddress(s,t,r,null,n,o);return h||(h=t),h||(h={}),this.pict.parseTemplateSetWithPayloadByHash(i,d,h,null,r,n,o)}renderAsync(e,t,r,n,o,i){let a,s,l,c=e.trim(),d="function"==typeof r?r:()=>"";(this.pict.LogNoisiness>4||this.pict.LogNoisiness>0)&&this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(c,"]"));let h=c.trim().split(":");if(h.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");a=h[0],s=h[1],l=h[2];let p=this.resolveStateFromAddress(s,t,n,null,o,i);p||(p=t),p||(p={});let u=this.resolveStateFromAddress(l,t,n,null,o,i);u||(u=t),u||(u={}),this.pict.parseTemplateSetWithPayloadByHash(a,p,u,(e,t)=>e?d(e,""):d(null,t),n,o,i)}}},{"pict-template":214}],257:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateValueSet:","~}"),this.addPattern("{~TVS:","~}")}render(e,t,r,n,o){let i,a,s=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(s,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(s,"]"));let c=s.indexOf(":");if(i=s.substring(0,c),c>-1?a=s.substring(c+1):i=s,!i)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(s,"]")),"";l=this.resolveStateFromAddress(a,l,r,null,n,o);let d=[];if(Array.isArray(l))for(let e=0;e<l.length;e++)d.push({Value:l[e],Key:e});else if("object"==typeof l){let e=Object.keys(l);for(let t=0;t<e.length;t++)d.push({Value:l[e[t]],Key:e[t]})}else d.push({Value:l});return l=d,l?this.pict.parseTemplateSetByHash(i,l,null,r,n,o):this.pict.parseTemplateSetByHash(i,t,null,r,n,o)}renderAsync(e,t,r,n,o,i){let a,s,l=e.trim(),c="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(l,"]"));let h=l.split(":");if(h.length<2)return this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(a=h[0],s=h[1],!a)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"");c=this.resolveStateFromAddress(s,c,n,null,o,i);let p=[];if(Array.isArray(c))for(let e=0;e<c.length;e++)p.push({Value:c[e],Key:e});else if("object"==typeof c){let e=Object.keys(c);for(let t=0;t<e.length;t++)p.push({Value:c[e[t]],Key:c[e[t]]})}else p.push({Value:c});c=p,c?this.pict.parseTemplateSetByHash(a,c,(e,t)=>e?d(e,""):d(null,t),n,o,i):this.pict.parseTemplateSetByHash(a,t,(e,t)=>e?d(e,""):d(null,t),n,o,i)}}},{"pict-template":214}],258:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~V:","~}"),this.addPattern("{~View:","~}"),"__TemplateOutputCache"in this.pict||(this.pict.__TemplateOutputCache={})}render(e,t,r,n,o){const i=e.trim();if(!(i in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(i,"]")),"";let a=this.pict.getUUID();return this.pict.views[i].render("__Virtual","__TemplateOutputCache.".concat(a),t,o?o.RootRenderable:void 0),this.pict.__TemplateOutputCache[a]}renderAsync(e,t,r,n,o,i){const a=e.trim();if(!(a in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(a,"]")),r(null,"");let s=this.pict.getUUID();return this.pict.views[a].renderAsync("__Virtual","__TemplateOutputCache.".concat(s),t,i?i.RootRenderable:void 0,(e,t)=>{if(e)return this.log.warn("Pict: View Template Render: Error rendering view [".concat(a,"]"),e),r(e,"");let n=this.pict.__TemplateOutputCache[s];return r(null,n)})}}},{"pict-template":214}],259:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumber:","~}"),this.addPattern("{~RN:","~}")}render(e,t,r,n,o){let i=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumber]::[".concat(i,"]"));let a=0,s=9999999;if(i.length>0){let e=i.split(",");if(e.length>0)try{a=parseInt(e[0])}catch(e){a=0}if(e.length>1)try{s=parseInt(e[1])}catch(e){s=9999999}}return this.fable.DataGeneration.randomIntegerBetween(a,s)}}},{"pict-template":214}],260:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumberString:","~}"),this.addPattern("{~RNS:","~}")}render(e,t,r,n,o){let i=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumberString]::[".concat(i,"]"));let a=4,s=9999;if(i.length>0){let e=i.split(",");if(e.length>0)try{a=parseInt(e[0])}catch(e){a=4}if(e.length>1)try{s=parseInt(e[1])}catch(e){s=9999}}return this.fable.DataGeneration.randomNumericString(a,s)}}},{"pict-template":214}],261:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataEncodeJavascriptString:","~}"),this.addPattern("{~DEJS:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(i,"]"));let s=this.resolveStateFromAddress(i,a,r,null,n,o);return this.pict.DataFormat.stringEncodeForJavascript(s)}}},{"pict-template":214}],262:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataJson:","~}"),this.addPattern("{~DJ:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(i,"]"));let s=this.resolveStateFromAddress(i,a,r,null,n,o);return s||(s=t),JSON.stringify(s)}}},{"pict-template":214}],263:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyFormat:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{},s=i.split("^");if(s.length<2)return this.log.error("PICT Template [fDateOnlyFormat]::[".concat(i,"] did not have a valid format string and date.")),"";let l=this.resolveStateFromAddress(s[0],a,r,null,n,o);return this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(i,"] with data:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(i,"]")),this.fable.Dates.dayJS.utc(l).format(s[1])}}},{"pict-template":214}],264:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyYMD:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{},s=this.resolveStateFromAddress(i,a,r,null,n,o);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(i,"] with data:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(i,"]"));return""+this.fable.Dates.dayJS.utc(s).format("YYYY-MM-DD")}}},{"pict-template":214}],265:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeFormat:","~}"),this.addPattern("{~DateFormat:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{},s=i.split("^");if(s.length<2)return this.log.error("PICT Template [fDateTimeFormat]::[".concat(i,"] did not have a valid format string and date.")),"";let l=this.resolveStateFromAddress(s[0],a,r,null,n,o);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeFormat]::[".concat(i,"] with data:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeFormat]::[".concat(i,"]"));let c=this.fable.Dates.dayJS.utc(l);try{if(this.pict.options.Timezone)c=c.tz(this.pict.options.Timezone);else try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return c.format(s[1])}}},{"pict-template":214}],266:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeYMD:","~}"),this.addPattern("{~DateYMD:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{},s=this.resolveStateFromAddress(i,a,r,null,n,o);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(i,"] with data:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(i,"]"));let l=this.fable.Dates.dayJS.utc(s);try{if(this.pict.options.Timezone)l=l.tz(this.pict.options.Timezone);else try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return l.format("YYYY-MM-DD")}}},{"pict-template":214}],267:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Digits:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDigits]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDigits]::[".concat(i,"]"));let s=this.resolveStateFromAddress(i,a,r,null,n,o);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(s,2))}}},{"pict-template":214}],268:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Dollars:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDollars]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDollars]::[".concat(i,"]"));let s=this.resolveStateFromAddress(i,a,r,null,n,o);return this.fable.DataFormat.formatterDollars(s)}}},{"pict-template":214}],269:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentEnd:","~}"),this.addPattern("{~HCE:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(i,"]"));let s=!1;const[l,c]=i.split(":");null!=l&&(s=this.resolveStateFromAddress(l,a,r,null,n,o));const d=null!=c&&("1"===c||"true"===c.toLowerCase()||"t"===c.toLowerCase());return Boolean(s)==d?" --\x3e":""}}},{"pict-template":214}],270:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentStart:","~}"),this.addPattern("{~HCS:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(i,"]"));let s=!1;const[l,c]=i.split(":");null!=l&&(s=this.resolveStateFromAddress(l,a,r,null,n,o));const d=null!=c&&("1"===c||"true"===c.toLowerCase()||"t"===c.toLowerCase());return Boolean(s)==d?"\x3c!-- ":""}}},{"pict-template":214}],271:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Join:","~}"),this.addPattern("{~J:","~}")}render(e,t,r,n,o){let i=e,a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join [fDataRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Join [fDataRender]::[".concat(i,"]"));let s=i.split("^");if(s.length<2)return"";let l=s.shift(),c=[];for(let e=0;e<s.length;e++){let t=this.resolveStateFromAddress(s[e],a,r,null,n,o);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)c.push(t[e]);else t&&c.push(t)}return c.join(l)}}},{"pict-template":214}],272:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~JoinUnique:","~}"),this.addPattern("{~JU:","~}")}render(e,t,r,n,o){let i=e,a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join Unique [fDataRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Join Unique [fDataRender]::[".concat(i,"]"));let s=i.split("^");if(s.length<2)return"";let l=s.shift(),c=[],d={};for(let e=0;e<s.length;e++){let t=this.resolveStateFromAddress(s[e],a,r,null,n,o);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)t[e]in d||(d[t[e]]=!0,c.push(t[e]));else t&&(t in d||(d[t]=!0,c.push(t)))}return c.join(l)}}},{"pict-template":214}],273:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PascalCaseIdentifier:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(i,"]"));let s=this.resolveStateFromAddress(i,a,r,null,n,o);return null==s||"undefined"==s||void 0===s?"":this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(s))}}},{"pict-template":214}],274:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PluckJoinUnique:","~}"),this.addPattern("{~PJU:","~}")}render(e,t,r,n,o){let i=e,a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(i,"]"));let s=i.split("^");if(s.length<3)return"";let l=s.shift(),c=s.shift(),d=[],h={};for(let e=0;e<s.length;e++){let t=this.resolveStateFromAddress(s[e],a,r,null,n,o);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++){if(null===t[e]||"object"!=typeof t)continue;let r=this.pict.manifest.getValueByHash(t[e],c);r in h||(h[r]=!0,d.push(r))}else t&&(t in h||(h[t]=!0,d.push(t)))}return d.join(l)}}},{"pict-template":214}],275:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Breakpoint","~}")}render(e,t,r,n,o){let i=e.trim(),a=new Error("PICT Template Breakpoint: ".concat(i));return this.log.trace("PICT Template Breakpoint: ".concat(i),a.stack),""}}},{"pict-template":214}],276:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataTree:","~}"),this.addPattern("{~DT:","~}")}render(e,t,r,n,o){let i="object"==typeof t?t:{};if(i.TemplateHash=e.trim(),i.ValueTreeParameters=i.TemplateHash.split("^"),i.ValueTreeParameters.length<1)return"";i.ResolvedValue=this.resolveStateFromAddress(i.ValueTreeParameters[0],i,r,null,n,o),i.ResolvedValueType=typeof i.ResolvedValue;try{i.TreeMaxDepth=i.ValueTreeParameters.length<2?1:parseInt(i.ValueTreeParameters[1])}catch(e){i.TreeMaxDepth=1}let a=this.pict.TemplateProvider.getTemplate("PICT-Object-Wrap");return a||(a='<div class="PICT PICTObjectSet">{~D:Record.ObjectValueTree~}</div>'),"object"==i.ResolvedValueType?i.ObjectValueTree=this.dataValueTreeObjectSet(i.ResolvedValue,i.ResolvedValue,0,i.TreeMaxDepth,r,n):(this.log.trace("PICT Template Log Value Tree: [".concat(i.TemplateHash,"] resolved data is not an object."),i.ResolvedValue),i.ObjectValueTree=i.ResolveValue),this.pict.parseTemplate(a,i,null,r,n,o)}dataValueTreeObjectSet(e,t,r,n,o,i,a){let s="";if("object"!=typeof e)return s;let l=Object.keys(e),c=this.pict.TemplateProvider.getTemplate("PICT-Object-Branch");c||(c='\n<div class="PICTObjectBranchDepth_{~D:Record.CurrentDepth~}"><div class="PICTObjectBranch">{~D:Record.BranchKey~}</div><div class="PICTObjectBranchValue">{~D:Record.BranchValue~}</div></div>\n');for(let d=0;d<l.length;d++){let h=typeof e[l[d]],p="";if("object"===h)p=r+1>n?"...":this.dataValueTreeObjectSet(e[l[d]],t,r+1,n,o,i);else p=e[l[d]];let u={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:t,Container:e,BranchEntryCount:l.length,BranchIndex:d,BranchKey:l[d],BranchValue:p,BranchDataType:h,CurrentDepth:r,MaxDepth:n};s+=this.pict.parseTemplate(c,u,null,o,i,a)}return s}}},{"pict-template":214}],277:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogStatement:","~}"),this.addPattern("{~LS:","~}")}render(e,t,r,n,o){let i=e.trim();return this.log.trace("PICT Template Log Message: ".concat(i)),""}}},{"pict-template":214}],278:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogValue:","~}"),this.addPattern("{~LV:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{},s=this.resolveStateFromAddress(i,a,r,null,n,o),l=typeof s;return null==s||"undefined"==l?this.log.trace("PICT Template Log Value: [".concat(i,"] is ").concat(l,".")):"object"==l?this.log.trace("PICT Template Log Value: [".concat(i,"] is an object."),s):this.log.trace("PICT Template Log Value: [".concat(i,"] is a ").concat(l," = [").concat(s,"]")),""}}},{"pict-template":214}],279:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"logValueTreeObjectSet",(e,t,r,n,o)=>{if("object"!=typeof e)return"";let i=Object.keys(e);for(let a=0;a<i.length;a++){let s=typeof e[i[a]],l="";if("object"===s)l="...";else l=e[i[a]];if(this.log.trace("[".concat(t,".").concat(i[a],"] (").concat(s,"): ").concat(l)),n+1>o)return"";"object"==s&&(l=this.logValueTreeObjectSet(e[i[a]],"".concat(t,".").concat(i[a]),r,n+1,o))}return""}),this.log,this.addPattern("{~LogValueTree:","~}"),this.addPattern("{~LVT:","~}")}render(e,t,r,n,o){let i="object"==typeof t?t:{};if(i.TemplateHash=e.trim(),i.ValueTreeParameters=i.TemplateHash.split("^"),i.ValueTreeParameters.length<1)return"";i.ResolvedValue=this.resolveStateFromAddress(i.ValueTreeParameters[0],i,r,null,n,o),i.ResolvedValueType=typeof i.ResolvedValue;try{i.TreeMaxDepth=i.ValueTreeParameters.length<2?1:parseInt(i.ValueTreeParameters[1])}catch(e){i.TreeMaxDepth=1}return"object"==i.ResolvedValueType?this.logValueTreeObjectSet(i.ResolvedValue,i.ValueTreeParameters[0],i.ResolvedValue,0,i.TreeMaxDepth):this.log.trace("PICT Template Log Value Tree: [".concat(i.TemplateHash,"] resolved data is not an object."),i.ResolvedValue),""}}},{"pict-template":214}],280:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~NotEmpty:","~}"),this.addPattern("{~NE:","~}")}render(e,t,r,n,o){let i=e.trim(),a="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fNotEmptyRender]::[".concat(i,"] with tmpData:"),a):this.pict.LogNoisiness>2&&this.log.trace("PICT Template [fNotEmptyRender]::[".concat(i,"]"));let s=i.split("^");return this.resolveStateFromAddress(s[0],a,r,null,n,o)?s[1]:""}}},{"pict-template":214}],281:[function(e,t,r){const n=e("pict-template");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}compareValues(e,t,r){switch(t){case"TRUE":return!0===e;case"FALSE":return!1===e;case"LNGT":case"LENGTH_GREATER_THAN":switch(typeof e){case"string":case"object":return e.length>r;default:return!1}case"LNLT":case"LENGTH_LESS_THAN":switch(typeof e){case"string":case"object":return e.length<r;default:return!1}case"!==":return e!==r;case"!=":return e!=r;case"<":return e<r;case">":return e>r;case"<=":return e<=r;case">=":return e>=r;case"===":return e===r;case"==":return e==r;default:return!1}}}},{"pict-template":214}],282:[function(e,t,r){const n=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIf:","~}"),this.addPattern("{~TIf:","~}")}render(e,t,r,n,o){let i,a,s,l=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let d=l.split(":");if(d.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),"";if(i=d[0],a=d[1],s=d[2],!i)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),"";if(!s)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),"";let h=s.split("^");if(h.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(h[0],c,r,null,n,o),h[1],this.resolveStateFromAddress(h[2],c,r,null,n,o))?a?this.pict.parseTemplateByHash(i,this.resolveStateFromAddress(a,c,r,null,n,o),null,r,n,o):this.pict.parseTemplateByHash(i,t,null,r,n,o):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),""}}renderAsync(e,t,r,n,o,i){let a,s,l,c=e.trim(),d="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),d):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let p=c.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),h(null,"");if(a=p[0],s=p[1],l=p[2],!a)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),h(null,"");if(!l)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),h(null,"");let u=l.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),h(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(u[0],d,n,null,o,i),u[1],this.resolveStateFromAddress(u[2],d,n,null,o,i)))return h(null,"");s?this.pict.parseTemplateByHash(a,this.resolveStateFromAddress(s,d,n,null,o,i),(e,t)=>e?h(e,""):h(null,t),n,o,i):this.pict.parseTemplateByHash(a,t,(e,t)=>e?h(e,""):h(null,t),n,o,i)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),h(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":281}],283:[function(e,t,r){const n=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIfAbsolute:","~}"),this.addPattern("{~TIfAbs:","~}")}render(e,t,r,n,o){let i,a,s,l=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let d=l.split(":");if(d.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),"";if(i=d[0],a=d[1],s=d[2],!i)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),"";if(!s)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),"";let h=s.split("^");if(h.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(h[0],c,r,null,n,o),h[1],h[2])?a?this.pict.parseTemplateByHash(i,this.resolveStateFromAddress(a,c,r,null,n,o),null,r,n,o):this.pict.parseTemplateByHash(i,t,null,r,n,o):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),""}}renderAsync(e,t,r,n,o,i){let a,s,l,c=e.trim(),d="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),d):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let p=c.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),h(null,"");if(a=p[0],s=p[1],l=p[2],!a)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),h(null,"");if(!l)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),h(null,"");let u=l.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),h(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(u[0],d,n,null,o,i),u[1],u[2]))return h(null,"");s?this.pict.parseTemplateByHash(a,this.resolveStateFromAddress(s,d,n,null,o,i),(e,t)=>e?h(e,""):h(null,t),n,o,i):this.pict.parseTemplateByHash(a,t,(e,t)=>e?h(e,""):h(null,t),n,o,i)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),h(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":281}],284:[function(e,t,r){
91
+ /**
92
+ * Precedent Meta-Templating
93
+ *
94
+ * @license MIT
95
+ *
96
+ * @author Steven Velozo <steven@velozo.com>
97
+ *
98
+ * @description Process text streams, parsing out meta-template expressions.
99
+ */
100
+ var n=e("./WordTree.js"),o=e("./StringParser.js");t.exports=class{constructor(){this.WordTree=new n,this.StringParser=new o,this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r){return this.WordTree.addPattern(e,t,r)}parseString(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}},{"./StringParser.js":285,"./WordTree.js":286}],285:[function(e,t,r){t.exports=class{constructor(){}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&t.Pattern.hasOwnProperty(e))t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(t.Pattern.PatternEnd.hasOwnProperty(e)){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),t.Pattern.hasOwnProperty("Parse"))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else t.PatternStartNode.PatternEnd.hasOwnProperty(e)?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if(t.Pattern.hasOwnProperty("PatternEnd")){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),t.Pattern.PatternEnd.hasOwnProperty(e)&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],t.Pattern.hasOwnProperty("Parse")))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(t.ParseTree.hasOwnProperty(e))return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}parseString(e,t,r){let n=this.newParserState(t);for(var o=0;o<e.length;o++)this.parseCharacter(e[o],n,r);return this.flushOutputBuffer(n),n.Output}}},{}],286:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}addEndChild(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPattern(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let n=this.ParseTree;for(var o=0;o<e.length;o++)n=this.addChild(n,e[o],o);n.hasOwnProperty("PatternEnd")||(n.PatternEnd={});let i="string"==typeof t?t:e;for(let e=0;e<i.length;e++)n=this.addEndChild(n,i[e],e);return n.PatternStartString=e,n.PatternEndString=i,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:e=>e,!0}}},{}],287:[function(e,t,r){var n,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(e){o=s}}();var c,d=[],h=!1,p=-1;function u(){h&&c&&(h=!1,c.length?d=c.concat(d):p=-1,d.length&&f())}function f(){if(!h){var e=l(u);h=!0;for(var t=d.length;t;){for(c=d,d=[];++p<t;)c&&c[p].run();p=-1,t=d.length}c=null,h=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d.push(new m(e,t)),1!==d.length||h||l(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],288:[function(e,t,r){(function(e){(function(){!function(n){var o="object"==typeof r&&r&&!r.nodeType&&r,i="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a&&a.self!==a||(n=a);var s,l,c=2147483647,d=36,h=/^xn--/,p=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function y(e){throw new RangeError(f[e])}function b(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+b((e=e.replace(u,".")).split("."),t).join(".")}function S(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function T(e){return b(e,function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)}).join("")}function w(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,r){var n=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=d)e=m(e/35);return m(n+36*e/(e+38))}function A(e){var t,r,n,o,i,a,s,l,h,p,u=[],f=e.length,g=0,b=128,v=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&y("not-basic"),u.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<f;){for(i=g,a=1,s=d;o>=f&&y("invalid-input"),((l=w(e.charCodeAt(o++)))>=d||l>m((c-g)/a))&&y("overflow"),g+=l*a,!(l<(h=s<=v?1:s>=v+26?26:s-v));s+=d)a>m(c/(p=d-h))&&y("overflow"),a*=p;v=P(g-i,t=u.length+1,0==i),m(g/t)>c-b&&y("overflow"),b+=m(g/t),g%=t,u.splice(g++,0,b)}return T(u)}function C(e){var t,r,n,o,i,a,s,l,h,p,u,f,b,v,T,w=[];for(f=(e=S(e)).length,t=128,r=0,i=72,a=0;a<f;++a)(u=e[a])<128&&w.push(g(u));for(n=o=w.length,o&&w.push("-");n<f;){for(s=c,a=0;a<f;++a)(u=e[a])>=t&&u<s&&(s=u);for(s-t>m((c-r)/(b=n+1))&&y("overflow"),r+=(s-t)*b,t=s,a=0;a<f;++a)if((u=e[a])<t&&++r>c&&y("overflow"),u==t){for(l=r,h=d;!(l<(p=h<=i?1:h>=i+26?26:h-i));h+=d)T=l-p,v=d-p,w.push(g(x(p+T%v,0))),l=m(T/v);w.push(g(x(l,0))),i=P(r,b,n==o),r=0,++n}++r,++t}return w.join("")}if(s={version:"1.4.1",ucs2:{decode:S,encode:T},decode:A,encode:C,toASCII:function(e){return v(e,function(e){return p.test(e)?"xn--"+C(e):e})},toUnicode:function(e){return v(e,function(e){return h.test(e)?A(e.slice(4).toLowerCase()):e})}},o&&i)if(t.exports==o)i.exports=s;else for(l in s)s.hasOwnProperty(l)&&(o[l]=s[l]);else n.punycode=s}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],289:[function(e,t,r){var n=String.prototype.replace,o=/%20/g,i="RFC1738",a="RFC3986";t.exports={default:a,formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:a}},{}],290:[function(e,t,r){var n=e("./stringify"),o=e("./parse"),i=e("./formats");t.exports={formats:i,parse:o,stringify:n}},{"./formats":289,"./parse":291,"./stringify":292}],291:[function(e,t,r){var n=e("./utils"),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},l=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},c=function(e,t,r,i){if(e){var a=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&o.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(r),a=i?r.slice(0,i.index):r,s=[];if(a){if(!t.plainObjects&&o.call(Object.prototype,a)&&!t.allowPrototypes)return;s[s.length]=a}for(var l=0;null!==(i=n.exec(r))&&l<t.depth;){l+=1;var c=i[1].slice(1,-1);if(!t.plainObjects&&o.call(Object.prototype,c)&&!t.allowPrototypes)return;s[s.length]=i[1]}if(i){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");s[s.length]="["+r.slice(i.index)+"]"}return s}(e,r);if(a)return function(e,t,r,o){var i=0;if(e.length>0&&"[]"===e[e.length-1]){var a=e.slice(0,-1).join("");i=Array.isArray(t)&&t[a]?t[a].length:0}for(var s=o?t:l(t,r,i),c=e.length-1;c>=0;--c){var d,h=e[c];if("[]"===h&&r.parseArrays)d=n.isOverflow(s)?s:r.allowEmptyArrays&&(""===s||r.strictNullHandling&&null===s)?[]:n.combine([],s,r.arrayLimit,r.plainObjects);else{d=r.plainObjects?{__proto__:null}:{};var p="["===h.charAt(0)&&"]"===h.charAt(h.length-1)?h.slice(1,-1):h,u=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,f=parseInt(u,10),m=!isNaN(f)&&h!==u&&String(f)===u&&f>=0&&r.parseArrays;if(r.parseArrays||""!==u)if(m&&f<r.arrayLimit)(d=[])[f]=s;else{if(m&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");m?(d[f]=s,n.markOverflow(d,f)):"__proto__"!==u&&(d[u]=s)}else d={0:s}}s=d}return s}(a,t,r,i)}};t.exports=function(e,t){var r=function(e){if(!e)return a;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?a.charset:e.charset,r=void 0===e.duplicates?a.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:a.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:a.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var d="string"==typeof e?function(e,t){var r={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,t.throwOnLimitExceeded?d+1:d);if(t.throwOnLimitExceeded&&h.length>d)throw new RangeError("Parameter limit exceeded. Only "+d+" parameter"+(1===d?"":"s")+" allowed.");var p,u=-1,f=t.charset;if(t.charsetSentinel)for(p=0;p<h.length;++p)0===h[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===h[p]?f="utf-8":"utf8=%26%2310003%3B"===h[p]&&(f="iso-8859-1"),u=p,p=h.length);for(p=0;p<h.length;++p)if(p!==u){var m,g,y=h[p],b=y.indexOf("]="),v=-1===b?y.indexOf("="):b+1;if(-1===v?(m=t.decoder(y,a.decoder,f,"key"),g=t.strictNullHandling?null:""):null!==(m=t.decoder(y.slice(0,v),a.decoder,f,"key"))&&(g=n.maybeMap(l(y.slice(v+1),t,i(r[m])?r[m].length:0),function(e){return t.decoder(e,a.decoder,f,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=s(String(g))),y.indexOf("[]=")>-1&&(g=i(g)?[g]:g),t.comma&&i(g)&&g.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");g=n.combine([],g,t.arrayLimit,t.plainObjects)}if(null!==m){var S=o.call(r,m);S&&("combine"===t.duplicates||y.indexOf("[]=")>-1)?r[m]=n.combine(r[m],g,t.arrayLimit,t.plainObjects):S&&"last"!==t.duplicates||(r[m]=g)}}return r}(e,r):e,h=r.plainObjects?{__proto__:null}:{},p=Object.keys(d),u=0;u<p.length;++u){var f=p[u],m=c(f,d[f],r,"string"==typeof e);h=n.merge(h,m,r)}return!0===r.allowSparse?h:n.compact(h)}},{"./utils":293}],292:[function(e,t,r){var n=e("side-channel"),o=e("./utils"),i=e("./formats"),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,d=function(e,t){c.apply(e,l(t)?t:[t])},h=Date.prototype.toISOString,p=i.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,r,i,a,s,c,h,p,m,g,y,b,v,S,T,w,x,P){for(var A,C=t,D=P,k=0,E=!1;void 0!==(D=D.get(f))&&!E;){var F=D.get(t);if(k+=1,void 0!==F){if(F===k)throw new RangeError("Cyclic object value");E=!0}void 0===D.get(f)&&(k=0)}if("function"==typeof g?C=g(r,C):C instanceof Date?C=v(C):"comma"===i&&l(C)&&(C=o.maybeMap(C,function(e){return e instanceof Date?v(e):e})),null===C){if(c)return m&&!w?m(r,u.encoder,x,"key",S):r;C=""}if("string"==typeof(A=C)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||o.isBuffer(C))return m?[T(w?r:m(r,u.encoder,x,"key",S))+"="+T(m(C,u.encoder,x,"value",S))]:[T(r)+"="+T(String(C))];var M,L=[];if(void 0===C)return L;if("comma"===i&&l(C))w&&m&&(C=o.maybeMap(C,m)),M=[{value:C.length>0?C.join(",")||null:void 0}];else if(l(g))M=g;else{var R=Object.keys(C);M=y?R.sort(y):R}var _=p?String(r).replace(/\./g,"%2E"):String(r),B=a&&l(C)&&1===C.length?_+"[]":_;if(s&&l(C)&&0===C.length)return B+"[]";for(var N=0;N<M.length;++N){var I=M[N],j="object"==typeof I&&I&&void 0!==I.value?I.value:C[I];if(!h||null!==j){var O=b&&p?String(I).replace(/\./g,"%2E"):String(I),V=l(C)?"function"==typeof i?i(B,O):B:B+(b?"."+O:"["+O+"]");P.set(t,k);var H=n();H.set(f,P),d(L,e(j,V,i,a,s,c,h,p,"comma"===i&&w&&l(C)?null:m,g,y,b,v,S,T,w,x,H))}}return L};t.exports=function(e,t){var r,o=e,c=function(e){if(!e)return u;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||u.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,o=i.formatters[r],c=u.filter;if(("function"==typeof e.filter||l(e.filter))&&(c=e.filter),n=e.arrayFormat in s?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":u.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===e.allowDots?!0===e.encodeDotInKeys||u.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:u.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?u.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:u.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:u.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:u.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:u.encodeValuesOnly,filter:c,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:u.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:u.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:u.strictNullHandling}}(t);"function"==typeof c.filter?o=(0,c.filter)("",o):l(c.filter)&&(r=c.filter);var h=[];if("object"!=typeof o||null===o)return"";var p=s[c.arrayFormat],f="comma"===p&&c.commaRoundTrip;r||(r=Object.keys(o)),c.sort&&r.sort(c.sort);for(var g=n(),y=0;y<r.length;++y){var b=r[y],v=o[b];c.skipNulls&&null===v||d(h,m(v,b,p,f,c.allowEmptyArrays,c.strictNullHandling,c.skipNulls,c.encodeDotInKeys,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var S=h.join(c.delimiter),T=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?T+="utf8=%26%2310003%3B&":T+="utf8=%E2%9C%93&"),S.length>0?T+S:""}},{"./formats":289,"./utils":293,"side-channel":301}],293:[function(e,t,r){var n=e("./formats"),o=e("side-channel"),i=Object.prototype.hasOwnProperty,a=Array.isArray,s=o(),l=function(e,t){return s.set(e,t),e},c=function(e){return s.has(e)},d=function(e){return s.get(e)},h=function(e,t){s.set(e,t)},p=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),u=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},f=1024;t.exports={arrayToObject:u,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t,r,n){if(c(e)){var o=d(e)+1;return e[o]=t,h(e,o),e}var i=[].concat(e,t);return i.length>r?l(u(i,{plainObjects:n}),i.length-1):i},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),l=0;l<s.length;++l){var c=s[l],d=i[c];"object"==typeof d&&null!==d&&-1===r.indexOf(d)&&(t[t.length]={obj:i,prop:c},r[r.length]=d)}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&(n[n.length]=r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var s="",l=0;l<a.length;l+=f){for(var c=a.length>=f?a.slice(l,l+f):a,d=[],h=0;h<c.length;++h){var u=c.charCodeAt(h);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===n.RFC1738&&(40===u||41===u)?d[d.length]=c.charAt(h):u<128?d[d.length]=p[u]:u<2048?d[d.length]=p[192|u>>6]+p[128|63&u]:u<55296||u>=57344?d[d.length]=p[224|u>>12]+p[128|u>>6&63]+p[128|63&u]:(h+=1,u=65536+((1023&u)<<10|1023&c.charCodeAt(h)),d[d.length]=p[240|u>>18]+p[128|u>>12&63]+p[128|u>>6&63]+p[128|63&u])}s+=d.join("")}return s},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:c,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:l,maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r[r.length]=t(e[n]);return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(a(t)){var o=t.length;if(n&&"number"==typeof n.arrayLimit&&o>n.arrayLimit)return l(u(t.concat(r),n),o);t[o]=r}else{if(!t||"object"!=typeof t)return[t,r];if(c(t)){var s=d(t)+1;t[s]=r,h(t,s)}else{if(n&&n.strictMerge)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}}return t}if(!t||"object"!=typeof t){if(c(r)){for(var p=Object.keys(r),f=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},m=0;m<p.length;m++){f[parseInt(p[m],10)+1]=r[p[m]]}return l(f,d(r)+1)}var g=[t].concat(r);return n&&"number"==typeof n.arrayLimit&&g.length>n.arrayLimit?l(u(g,n),g.length-1):g}var y=t;return a(t)&&!a(r)&&(y=u(t,n)),a(t)&&a(r)?(r.forEach(function(r,o){if(i.call(t,o)){var a=t[o];a&&"object"==typeof a&&r&&"object"==typeof r?t[o]=e(a,r,n):t[t.length]=r}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){var a=r[o];if(i.call(t,o)?t[o]=e(t[o],a,n):t[o]=a,c(r)&&!c(t)&&l(t,d(r)),c(t)){var s=parseInt(o,10);String(s)===o&&s>=0&&s>d(t)&&h(t,s)}return t},y)}}},{"./formats":289,"side-channel":301}],294:[function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var d=0;d<c;++d){var h,p,u,f,m=e[d].replace(s,"%20"),g=m.indexOf(r);g>=0?(h=m.substr(0,g),p=m.substr(g+1)):(h=m,p=""),u=decodeURIComponent(h),f=decodeURIComponent(p),n(a,u)?o(a[u])?a[u].push(f):a[u]=[a[u],f]:a[u]=f}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],295:[function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),function(a){var s=encodeURIComponent(n(a))+r;return o(e[a])?i(e[a],function(e){return s+encodeURIComponent(n(e))}).join(t):s+encodeURIComponent(n(e[a]))}).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],296:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":294,"./encode":295}],297:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=e("buffer"),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:20}],298:[function(e,t,r){var n=e("object-inspect"),o=e("es-errors/type"),i=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return i(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return function(e,t){if(e){var r=i(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!i(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var n=i(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t}},{"es-errors/type":47,"object-inspect":137}],299:[function(e,t,r){var n=e("get-intrinsic"),o=e("call-bound"),i=e("object-inspect"),a=e("es-errors/type"),s=n("%Map%",!0),l=o("Map.prototype.get",!0),c=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),h=o("Map.prototype.delete",!0),p=o("Map.prototype.size",!0);t.exports=!!s&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a("Side channel does not contain "+i(e))},delete:function(t){if(e){var r=h(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return l(e,t)},has:function(t){return!!e&&d(e,t)},set:function(t,r){e||(e=new s),c(e,t,r)}};return t}},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":137}],300:[function(e,t,r){var n=e("get-intrinsic"),o=e("call-bound"),i=e("object-inspect"),a=e("side-channel-map"),s=e("es-errors/type"),l=n("%WeakMap%",!0),c=o("WeakMap.prototype.get",!0),d=o("WeakMap.prototype.set",!0),h=o("WeakMap.prototype.has",!0),p=o("WeakMap.prototype.delete",!0);t.exports=l?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+i(e))},delete:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(a&&t)return t.delete(r);return!1},get:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):t&&t.get(r)},has:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?h(e,r):!!t&&t.has(r)},set:function(r,n){l&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new l),d(e,r,n)):a&&(t||(t=a()),t.set(r,n))}};return r}:a},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":137,"side-channel-map":299}],301:[function(e,t,r){var n=e("es-errors/type"),o=e("object-inspect"),i=e("side-channel-list"),a=e("side-channel-map"),s=e("side-channel-weakmap")||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+o(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=s()),e.set(t,r)}};return t}},{"es-errors/type":47,"object-inspect":137,"side-channel-list":298,"side-channel-map":299,"side-channel-weakmap":300}],302:[function(e,t,r){(function(e){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=function(t,r){var n=[];t.on("data",function(e){n.push(e)}),t.once("end",function(){r&&r(null,e.concat(n)),r=null}),t.once("error",function(e){r&&r(e),r=null})}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20}],303:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=h;const n=e("simple-concat"),o=e("decompress-response"),i=e("http"),a=e("https"),s=e("once"),l=e("querystring"),c=e("url"),d=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function h(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=s(t),e.url){const{hostname:t,port:r,protocol:n,auth:o,path:i}=c.parse(e.url);delete e.url,t||r||n||o?Object.assign(e,{hostname:t,port:r,protocol:n,auth:o,path:i}):e.path=i}const n={"accept-encoding":"gzip, deflate"};let p;e.headers&&Object.keys(e.headers).forEach(t=>n[t.toLowerCase()]=e.headers[t]),e.headers=n,e.body?p=e.json&&!d(e.body)?JSON.stringify(e.body):e.body:e.form&&(p="string"==typeof e.form?e.form:l.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),p&&(e.method||(e.method="POST"),d(p)||(e.headers["content-length"]=r.byteLength(p)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const u=e.hostname,f=("https:"===e.protocol?a:i).request(e,r=>{if(!1!==e.followRedirects&&r.statusCode>=300&&r.statusCode<400&&r.headers.location){e.url=r.headers.location,delete e.headers.host,r.resume();const n=c.parse(e.url).hostname;return null!==n&&n!==u&&(delete e.headers.cookie,delete e.headers.authorization),"POST"===e.method&&[301,302].includes(r.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0===e.maxRedirects--?t(new Error("too many redirects")):h(e,t)}const n="function"==typeof o&&"HEAD"!==e.method;t(null,n?o(r):r)});return f.on("timeout",()=>{f.abort(),t(new Error("Request timed out"))}),f.on("error",t),d(p)?p.on("error",t).pipe(f):f.end(p),f}h.concat=(e,t)=>h(e,(r,o)=>{if(r)return t(r);n(o,(r,n)=>{if(r)return t(r);if(e.json)try{n=JSON.parse(n.toString())}catch(r){return t(r,o,n)}t(null,o,n)})}),["get","post","put","patch","head","delete"].forEach(e=>{h[e]=(t,r)=>("string"==typeof t&&(t={url:t}),h(Object.assign({method:e.toUpperCase()},t),r))})}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,"decompress-response":18,http:304,https:113,once:138,querystring:296,"simple-concat":302,url:325}],304:[function(e,t,r){(function(t){(function(){var n=e("./lib/request"),o=e("./lib/response"),i=e("xtend"),a=e("builtin-status-codes"),s=e("url"),l=r;l.request=function(e,r){e="string"==typeof e?s.parse(e):i(e);var o=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,l=e.hostname||e.host,c=e.port,d=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?a+"//"+l:"")+(c?":"+c:"")+d,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new n(e);return r&&h.on("response",r),h},l.get=function(e,t){var r=l.request(e,t);return r.end(),r},l.ClientRequest=n,l.IncomingMessage=o.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":306,"./lib/response":307,"builtin-status-codes":21,url:325,xtend:328}],305:[function(e,t,r){(function(e){(function(){var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function o(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function i(e){return"function"==typeof e}r.fetch=i(e.fetch)&&i(e.ReadableStream),r.writableStream=i(e.WritableStream),r.abortController=i(e.AbortController),r.arraybuffer=r.fetch||o("arraybuffer"),r.msstream=!r.fetch&&o("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&i(n().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],306:[function(e,t,r){(function(r,n,o){(function(){var i=e("./capability"),a=e("inherits"),s=e("./response"),l=e("readable-stream"),c=s.IncomingMessage,d=s.readyStates;var h=t.exports=function(e){var t,r=this;l.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+o.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])});var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",function(){r._onFinish()})};a(h,l.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var o=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(o["content-type"]||{}).value||""}));var s=[];if(Object.keys(o).forEach(function(e){var t=o[e].name,r=o[e].value;Array.isArray(r)?r.forEach(function(e){s.push([t,e])}):s.push([t,r])}),"fetch"===e._mode){var l=null;if(i.abortController){var c=new AbortController;l=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then(function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()},function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)})}else{var h=e._xhr=new n.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in h&&(h.responseType=e._mode),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(h.timeout=t.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),s.forEach(function(e){h.setRequestHeader(e[0],e[1])}),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{h.send(a)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},h.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype._resetTimers=function(e){var t=this;n.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.setTimeout(function(){t.emit("timeout")},t._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),l.Writable.prototype.end.call(this,e,t,r)},h.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":305,"./response":307,_process:287,buffer:20,inherits:115,"readable-stream":322}],307:[function(e,t,r){(function(t,n,o){(function(){var i=e("./capability"),a=e("inherits"),s=e("readable-stream"),l=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,n,a){var l=this;if(s.Readable.call(l),l._mode=n,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",function(){t.nextTick(function(){l.emit("close")})}),"fetch"===n){if(l._fetchResponse=r,l.url=r.url,l.statusCode=r.status,l.statusMessage=r.statusText,r.headers.forEach(function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)}),i.writableStream){var c=new WritableStream({write:function(e){return a(!1),new Promise(function(t,r){l._destroyed?r():l.push(o.from(e))?t():l._resumeFetch=t})},close:function(){a(!0),l._destroyed||l.push(null)},abort:function(e){a(!0),l._destroyed||l.emit("error",e)}});try{return void r.body.pipeTo(c).catch(function(e){a(!0),l._destroyed||l.emit("error",e)})}catch(f){}}var d=r.body.getReader();function u(){d.read().then(function(e){l._destroyed||(a(e.done),e.done?l.push(null):(l.push(o.from(e.value)),u()))}).catch(function(e){a(!0),l._destroyed||l.emit("error",e)})}u()}else{if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===l.headers[r]&&(l.headers[r]=[]),l.headers[r].push(t[2])):void 0!==l.headers[r]?l.headers[r]+=", "+t[2]:l.headers[r]=t[2],l.rawHeaders.push(t[1],t[2])}}),l._charset="x-user-defined",!i.overrideMimeType){var h=l.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(l._charset=p[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,i=null;switch(t._mode){case"text":if((i=r.responseText).length>t._pos){var a=i.substr(t._pos);if("x-user-defined"===t._charset){for(var s=o.alloc(a.length),c=0;c<a.length;c++)s[c]=255&a.charCodeAt(c);t.push(s)}else t.push(a,t._charset);t._pos=i.length}break;case"arraybuffer":if(r.readyState!==l.DONE||!r.response)break;i=r.response,t.push(o.from(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=r.response,r.readyState!==l.LOADING||!i)break;t.push(o.from(new Uint8Array(i)));break;case"ms-stream":if(i=r.response,r.readyState!==l.LOADING)break;var d=new n.MSStreamReader;d.onprogress=function(){d.result.byteLength>t._pos&&(t.push(o.from(new Uint8Array(d.result.slice(t._pos)))),t._pos=d.result.byteLength)},d.onload=function(){e(!0),t.push(null)},d.readAsArrayBuffer(i)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":305,_process:287,buffer:20,inherits:115,"readable-stream":322}],308:[function(e,t,r){var n={};function o(e,t,r){r||(r=Error);var o=function(e){var r,n;function o(r,n,o){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,o))||this}return n=e,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,o}(r);o.prototype.name=r.name,o.prototype.code=e,n[e]=o}function i(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,o,a,s;if("string"==typeof t&&(o="not ",t.substr(!a||a<0?0:+a,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(i(t,"type"))}return s+=". Received type ".concat(typeof r)},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],309:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=c;var o=e("./_stream_readable"),i=e("./_stream_writable");e("inherits")(c,o);for(var a=n(i.prototype),s=0;s<a.length;s++){var l=a[s];c.prototype[l]||(c.prototype[l]=i.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":311,"./_stream_writable":313,_process:287,inherits:115}],310:[function(e,t,r){t.exports=o;var n=e("./_stream_transform");function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}e("inherits")(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":312,inherits:115}],311:[function(e,t,r){(function(r,n){(function(){var o;t.exports=A,A.ReadableState=P;e("events").EventEmitter;var i=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),s=e("buffer").Buffer,l=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,d=e("util");c=d&&d.debuglog?d.debuglog("stream"):function(){};var h,p,u,f=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),g=e("./internal/streams/state").getHighWaterMark,y=e("../errors").codes,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,S=y.ERR_METHOD_NOT_IMPLEMENTED,T=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(A,a);var w=m.errorOrDestroy,x=["error","close","destroy","pause","resume"];function P(t,r,n){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof o),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function A(t){if(o=o||e("./_stream_duplex"),!(this instanceof A))return new A(t);var r=this instanceof o;this._readableState=new P(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function C(e,t,r,n,o){c("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?F(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}(e,a);else if(o||(i=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),i)w(e,i);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?w(e,new T):D(e,a,t,!0);else if(a.ended)w(e,new v);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?D(e,a,t,!1):L(e,a)):D(e,a,t,!1)}else n||(a.reading=!1,L(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function D(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&F(e)),L(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=m.destroy,A.prototype._undestroy=m.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=s.from(e,t),t=""),r=!0),C(this,e,t,!1,r)},A.prototype.unshift=function(e){return C(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var r=new h(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,o="";null!==n;)o+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var k=1073741824;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function F(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(M,e))}function M(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function L(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function _(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function B(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function O(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(V,t,e))}function V(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function H(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}A.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):F(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&O(this),null;var n,o=t.needReadable;return c("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",o=!0),t.ended||t.reading?c("reading or ended",o=!1):o&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){w(this,new S("_read()"))},A.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,c("pipe count=%d opts=%j",o.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",f),e.removeListener("finish",m),e.removeListener("drain",d),e.removeListener("error",u),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",p),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){c("onend"),e.end()}o.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",s);var d=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,I(e))}}(n);e.on("drain",d);var h=!1;function p(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==H(o.pipes,e))&&!h&&(c("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function u(t){c("onerror",t),g(),e.removeListener("error",u),0===i(e,"error")&&w(e,t)}function f(){e.removeListener("finish",m),g()}function m(){c("onfinish"),e.removeListener("close",f),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",u),e.once("close",f),e.once("finish",m),e.emit("pipe",n),o.flowing||(c("pipe resume"),n.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,c("on readable",o.length,o.reading),o.length?F(this):o.reading||r.nextTick(B,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(_,this),n},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(_,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){(c("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<x.length;i++)e.on(x[i],this.emit.bind(this,x[i]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=e("./internal/streams/async_iterator")),p(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=j,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(t,r){return void 0===u&&(u=e("./internal/streams/from")),u(A,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":308,"./_stream_duplex":309,"./internal/streams/async_iterator":314,"./internal/streams/buffer_list":315,"./internal/streams/destroy":316,"./internal/streams/from":318,"./internal/streams/state":320,"./internal/streams/stream":321,_process:287,buffer:20,events:50,inherits:115,"string_decoder/":323,util:18}],312:[function(e,t,r){t.exports=d;var n=e("../errors").codes,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function d(e){if(!(this instanceof d))return new d(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush(function(t,r){p(e,t,r)})}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}e("inherits")(d,l),d.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},d.prototype._transform=function(e,t,r){r(new o("_transform()"))},d.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},d.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},d.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":308,"./_stream_duplex":309,inherits:115}],313:[function(e,t,r){(function(r,n){(function(){function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;t.exports=A,A.WritableState=P;var a={deprecate:e("util-deprecate")},s=e("./internal/streams/stream"),l=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,h=e("./internal/streams/destroy"),p=e("./internal/streams/state").getHighWaterMark,u=e("../errors").codes,f=u.ERR_INVALID_ARG_TYPE,m=u.ERR_METHOD_NOT_IMPLEMENTED,g=u.ERR_MULTIPLE_CALLBACK,y=u.ERR_STREAM_CANNOT_PIPE,b=u.ERR_STREAM_DESTROYED,v=u.ERR_STREAM_NULL_VALUES,S=u.ERR_STREAM_WRITE_AFTER_END,T=u.ERR_UNKNOWN_ENCODING,w=h.errorOrDestroy;function x(){}function P(t,n,a){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof a&&(a=n instanceof i),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=p(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,o=n.sync,i=n.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,o,i){--t.pendingcb,n?(r.nextTick(i,o),r.nextTick(M,e,t),e._writableState.errorEmitted=!0,w(e,o)):(i(o),e._writableState.errorEmitted=!0,w(e,o),M(e,t))}(e,n,o,t,i);else{var a=E(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||k(e,n),o?r.nextTick(D,e,n,a,i):D(e,n,a,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function A(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!d.call(A,this))return new A(t);this._writableState=new P(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function C(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function D(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),M(e,t)}function k(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,l=!0;r;)i[s]=r,r.isBuf||(l=!1),r=r.next,s+=1;i.allBuffers=l,C(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,d=r.encoding,h=r.callback;if(C(e,t,!1,t.objectMode?1:c.length,c,d,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function F(e,t){e._final(function(r){t.pendingcb--,r&&w(e,r),t.prefinished=!0,e.emit("prefinish"),M(e,t)})}function M(e,t){var n=E(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(F,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var o=e._readableState;(!o||o.autoDestroy&&o.endEmitted)&&e.destroy()}return n}e("inherits")(A,s),P.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(P.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===A&&(e&&e._writableState instanceof P)}})):d=function(e){return e instanceof this},A.prototype.pipe=function(){w(this,new y)},A.prototype.write=function(e,t,n){var o,i=this._writableState,a=!1,s=!i.objectMode&&(o=e,l.isBuffer(o)||o instanceof c);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=x),i.ending?function(e,t){var n=new S;w(e,n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,o){var i;return null===n?i=new v:"string"==typeof n||t.objectMode||(i=new f("chunk",["string","Buffer"],n)),!i||(w(e,i),r.nextTick(o,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,o);n!==a&&(r=!0,o="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,s,n,o,i);return c}(this,i,s,e,t,n)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||k(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new T(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var o=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,n){t.ending=!0,M(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":308,"./_stream_duplex":309,"./internal/streams/destroy":316,"./internal/streams/state":320,"./internal/streams/stream":321,_process:287,buffer:20,inherits:115,"util-deprecate":326}],314:[function(e,t,r){(function(r){(function(){var n;function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=e("./end-of-stream"),a=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),d=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function u(e,t){return{value:e,done:t}}function f(e){var t=e[a];if(null!==t){var r=e[p].read();null!==r&&(e[d]=null,e[a]=null,e[s]=null,t(u(r,!1)))}}function m(e){r.nextTick(f,e)}var g=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((o(n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(u(void 0,!0));if(this[p].destroyed)return new Promise(function(t,n){r.nextTick(function(){e[l]?n(e[l]):t(u(void 0,!0))})});var n,o=this[d];if(o)n=new Promise(function(e,t){return function(r,n){e.then(function(){t[c]?r(u(void 0,!0)):t[h](r,n)},n)}}(o,this));else{var i=this[p].read();if(null!==i)return Promise.resolve(u(i,!1));n=new Promise(this[h])}return this[d]=n,n}},Symbol.asyncIterator,function(){return this}),o(n,"return",function(){var e=this;return new Promise(function(t,r){e[p].destroy(null,function(e){e?r(e):t(u(void 0,!0))})})}),n),g);t.exports=function(e){var t,r=Object.create(y,(o(t={},p,{value:e,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,c,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[p].read();n?(r[d]=null,r[a]=null,r[s]=null,e(u(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[d]=null,i(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[d]=null,r[a]=null,r[s]=null,t(e)),void(r[l]=e)}var n=r[a];null!==n&&(r[d]=null,r[a]=null,r[s]=null,n(u(void 0,!0))),r[c]=!0}),e.on("readable",m.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":317,_process:287}],315:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var l=e("buffer").Buffer,c=e("util").inspect,d=c&&c.custom||"inspect";function h(e,t,r){l.prototype.copy.call(e,t,r)}t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t=l.allocUnsafe(e>>>0),r=this.head,n=0;r;)h(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0===(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0===(e-=i)){i===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++n}return this.length-=n,t}},{key:d,value:function(e,t){return c(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:20,util:18}],316:[function(e,t,r){(function(e){(function(){function r(e,t){o(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}t.exports={destroy:function(t,i){var a=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(o,this,t)):e.nextTick(o,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!i&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(n,a):(a._writableState.errorEmitted=!0,e.nextTick(r,a,t)):e.nextTick(r,a,t):i?(e.nextTick(n,a),i(t)):e.nextTick(n,a)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:287}],317:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}(i||o);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||d()},c=t._writableState&&t._writableState.finished,d=function(){s=!1,c=!0,a||i.call(t)},h=t._readableState&&t._readableState.endEmitted,p=function(){a=!1,h=!0,s||i.call(t)},u=function(e){i.call(t,e)},f=function(){var e;return a&&!h?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},m=function(){t.req.on("finish",d)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",d),t.on("abort",f),t.req?m():t.on("request",m)),t.on("end",p),t.on("finish",d),!1!==r.error&&t.on("error",u),t.on("close",f),function(){t.removeListener("complete",d),t.removeListener("abort",f),t.removeListener("request",m),t.req&&t.req.removeListener("finish",d),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",d),t.removeListener("end",p),t.removeListener("error",u),t.removeListener("close",f)}}},{"../../../errors":308}],318:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],319:[function(e,t,r){var n;var o=e("../../../errors").codes,i=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var d,h=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new i("streams");var p=r.map(function(t,o){var i=o<r.length-1;return function(t,r,o,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var s=!1;t.on("close",function(){s=!0}),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:o},function(e){if(e)return i(e);s=!0,i()});var l=!1;return function(e){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new a("pipe"))}}(t,i,o>0,function(e){d||(d=e),e&&p.forEach(l),i||(p.forEach(l),h(d))})});return r.reduce(c)}},{"../../../errors":308,"./end-of-stream":317}],320:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,o){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},{"../../../errors":308}],321:[function(e,t,r){t.exports=e("events").EventEmitter},{events:50}],322:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":309,"./lib/_stream_passthrough.js":310,"./lib/_stream_readable.js":311,"./lib/_stream_transform.js":312,"./lib/_stream_writable.js":313,"./lib/internal/streams/end-of-stream.js":317,"./lib/internal/streams/pipeline.js":319}],323:[function(e,t,r){var n=e("safe-buffer").Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=d,this.end=h,t=3;break;default:return this.write=p,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function d(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=a(t[n]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(o=a(t[n]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(o=a(t[n]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":297}],324:[function(e,t,r){(function(t,n){(function(){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=l++,n=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,o(function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":287,timers:324}],325:[function(e,t,r){var n=e("punycode/");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),d=["%","/","?",";","#"].concat(c),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=e("qs");function b(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",l=e.split(a);l[0]=l[0].replace(/\\/g,"/");var b=e=l.join(a);if(b=b.trim(),!r&&1===e.split("#").length){var v=s.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=i.exec(b);if(S){var T=(S=S[0]).toLowerCase();this.protocol=T,b=b.substr(S.length)}if(r||S||b.match(/^\/\/[^@/]+@[^@/]+/)){var w="//"===b.substr(0,2);!w||S&&m[S]||(b=b.substr(2),this.slashes=!0)}if(!m[S]&&(w||S&&!g[S])){for(var x,P,A=-1,C=0;C<h.length;C++){-1!==(D=b.indexOf(h[C]))&&(-1===A||D<A)&&(A=D)}-1!==(P=-1===A?b.lastIndexOf("@"):b.lastIndexOf("@",A))&&(x=b.slice(0,P),b=b.slice(P+1),this.auth=decodeURIComponent(x)),A=-1;for(C=0;C<d.length;C++){var D;-1!==(D=b.indexOf(d[C]))&&(-1===A||D<A)&&(A=D)}-1===A&&(A=b.length),this.host=b.slice(0,A),b=b.slice(A),this.parseHost(),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k)for(var E=this.hostname.split(/\./),F=(C=0,E.length);C<F;C++){var M=E[C];if(M&&!M.match(p)){for(var L="",R=0,_=M.length;R<_;R++)M.charCodeAt(R)>127?L+="x":L+=M[R];if(!L.match(p)){var B=E.slice(0,C),N=E.slice(C+1),I=M.match(u);I&&(B.push(I[1]),N.unshift(I[2])),N.length&&(b="/"+N.join(".")+b),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=n.toASCII(this.hostname));var j=this.port?":"+this.port:"",O=this.hostname||"";this.host=O+j,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!f[T])for(C=0,F=c.length;C<F;C++){var V=c[C];if(-1!==b.indexOf(V)){var H=encodeURIComponent(V);H===V&&(H=escape(V)),b=b.split(V).join(H)}}var U=b.indexOf("#");-1!==U&&(this.hash=b.substr(U),b=b.slice(0,U));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),g[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var W=this.search||"";this.path=j+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if("string"==typeof e){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var c=s[l];"protocol"!==c&&(r[c]=e[c])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var p=d[h];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||m[e.protocol])r.pathname=e.pathname;else{for(var u=(e.pathname||"").split("/");u.length&&!(e.host=u.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==u[0]&&u.unshift(""),u.length<2&&u.unshift(""),r.pathname=u.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var f=r.pathname||"",y=r.search||"";r.path=f+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),S=v||b||r.host&&e.pathname,T=S,w=r.pathname&&r.pathname.split("/")||[],x=(u=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(x&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===u[0]?u[0]=e.host:u.unshift(e.host)),e.host=null),S=S&&(""===u[0]||""===w[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=u;else if(u.length)w||(w=[]),w.pop(),w=w.concat(u),r.search=e.search,r.query=e.query;else if(null!=e.search){if(x)r.host=w.shift(),r.hostname=r.host,(k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=k.shift(),r.hostname=k.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var P=w.slice(-1)[0],A=(r.host||e.host||w.length>1)&&("."===P||".."===P)||""===P,C=0,D=w.length;D>=0;D--)"."===(P=w[D])?w.splice(D,1):".."===P?(w.splice(D,1),C++):C&&(w.splice(D,1),C--);if(!S&&!T)for(;C--;C)w.unshift("..");!S||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),A&&"/"!==w.join("/").substr(-1)&&w.push("");var k,E=""===w[0]||w[0]&&"/"===w[0].charAt(0);x&&(r.hostname=E?"":w.length?w.shift():"",r.host=r.hostname,(k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=k.shift(),r.hostname=k.shift(),r.host=r.hostname));return(S=S||r.host&&w.length)&&!E&&w.unshift(""),w.length>0?r.pathname=w.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},r.parse=b,r.resolve=function(e,t){return b(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},r.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},r.Url=o},{"punycode/":288,qs:290}],326:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],327:[function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(e){n[e]=t[e]}),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),o=e[e.length-1];return"function"==typeof n&&n!==o&&Object.keys(o).forEach(function(e){n[e]=o[e]}),n}}},{}],328:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},{}],329:[function(e,t,r){t.exports={name:"pict-docuserve",version:"1.3.2",description:"Pict Documentation Server - A single-page documentation viewer built on Pict",main:"source/Pict-Application-Docuserve.js",bin:{"pict-docuserve":"source/cli/Docuserve-CLI-Run.js"},files:["source/","dist/","html/"],scripts:{start:"node source/cli/Docuserve-CLI-Run.js serve",brand:"node node_modules/pict-section-theme/bin/pict-section-theme-brand.js --manifest ../../../Retold-Modules-Manifest.json --module pict-docuserve",prebuild:"npm run brand",build:"npx quack build && npx quack copy","prebuild-docs":"npm run brand","build-docs":"npx quack build && npx quack copy && node source/cli/Docuserve-CLI-Run.js inject ./docs && node example_applications/build-examples.js stage-docs","serve-docs":"node source/cli/Docuserve-CLI-Run.js serve ./docs","serve-examples":"node example_applications/build-examples.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",prepublishOnly:"npm run build"},author:"steven velozo <steven@velozo.com>",license:"MIT",dependencies:{"fable-serviceproviderbase":"^3.0.19",lunr:"^2.3.9",pict:"^1.0.368","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-section-code":"^1.0.11","pict-section-content":"^1.0.2","pict-section-histogram":"^1.0.1","pict-section-modal":"^1.1.1","pict-section-theme":"^1.0.2","pict-service-commandlineutility":"^1.0.19","pict-view":"^1.0.68"},devDependencies:{"pict-docuserve":"^1.3.1",quackage:"^1.2.3"},copyFilesSettings:{whenFileExists:"overwrite"},copyFiles:[{from:"./html/*",to:"./dist/"}],mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},retold:{brand:{Hash:"pict-docuserve",Name:"Pict Docuserve",Tagline:"A documentation viewer built on Pict",Palette:"default",Icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="frame-pict-docuserve-filled-light">\n\t\t\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z" fill="#692bbf"/>\n\t\t<g clip-path="url(#frame-pict-docuserve-filled-light)"><rect x="18" y="30" width="48" height="48" rx="8" fill="#c13ccd" opacity="0.9"/>\n\t\t\t\t\t<rect x="30" y="18" width="48" height="48" rx="8" fill="rgba(255,255,255,0.18)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="38" font-weight="600"\n\t\t\tfill="#ffffff" letter-spacing="-1">PD</text>\n\t</svg>',IconType:"svg",Favicon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="fav-pict-docuserve-light">\n\t\t\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z" fill="#692bbf"/>\n\t\t<g clip-path="url(#fav-pict-docuserve-light)"><rect x="28" y="16" width="52" height="52" rx="9" fill="rgba(255,255,255,0.22)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="60" font-weight="800"\n\t\t\tfill="#ffffff" letter-spacing="-1">P</text>\n\t</svg>',FaviconDark:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="fav-pict-docuserve-dark">\n\t\t\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 2 48\n\t\t\tC 2 18.0222416, 18.0222416 2, 48 2\n\t\t\tC 77.9777584 2, 94 18.0222416, 94 48\n\t\t\tC 94 77.9777584, 77.9777584 94, 48 94\n\t\t\tC 18.0222416 94, 2 77.9777584, 2 48 Z" fill="#9a6fd8"/>\n\t\t<g clip-path="url(#fav-pict-docuserve-dark)"><rect x="28" y="16" width="52" height="52" rx="9" fill="rgba(255,255,255,0.22)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="60" font-weight="800"\n\t\t\tfill="#101418" letter-spacing="-1">P</text>\n\t</svg>',Colors:{Primary:"#692bbf",Secondary:"#c13ccd",PrimaryLight:"#692bbf",PrimaryDark:"#9a6fd8",SecondaryLight:"#c13ccd",SecondaryDark:"#d48adb"}}}}},{}],330:[function(e,t,r){const n=e("../package.json");if(!n.retold||!n.retold.brand)throw new Error("pict-docuserve: package.json is missing retold.brand — run `npm run brand` (which calls pict-section-theme-brand) before building");t.exports=n.retold.brand},{"../package.json":329}],331:[function(e,t,r){t.exports={Name:"Pict Docuserve",Hash:"Docuserve",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"Docuserve-Pict-Application"}}},{}],332:[function(e,t,r){const n=e("pict-application"),o=e("./providers/Pict-Provider-Docuserve-Documentation.js"),i=e("./providers/Pict-Provider-Docuserve-Demos.js"),a=e("pict-section-modal"),s=e("pict-section-theme"),l=e("./Docuserve-Brand.js"),c=e("./views/PictView-Docuserve-Layout.js"),d=e("./views/PictView-Docuserve-TopBar-Nav.js"),h=e("./views/PictView-Docuserve-TopBar-User.js"),p=e("./views/PictView-Docuserve-Sidebar.js"),u=e("./views/PictView-Docuserve-Splash.js"),f=e("./views/PictView-Docuserve-Content.js"),m=e("./views/PictView-Docuserve-Search.js"),g=e("./views/PictView-Docuserve-Demo.js"),y=e("./views/PictView-Docuserve-Fable-Playground.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.pict.addProvider("Docuserve-Documentation",o.default_configuration,o),this.pict.addProvider("Docuserve-Demos",i.default_configuration,i),this.pict.addView("Pict-Section-Modal",a.default_configuration,a),this.pict.addView("Docuserve-Layout",c.default_configuration,c),this.pict.addView("Docuserve-TopBar-Nav",d.default_configuration,d),this.pict.addView("Docuserve-TopBar-User",h.default_configuration,h),this.pict.addView("Docuserve-Sidebar",p.default_configuration,p),this.pict.addView("Docuserve-Splash",u.default_configuration,u),this.pict.addView("Docuserve-Content",f.default_configuration,f),this.pict.addView("Docuserve-Search",m.default_configuration,m),this.pict.addView("Docuserve-Demo",g.default_configuration,g),this.pict.addView("Docuserve-Fable-Playground",y.default_configuration,y),this._docuserveBrandOverride=t&&t.Brand?t.Brand:null}_resolveBrand(e){return this._docuserveBrandOverride?e(this._docuserveBrandOverride):"function"!=typeof fetch?e(l):void fetch("_brand.json").then(e=>e&&e.ok?e.json():null).then(t=>{if(t&&(t.Name||t.Hash||t.Colors))return e(t);e(l)}).catch(()=>{e(l)})}_addThemeSection(e){this.pict.addProvider("Theme-Section",{ApplyDefault:"pict-default",DefaultMode:"system",DefaultScale:1,Brand:e,Views:["Picker","ModeToggle","ScaleSelect","Button","BrandMark","TopBar"],ViewOptions:{TopBar:{NavView:"Docuserve-TopBar-Nav",UserView:"Docuserve-TopBar-User",Height:56}}},s)}onAfterInitializeAsync(e){this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,VersionLoaded:!1,Version:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"",CatalogURL:"retold-catalog.json",SidebarGroupRecords:[],SidebarSearchSlot:[],SidebarSearchResults:[],SidebarSearchOverflow:[],SidebarSearchEmpty:[],ModuleNavSections:[],FooterSlot:[],SearchResults:[],SearchStatus:""},this._resolveBrand(t=>{this._addThemeSection(t),this._loadCatalogAndRender(e)})}_loadCatalogAndRender(e){this.pict.providers["Docuserve-Documentation"].loadCatalog(()=>{let t=this.pict.AppData.Docuserve,r="";return t.CoverLoaded&&t.Cover&&t.Cover.Title?r=t.Cover.Title.replace(/<[^>]*>/g,"").trim():t.TopBarLoaded&&t.TopBar&&t.TopBar.Brand&&(r=t.TopBar.Brand.replace(/<[^>]*>/g,"").trim()),r&&(t.VersionLoaded&&t.Version&&t.Version.Version?document.title="".concat(r," v").concat(t.Version.Version," Documentation"):document.title=r),this.pict.views["Docuserve-Layout"].render(),super.onAfterInitializeAsync(e)})}resolveHash(){let e=(window.location.hash||"").replace(/^#\/?/,"");if(!e||"Home"===e)return void this.showView("Docuserve-Splash");let t=e.split("/");if("search"===t[0]){let e=decodeURIComponent(t.slice(1).join("/"));return void this.navigateToSearch(e)}if("page"===t[0]&&t.length>=2){let e=t.slice(1).join("/");return void this.navigateToPage(e)}if("doc"===t[0]&&t.length>=3){let e=t[1],r=t[2];if(t.length>=4){let n=t.slice(3).join("/");this.navigateToModulePath(e,r,n)}else this.navigateToModule(e,r);return}if("demo"===t[0]&&t.length>=4){let e=t[1],r=t[2],n=t.slice(3).join("/");return void this.navigateToDemo(e,r,n)}"playground"===t[0]&&t.length>=2?this.navigateToPlayground(t[1]):this.navigateToPage(e)}navigateToDemo(e,t,r){let n=this.pict.views["Docuserve-Demo"],o=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=e,this.pict.AppData.Docuserve.CurrentModule=t,this.pict.AppData.Docuserve.CurrentDemo=r,this.pict.AppData.Docuserve.CurrentPath="",n&&"function"==typeof n.showDemo&&n.showDemo(e,t,r),o&&(o.renderSidebarGroups(),"function"==typeof o.renderModuleNav&&o.renderModuleNav(e,t)),this._syncPlaygroundVisibility()}navigateToPlayground(e){let t=this.pict.views["Docuserve-Layout"];if("fable"===e)return this.navigateToPage("fable-playground"),t&&"function"==typeof t.setPlaygroundEnabled&&t.setPlaygroundEnabled(!0),void(t&&"function"==typeof t.expandPlayground&&t.expandPlayground());let r=this.pict.views["Docuserve-Content"];r&&"function"==typeof r.displayContent&&(r.render(),r.displayContent("<h1>Playground not available</h1><p>No playground is registered for <code>"+e+"</code>.</p>"))}navigateTo(e){window.location.hash=e}showView(e){e in this.pict.views&&(this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",this.pict.views[e].render(),this.pict.views["Docuserve-Sidebar"].clearModuleNav(),this.pict.views["Docuserve-Sidebar"].renderSidebarGroups()),this._syncPlaygroundVisibility()}_syncPlaygroundVisibility(){let e=this.pict.views["Docuserve-Layout"],t=this.pict.providers["Docuserve-Documentation"];if(!e||"function"!=typeof e.setPlaygroundEnabled)return;let r=this.pict.AppData.Docuserve.CurrentGroup,n=this.pict.AppData.Docuserve.CurrentModule,o=!(!t||"function"!=typeof t.isPlaygroundEnabled)&&t.isPlaygroundEnabled(r,n);if(e.setPlaygroundEnabled(o),"function"==typeof e.setPlaygroundTitle&&e.setPlaygroundTitle(n?"JS Playground: "+n:"JS Playground"),o&&t&&"function"==typeof t.loadPlaygroundConfig)t.loadPlaygroundConfig(r,n).then(e=>{this.pict.AppData.Docuserve.Playground||(this.pict.AppData.Docuserve.Playground={}),this.pict.AppData.Docuserve.Playground.Config=e||null;let t=this.pict.views["Docuserve-Fable-Playground"];t&&"function"==typeof t._applySandboxMode&&t._applySandboxMode()});else{this.pict.AppData.Docuserve.Playground&&(this.pict.AppData.Docuserve.Playground.Config=null);let e=this.pict.views["Docuserve-Fable-Playground"];e&&"function"==typeof e._applySandboxMode&&e._applySandboxMode()}}navigateToModule(e,t){this.navigateToModulePath(e,t,"README.md")}navigateToModulePath(e,t,r){let n=this.pict.providers["Docuserve-Documentation"],o=this.pict.views["Docuserve-Content"],i=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=e,this.pict.AppData.Docuserve.CurrentModule=t,this.pict.AppData.Docuserve.CurrentPath=r,o.render(),o.showLoading(),i.renderSidebarGroups(),i.renderModuleNav(e,t),this._syncPlaygroundVisibility();let a=n.resolveDocumentURL(e,t,r||"README.md");if(!a)return void o.displayContent(n.getErrorPageHTML(e+"/"+t));let s=r||"README.md";n.fetchDocument(a,(r,i)=>{if(!r)return void o.displayContent(i);let a=e+"/"+t+"/"+s;n.fetchLocalDocument(a,(e,t)=>{o.displayContent(t)},e,t,s)},e,t,s)}navigateToPage(e){let t=this.pict.providers["Docuserve-Documentation"],r=this.pict.views["Docuserve-Content"],n=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath=e,r.render(),r.showLoading(),n.clearModuleNav(),n.renderSidebarGroups(),this._syncPlaygroundVisibility();let o=e;o.match(/\.md$/)||(o+=".md"),t.fetchLocalDocument(o,(e,t)=>{r.displayContent(t)})}navigateToSearch(e){let t=this.pict.views["Docuserve-Sidebar"],r=this.pict.views["Docuserve-Search"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",t.clearModuleNav(),t.renderSidebarGroups(),r.render(),r.showSearch(e||""),this._syncPlaygroundVisibility()}},t.exports.default_configuration=e("./Pict-Application-Docuserve-Configuration.json")},{"./Docuserve-Brand.js":330,"./Pict-Application-Docuserve-Configuration.json":331,"./providers/Pict-Provider-Docuserve-Demos.js":333,"./providers/Pict-Provider-Docuserve-Documentation.js":334,"./views/PictView-Docuserve-Content.js":335,"./views/PictView-Docuserve-Demo.js":336,"./views/PictView-Docuserve-Fable-Playground.js":337,"./views/PictView-Docuserve-Layout.js":338,"./views/PictView-Docuserve-Search.js":339,"./views/PictView-Docuserve-Sidebar.js":340,"./views/PictView-Docuserve-Splash.js":341,"./views/PictView-Docuserve-TopBar-Nav.js":342,"./views/PictView-Docuserve-TopBar-User.js":343,"pict-application":141,"pict-section-modal":165,"pict-section-theme":171}],333:[function(e,t,r){const n=e("pict-provider");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._byKey={},this._byModule={},this._all=[]}get maxSchemaVersion(){return 1}register(e){if(!e||"object"!=typeof e)return this.log.warn("Docuserve-Demos.register: entry must be an object"),null;let t="number"==typeof e.DemoSchemaVersion?e.DemoSchemaVersion:1;if(t>1)return this.log.warn("Docuserve-Demos.register: entry schema v"+t+" exceeds this provider's max v1 — skipping "+(e.Group||"?")+"/"+(e.Module||"?")+"/"+(e.Hash||"?")+". Upgrade pict-docuserve to register newer-schema demos."),null;if("string"!=typeof e.Hash||e.Hash.length<1)return this.log.warn("Docuserve-Demos.register: entry.Hash is required"),null;if("string"!=typeof e.Group||e.Group.length<1)return this.log.warn('Docuserve-Demos.register: entry.Group is required (e.g. "pict")'),null;if("string"!=typeof e.Module||e.Module.length<1)return this.log.warn('Docuserve-Demos.register: entry.Module is required (e.g. "pict-section-form")'),null;if("function"!=typeof e.Mount)return this.log.warn("Docuserve-Demos.register: entry.Mount must be a function (pict, container, spec)"),null;let r=e.Group+"/"+e.Module+"/"+e.Hash,n=e.Group+"/"+e.Module,o=this._byKey[r];if(o){let t=this._all.indexOf(o);t>=0&&(this._all[t]=e);let i=this._byModule[n]||[],a=i.indexOf(o);return a>=0&&(i[a]=e),this._byKey[r]=e,e}return this._byKey[r]=e,this._all.push(e),this._byModule[n]||(this._byModule[n]=[]),this._byModule[n].push(e),e}registerAll(e){if(!Array.isArray(e))return 0;let t=0;for(let r=0;r<e.length;r++)this.register(e[r])&&t++;return t}get(e,t,r){return this._byKey[e+"/"+t+"/"+r]||null}listAll(){return this._all.slice()}listByModule(e,t){let r=this._byModule[e+"/"+t];return r?r.slice():[]}hasDemos(e,t){let r=this._byModule[e+"/"+t];return!!(r&&r.length>0)}},t.exports.default_configuration={ProviderIdentifier:"Docuserve-Demos"},t.exports.MAX_DEMO_SCHEMA_VERSION=1},{"pict-provider":143}],334:[function(e,t,r){const n=e("pict-provider"),o=e("lunr"),i=e("pict-section-content").PictContentProvider;t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._Catalog=null,this._ContentCache={},this._PlaygroundConfigCache={},this._ContentProvider=this.pict.addProvider("Pict-Content",i.default_configuration,i)}_createLinkResolver(e,t,r){return(n,o)=>{if(n.match(/^\//)||n.match(/^[^:]+\.md/)){return{href:this.convertDocLink(n,e,t,r)}}let i=this.resolveGitHubURLToRoute(n);return i?{href:i}:null}}_createImageResolver(e){let t="";if(e){let r=e.lastIndexOf("/");r>=0&&(t=e.substring(0,r+1))}return(e,r)=>e.match(/^https?:\/\//)||e.match(/^data:/)||e.match(/^\//)?e:t+e}loadCatalog(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.CatalogURL||"retold-catalog.json",n=()=>{let e=6,r=()=>{if(e--,e<=0){if(this.pict.AppData.Docuserve.SidebarGroups&&!(this.pict.AppData.Docuserve.SidebarGroups.length<1))return t();this.autoDiscoverSidebar(t)}};this.loadCover(r),this.loadSidebar(r),this.loadTopbar(r),this.loadErrorPage(r),this.loadKeywordIndex(r),this.loadVersion(r)};fetch(r).then(e=>e.ok?e.json():(this.log.info("Docuserve: No catalog at [".concat(r,"]; running in standalone mode.")),null)).then(e=>{e&&(this._Catalog=e,this.pict.AppData.Docuserve.Catalog=e,this.pict.AppData.Docuserve.CatalogLoaded=!0,this.buildSidebarData(e)),n()}).catch(e=>{this.log.info("Docuserve: Catalog load error (".concat(e,"); continuing in standalone mode.")),n()})}autoDiscoverSidebar(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(r+"README.md").then(e=>e.ok?e.text():null).then(e=>{if(e){let t=e.match(/^#+\s+(.+)/m),r=t?t[1].trim():"Docs";this.pict.AppData.Docuserve.SidebarGroups=[{Name:r,Key:"docs",Route:"#/page/README",Modules:[]}],this.pict.AppData.Docuserve.CoverLoaded||(this.pict.AppData.Docuserve.Cover={Title:r,Tagline:"",Description:"",Highlights:[],Actions:[{Text:"Read the Docs",Href:"README.md"}]},this.pict.AppData.Docuserve.CoverLoaded=!0)}else this.log.info("Docuserve: No README.md found; sidebar will be empty.");return t()}).catch(e=>(this.log.info("Docuserve: README.md discovery failed (".concat(e,").")),t()))}loadCover(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(r+"_cover.md").then(e=>e.ok?e.text():null).then(e=>e?(this.pict.AppData.Docuserve.Cover=this.parseCover(e),this.pict.AppData.Docuserve.CoverLoaded=!0,t()):(this.log.info("Docuserve: No _cover.md found; splash will use catalog data."),t())).catch(e=>(this.log.warn("Docuserve: Error loading _cover.md: ".concat(e)),t()))}parseCover(e){let t={Title:"",Tagline:"",Description:"",Highlights:[],Actions:[]},r=e.split("\n");for(let e=0;e<r.length;e++){let n=r[e].trim();if(!n)continue;let o=n.match(/^#+\s+(.+)/);if(o){t.Title=o[1].trim();continue}let i=n.match(/^>\s*(.*)/);if(i){t.Tagline=i[1].trim();continue}let a=n.match(/^[-*+]\s+(.*)/);if(a){let e=a[1],r=e.match(/^\*\*([^*]+)\*\*\s*[-—:]\s*(.*)/);r?t.Highlights.push({Label:r[1].trim(),Text:r[2].trim()}):t.Highlights.push({Label:"",Text:e.trim()});continue}let s=n.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);s?t.Actions.push({Text:s[1].trim(),Href:s[2].trim()}):t.Description?t.Description+=" "+n:t.Description=n}return t}loadSidebar(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(r+"_sidebar.md").then(e=>e.ok?e.text():null).then(e=>{if(!e)return this.log.info("Docuserve: No _sidebar.md found; sidebar will use catalog data."),t();let r=this.parseSidebarMarkdown(e);return r&&r.length>0&&(this.pict.AppData.Docuserve.SidebarGroups=r,this.pict.AppData.Docuserve.SidebarLoaded=!0),t()}).catch(e=>(this.log.warn("Docuserve: Error loading _sidebar.md: ".concat(e)),t()))}loadTopbar(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(r+"_topbar.md").then(e=>e.ok?e.text():null).then(e=>e?(this.pict.AppData.Docuserve.TopBar=this.parseTopbar(e),this.pict.AppData.Docuserve.TopBarLoaded=!0,t()):(this.log.info("Docuserve: No _topbar.md found; top bar will use defaults."),t())).catch(e=>(this.log.warn("Docuserve: Error loading _topbar.md: ".concat(e)),t()))}parseTopbar(e){let t={Brand:"",NavLinks:[],ExternalLinks:[]},r=e.split("\n");for(let e=0;e<r.length;e++){let n=r[e].trim();if(!n)continue;let o=n.match(/^#+\s+(.+)/);if(o){t.Brand=o[1].trim();continue}let i=n.match(/^[-*+]\s+(.*)/);if(i){let e=i[1].trim().match(/^\[([^\]]+)\]\(([^)]+)\)/);if(e){let r=e[1].trim(),n=e[2].trim();if(n.match(/^https?:\/\//))t.ExternalLinks.push({Text:r,Href:n});else{let e=this.convertSidebarLink(n);t.NavLinks.push({Text:r,Href:e})}}continue}}return t}loadVersion(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(r+"_version.json").then(e=>e.ok?e.json():null).then(e=>e?(this.pict.AppData.Docuserve.Version=e,this.pict.AppData.Docuserve.VersionLoaded=!0,t()):(this.log.info("Docuserve: No _version.json found; version placard disabled."),t())).catch(e=>(this.log.warn("Docuserve: Error loading _version.json: ".concat(e)),t()))}loadPlaygroundConfig(e,t){let r,n=(e||"")+"/"+(t||"");if(Object.prototype.hasOwnProperty.call(this._PlaygroundConfigCache,n))return Promise.resolve(this._PlaygroundConfigCache[n]);if(e&&t&&this._Catalog&&(r=this.resolveDocumentURL(e,t,"_playground.json")),!r){let e=this.pict.AppData.Docuserve.DocsBaseURL||"";r=e+"_playground.json"}return fetch(r).then(e=>e.ok?e.json():null).then(e=>(this._PlaygroundConfigCache[n]=e||null,this._PlaygroundConfigCache[n])).catch(e=>(this.log.warn("Docuserve: Error loading _playground.json ["+r+"]: "+e),this._PlaygroundConfigCache[n]=null,null))}loadErrorPage(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(r+"errorpage.md").then(e=>e.ok?e.text():null).then(e=>e?(this.pict.AppData.Docuserve.ErrorPageHTML=this._ContentProvider.parseMarkdown(e),this.pict.AppData.Docuserve.ErrorPageLoaded=!0,t()):(this.log.info("Docuserve: No errorpage.md found; errors will use default page."),t())).catch(e=>(this.log.warn("Docuserve: Error loading errorpage.md: ".concat(e)),t()))}loadKeywordIndex(e){let t="function"==typeof e?e:()=>{},r=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(r+"retold-keyword-index.json").then(e=>e.ok?e.json():null).then(e=>{if(!e||!e.LunrIndex||!e.Documents)return this.log.info("Docuserve: No keyword index found; search will be unavailable."),t();try{this._LunrIndex=o.Index.load(e.LunrIndex),this._KeywordDocuments=e.Documents,this.pict.AppData.Docuserve.KeywordIndexLoaded=!0,this.pict.AppData.Docuserve.KeywordDocumentCount=e.DocumentCount||0,this.log.info("Docuserve: Keyword index loaded (".concat(e.DocumentCount||0," documents)."))}catch(e){this.log.warn("Docuserve: Error hydrating lunr index: ".concat(e))}return t()}).catch(e=>(this.log.warn("Docuserve: Error loading keyword index: ".concat(e)),t()))}isModuleInCatalog(e,t){if(!this._Catalog||!this._Catalog.Groups)return!1;for(let r=0;r<this._Catalog.Groups.length;r++){let n=this._Catalog.Groups[r];if(n.Key===e)for(let e=0;e<n.Modules.length;e++){if(n.Modules[e].Name===t)return!0}}return!1}findModuleGroupKey(e){if(!this._Catalog||!this._Catalog.Groups)return null;for(let t=0;t<this._Catalog.Groups.length;t++){let r=this._Catalog.Groups[t];for(let t=0;t<r.Modules.length;t++)if(r.Modules[t].Name===e)return r.Key}return null}isGroupInCatalog(e){if(!this._Catalog||!this._Catalog.Groups)return!1;for(let t=0;t<this._Catalog.Groups.length;t++)if(this._Catalog.Groups[t].Key===e)return!0;return!1}search(e){if(!(this._LunrIndex&&this._KeywordDocuments&&e&&e.trim()))return[];let t=[];try{let r=this._LunrIndex.search(e);for(let e=0;e<r.length;e++){let n=r[e].ref,o=r[e].score,i=this._KeywordDocuments[n];if(!i)continue;let a=n.split("/"),s="";if(a.length>=2){let e=a[0],t=a[1];s=this.isModuleInCatalog(e,t)?"#/doc/"+n:"#/page/"+n}t.push({Key:n,Title:i.Title||n,Group:i.Group||"",Module:i.Module||"",DocPath:i.DocPath||"",Score:o,Route:s})}}catch(e){this.log.warn("Docuserve: Search error: ".concat(e))}return t}getErrorPageHTML(e){let t=e||"unknown";return this.pict.AppData.Docuserve.ErrorPageLoaded&&this.pict.AppData.Docuserve.ErrorPageHTML?this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\{\{path\}\}/g,this._ContentProvider.escapeHTML(t)):'<div class="docuserve-not-found"><h2>Page Not Found</h2><p>The document <code>'+this._ContentProvider.escapeHTML(t)+'</code> could not be loaded.</p><p><a href="#/Home">Return to the home page</a></p></div>'}parseSidebarMarkdown(e){let t=[],r=null,n=e.split("\n");for(let e=0;e<n.length;e++){let o=n[e];if(!o.trim())continue;let i=o.match(/^(\s*)/),a=i?i[1].length:0,s=o.trim().match(/^[-*+]\s+(.*)/);if(!s)continue;let l=s[1].trim(),c=l.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(a<2)if(c){let e=c[1].trim(),n=c[2].trim();r={Name:e,Key:this.deriveGroupKey(e,n),Route:this.convertSidebarLink(n),Modules:[]},t.push(r)}else{let e=l,n=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");r={Name:e,Key:n,Route:"",Modules:[]},t.push(r)}else if(r)if(c){let e=c[1].trim(),t=c[2].trim(),n=this.convertSidebarLink(t);r.Modules.push({Name:e,HasDocs:!0,Group:r.Key,Route:n})}else r.Modules.push({Name:l,HasDocs:!1,Group:r.Key,Route:""})}return t}convertSidebarLink(e){if(!e)return"";if("/"===e)return"#/Home";if(e.match(/^#[^/]/)){let e=this.pict.AppData.Docuserve.SidebarGroups;if(e)for(let t=0;t<e.length;t++){let r=e[t].Modules;if(r)for(let e=0;e<r.length;e++)if(r[e].HasDocs&&r[e].Route&&"#/Home"!==r[e].Route)return r[e].Route;if(e[t].Route&&"#/Home"!==e[t].Route)return e[t].Route}return"#/Home"}let t=e.replace(/^\//,"").replace(/\/$/,"");if(!t)return"#/Home";let r=t.split("/");if(r.length>=2){if(this.isGroupInCatalog(r[0])&&this.isModuleInCatalog(r[0],r[1]))return"#/doc/"+t;let e=this.findModuleGroupKey(r[1]);if(e){let t=r.slice(2).join("/");return t?"#/doc/"+e+"/"+r[1]+"/"+t:"#/doc/"+e+"/"+r[1]}}return t.match(/\.md$/)?"#/page/"+t.replace(/\.md$/,""):"#/page/"+t}deriveGroupKey(e,t){if(t&&"/"!==t){let e=t.replace(/^\//,"").replace(/\.md$/,"").replace(/\/$/,"");if(e&&!e.includes("/"))return e.toLowerCase()}return e.split(/[\s—\-:]+/)[0].toLowerCase().replace(/[^a-z0-9]/g,"")}buildSidebarData(e){let t=[];for(let r=0;r<e.Groups.length;r++){let n=e.Groups[r],o={Name:n.Name,Key:n.Key,Description:n.Description,Modules:[]};for(let e=0;e<n.Modules.length;e++){let t=n.Modules[e];o.Modules.push({Name:t.Name,HasDocs:t.HasDocs,Group:n.Key,Route:"#/doc/"+n.Key+"/"+t.Name})}t.push(o)}this.pict.AppData.Docuserve.SidebarGroups=t}resolveDocumentURL(e,t,r){if(!this._Catalog)return null;let n=this._Catalog.GitHubOrg||"stevenvelozo",o=this._Catalog.DefaultBranch||"master";for(let i=0;i<this._Catalog.Groups.length;i++){let a=this._Catalog.Groups[i];if(a.Key===e)for(let e=0;e<a.Modules.length;e++){let i=a.Modules[e];if(i.Name!==t)continue;let s=i.Branch||o,l=r||"README.md";return"https://raw.githubusercontent.com/"+n+"/"+i.Repo+"/"+s+"/docs/"+l}}return null}resolveGitHubURLToRoute(e){if(!this._Catalog||!this._Catalog.Groups||!e)return null;let t=e.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)/);if(!t)return null;let r=t[1],n=t[2];if(r!==this._Catalog.GitHubOrg)return null;for(let e=0;e<this._Catalog.Groups.length;e++){let t=this._Catalog.Groups[e];for(let e=0;e<t.Modules.length;e++){let r=t.Modules[e];if(r.Repo===n)return"#/doc/"+t.Key+"/"+r.Name}}return null}resolveGitHubPagesURL(e,t){if(!this._Catalog||!this._Catalog.Groups)return null;let r=this._Catalog.GitHubOrg||"stevenvelozo";for(let n=0;n<this._Catalog.Groups.length;n++){let o=this._Catalog.Groups[n];if(o.Key===e)for(let e=0;e<o.Modules.length;e++){let n=o.Modules[e];if(n.Name===t)return n.HasDocs?"https://"+r+".github.io/"+n.Repo+"/":null}}return null}getModuleSidebar(e,t){if(!this._Catalog)return null;for(let r=0;r<this._Catalog.Groups.length;r++){let n=this._Catalog.Groups[r];if(n.Key===e)for(let e=0;e<n.Modules.length;e++){let r=n.Modules[e];if(r.Name===t)return r.Sidebar||null}}return null}isPlaygroundEnabled(e,t){if(e&&t){let r=this.getModuleSidebar(e,t);if(Array.isArray(r)&&this._sidebarEntriesIncludePlayground(r))return!0}let r=this.pict.AppData.Docuserve.SidebarGroups;return!(!Array.isArray(r)||!this._sidebarGroupsIncludePlayground(r))}_sidebarEntriesIncludePlayground(e){for(let t=0;t<e.length;t++){let r=e[t];if("string"==typeof r.Path&&/(^|\/)playground\.md$/i.test(r.Path))return!0;if(Array.isArray(r.Children)&&this._sidebarEntriesIncludePlayground(r.Children))return!0}return!1}_sidebarGroupsIncludePlayground(e){let t=/(^|\/)playground(\.md|$)/i;for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n.Route&&t.test(n.Route))return!0;if(Array.isArray(n.Modules))for(let e=0;e<n.Modules.length;e++){let r=n.Modules[e];if("string"==typeof r.Route&&t.test(r.Route))return!0}}return!1}fetchDocument(e,t,r,n,o){let i="function"==typeof t?t:()=>{};return e?this._ContentCache[e]?i(null,this._ContentCache[e]):void fetch(e).then(e=>e.ok?e.text():null).then(t=>{if(!t)return i("Document not found",this.getErrorPageHTML(e));let a=this._ContentProvider.parseMarkdown(t,this._createLinkResolver(r,n,o),this._createImageResolver(e));return this._ContentCache[e]=a,i(null,a)}).catch(t=>(this.log.warn("Docuserve: Error fetching document [".concat(e,"]: ").concat(t)),i(t,this.getErrorPageHTML(e)))):i("No URL provided","")}fetchLocalDocument(e,t,r,n,o){let i=(this.pict.AppData.Docuserve.DocsBaseURL||"")+e;this.fetchDocument(i,t,r,n,o)}convertDocLink(e,t,r,n){let o=e.replace(/^\.\//,"");o=o.replace(/^\//,"");let i=o.split("/");if(i.length>=2&&this.isGroupInCatalog(i[0])&&this.isModuleInCatalog(i[0],i[1]))return"#/doc/"+o;if(t&&r){let e="";if(n){let t=n.split("/");t.length>1&&(t.pop(),e=t.join("/")+"/")}return"#/doc/"+t+"/"+r+"/"+e+o}if(o.match(/\.md$/)){return"#/page/"+o.replace(/\.md$/,"")}return"#/page/"+o}},t.exports.default_configuration={ProviderIdentifier:"Docuserve-Documentation",AutoInitialize:!0,AutoInitializeOrdinal:0}},{lunr:116,"pict-provider":143,"pict-section-content":148}],335:[function(e,t,r){const n=e("pict-section-content");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}displayContent(e){let t=e,r=this.pict.AppData.Docuserve.CurrentGroup,n=this.pict.AppData.Docuserve.CurrentModule;if(r&&n){let e=this.pict.providers["Docuserve-Documentation"];if(e){let o=e.resolveGitHubPagesURL(r,n);o&&(t='<div class="docuserve-module-external-link"><a href="'+o+'" target="_blank" rel="noopener">&#x2197; View '+n+" documentation site</a></div>"+t)}}super.displayContent(t,"Docuserve-Content-Body"),this._mountInlineWidgets()}_mountInlineWidgets(){let e=document.getElementById("Docuserve-Content-Body");if(!e)return;let t=e.querySelectorAll("[data-docuserve-playground]:not([data-docuserve-mounted])");for(let e=0;e<t.length;e++){let r=t[e],n=null;"fable"===r.getAttribute("data-docuserve-playground")&&(n=this.pict.views["Docuserve-Fable-Playground"]),n&&"function"==typeof n.mountInto&&(r.setAttribute("data-docuserve-mounted","1"),n.mountInto(r))}this._addPlaygroundButtonsToCodeBlocks()}_addPlaygroundButtonsToCodeBlocks(){let e=document.getElementById("Docuserve-Content-Body");if(!e)return;let t=this.pict.providers["Docuserve-Documentation"];if(t&&"function"==typeof t.isPlaygroundEnabled){let e=this.pict.AppData.Docuserve||{};if(!t.isPlaygroundEnabled(e.CurrentGroup,e.CurrentModule))return}let r=e.querySelectorAll(".pict-content-code-container:not([data-tryplay-wired])");for(let e=0;e<r.length;e++){let t=r[e];if(!t.querySelector("code.language-javascript, code.language-js"))continue;let n=t.querySelector(".pict-content-code-actions");if(!n)continue;let o=document.createElement("button");o.type="button",o.className="pict-content-code-action-btn docuserve-tryplay-btn",o.title="Try in Fable Playground",o.setAttribute("aria-label","Try this code in the Fable Playground"),o.setAttribute("onclick","_Pict.views['Docuserve-Content'].tryInPlayground(this)"),o.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true"><polygon points="5,3 13,8 5,13"></polygon></svg>',n.appendChild(o),t.setAttribute("data-tryplay-wired","true")}}tryInPlayground(e){if(!e)return;let t=e.closest(".pict-content-code-container");if(!t)return;let r=t.querySelector("code");if(!r)return;let n=this.pict.views["Docuserve-Fable-Playground"];n&&"function"==typeof n.loadCode&&n.loadCode(r.textContent)}showLoading(){super.showLoading("Loading documentation...","Docuserve-Content-Body")}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Content",DefaultRenderable:"Docuserve-Content-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* Plain <pre> (no wrap) - rare; keep for safety */\n\t\t.pict-content pre {\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t/* Inline code */\n\t\t.pict-content code {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-syntax-property, #9E3A50);\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t/* Fenced code block wrapper emitted by pict-section-content */\n\t\t.pict-content-code-wrap {\n\t\t\tposition: relative;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: var(--theme-color-background-tertiary, #EFEAE0);\n\t\t\tborder-right: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tcolor: var(--theme-color-text-muted, #A59986);\n\t\t\tfont-family: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tline-height: inherit;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tpadding: 1.25em 1.25em 1.25em 52px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t/* Syntax tokens — these rules must match the span classes emitted by\n\t\t pict-section-code's highlighter. Also apply without .pict-content-code-wrap\n\t\t as a belt-and-suspenders for any <pre><code> not emitted from a fence. */\n\t\t.pict-content-code-wrap .keyword,\n\t\t.pict-content pre code .keyword { color: var(--theme-color-syntax-keyword, #A03472); }\n\t\t.pict-content-code-wrap .string,\n\t\t.pict-content pre code .string { color: var(--theme-color-syntax-string, #1A6640); }\n\t\t.pict-content-code-wrap .number,\n\t\t.pict-content pre code .number { color: var(--theme-color-syntax-number, #B25A00); }\n\t\t.pict-content-code-wrap .comment,\n\t\t.pict-content pre code .comment { color: var(--theme-color-syntax-comment, #8A7F72); font-style: italic; }\n\t\t.pict-content-code-wrap .operator,\n\t\t.pict-content pre code .operator { color: var(--theme-color-syntax-operator, #2E7D74); }\n\t\t.pict-content-code-wrap .punctuation,\n\t\t.pict-content pre code .punctuation { color: var(--theme-color-syntax-punctuation, #2A241E); }\n\t\t.pict-content-code-wrap .function-name,\n\t\t.pict-content pre code .function-name { color: var(--theme-color-syntax-function, #2A5DB0); }\n\t\t.pict-content-code-wrap .property,\n\t\t.pict-content pre code .property { color: var(--theme-color-syntax-property, #9E3A50); }\n\t\t.pict-content-code-wrap .tag,\n\t\t.pict-content pre code .tag { color: var(--theme-color-syntax-tag, #9E3A50); }\n\t\t.pict-content-code-wrap .attr-name,\n\t\t.pict-content pre code .attr-name { color: var(--theme-color-syntax-attrname, #B25A00); }\n\t\t.pict-content-code-wrap .attr-value,\n\t\t.pict-content pre code .attr-value { color: var(--theme-color-syntax-attrvalue, #1A6640); }\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: var(--theme-color-background-secondary, #F7F5F0);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F5F0E8);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: var(--theme-color-background-secondary, #F9F6F0);\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t}\n\t\t/* Force dark text inside mermaid SVGs so diagrams stay readable\n\t\t in dark mode (mermaid bg is always light). */\n\t\t.pict-content pre.mermaid text,\n\t\t.pict-content pre.mermaid .nodeLabel,\n\t\t.pict-content pre.mermaid .edgeLabel,\n\t\t.pict-content pre.mermaid .label,\n\t\t.pict-content pre.mermaid .cluster-label,\n\t\t.pict-content pre.mermaid span,\n\t\t.pict-content pre.mermaid foreignObject p,\n\t\t.pict-content pre.mermaid foreignObject div,\n\t\t.pict-content pre.mermaid foreignObject span {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E) !important;\n\t\t\tfill: var(--theme-color-text-primary, #2A241E) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .edgePath .path {\n\t\t\tstroke: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t.pict-content pre.mermaid .arrowheadPath {\n\t\t\tfill: var(--theme-color-text-secondary, #5E5549) !important;\n\t\t}\n\t\t/* Mermaid 11's block-beta renderer ignores the themeVariables we\n\t\t pass to mermaid.initialize() — it bakes its own multi-color\n\t\t palette directly into each rect's inline SVG attributes. In\n\t\t light mode that palette is fine: Mermaid's pastel colors on a\n\t\t light page have good contrast and visual hierarchy. In dark\n\t\t mode those same light-pastel fills with dark text appear as a\n\t\t light-mode island stamped onto a dark page — poor contrast and\n\t\t visually jarring.\n\t\t Rather than collapsing the palette to a single theme color\n\t\t (which loses the per-cluster identity the diagram author chose),\n\t\t we invert the entire diagram with a CSS filter in dark mode.\n\t\t The 0.92 factor avoids a harsh pure-white→pure-black flip; the\n\t\t hue-rotate(180deg) compensates for the hue shift invert()\n\t\t introduces, so red stays reddish, green stays greenish, etc.\n\t\t Scoped via :has(g.block) so only block-beta diagrams get\n\t\t filtered — flowchart / sequence / state diagrams already honor\n\t\t themeVariables and render mode-correctly without inversion. */\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) {\n\t\t\tfilter: invert(0.92) hue-rotate(180deg);\n\t\t\tbackground: transparent !important;\n\t\t\tborder-color: transparent !important;\n\t\t}\n\t\t/* When the block-beta inversion is active, the global \"force\n\t\t text to theme-color-text-primary\" rule above would set text\n\t\t to the dark-mode text color (light cream), which the filter\n\t\t then inverts to dark — unreadable against the now-dark fills.\n\t\t Reverting lets Mermaid's natural light-mode text color (dark)\n\t\t pass through the inversion, becoming light text in dark mode. */\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) text,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .nodeLabel,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .edgeLabel,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .label,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) .cluster-label,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) span,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) foreignObject p,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) foreignObject div,\n\t\t.theme-dark .pict-content pre.mermaid:has(g.block) foreignObject span {\n\t\t\t/* Force text to render DARK pre-filter so the dark-mode filter\n\t\t\t inverts it to LIGHT on the now-dark inverted blocks. Using\n\t\t\t the theme's light-mode text-primary hex directly (not the\n\t\t\t var() chain) because the chain would resolve to light cream\n\t\t\t in dark mode, which the filter would then invert BACK to\n\t\t\t dark — unreadable on the inverted dark blocks. */\n\t\t\tcolor: #3D3229 !important;\n\t\t\tfill: #3D3229 !important;\n\t\t}\n\t\t/* Inner blocks (the .basic.label-container rects inside block-beta\n\t\t diagrams, NOT the cluster wrappers) pick up mainBkg from the\n\t\t themeVariables we pass to mermaid.initialize(). In dark mode\n\t\t that's a dark color — which the SVG filter then inverts to\n\t\t light gray, undoing the dark-mode-ification. Force the inner\n\t\t blocks to render with a fixed light fill so the inversion\n\t\t produces dark cards in dark mode. In light mode (no filter)\n\t\t the white fill is effectively the same as Mermaid's default\n\t\t light-theme block bg — so no visual change there. */\n\t\t.pict-content pre.mermaid:has(g.block) rect.basic.label-container:not(.cluster) {\n\t\t\tfill: #FFFFFF !important;\n\t\t\tstroke: #6E6E6E !important;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-module-external-link {\n\t\t\tpadding: 0.5em 0;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t.docuserve-module-external-link a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-module-external-link a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0ECE4);\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-syntax-property, #9E3A50);\n\t\t}\n\n\t\t/* Fullscreen viewer for images and mermaid diagrams (click-to-zoom) */\n\t\t.pict-content [data-fullscreen-source] {\n\t\t\tcursor: zoom-in;\n\t\t\toutline: 1px solid transparent;\n\t\t\toutline-offset: 3px;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: outline-color 0.15s ease;\n\t\t}\n\t\t.pict-content [data-fullscreen-source]:hover {\n\t\t\toutline-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t/* Code block container with hover-revealed action buttons */\n\t\t.pict-content-code-container {\n\t\t\tposition: relative;\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tgap: 8px;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content-code-container > .pict-content-code-wrap {\n\t\t\tmargin: 0;\n\t\t\tflex: 1 1 auto;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-actions {\n\t\t\tposition: sticky;\n\t\t\ttop: 64px;\n\t\t\talign-self: flex-start;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t\tflex: 0 0 auto;\n\t\t\tpadding-top: 6px;\n\t\t\topacity: 0;\n\t\t\ttransform: translateX(-4px);\n\t\t\ttransition: opacity 0.15s ease, transform 0.15s ease;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-content-code-container:hover .pict-content-code-actions,\n\t\t.pict-content-code-container:focus-within .pict-content-code-actions {\n\t\t\topacity: 1;\n\t\t\ttransform: translateX(0);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-content-code-action-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tpadding: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\tcursor: pointer;\n\t\t\tbox-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;\n\t\t}\n\t\t.pict-content-code-action-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.6;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-content-code-action-btn:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t}\n\t\t.pict-content-code-action-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-content-code-action-btn.is-copied {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.pict-content-code-action-btn.is-copy-failed {\n\t\t\tbackground: #B23A3A;\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: #B23A3A;\n\t\t}\n\t\t/* Try-in-playground button — appended to JS code blocks. The\n\t\t triangle is filled (vs. the other action icons which are\n\t\t stroke-only) to read as a \"play\" affordance. */\n\t\t.docuserve-tryplay-btn svg polygon {\n\t\t\tfill: currentColor;\n\t\t\tstroke: none;\n\t\t}\n\t\t.docuserve-tryplay-btn svg {\n\t\t\twidth: 12px;\n\t\t\theight: 12px;\n\t\t}\n\t\t.pict-fullscreen-overlay {\n\t\t\tposition: fixed;\n\t\t\tinset: 0;\n\t\t\tz-index: 9999;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: rgba(0, 0, 0, 0.62);\n\t\t\tbackdrop-filter: blur(6px);\n\t\t\t-webkit-backdrop-filter: blur(6px);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.pict-fullscreen-overlay[hidden] {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-fullscreen-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 1em;\n\t\t\theight: 48px;\n\t\t\tpadding: 0 1em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n\t\t\tflex: 0 0 auto;\n\t\t}\n\t\t.pict-fullscreen-title {\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.01em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-fullscreen-controls {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-fullscreen-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 6px;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n\t\t}\n\t\t.pict-fullscreen-btn svg {\n\t\t\tdisplay: block;\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tstroke: currentColor;\n\t\t\tfill: none;\n\t\t\tstroke-width: 1.75;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-fullscreen-btn:hover {\n\t\t\tbackground: var(--theme-color-border-light, #EAE3D8);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.pict-fullscreen-btn:focus-visible {\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 2px;\n\t\t}\n\t\t.pict-fullscreen-close:hover {\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.pict-fullscreen-stage {\n\t\t\tflex: 1 1 auto;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 1.5em;\n\t\t\tcursor: zoom-in;\n\t\t\ttouch-action: none;\n\t\t}\n\t\t.pict-fullscreen-stage.is-zoomed {\n\t\t\tcursor: grab;\n\t\t}\n\t\t.pict-fullscreen-stage.is-panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-fullscreen-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 100%;\n\t\t\ttransform-origin: center center;\n\t\t\ttransition: transform 0.05s linear;\n\t\t\twill-change: transform;\n\t\t}\n\t\t.pict-fullscreen-content > * {\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-img {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tobject-fit: contain;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 12px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg {\n\t\t\twidth: min(90vw, 1400px);\n\t\t\theight: auto;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tpadding: 16px;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg text,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg .nodeLabel,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg .edgeLabel,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg .label,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg span,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg foreignObject p,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg foreignObject div,\n\t\t.pict-fullscreen-content .pict-fullscreen-mermaid-svg foreignObject span {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E) !important;\n\t\t\tfill: var(--theme-color-text-primary, #2A241E) !important;\n\t\t}\n\t\t.pict-fullscreen-content .pict-fullscreen-codewrap {\n\t\t\tmax-width: 90vw;\n\t\t\tmax-height: calc(100vh - 96px);\n\t\t\tmargin: 0;\n\t\t\toverflow: auto;\n\t\t\tbox-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Content-Template",Template:'\n<div class="pict-content" id="Docuserve-Content-Body">\n\t<div class="pict-content-loading">Loading documentation...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Content-Display",TemplateHash:"Docuserve-Content-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-section-content":148}],336:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender(e,t,r,n)}showEmpty(){let e=this.pict.parseTemplateByHash("Docuserve-Demo-Empty-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Content-Container",e)}showDemo(e,t,r){let n=this.pict.providers["Docuserve-Demos"];if(!n)return this.log.warn("Docuserve-Demo: Docuserve-Demos provider not registered"),void this.showEmpty();let o=n.get(e,t,r);if(!o)return this.log.warn("Docuserve-Demo: no demo registered for "+e+"/"+t+"/"+r),void this.showEmpty();let i=this.pict.parseTemplateByHash("Docuserve-Demo-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Content-Container",i),this.pict.CSSMap.injectCSS();let a=document.getElementById("Docuserve-Demo-Title"),s=document.getElementById("Docuserve-Demo-Meta"),l=document.getElementById("Docuserve-Demo-Description");a&&(a.textContent=o.Name||o.Hash),s&&(s.innerHTML=this._escapeHTML(o.Group)+' · <a href="#/doc/'+this._escapeHTML(o.Group)+"/"+this._escapeHTML(o.Module)+'">'+this._escapeHTML(o.Module)+"</a>"),l&&(l.textContent=o.Description||"");let c=document.getElementById("Docuserve-Demo-Live"),d=document.getElementById("Docuserve-Demo-Sources");if(c){let e=Array.isArray(o.Sources)&&o.Sources.length>0;d&&(d.style.display=e?"":"none",c.classList.toggle("full-width",!e));try{o.Mount(this.pict,c,o.Spec||{})}catch(e){this.log.warn("Docuserve-Demo: Mount() threw for "+r+": "+(e&&e.message?e.message:e)),c.innerHTML='<div class="docuserve-demo-empty">Demo failed to mount: '+this._escapeHTML(e&&e.message?e.message:String(e))+"</div>"}}Array.isArray(o.Sources)&&o.Sources.length>0&&this._renderSources(o.Sources)}_renderSources(e){let t=document.getElementById("Docuserve-Demo-Sources-Tabs"),r=document.getElementById("Docuserve-Demo-Sources-Body");if(!t||!r)return;let n="",o="";for(let t=0;t<e.length;t++){let r=e[t],i=0===t?" active":"";n+='<button type="button" class="docuserve-demo-sources-tab'+i+'" data-source-idx="'+t+"\" onclick=\"_Pict.views['Docuserve-Demo']._switchSourceTab("+t+')">'+this._escapeHTML(r.Name||"source-"+(t+1))+"</button>",o+='<div class="docuserve-demo-source-pane'+i+'" data-source-idx="'+t+'"><pre><code>'+this._escapeHTML(r.Content||"")+"</code></pre></div>"}t.innerHTML=n,r.innerHTML=o}_switchSourceTab(e){let t=document.querySelectorAll(".docuserve-demo-sources-tab"),r=document.querySelectorAll(".docuserve-demo-source-pane");for(let r=0;r<t.length;r++){let n=parseInt(t[r].getAttribute("data-source-idx"),10);t[r].classList.toggle("active",n===e)}for(let t=0;t<r.length;t++){let n=parseInt(r[t].getAttribute("data-source-idx"),10);r[t].classList.toggle("active",n===e)}}_escapeHTML(e){return null==e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Demo",DefaultRenderable:"Docuserve-Demo-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-demo\n\t\t{\n\t\t\tpadding: 1.5em 2em;\n\t\t\tmax-width: 1200px;\n\t\t\tmargin: 0 auto;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.docuserve-demo-header\n\t\t{\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding-bottom: 0.75em;\n\t\t\tmargin-bottom: 1.25em;\n\t\t}\n\t\t.docuserve-demo-title\n\t\t{\n\t\t\tfont-size: 1.5em;\n\t\t\tfont-weight: 600;\n\t\t\tmargin: 0 0 0.3em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.docuserve-demo-meta\n\t\t{\n\t\t\tfont-size: 0.78em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tletter-spacing: 0.04em;\n\t\t\ttext-transform: uppercase;\n\t\t\tmargin: 0 0 0.6em;\n\t\t}\n\t\t.docuserve-demo-meta a\n\t\t{\n\t\t\tcolor: inherit;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-demo-meta a:hover\n\t\t{\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-demo-description\n\t\t{\n\t\t\tfont-size: 0.95em;\n\t\t\tline-height: 1.55;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t}\n\t\t.docuserve-demo-body\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 1.5em;\n\t\t\tmin-height: 320px;\n\t\t\talign-items: stretch;\n\t\t}\n\t\t.docuserve-demo-live\n\t\t{\n\t\t\tflex: 1 1 60%;\n\t\t\tmin-width: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 1em;\n\t\t\toverflow: auto;\n\t\t}\n\t\t.docuserve-demo-live.full-width\n\t\t{\n\t\t\tflex: 1 1 100%;\n\t\t}\n\t\t.docuserve-demo-sources\n\t\t{\n\t\t\tflex: 1 1 40%;\n\t\t\tmin-width: 0;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF8F4);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: hidden;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.docuserve-demo-sources-tabs\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F0EDE8);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t}\n\t\t.docuserve-demo-sources-tab\n\t\t{\n\t\t\tpadding: 0.55em 0.9em;\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tborder-right: 1px solid var(--theme-color-border-light, #E8E2D7);\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tfont-size: 0.8em;\n\t\t\tfont-weight: 500;\n\t\t\tcursor: pointer;\n\t\t\tfont-family: var(--theme-typography-family-mono, ui-monospace, monospace);\n\t\t}\n\t\t.docuserve-demo-sources-tab:hover\n\t\t{\n\t\t\tbackground: var(--theme-color-background-hover, #EDE9E3);\n\t\t}\n\t\t.docuserve-demo-sources-tab.active\n\t\t{\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: inset 0 -2px 0 0 var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-demo-sources-body\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\toverflow: auto;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-demo-source-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tpadding: 0.5em;\n\t\t}\n\t\t.docuserve-demo-source-pane.active\n\t\t{\n\t\t\tdisplay: block;\n\t\t}\n\t\t.docuserve-demo-source-pane pre\n\t\t{\n\t\t\tmargin: 0;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-family: var(--theme-typography-family-mono, ui-monospace, monospace);\n\t\t\tfont-size: 0.82em;\n\t\t\tline-height: 1.5;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tborder: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tborder-radius: 4px;\n\t\t\toverflow: auto;\n\t\t\twhite-space: pre;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.docuserve-demo-empty\n\t\t{\n\t\t\tpadding: 2em;\n\t\t\ttext-align: center;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t@media (max-width: 900px)\n\t\t{\n\t\t\t.docuserve-demo-body { flex-direction: column; }\n\t\t\t.docuserve-demo-live, .docuserve-demo-sources { flex: 1 1 auto; }\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Demo-Template",Template:'\n<div class="docuserve-demo">\n\t<div class="docuserve-demo-header">\n\t\t<div class="docuserve-demo-meta" id="Docuserve-Demo-Meta"></div>\n\t\t<h1 class="docuserve-demo-title" id="Docuserve-Demo-Title">Demo</h1>\n\t\t<div class="docuserve-demo-description" id="Docuserve-Demo-Description"></div>\n\t</div>\n\t<div class="docuserve-demo-body" id="Docuserve-Demo-Body">\n\t\t<div class="docuserve-demo-live" id="Docuserve-Demo-Live"></div>\n\t\t<div class="docuserve-demo-sources" id="Docuserve-Demo-Sources" style="display:none">\n\t\t\t<div class="docuserve-demo-sources-tabs" id="Docuserve-Demo-Sources-Tabs"></div>\n\t\t\t<div class="docuserve-demo-sources-body" id="Docuserve-Demo-Sources-Body"></div>\n\t\t</div>\n\t</div>\n</div>'},{Hash:"Docuserve-Demo-Empty-Template",Template:'<div class="docuserve-demo"><div class="docuserve-demo-empty">No demo registered at this route.</div></div>'}],Renderables:[{RenderableHash:"Docuserve-Demo-Display",TemplateHash:"Docuserve-Demo-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":216}],337:[function(e,t,r){const n=e("pict-view"),o=e("pict-section-code"),i=e("fable-serviceproviderbase"),a=e("pict"),s=e("pict-section-histogram"),l="docuserve-fable-playground-code",c="docuserve-fable-playground-auto-capture",d="Docuserve-Fable-Playground-CodeEditor",h="Docuserve-Fable-Playground-Editor-Mount";class p extends o{onCodeChange(e){super.onCodeChange(e),this._lsTimer&&clearTimeout(this._lsTimer),this._lsTimer=setTimeout(()=>{this._lsTimer=null;try{window.localStorage.setItem(l,e)}catch(e){}let t=this.fable.pict.views["Docuserve-Fable-Playground"];t&&"function"==typeof t._setStatus&&t._setStatus("saved")},500)}}const u={ViewIdentifier:"Docuserve-Fable-Playground",DefaultRenderable:"Docuserve-Fable-Playground-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:'\n\t\t/* The shell renders the panel content into a wrapper that has\n\t\t min-height: 100% but no explicit height — which means our\n\t\t percentage-height children would resolve to 0. Promote the\n\t\t destination to a flex column so the playground inside it\n\t\t can use flex: 1 to fill the drawer height. */\n\t\t#Docuserve-Playground-Drawer-Content {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t/* Playground fills the bottom drawer height-wise. The drawer\n\t\t itself owns the outer resize; everything inside flexes to\n\t\t whatever vertical space remains so a thin drawer is usable\n\t\t and a tall drawer just gives the editor more room. */\n\t\t.docuserve-playground {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t}\n\t\t.docuserve-playground-body {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tgap: 0;\n\t\t}\n\t\t@media (max-width: 900px) {\n\t\t\t.docuserve-playground-body { flex-direction: column; gap: 0; }\n\t\t}\n\t\t.docuserve-playground-pane {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.docuserve-playground-pane-code { border-right: 1px solid var(--theme-color-border-default, #DDD6CA); }\n\t\t.docuserve-playground-pane-log { background: var(--theme-color-background-secondary, #F6F3EE); }\n\t\t/* DOM sandbox pane — third column, opt-in via _playground.json\'s\n\t\t "Sandbox": "dom" field. Hidden by default so fable-family docs\n\t\t keep their familiar two-pane layout. */\n\t\t.docuserve-playground-pane-dom { display: none; border-left: 1px solid var(--theme-color-border-default, #DDD6CA); background: var(--theme-color-background-panel, #FFFFFF); }\n\t\t.docuserve-playground-mode-dom .docuserve-playground-pane-dom { display: flex; }\n\t\t.docuserve-playground-sandbox { flex: 1 1 0; min-height: 0; overflow: auto; padding: 12px; }\n\n\t\t/* Per-pane header — small uppercase label on the left, controls\n\t\t on the right. Same row height as the doc page section\n\t\t labels so it slots in visually under the topbar. */\n\t\t.docuserve-playground-pane-header {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.9em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-playground-pane-log .docuserve-playground-pane-header {\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t}\n\t\t.docuserve-playground-pane-title {\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.06em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-playground-pane-controls {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.15em;\n\t\t}\n\n\t\t/* Compact icon button — subtle by default, brand-primary on\n\t\t hover. Used for help, copy, copy-log, clear-log, and run.\n\t\t All glyphs are 14px @ 1em via SVG so they ride the font-size\n\t\t set on the parent. */\n\t\t.docuserve-playground-iconbtn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 1.6em;\n\t\t\theight: 1.6em;\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 14px;\n\t\t\ttransition: color 0.12s, background-color 0.12s, border-color 0.12s, opacity 0.12s;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t.docuserve-playground-iconbtn svg {\n\t\t\twidth: 1em;\n\t\t\theight: 1em;\n\t\t\tdisplay: block;\n\t\t\tfill: none;\n\t\t\tstroke: currentColor;\n\t\t\tstroke-width: 2;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.docuserve-playground-iconbtn:hover {\n\t\t\topacity: 1;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbackground: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tborder-color: var(--theme-color-border-default, #DDD6CA);\n\t\t}\n\t\t.docuserve-playground-iconbtn:focus-visible {\n\t\t\topacity: 1;\n\t\t\toutline: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t\toutline-offset: 1px;\n\t\t}\n\t\t/* Run is the destination action — slightly brighter at rest so\n\t\t the user\'s eye lands on it, with a filled play triangle that\n\t\t uses fill instead of stroke. */\n\t\t.docuserve-playground-iconbtn-run {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\topacity: 0.7;\n\t\t}\n\t\t.docuserve-playground-iconbtn-run svg { fill: currentColor; stroke: none; }\n\t\t.docuserve-playground-iconbtn-run:hover {\n\t\t\topacity: 1;\n\t\t\tbackground: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\n\t\t/* The copy-log button only materializes on hover of the log\n\t\t pane — it\'s a "by the way" action, not something the user\n\t\t should be reaching for during normal exploration. */\n\t\t.docuserve-playground-iconbtn-copylog { opacity: 0; pointer-events: none; }\n\t\t.docuserve-playground-pane-log:hover .docuserve-playground-iconbtn-copylog,\n\t\t.docuserve-playground-pane-log:focus-within .docuserve-playground-iconbtn-copylog {\n\t\t\topacity: 0.6;\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.docuserve-playground-pane-log:hover .docuserve-playground-iconbtn-copylog:hover { opacity: 1; }\n\n\t\t/* Auto-attach toggle — compact inline checkbox + label sized\n\t\t to sit alongside the icon buttons without overpowering\n\t\t them. */\n\t\t.docuserve-playground-toggle {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tmargin-right: 0.25em;\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-playground-toggle input[type="checkbox"] {\n\t\t\taccent-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tcursor: pointer;\n\t\t\tmargin: 0;\n\t\t\twidth: 0.95em;\n\t\t\theight: 0.95em;\n\t\t}\n\t\t.docuserve-playground-toggle:hover { color: var(--theme-color-text-secondary, #5E5549); }\n\n\t\t/* Editor mount fills the remaining pane height; pict-section-code\n\t\t styles the inner editor + gutter itself. */\n\t\t#'.concat(h," {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t#").concat(h," .pict-code-editor-wrap {\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\theight: 100%;\n\t\t}\n\t\t.docuserve-playground-log {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n\t\t\tfont-size: 12.5px;\n\t\t\tline-height: 1.6;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tpadding: 0.8em 0.9em;\n\t\t\toverflow: auto;\n\t\t\tmargin: 0;\n\t\t\twhite-space: pre-wrap;\n\t\t\tword-break: break-word;\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tborder: 0;\n\t\t\tborder-radius: 0;\n\t\t}\n\t\t.docuserve-playground-log-line {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.05em 0;\n\t\t}\n\t\t.docuserve-playground-log-time {\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-playground-log-level {\n\t\t\tdisplay: inline-block;\n\t\t\tmin-width: 5.5ch;\n\t\t\ttext-align: right;\n\t\t\tfont-weight: 600;\n\t\t\tmargin: 0 0.4em 0 0.25em;\n\t\t}\n\t\t.docuserve-playground-log-level-trace { color: var(--theme-color-text-muted, #8A7F72); }\n\t\t.docuserve-playground-log-level-debug { color: var(--theme-color-text-secondary, #5E5549); }\n\t\t.docuserve-playground-log-level-info { color: var(--theme-color-brand-primary, #2E7D74); }\n\t\t.docuserve-playground-log-level-warn { color: var(--theme-color-status-warning, #B25A00); }\n\t\t.docuserve-playground-log-level-error { color: var(--theme-color-status-error, #B23A3A); }\n\t\t.docuserve-playground-log-level-fatal {\n\t\t\tcolor: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tbackground: var(--theme-color-status-error, #B23A3A);\n\t\t\tpadding: 0 0.3em;\n\t\t\tborder-radius: 2px;\n\t\t}\n\t\t/* Banner records (start / finish) — span the full row width\n\t\t with no level chip or timestamp, since the message itself\n\t\t is the dash-bordered marker. font-size: 0 on the row\n\t\t collapses the literal whitespace text nodes the line\n\t\t template inserts between time/level/message (those are\n\t\t needed for copy-paste of regular rows but would otherwise\n\t\t leak 2 leading spaces onto every banner line); the message\n\t\t span re-asserts the inherited font size so it renders. */\n\t\t.docuserve-playground-log-line-banner\n\t\t{\n\t\t\tfont-size: 0;\n\t\t}\n\t\t.docuserve-playground-log-line-banner .docuserve-playground-log-time,\n\t\t.docuserve-playground-log-line-banner .docuserve-playground-log-level\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-playground-log-line-banner .docuserve-playground-log-message\n\t\t{\n\t\t\tfont-size: 12.5px;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-playground-log-message { color: var(--theme-color-text-primary, #2A241E); }\n\t\t.docuserve-playground-log-datum {\n\t\t\tcolor: var(--theme-color-syntax-property, #9E3A50);\n\t\t}\n\t\t.docuserve-playground-log-empty {\n\t\t\tdisplay: block;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-playground-log-meta {\n\t\t\tdisplay: block;\n\t\t\tpadding-top: 0.4em;\n\t\t\tmargin-top: 0.4em;\n\t\t\tborder-top: 1px dashed var(--theme-color-border-light, #E5DED1);\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t"),Templates:[{Hash:"Docuserve-Fable-Playground-Template",Template:'\n<div class="docuserve-playground">\n\t<div class="docuserve-playground-body">\n\t\t<div class="docuserve-playground-pane docuserve-playground-pane-code">\n\t\t\t<div class="docuserve-playground-pane-header">\n\t\t\t\t<span class="docuserve-playground-pane-title">Code</span>\n\t\t\t\t<div class="docuserve-playground-pane-controls">\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" id="Docuserve-Fable-Playground-HelpBtn" aria-label="What\'s the playground?">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M9.5 9a2.5 2.5 0 0 1 5 0c0 1.5-2.5 2-2.5 3.5"/><circle cx="12" cy="17" r="0.5" fill="currentColor" stroke="none"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<label class="docuserve-playground-toggle" title="When on, user code that does new Fable(...) via require(\'fable\') gets the playground\'s log capture pre-attached, so app.log.info(...) calls appear in the panel.">\n\t\t\t\t\t\t<input type="checkbox" id="Docuserve-Fable-Playground-AutoCapture-Toggle" onchange="{~P~}.views[\'Docuserve-Fable-Playground\'].setAutoCapture(this.checked)">\n\t\t\t\t\t\tauto-attach\n\t\t\t\t\t</label>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" title="Copy code" aria-label="Copy code" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].copyCode()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn docuserve-playground-iconbtn-run" title="Run" aria-label="Run code" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].run()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 4l13 8-13 8z"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id="'.concat(h,'"></div>\n\t\t</div>\n\t\t<div class="docuserve-playground-pane docuserve-playground-pane-log">\n\t\t\t<div class="docuserve-playground-pane-header">\n\t\t\t\t<span class="docuserve-playground-pane-title">Log output</span>\n\t\t\t\t<div class="docuserve-playground-pane-controls">\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn docuserve-playground-iconbtn-copylog" title="Copy log" aria-label="Copy log" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].copyLog()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" title="Clear log" aria-label="Clear log" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].clear()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" title="Close playground" aria-label="Close playground" onclick="{~P~}.views[\'Docuserve-Layout\'].collapsePlayground()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<pre class="docuserve-playground-log" id="Docuserve-Fable-Playground-Log">{~T:Docuserve-Fable-Playground-Log-Body-Template:AppData~}</pre>\n\t\t</div>\n\t\t<div class="docuserve-playground-pane docuserve-playground-pane-dom">\n\t\t\t<div class="docuserve-playground-pane-header">\n\t\t\t\t<span class="docuserve-playground-pane-title">DOM sandbox</span>\n\t\t\t\t<div class="docuserve-playground-pane-controls">\n\t\t\t\t\t<button type="button" class="docuserve-playground-iconbtn" title="Clear sandbox" aria-label="Clear sandbox" onclick="{~P~}.views[\'Docuserve-Fable-Playground\'].clearSandbox()">\n\t\t\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6"/></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="docuserve-playground-sandbox" id="Docuserve-Fable-Playground-Sandbox"></div>\n\t\t</div>\n\t</div>\n</div>\n')},{Hash:"Docuserve-Fable-Playground-Log-Body-Template",Template:"{~TS:Docuserve-Fable-Playground-Log-Line-Template:AppData.Docuserve.Playground.LogLines~}{~TS:Docuserve-Fable-Playground-Log-Empty-Template:AppData.Docuserve.Playground.LogEmptySlot~}{~TS:Docuserve-Fable-Playground-Log-Meta-Template:AppData.Docuserve.Playground.LogMetaSlot~}"},{Hash:"Docuserve-Fable-Playground-Log-Line-Template",Template:'<span class="docuserve-playground-log-line docuserve-playground-log-line-{~D:Record.Level~}"><span class="docuserve-playground-log-time">{~D:Record.Time~}</span> <span class="docuserve-playground-log-level docuserve-playground-log-level-{~D:Record.Level~}">{~D:Record.Level~}</span> <span class="docuserve-playground-log-message">{~D:Record.Message~}</span>{~TS:Docuserve-Fable-Playground-Log-Datum-Template:Record.DatumSlot~}</span>'},{Hash:"Docuserve-Fable-Playground-Log-Datum-Template",Template:' <span class="docuserve-playground-log-datum">{~D:Record.Datum~}</span>'},{Hash:"Docuserve-Fable-Playground-Log-Empty-Template",Template:'<span class="docuserve-playground-log-empty">(no log output yet — press Run)</span>'},{Hash:"Docuserve-Fable-Playground-Log-Meta-Template",Template:'<span class="docuserve-playground-log-meta">{~D:Record.Meta~}</span>'}],Renderables:[]};t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._DefaultCode="// Fable Playground. 'fable' is a fresh Fable instance.\n// Anything you log lands in the panel to the right.\n\nfable.log.info('Hello from the playground!');\n\n// Each level has its own color:\nfable.log.trace('trace messages (most verbose)');\nfable.log.debug('debug messages');\nfable.log.info('info messages');\nfable.log.warn('warnings stand out');\nfable.log.error('errors are loud');\nfable.log.fatal('FATAL records flag in red');\n\n// Records can carry a data payload:\nfable.log.info('Action completed', { user: 'alice', ms: 42 });\n\n// Full service access:\nfable.log.info('Generated UUID', { id: fable.UUID.getUUID() });\nfable.log.info('Product setting', { product: fable.SettingsManager.settings.Product });\n\n// Async logs work too — the panel updates as records arrive:\nsetTimeout(() => fable.log.info('arrived 100ms later'), 100);\nsetTimeout(() => fable.log.warn('arrived 250ms later'), 250);\n\n// Bonus: require() works for a curated set of Retold modules:\nconst Fable = require('fable');\nlet mine = new Fable({ Product: 'BYO-Fable' });\nfable.log.info('Fable class via require()', { sameAsFableCtor: Fable === fable.constructor });\n",this._codeJarPromise=null,this._asyncRenderTimer=null,this._currentRunRecords=null,this._currentRunStart=0,this._statusClearTimer=null,this._mountedInDrawer=!1,this._registerCodeEditor()}mountIntoDrawer(){if(this._mountedInDrawer)return;let e=document.getElementById("Docuserve-Playground-Drawer-Content");e&&(this.mountInto(e),this._mountedInDrawer=!0)}mountInto(e){if(!e)return;this._setupPlaygroundState();let t=this.pict.parseTemplateByHash("Docuserve-Fable-Playground-Template",{});e.innerHTML=t;let r=document.getElementById("Docuserve-Fable-Playground-AutoCapture-Toggle");r&&(r.checked=!!this.pict.AppData.Docuserve.Playground.AutoCaptureUserFables),this._wireHelpTooltip(),this._mountCodeEditor(),this._applySandboxMode()}_applySandboxMode(){let e=document.querySelector(".docuserve-playground");if(!e)return;let t=this.pict.AppData.Docuserve&&this.pict.AppData.Docuserve.Playground&&this.pict.AppData.Docuserve.Playground.Config,r=t&&"dom"===t.Sandbox;e.classList.toggle("docuserve-playground-mode-dom",r)}clearSandbox(){let e=document.getElementById("Docuserve-Fable-Playground-Sandbox");e&&(e.innerHTML="")}_wireHelpTooltip(){let e=document.getElementById("Docuserve-Fable-Playground-HelpBtn"),t=this.pict.views["Pict-Section-Modal"];if(!e||!t||"function"!=typeof t.richTooltip)return;this._helpTooltip&&"function"==typeof this._helpTooltip.destroy&&this._helpTooltip.destroy();this._helpTooltip=t.richTooltip(e,'<div style="font-size:12px;line-height:1.5;"><strong>JS Playground</strong> &mdash; write JavaScript that receives a fresh <code>fable</code> instance. Every <code>fable.log.*</code> call is captured and shown in the Log Output panel. Toggle <em>auto-attach</em> off to get a raw Fable whose log streams you wire yourself. Press the play button to run; click the copy icon to grab the code or the output.</div>',{position:"bottom",interactive:!0,maxWidth:"340px",delay:80})}copyCode(){this._copyToClipboard(this._getCurrentCode(),"code")}copyLog(){let e=(this.pict.AppData.Docuserve.Playground&&this.pict.AppData.Docuserve.Playground.LogLines||[]).map(function(e){if("banner"===e.Level)return e.Message;let t=e.Time+" "+e.Level.toUpperCase()+" "+e.Message;return Array.isArray(e.DatumSlot)&&e.DatumSlot.length>0&&(t+=" "+e.DatumSlot[0].Datum),t}).join("\n");this._copyToClipboard(e,"log")}_copyToClipboard(e,t){let r=e=>{let r=this.pict.views["Pict-Section-Modal"];r&&"function"==typeof r.toast&&r.toast(e?"log"===t?"Log copied":"Code copied":"Copy failed",{type:e?"success":"error",duration:1500})};if(navigator.clipboard&&"function"==typeof navigator.clipboard.writeText)navigator.clipboard.writeText(e).then(()=>r(!0)).catch(()=>r(!1));else try{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let n=document.execCommand("copy");document.body.removeChild(t),r(n)}catch(e){r(!1)}}setAutoCapture(e){this.pict.AppData.Docuserve.Playground.AutoCaptureUserFables=!!e;try{window.localStorage.setItem(c,e?"1":"0")}catch(e){}}loadCode(e){if("string"!=typeof e)return;let t=this.pict.AppData.Docuserve.Playground||{};t.Code=e,this.pict.AppData.Docuserve.Playground=t,this._saveCode(e);let r=this.pict.views[d];r&&r.codeJar&&"function"==typeof r.setCode&&r.setCode(e);let n=this.pict.views["Docuserve-Layout"];n&&"function"==typeof n.expandPlayground&&n.expandPlayground()}_setupPlaygroundState(){let e=this.pict.AppData.Docuserve.Playground||{};e.Title="Fable Playground",e.Description="Write JavaScript that receives a fresh `fable` instance. Every log call is captured and rendered in the panel on the right.";let t=e.Code,r=this._loadSavedCode();e.Code="string"==typeof t&&t.length>0?t:"string"==typeof r&&r.length>0?r:this._DefaultCode,e.LogLines=[],e.LogEmptySlot=[{}],e.LogMetaSlot=[];let n=null;try{n=window.localStorage.getItem(c)}catch(e){}e.AutoCaptureUserFables=null===n||"1"===n,this.pict.AppData.Docuserve.Playground=e}_mountCodeEditor(){this._loadCodeJar().then(e=>{let t=this.pict.views[d];t&&(t._codeJarPrototype||t.connectCodeJarPrototype(e),t.codeJar&&"function"==typeof t.destroy&&t.destroy(),t.render())}).catch(e=>{let t=document.getElementById(h);t&&(t.innerHTML='<div class="docuserve-playground-codejar-error">Editor failed to load: '+this._escapeHTML(e&&e.message?e.message:String(e))+"</div>")})}run(){this._cancelAsyncRender(),this._cancelFinishBanner(),this._applySandboxMode(),this.clearSandbox();let e=this._getCurrentCode();this.pict.AppData.Docuserve.Playground.Code=e;let t=[],r=Date.now();this._currentRunRecords=t,this._currentRunStart=r,t.push({level:"banner",message:this._formatStartBanner(r),datum:null,ms:0});let n,o=this.pict.AppData.Docuserve&&this.pict.AppData.Docuserve.Playground&&this.pict.AppData.Docuserve.Playground.Config,i=o&&"dom"===o.Sandbox,s=this.pict;try{let e=this.fable&&this.fable.constructor;if("function"!=typeof e)throw new Error("Fable constructor unavailable on this.fable");i?(s=new a({Product:"FablePlayground",LogStreams:[]}),s.log.addLogger(this._buildCaptureLogger(t,r),"trace"),n=s):(n=new e({Product:"FablePlayground",LogStreams:[]}),n.log.addLogger(this._buildCaptureLogger(t,r),"trace"),s=this.pict)}catch(e){t.push({level:"error",message:"Fable instantiation failed: "+this._errorMessage(e),datum:null,ms:0})}let l=null;if(n)try{let o=this._buildRequireShim(n,t,r),i=this._buildCapturingConsole(t,r),a=document.getElementById("Docuserve-Fable-Playground-Sandbox"),l=new Function("fable","pict","require","console","sandbox","return (async () => { "+e+"\n})();")(n,s,o,i,a);if(l&&"function"==typeof l.then){let e=this;l.then(()=>{},n=>{t===e._currentRunRecords&&(t.push({level:"error",message:e._errorMessage(n),datum:null,ms:Date.now()-r}),e._scheduleAsyncLogRender())})}}catch(e){l=e,t.push({level:"error",message:this._errorMessage(e),datum:null,ms:Date.now()-r})}this._setLogRecords(t,Date.now()-r,l),this._renderLogOnly(),this._scheduleFinishBanner(t,r,l)}_scheduleFinishBanner(e,t,r){this._cancelFinishBanner();let n=this,o=e.length,i=(Date.now(),o=>{if(n._finishBannerTimer=null,n._finishBannerMaxTimer&&(clearTimeout(n._finishBannerMaxTimer),n._finishBannerMaxTimer=null),e!==n._currentRunRecords)return;let i=Date.now()-t;e.push({level:"banner",message:n._formatFinishBanner(i,r,o),datum:null,ms:i}),n._setLogRecords(e,i,r),n._renderLogOnly()}),a=()=>{e===n._currentRunRecords?e.length===o?i(!1):(o=e.length,n._finishBannerTimer=setTimeout(a,200)):n._cancelFinishBanner()};this._finishBannerTimer=setTimeout(a,200),this._finishBannerMaxTimer=setTimeout(()=>i(!0),1e4)}_cancelFinishBanner(){this._finishBannerTimer&&(clearTimeout(this._finishBannerTimer),this._finishBannerTimer=null),this._finishBannerMaxTimer&&(clearTimeout(this._finishBannerMaxTimer),this._finishBannerMaxTimer=null)}_buildCapturingConsole(e,t){let r=this,n="undefined"!=typeof console?console:null,o=e=>{if(!n)return function(){};let t=n[e]||n.log;return function(){try{t.apply(n,arguments)}catch(e){}}},i=n=>{let i=o(n);return function(){if(i.apply(null,arguments),e!==r._currentRunRecords)return;let o=Array.prototype.slice.call(arguments),a=[],s=null;for(let e=0;e<o.length;e++){let t=o[e];"string"==typeof t?a.push(t):null===s&&t&&"object"==typeof t?s=t:a.push(r._formatDatum(t))}e.push({level:n,message:"[console] "+a.join(" "),datum:s,ms:Date.now()-t}),r._scheduleAsyncLogRender()}};return{log:i("info"),info:i("info"),warn:i("warn"),error:i("error"),debug:i("debug"),trace:i("trace"),group:o("group"),groupEnd:o("groupEnd"),groupCollapsed:o("groupCollapsed"),table:o("table"),dir:o("dir"),time:o("time"),timeEnd:o("timeEnd"),count:o("count"),countReset:o("countReset"),assert:o("assert"),clear:o("clear")}}_formatStartBanner(e){return"─── run started · "+this._formatWallClock(e)+" "+this._padDashes(40)}_formatFinishBanner(e,t,r){let n;return n=t?"run threw":r?"run still emitting · cut off at cap":"run finished","─── "+n+(" · elapsed "+e+"ms ")+this._padDashes(40)}_formatWallClock(e){let t=new Date(e),r=(e,t)=>{let r=String(e);for(;r.length<t;)r="0"+r;return r};return r(t.getHours(),2)+":"+r(t.getMinutes(),2)+":"+r(t.getSeconds(),2)+"."+r(t.getMilliseconds(),3)}_padDashes(e){let t="";for(let r=0;r<e;r++)t+="─";return t}clear(){this._cancelAsyncRender(),this._cancelFinishBanner(),this._currentRunRecords=null,this._currentRunStart=0,this._setLogRecords([],0,null),this._renderLogOnly()}reset(){let e=this.pict.views[d];e&&"function"==typeof e.setCode&&e.setCode(this._DefaultCode),this.pict.AppData.Docuserve.Playground.Code=this._DefaultCode,this._clearSavedCode(),this._setStatus("reset")}_loadCodeJar(){return this._codeJarPromise||(this._codeJarPromise=new Function("u","return import(u)")("https://cdn.jsdelivr.net/npm/codejar@4.2.0/dist/codejar.min.js").then(e=>{if(!e||"function"!=typeof e.CodeJar)throw new Error("CodeJar export not found in module");return e.CodeJar})),this._codeJarPromise}_registerCodeEditor(){let e={ViewIdentifier:d,DefaultDestinationAddress:"#"+h,Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- pict-section-code mount --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#"+h}],TargetElementAddress:"#"+h,Language:"javascript",LineNumbers:!0,Tab:"\t",AddClosing:!0,CatchTab:!0,CodeDataAddress:"AppData.Docuserve.Playground.Code",DefaultCode:this._DefaultCode,AutoRender:!1,RenderOnLoad:!1};this.pict.addView(d,e,p)}_buildRequireShim(e,t,r){this.pict;let n=e.constructor,o=this,l=!!this.pict.AppData.Docuserve.Playground.AutoCaptureUserFables;function c(e){let i=Object.assign({},e||{},{LogStreams:[]}),a=new n(i);return a.log.addLogger(o._buildCaptureLogger(t,r),"trace"),a}let d=e.Logging&&e.Logging.constructor;function h(e,n){let i=new d(e,n);return i.addLogger(o._buildCaptureLogger(t,r),"trace"),i}if(d){let e=Object.getOwnPropertyNames(d);for(let t=0;t<e.length;t++){let r=e[t];if("length"!==r&&"name"!==r&&"prototype"!==r)try{h[r]=d[r]}catch(e){}}h.new=function(e){return h(e)}}let p={fable:()=>l?c:n,pict:()=>a,"pict-section-histogram":()=>s,"fable-uuid":()=>e.UUID&&e.UUID.constructor,"fable-settings":()=>e.SettingsManager&&e.SettingsManager.constructor,"fable-log":()=>d?h:null,"fable-serviceproviderbase":()=>i},u=this.pict.AppData.Docuserve.Playground.Config,f=null;if(u&&Array.isArray(u.Imports)&&u.Imports.length>0){f={};for(let e=0;e<u.Imports.length;e++){let t=u.Imports[e];t&&"string"==typeof t.Name&&(f[t.Name]=t.Source||"bundled")}}return function(e){let t,r=p[e],n=null===f||Object.prototype.hasOwnProperty.call(f,e);if(r&&n)return r();throw t=null!==f?Object.keys(f):Object.keys(p),new Error("require('"+e+"') is not available in this playground. Allowed here: "+t.map(e=>"'"+e+"'").join(", ")+".")}}_buildCaptureLogger(e,t){let r="playground-"+Date.now()+"-"+Math.floor(1e9*Math.random()),n=this,o=(r,o,i)=>{e.push({level:r,message:null==o?"":String(o),datum:null==i?null:i,ms:Date.now()-t}),e===n._currentRunRecords&&n._scheduleAsyncLogRender()};return{loggerUUID:r,initialize:()=>{},trace:(e,t)=>o("trace",e,t),debug:(e,t)=>o("debug",e,t),info:(e,t)=>o("info",e,t),warn:(e,t)=>o("warn",e,t),error:(e,t)=>o("error",e,t),fatal:(e,t)=>o("fatal",e,t)}}_scheduleAsyncLogRender(){this._asyncRenderTimer||(this._asyncRenderTimer=setTimeout(()=>{if(this._asyncRenderTimer=null,!this._currentRunRecords)return;let e=Date.now()-this._currentRunStart;this._setLogRecords(this._currentRunRecords,e,null),this._renderLogOnly()},60))}_cancelAsyncRender(){this._asyncRenderTimer&&(clearTimeout(this._asyncRenderTimer),this._asyncRenderTimer=null)}_setLogRecords(e,t,r){let n=this.pict.AppData.Docuserve.Playground;if(n.LogLines=e.map(e=>({Time:this._formatTime(e.ms),Level:e.level,Message:this._escapeHTML(e.message),DatumSlot:null==e.datum?[]:[{Datum:this._escapeHTML(this._formatDatum(e.datum))}]})),n.LogEmptySlot=0===e.length?[{}]:[],e.length>0){let o=e.length+" record"+(1===e.length?"":"s")+" · "+t+"ms";r&&(o+=" · run threw"),n.LogMetaSlot=[{Meta:o}]}else n.LogMetaSlot=[]}_renderLogOnly(){let e=this.pict.parseTemplateByHash("Docuserve-Fable-Playground-Log-Body-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Fable-Playground-Log",e)}_loadSavedCode(){try{return window.localStorage.getItem(l)}catch(e){return null}}_saveCode(e){try{window.localStorage.setItem(l,e)}catch(e){}}_clearSavedCode(){try{window.localStorage.removeItem(l)}catch(e){}}_getCurrentCode(){let e=this.pict.views[d];if(e&&"function"==typeof e.getCode){let t=e.getCode();if("string"==typeof t)return t}return this.pict.AppData.Docuserve.Playground.Code||""}_setStatus(e){let t=document.getElementById("Docuserve-Fable-Playground-Status");t&&(t.textContent=e,this._statusClearTimer&&clearTimeout(this._statusClearTimer),this._statusClearTimer=setTimeout(()=>{t.textContent===e&&(t.textContent="")},1200))}_formatTime(e){let t=Math.max(0,Math.floor(e||0)),r=String(t);for(;r.length<4;)r=" "+r;return r+"ms"}_formatDatum(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"(unserializable: "+this._errorMessage(e)+")"}}_errorMessage(e){return e?e.message?e.message:String(e):""}_escapeHTML(e){return null==e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}},t.exports.default_configuration=u},{"fable-serviceproviderbase":59,pict:226,"pict-section-code":146,"pict-section-histogram":152,"pict-view":216}],338:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._shell=null,this._shellPanelsBuilt=!1}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),this._shellPanelsBuilt||(this._buildShell(),this._shellPanelsBuilt=!0),this.pict.PictApplication.resolveHash(),this._wireHashChangeListener(),super.onAfterRender(e,t,r,n)}_buildShell(){let e=this.pict.views["Pict-Section-Modal"];if(!e||"function"!=typeof e.shell)return void(this.log&&this.log.warn&&this.log.warn("Docuserve-Layout: pict-section-modal.shell not available"));let t=document.getElementById("Docuserve-Layout-Mount");if(!t)return void(this.log&&this.log.warn&&this.log.warn("Docuserve-Layout: #Docuserve-Layout-Mount missing"));this._shell=e.shell(t,{PersistenceKey:"docuserve-shell"}),this._shell.addPanel({Hash:"topbar",Side:"top",Mode:"fixed",Size:56,ContentDestinationId:"Theme-TopBar",ContentView:"Theme-TopBar"}),this._shell.addPanel({Hash:"sidebar",Side:"left",Mode:"resizable",Size:280,MinSize:200,MaxSize:500,Title:"Documentation",ContentDestinationId:"Docuserve-Sidebar-Container",ContentView:"Docuserve-Sidebar",ResponsiveDrawer:900}),this._shell.addPanel({Hash:"playground-drawer",Side:"bottom",Scope:"center",Mode:"resizable",Size:420,MinSize:320,MaxSize:800,Collapsed:!0,Title:"JS Playground",ContentDestinationId:"Docuserve-Playground-Drawer-Content",OnExpand:()=>{this._onPlaygroundDrawerExpand()}}),this._shell.center({ContentDestinationId:"Docuserve-Content-Container"});let r=this._shell.getPanel("playground-drawer");r&&!r.Collapsed&&this._onPlaygroundDrawerExpand()}_onPlaygroundDrawerExpand(){if(this._playgroundMounted)return;let e=this.pict.views["Docuserve-Fable-Playground"];e&&"function"==typeof e.mountIntoDrawer&&(e.mountIntoDrawer(),this._playgroundMounted=!0)}_wireHashChangeListener(){if(this._hashListenerBound)return;this._hashListenerBound=!0;let e=this;window.addEventListener("hashchange",()=>{e.pict.PictApplication.resolveHash()})}getSidebarPanel(){return this._shell?this._shell.getPanel("sidebar"):null}toggleSidebar(){let e=this.getSidebarPanel();e&&e.toggle()}getPlaygroundPanel(){return this._shell?this._shell.getPanel("playground-drawer"):null}setPlaygroundEnabled(e){let t=document.getElementById("Docuserve-Layout-Mount");if(t)if(e)t.classList.remove("docuserve-playground-disabled");else{t.classList.add("docuserve-playground-disabled");let e=this.getPlaygroundPanel();e&&"function"==typeof e.collapse&&e.collapse()}}expandPlayground(){let e=this.getPlaygroundPanel();e&&"function"==typeof e.expand&&e.expand()}setPlaygroundTitle(e){let t=this.getPlaygroundPanel();if(!t||!t.El)return;let r="string"==typeof e&&e.length>0?e:"JS Playground";if(t.Title=r,t._collapseTab){t._collapseTab.setAttribute("aria-label","Toggle "+r),t._collapseTab.title=r;let e=t._collapseTab.querySelector(".pict-modal-shell-panel-collapse-tab-title");e&&(e.textContent=r)}}collapsePlayground(){let e=this.getPlaygroundPanel();e&&"function"==typeof e.collapse&&e.collapse()}togglePlayground(){let e=this.getPlaygroundPanel();e&&"function"==typeof e.toggle&&e.toggle()}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Layout",DefaultRenderable:"Docuserve-Layout-Shell",DefaultDestinationAddress:"#Docuserve-Application-Container",AutoRender:!1,CSS:"\n\t\t/* Global resets — these used to live in css/docuserve.css. Now\n\t\t that docuserve ships its theming entirely through view CSSMap\n\t\t (no external <link> required), the resets travel with the JS\n\t\t bundle so consumers can't forget to load them. */\n\t\t*, *::before, *::after { box-sizing: border-box; }\n\t\thtml, body\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tfont-family: var(--theme-typography-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);\n\t\t\tfont-size: 16px;\n\t\t\tline-height: 1.5;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t}\n\t\tbody\n\t\t{\n\t\t\tbackground: var(--theme-color-background-primary, #FDFBF7);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\ttransition: background-color 0.15s ease, color 0.15s ease;\n\t\t}\n\t\t::-webkit-scrollbar { width: 8px; height: 8px; }\n\t\t::-webkit-scrollbar-track { background: var(--theme-color-scrollbar-track, #F5F0E8); }\n\t\t::-webkit-scrollbar-thumb { background: var(--theme-color-scrollbar-thumb, #D4CCBE); border-radius: 4px; }\n\t\t::-webkit-scrollbar-thumb:hover { background: var(--theme-color-scrollbar-hover, #B5AA9A); }\n\t\t/* height: 100% (not 100vh) — Theme-Scale applies CSS zoom on\n\t\t <html>; vh units render against the un-zoomed viewport and\n\t\t push panels off-screen at non-1.0 scale. */\n\t\t#Docuserve-Application-Container\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.pict-modal-shell-host { height: 100%; }\n\t\t.pict-modal-shell { background: var(--theme-color-background-primary, #FDFBF7); }\n\t\t.pict-modal-shell-panel { background: var(--theme-color-background-panel, #FFFFFF); }\n\t\t.pict-modal-shell-center { background: var(--theme-color-background-primary, #FDFBF7); }\n\n\t\t/* Center workspace — content / splash / search views write into\n\t\t #Docuserve-Content-Container which the shell provisions as the\n\t\t center destination. */\n\t\t#Docuserve-Content-Container\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\toverflow-y: auto;\n\t\t}\n\n\t\t/* The Sidebar view writes into the panel's destination\n\t\t (#Docuserve-Sidebar-Container). Its own CSS lives in\n\t\t PictView-Docuserve-Sidebar — here we just guarantee the panel\n\t\t wrap is scrollable and themed. */\n\t\t#Docuserve-Sidebar-Container\n\t\t{\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF7F1);\n\t\t}\n\n\t\t/* Playground panel suppression — the bottom drawer (and its\n\t\t collapsed tab strip) only takes layout space on pages that\n\t\t have opted into the playground via a \"Code Playground\"\n\t\t entry in their module's _sidebar.md. Everywhere else we\n\t\t hide the panel entirely so the doc content gets the full\n\t\t vertical area. The class is toggled by\n\t\t setPlaygroundEnabled() on each navigation. */\n\t\t.docuserve-playground-disabled .pict-modal-shell-center > .pict-modal-shell-panel-bottom\n\t\t{\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t/* Kill the height transition on the playground drawer.\n\t\t pict-section-modal ships a 0.14s height transition on every\n\t\t shell panel for smooth resize handoffs, but when the play\n\t\t button mounts the CodeJar editor mid-expand the synchronous\n\t\t innerHTML rewrite races the transition and the panel gets\n\t\t stuck at its pre-transition size. Snapping the resize\n\t\t avoids the race and the user never sees the in-between\n\t\t frames anyway. */\n\t\t.pict-modal-shell-center > .pict-modal-shell-panel-bottom\n\t\t{\n\t\t\ttransition: none !important;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Layout-Shell-Template",Template:'<div id="Docuserve-Layout-Mount" style="height:100%"></div>'}],Renderables:[{RenderableHash:"Docuserve-Layout-Shell",TemplateHash:"Docuserve-Layout-Shell-Template",DestinationAddress:"#Docuserve-Application-Container",RenderMethod:"replace"}]}},{"pict-view":216}],339:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._SearchDebounceTimer=null}showSearch(e){this._setIdleStatus(e),this.pict.AppData.Docuserve.SearchResults=[],this.render();let t=document.getElementById("Docuserve-Search-Input");t&&(t.value=e||"",t.focus()),e&&e.trim()&&this.performSearch(e);let r=document.getElementById("Docuserve-Content-Container");r&&(r.scrollTop=0)}onSearchInput(e){this._SearchDebounceTimer&&clearTimeout(this._SearchDebounceTimer),this._SearchDebounceTimer=setTimeout(()=>{this.performSearch(e)},250)}performSearch(e){let t=this.pict.AppData.Docuserve;if(!e||!e.trim())return this._setIdleStatus(e),t.SearchResults=[],this._renderResultsRegion(),void this._renderStatusRegion();let r=this.pict.providers["Docuserve-Documentation"].search(e);if(0===r.length)return t.SearchResults=[],t.SearchStatus="No results found for '"+this._escapeHTML(e)+"'.",this._renderResultsRegion(),void this._renderStatusRegion();let n=[];for(let e=0;e<r.length;e++){let t=r[e];n.push({Title:t.Title,Route:t.Route,Group:t.Group||"",Module:t.Module||"",BreadcrumbSlot:t.Group&&t.Module?[{Group:t.Group,Module:t.Module}]:[],PathSlot:t.DocPath?[{DocPath:t.DocPath}]:[],DocPath:t.DocPath||""})}t.SearchResults=n,t.SearchStatus=r.length+" result"+(1!==r.length?"s":"")+" for '"+this._escapeHTML(e)+"'",this._renderResultsRegion(),this._renderStatusRegion()}_setIdleStatus(e){let t=this.pict.AppData.Docuserve.KeywordDocumentCount||0;this.pict.AppData.Docuserve.SearchStatus=t>0?"Search across "+t+" documents.":"Enter a search term to find documentation."}_renderResultsRegion(){let e=this.pict.parseTemplateByHash("Docuserve-Search-ResultsBody-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results",e)}_renderStatusRegion(){this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",this.pict.AppData.Docuserve.SearchStatus||"")}_escapeHTML(e){return e?String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Search",DefaultRenderable:"Docuserve-Search-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-search {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin: 0 0 0.75em 0;\n\t\t}\n\t\t.docuserve-search-input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-size: 1.1em;\n\t\t\tborder: 2px solid var(--theme-color-border-default, #D4CCBE);\n\t\t\tborder-radius: 6px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\ttransition: border-color 0.15s;\n\t\t}\n\t\t.docuserve-search-input:focus {\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-search-status {\n\t\t\tmargin-top: 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-search-results {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-search-result {\n\t\t\tdisplay: block;\n\t\t\tpadding: 1em 1.25em;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #EAE3D8);\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit;\n\t\t\ttransition: border-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.docuserve-search-result:hover {\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbox-shadow: 0 2px 8px rgba(46, 125, 116, 0.1);\n\t\t}\n\t\t.docuserve-search-result-title {\n\t\t\tfont-size: 1.05em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tmargin-bottom: 0.25em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tmargin-bottom: 0.2em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb-sep {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t\tfont-size: 0.85em;\n\t\t\tmargin: 0 0.15em;\n\t\t\topacity: 0.7;\n\t\t}\n\t\t.docuserve-search-result-path {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--theme-color-text-muted, #A39889);\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.docuserve-search-empty {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Search-Template",Template:'<div class="docuserve-search">\n\t<div class="docuserve-search-header">\n\t\t<h1>Search Documentation</h1>\n\t\t<input type="text" class="docuserve-search-input" id="Docuserve-Search-Input" placeholder="Search across all modules..." oninput="{~P~}.views[\'Docuserve-Search\'].onSearchInput(this.value)">\n\t\t<div id="Docuserve-Search-Status" class="docuserve-search-status">{~D:AppData.Docuserve.SearchStatus~}</div>\n\t</div>\n\t<div id="Docuserve-Search-Results" class="docuserve-search-results">\n\t\t{~TS:Docuserve-Search-Result-Template:AppData.Docuserve.SearchResults~}\n\t</div>\n</div>'},{Hash:"Docuserve-Search-ResultsBody-Template",Template:"{~TS:Docuserve-Search-Result-Template:AppData.Docuserve.SearchResults~}"},{Hash:"Docuserve-Search-Result-Template",Template:'<a class="docuserve-search-result" href="{~D:Record.Route~}">\n\t<div class="docuserve-search-result-title">{~D:Record.Title~}</div>\n\t{~TS:Docuserve-Search-Result-Breadcrumb-Template:Record.BreadcrumbSlot~}\n\t{~TS:Docuserve-Search-Result-Path-Template:Record.PathSlot~}\n</a>'},{Hash:"Docuserve-Search-Result-Breadcrumb-Template",Template:'<div class="docuserve-search-result-breadcrumb">{~D:Record.Group~} <span class="docuserve-search-result-breadcrumb-sep">{~I:ChevronRight~}</span> {~D:Record.Module~}</div>'},{Hash:"Docuserve-Search-Result-Path-Template",Template:'<div class="docuserve-search-result-path">{~D:Record.DocPath~}</div>'}],Renderables:[{RenderableHash:"Docuserve-Search-Display",TemplateHash:"Docuserve-Search-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":216}],340:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._SidebarSearchDebounceTimer=null}onBeforeRender(e){return this._refreshSearchSlot(),this._refreshFooterSlot(),this._refreshSidebarGroupRecords(),this._refreshModuleNavSections(),super.onBeforeRender(e)}renderSidebarGroups(){this.render()}renderModuleNav(){this.render()}clearModuleNav(){this.render()}onSidebarSearchInput(e){this._SidebarSearchDebounceTimer&&clearTimeout(this._SidebarSearchDebounceTimer),this._SidebarSearchDebounceTimer=setTimeout(()=>{this.performSidebarSearch(e)},250)}performSidebarSearch(e){this._refreshSearchResults(e);let t=this.pict.parseTemplateByHash("Docuserve-Sidebar-Search-ResultsBody-Template",{});this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Search-Results",t)}toggleSidebar(){let e=this.pict.views["Docuserve-Layout"];if(e&&"function"==typeof e.toggleSidebar)return void e.toggleSidebar();this.pict.AppData.Docuserve.SidebarVisible=!this.pict.AppData.Docuserve.SidebarVisible;let t=document.getElementById("Docuserve-Sidebar-Container");t&&(t.style.display=this.pict.AppData.Docuserve.SidebarVisible?"":"none")}_refreshSearchSlot(){this.pict.AppData.Docuserve.SidebarSearchSlot=this.pict.AppData.Docuserve.KeywordIndexLoaded?[{}]:[]}_refreshFooterSlot(){let e=this.pict.AppData.Docuserve;if(!e.VersionLoaded||!e.Version||!e.Version.Version)return void(e.FooterSlot=[]);let t=e.Version,r={Version:t.Version,NameSlot:t.Name?[{Name:t.Name}]:[],MetaSlot:[]},n=[];if(t.GeneratedAt){let e=String(t.GeneratedAt).match(/^(\d{4}-\d{2}-\d{2})/);e&&n.push("built "+e[1])}t.GitCommit&&n.push(t.GitCommit),n.length>0&&(r.MetaSlot=[{Meta:n.join(" · ")}]),e.FooterSlot=[r]}_refreshSidebarGroupRecords(){let e=this.pict.AppData.Docuserve.SidebarGroups||[],t=this.pict.AppData.Docuserve.CurrentGroup,r=this.pict.AppData.Docuserve.CurrentModule,n="undefined"!=typeof window&&window.location&&window.location.hash||"",o=[];for(let i=0;i<e.length;i++){let a=e[i],s=a.Route||"";if(!s)for(let e=0;e<a.Modules.length;e++)if(a.Modules[e].HasDocs&&a.Modules[e].Route){s=a.Modules[e].Route;break}let l=t===a.Key||n===s,c=[],d=[];s?c.push({Name:a.Name,Route:s,ActiveClass:l?" active":""}):d.push({Name:a.Name});let h=[];for(let e=0;e<a.Modules.length;e++){let n=a.Modules[e];if(n.HasDocs){let e=t===n.Group&&r===n.Name;h.push({LinkSlot:[{Name:n.Name,Route:n.Route,ActiveClass:e?"active":""}],NoDocSlot:[]})}else h.push({LinkSlot:[],NoDocSlot:[{Name:n.Name}]})}o.push({TitleLink:c,TitlePlain:d,Modules:h})}this.pict.AppData.Docuserve.SidebarGroupRecords=o}_refreshModuleNavSections(){let e=this.pict.AppData.Docuserve.CurrentGroup,t=this.pict.AppData.Docuserve.CurrentModule;if(!e||!t)return void(this.pict.AppData.Docuserve.ModuleNavSections=[]);let r=this.pict.providers["Docuserve-Documentation"],n=this.pict.providers["Docuserve-Demos"],o=r?r.getModuleSidebar(e,t):null,i=n?n.listByModule(e,t):[];if((!o||o.length<1)&&i.length<1)return void(this.pict.AppData.Docuserve.ModuleNavSections=[]);let a="#/doc/"+e+"/"+t+"/",s="#/demo/"+e+"/"+t+"/",l=this.pict.AppData.Docuserve.CurrentDemo||"",c=[];if(o&&o.length>0){let e=null;for(let t=0;t<o.length;t++){let r=o[t];if(r.Children){e={TitleSlot:[{Title:r.Title}],Items:[]},c.push(e);for(let t=0;t<r.Children.length;t++){let n=r.Children[t];n.Path&&e.Items.push({Title:n.Title,Route:a+n.Path,ActiveClass:""})}}else r.Path&&((!e||e.TitleSlot.length>0)&&(e={TitleSlot:[],Items:[]},c.push(e)),e.Items.push({Title:r.Title,Route:a+r.Path,ActiveClass:""}))}}if(i.length>0){let e={TitleSlot:[{Title:"Demos"}],Items:[]};for(let t=0;t<i.length;t++){let r=i[t];e.Items.push({Title:r.Name||r.Hash,Route:s+r.Hash,ActiveClass:r.Hash===l?"active":""})}c.push(e)}this.pict.AppData.Docuserve.ModuleNavSections=c}_refreshSearchResults(e){let t=this.pict.AppData.Docuserve;if(!e||!e.trim())return t.SidebarSearchResults=[],t.SidebarSearchOverflow=[],void(t.SidebarSearchEmpty=[]);let r=this.pict.providers["Docuserve-Documentation"].search(e);if(0===r.length)return t.SidebarSearchResults=[],t.SidebarSearchOverflow=[],void(t.SidebarSearchEmpty=[{}]);let n=[];for(let e=0;e<r.length&&e<8;e++){let t=r[e],o=t.Group&&t.Module?t.Group+" / "+t.Module:"";n.push({Title:t.Title,Route:t.Route,MetaSlot:o?[{Meta:o}]:[]})}t.SidebarSearchResults=n,t.SidebarSearchEmpty=[],r.length>8?t.SidebarSearchOverflow=[{EncodedQuery:encodeURIComponent(e),TotalCount:r.length}]:t.SidebarSearchOverflow=[]}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Sidebar",DefaultRenderable:"Docuserve-Sidebar-Content",DefaultDestinationAddress:"#Docuserve-Sidebar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-sidebar {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF7F1);\n\t\t\tborder-right: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 1em 0;\n\t\t\tpadding-top: 0;\n\t\t\tmin-height: 100%;\n\t\t\tposition: relative;\n\t\t\ttransition: background-color 0.15s ease;\n\t\t}\n\t\t.docuserve-sidebar-header {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t.docuserve-sidebar-close {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 1.1em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.2em 0.4em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-sidebar-close:hover {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.docuserve-sidebar-search input:focus {\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search-results {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-results a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tcolor: var(--theme-color-text-primary, #423D37);\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\tborder-radius: 3px;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover {\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-sidebar-search-all {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tmargin-top: 0.25em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-all:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-sidebar-search-empty {\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t}\n\t\t.docuserve-sidebar-home {\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t}\n\t\t.docuserve-sidebar-home a {\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-home a:hover {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-group {\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.docuserve-sidebar-group-title {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t}\n\t\t.docuserve-sidebar-group-title:hover {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t}\n\t\ta.docuserve-sidebar-group-title.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tbackground-color: var(--theme-color-background-tertiary, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-modules {\n\t\t\tlist-style: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules li {\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-modules a:hover {\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: var(--theme-color-background-tertiary, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-modules .no-docs {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t\tmargin-top: 0.5em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav:empty {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-sidebar-module-nav-section {\n\t\t\tpadding: 0.4em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.25em 1.25em 0.25em 2.25em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a:hover {\n\t\t\tbackground-color: var(--theme-color-background-hover, #EAE3D8);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-sidebar-module-nav a.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: var(--theme-color-background-tertiary, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-footer {\n\t\t\tmargin-top: auto;\n\t\t\tpadding: 0.9em 1.25em 1em 1.25em;\n\t\t\tborder-top: 1px solid var(--theme-color-border-light, #E5DED1);\n\t\t}\n\t\t.docuserve-sidebar-footer:empty {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-version-placard {\n\t\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n\t\t\tline-height: 1.35;\n\t\t}\n\t\t.docuserve-version-name {\n\t\t\tfont-size: 0.78em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-version-number {\n\t\t\tfont-size: 0.82em;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-version-meta {\n\t\t\tfont-size: 0.7em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tmargin-top: 0.15em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Sidebar-Template",Template:'\n<div class="docuserve-sidebar">\n\t<div class="docuserve-sidebar-header">\n\t\t<button class="docuserve-sidebar-close" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()" aria-label="Close sidebar">{~I:Close~}</button>\n\t</div>\n\t{~TS:Docuserve-Sidebar-Search-Slot-Template:AppData.Docuserve.SidebarSearchSlot~}\n\t<div class="docuserve-sidebar-home">\n\t\t<a onclick="{~P~}.PictApplication.navigateTo(\'/Home\')">Home</a>\n\t</div>\n\t<div id="Docuserve-Sidebar-Groups">\n\t\t{~TS:Docuserve-Sidebar-Group-Template:AppData.Docuserve.SidebarGroupRecords~}\n\t</div>\n\t<div id="Docuserve-Sidebar-ModuleNav" class="docuserve-sidebar-module-nav">\n\t\t{~TS:Docuserve-Sidebar-ModuleNav-Section-Template:AppData.Docuserve.ModuleNavSections~}\n\t</div>\n\t<div class="docuserve-sidebar-footer">\n\t\t{~TS:Docuserve-Sidebar-Footer-Template:AppData.Docuserve.FooterSlot~}\n\t</div>\n</div>\n'},{Hash:"Docuserve-Sidebar-Search-Slot-Template",Template:'<div id="Docuserve-Sidebar-Search" class="docuserve-sidebar-search">\n\t<input type="text" placeholder="Search docs..." id="Docuserve-Sidebar-Search-Input" oninput="{~P~}.views[\'Docuserve-Sidebar\'].onSidebarSearchInput(this.value)">\n\t<div id="Docuserve-Sidebar-Search-Results" class="docuserve-sidebar-search-results"></div>\n</div>'},{Hash:"Docuserve-Sidebar-Group-Template",Template:'<div class="docuserve-sidebar-group">\n\t{~TS:Docuserve-Sidebar-Group-Title-Link-Template:Record.TitleLink~}{~TS:Docuserve-Sidebar-Group-Title-Plain-Template:Record.TitlePlain~}\n\t<ul class="docuserve-sidebar-modules">\n\t\t{~TS:Docuserve-Sidebar-Module-Doc-Template:Record.Modules~}\n\t</ul>\n</div>'},{Hash:"Docuserve-Sidebar-Group-Title-Link-Template",Template:'<a class="docuserve-sidebar-group-title{~D:Record.ActiveClass~}" href="{~D:Record.Route~}">{~D:Record.Name~}</a>'},{Hash:"Docuserve-Sidebar-Group-Title-Plain-Template",Template:'<div class="docuserve-sidebar-group-title">{~D:Record.Name~}</div>'},{Hash:"Docuserve-Sidebar-Module-Doc-Template",Template:"<li>{~TS:Docuserve-Sidebar-Module-Link-Template:Record.LinkSlot~}{~TS:Docuserve-Sidebar-Module-NoDoc-Template:Record.NoDocSlot~}</li>"},{Hash:"Docuserve-Sidebar-Module-Link-Template",Template:'<a class="{~D:Record.ActiveClass~}" href="{~D:Record.Route~}">{~D:Record.Name~}</a>'},{Hash:"Docuserve-Sidebar-Module-NoDoc-Template",Template:'<span class="no-docs">{~D:Record.Name~}</span>'},{Hash:"Docuserve-Sidebar-ModuleNav-Section-Template",Template:"{~TS:Docuserve-Sidebar-ModuleNav-SectionTitle-Template:Record.TitleSlot~}{~TS:Docuserve-Sidebar-ModuleNav-Item-Template:Record.Items~}"},{Hash:"Docuserve-Sidebar-ModuleNav-SectionTitle-Template",Template:'<div class="docuserve-sidebar-module-nav-section">{~D:Record.Title~}</div>'},{Hash:"Docuserve-Sidebar-ModuleNav-Item-Template",Template:'<a class="{~D:Record.ActiveClass~}" href="{~D:Record.Route~}">{~D:Record.Title~}</a>'},{Hash:"Docuserve-Sidebar-Footer-Template",Template:'<div class="docuserve-version-placard">\n\t{~TS:Docuserve-Sidebar-Footer-Name-Template:Record.NameSlot~}\n\t<div class="docuserve-version-number">v{~D:Record.Version~}</div>\n\t{~TS:Docuserve-Sidebar-Footer-Meta-Template:Record.MetaSlot~}\n</div>'},{Hash:"Docuserve-Sidebar-Footer-Name-Template",Template:'<div class="docuserve-version-name">{~D:Record.Name~}</div>'},{Hash:"Docuserve-Sidebar-Footer-Meta-Template",Template:'<div class="docuserve-version-meta">{~D:Record.Meta~}</div>'},{Hash:"Docuserve-Sidebar-Search-ResultsBody-Template",Template:"{~TS:Docuserve-Sidebar-Search-Result-Template:AppData.Docuserve.SidebarSearchResults~}{~TS:Docuserve-Sidebar-Search-Overflow-Template:AppData.Docuserve.SidebarSearchOverflow~}{~TS:Docuserve-Sidebar-Search-Empty-Template:AppData.Docuserve.SidebarSearchEmpty~}"},{Hash:"Docuserve-Sidebar-Search-Result-Template",Template:'<a href="{~D:Record.Route~}">\n\t<div class="docuserve-sidebar-search-result-title">{~D:Record.Title~}</div>\n\t{~TS:Docuserve-Sidebar-Search-Result-Meta-Template:Record.MetaSlot~}\n</a>'},{Hash:"Docuserve-Sidebar-Search-Result-Meta-Template",Template:'<div class="docuserve-sidebar-search-result-meta">{~D:Record.Meta~}</div>'},{Hash:"Docuserve-Sidebar-Search-Overflow-Template",Template:'<a class="docuserve-sidebar-search-all" href="#/search/{~D:Record.EncodedQuery~}">See all {~D:Record.TotalCount~} results</a>'},{Hash:"Docuserve-Sidebar-Search-Empty-Template",Template:'<div class="docuserve-sidebar-search-empty">No results found.</div>'}],Renderables:[{RenderableHash:"Docuserve-Sidebar-Content",TemplateHash:"Docuserve-Sidebar-Template",DestinationAddress:"#Docuserve-Sidebar-Container",RenderMethod:"replace"}]}},{"pict-view":216}],341:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}onAfterRender(e,t,r,n){let o=this.pict.AppData.Docuserve;return o.CoverLoaded&&o.Cover?this.renderFromCover(o.Cover):this.renderFromCatalog(o),super.onAfterRender(e,t,r,n)}renderFromCover(e){this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.sanitizeTitle(e.Title)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(e.Tagline)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description",this.escapeHTML(e.Description));let t="";for(let r=0;r<e.Highlights.length;r++){let n=e.Highlights[r];t+='<div class="docuserve-splash-highlight-card">',n.Label&&(t+="<h3>"+this.escapeHTML(n.Label)+"</h3>"),t+="<p>"+this.escapeHTML(n.Text)+"</p>",t+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",t);let r="",n=this.pict.providers["Docuserve-Documentation"];for(let t=0;t<e.Actions.length;t++){let o=e.Actions[t],i=0===t?"primary":"secondary",a=o.Href;if(a.match(/^https?:\/\//))r+='<a class="'+i+'" href="'+this.escapeHTML(a)+'" target="_blank" rel="noopener">'+this.escapeHTML(o.Text)+"</a>";else{let e=n.convertSidebarLink(a);r+='<a class="'+i+'" href="'+this.escapeHTML(e)+'">'+this.escapeHTML(o.Text)+"</a>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions",r)}renderFromCatalog(e){let t="Documentation",r="";e.CatalogLoaded&&e.Catalog&&e.Catalog.Name?t=e.Catalog.Name:e.TopBarLoaded&&e.TopBar&&e.TopBar.Brand?t=e.TopBar.Brand:"undefined"!=typeof document&&document.title&&(t=document.title),e.CatalogLoaded&&e.Catalog&&e.Catalog.Description&&(r=e.Catalog.Description),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.escapeHTML(t)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(r)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description","");let n="",o=e.SidebarGroups||[];for(let e=0;e<o.length;e++){let t=o[e];if(!t.Modules||t.Modules.length<1)continue;let r=t.Description||t.Modules.length+" modules";n+='<div class="docuserve-splash-highlight-card">',n+="<h3>"+this.escapeHTML(t.Name)+"</h3>",n+="<p>"+this.escapeHTML(r)+"</p>",n+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",n),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions","")}sanitizeTitle(e){return e?this.escapeHTML(e).replace(/&lt;small&gt;/gi,"<small>").replace(/&lt;\/small&gt;/gi,"</small>"):""}escapeHTML(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Splash",DefaultRenderable:"Docuserve-Splash-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: var(--theme-color-background-primary, #FDFBF7);\n\t\t}\n\t\t.docuserve-splash h1 {\n\t\t\tfont-size: 3em;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tmargin: 0 0 0.25em 0;\n\t\t}\n\t\t.docuserve-splash h1 small {\n\t\t\tfont-size: 0.4em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tvertical-align: middle;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.docuserve-splash-tagline {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-bottom: 1.5em;\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-splash-description {\n\t\t\tfont-size: 1em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmax-width: 600px;\n\t\t\tline-height: 1.7;\n\t\t\tmargin-bottom: 2em;\n\t\t}\n\t\t.docuserve-splash-highlights {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\t\tgap: 1.25em;\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t.docuserve-splash-highlight-card {\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 1.25em;\n\t\t\ttext-align: left;\n\t\t\ttransition: box-shadow 0.2s, border-color 0.2s;\n\t\t}\n\t\t.docuserve-splash-highlight-card:hover {\n\t\t\tbox-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-splash-highlight-card h3 {\n\t\t\tmargin: 0 0 0.5em 0;\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-splash-highlight-card p {\n\t\t\tmargin: 0;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tfont-size: 0.85em;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.docuserve-splash-actions {\n\t\t\tdisplay: flex;\n\t\t\tgap: 1em;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.docuserve-splash-actions a {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.7em 1.5em;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-splash-actions .primary {\n\t\t\tbackground-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\t/* text-on-brand falls to a fixed light hex — never to background-panel,\n\t\t\t which inverts contrast in dark themes (dark text on brand bg). */\n\t\t\tcolor: var(--theme-color-text-on-brand, #fff);\n\t\t}\n\t\t.docuserve-splash-actions .primary:hover {\n\t\t\tbackground-color: var(--theme-color-brand-primary-hover, #236660);\n\t\t}\n\t\t.docuserve-splash-actions .secondary {\n\t\t\tbackground-color: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tcolor: var(--theme-color-text-primary, #3D3229);\n\t\t\tborder: 2px solid var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-splash-actions .secondary:hover {\n\t\t\tborder-color: var(--theme-color-brand-primary-hover, #236660);\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Splash-Template",Template:'\n<div class="docuserve-splash">\n\t<h1 id="Docuserve-Splash-Title"></h1>\n\t<div class="docuserve-splash-tagline" id="Docuserve-Splash-Tagline"></div>\n\t<div class="docuserve-splash-description" id="Docuserve-Splash-Description"></div>\n\t<div class="docuserve-splash-highlights" id="Docuserve-Splash-Highlights"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":216}],342:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),this._renderNavLinks(),this._renderVersionChip(),super.onAfterRender(e,t,r,n)}_renderNavLinks(){let e=this.pict.AppData.Docuserve||{},t=document.getElementById("Docuserve-Nav-Links");if(!t)return;let r='<a href="#/Home">Home</a>';if(e.TopBarLoaded&&e.TopBar&&Array.isArray(e.TopBar.NavLinks))for(let t=0;t<e.TopBar.NavLinks.length;t++){let n=e.TopBar.NavLinks[t];r+='<a href="'+this._escapeHTML(n.Href||"#")+'">'+this._escapeHTML(n.Text||"")+"</a>"}t.innerHTML=r}_renderVersionChip(){let e=this.pict.AppData.Docuserve||{},t=document.getElementById("Docuserve-Nav-Version");if(!t)return;if(!e.VersionLoaded||!e.Version||!e.Version.Version)return t.innerHTML="",void t.setAttribute("title","");let r=e.Version;t.innerHTML="v"+this._escapeHTML(r.Version);let n=[];if(n.push((r.Name?r.Name+" ":"")+"v"+r.Version),r.GeneratedAt){let e=String(r.GeneratedAt).match(/^(\d{4}-\d{2}-\d{2})/);n.push("built "+(e?e[1]:r.GeneratedAt))}r.GitCommit&&n.push(r.GitCommit),t.setAttribute("title",n.join(" · "))}_escapeHTML(e){return null==e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},t.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar-Nav",DefaultRenderable:"Docuserve-TopBar-Nav-Display",DefaultDestinationAddress:"#Theme-TopBar-Nav",AutoRender:!1,CSS:"\n\t\t.docuserve-nav\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\theight: 100%;\n\t\t\tgap: 0.6em;\n\t\t\tpadding: 0 0.75em;\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-primary, #E8E0D4));\n\t\t}\n\t\t.docuserve-nav-links\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.docuserve-nav-links a\n\t\t{\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-primary, #E8E0D4));\n\t\t\ttext-decoration: none;\n\t\t\tpadding: 0.45em 0.7em;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-nav-links a:hover\n\t\t{\n\t\t\tbackground-color: var(--theme-color-background-hover, rgba(255, 255, 255, 0.06));\n\t\t\t/* Keep the text token chain on hover — falling to background-panel\n\t\t\t here inverts contrast (dark text on dark hover) in themes that\n\t\t\t don't define text-on-brand (e.g. night, twilight). */\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-primary, #ffffff));\n\t\t}\n\t\t.docuserve-nav-version\n\t\t{\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-muted, #B5AA9A));\n\t\t\tbackground: var(--theme-color-background-hover, rgba(255, 255, 255, 0.06));\n\t\t\tborder: 1px solid var(--theme-color-border-light, rgba(255, 255, 255, 0.08));\n\t\t\tpadding: 0.12em 0.55em;\n\t\t\tborder-radius: 10px;\n\t\t\tfont-family: var(--theme-typography-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n\t\t\tletter-spacing: 0.02em;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.docuserve-nav-version:empty\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-Nav-Template",Template:'\n<div class="docuserve-nav">\n\t<div id="Docuserve-Nav-Links" class="docuserve-nav-links"></div>\n\t<span id="Docuserve-Nav-Version" class="docuserve-nav-version" title=""></span>\n</div>'}],Renderables:[{RenderableHash:"Docuserve-TopBar-Nav-Display",TemplateHash:"Docuserve-TopBar-Nav-Template",DestinationAddress:"#Theme-TopBar-Nav",RenderMethod:"replace"}]}},{"pict-view":216}],343:[function(e,t,r){const n=e("pict-view");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),this._renderLinks(),super.onAfterRender(e,t,r,n)}_renderLinks(){let e=this.pict.AppData.Docuserve||{},t=document.getElementById("Docuserve-User-Links");if(!t)return;let r="";if(e.KeywordIndexLoaded&&(r+='<a href="#/search/">Search</a>'),e.TopBarLoaded&&e.TopBar&&Array.isArray(e.TopBar.ExternalLinks))for(let t=0;t<e.TopBar.ExternalLinks.length;t++){let n=e.TopBar.ExternalLinks[t],o=this._escapeHTML(n.Href||"#"),i=this._escapeHTML(n.Text||"");r+='<a href="'+o+'"'+(/^https?:/i.test(n.Href||"")?' target="_blank" rel="noopener"':"")+">"+i+"</a>"}t.innerHTML=r}_escapeHTML(e){return null==e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},t.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar-User",DefaultRenderable:"Docuserve-TopBar-User-Display",DefaultDestinationAddress:"#Theme-TopBar-User",AutoRender:!1,CSS:"\n\t\t.docuserve-user\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\theight: 100%;\n\t\t\tgap: 0.25em;\n\t\t\tpadding: 0 0.75em;\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-secondary, #B5AA9A));\n\t\t}\n\t\t.docuserve-user a\n\t\t{\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-secondary, #B5AA9A));\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.4em 0.6em;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.docuserve-user a:hover\n\t\t{\n\t\t\tbackground-color: var(--theme-color-background-hover, rgba(255, 255, 255, 0.06));\n\t\t\tcolor: var(--theme-color-text-on-brand, var(--theme-color-text-primary, #E8E0D4));\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-User-Template",Template:'<div class="docuserve-user" id="Docuserve-User-Links"></div>'}],Renderables:[{RenderableHash:"Docuserve-TopBar-User-Display",TemplateHash:"Docuserve-TopBar-User-Template",DestinationAddress:"#Theme-TopBar-User",RenderMethod:"replace"}]}},{"pict-view":216}]},{},[332])(332)});
91
101
  //# sourceMappingURL=pict-docuserve.min.js.map