pict-docuserve 1.4.13 → 1.4.14

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.
@@ -138,5 +138,5 @@ const n=[{Key:"primaryColor",Var:"--theme-color-background-panel",Fallback:"#fff
138
138
  *
139
139
  * @description Process text streams, parsing out meta-template expressions.
140
140
  */
141
- 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":305,"./WordTree.js":306}],305:[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}}},{}],306:[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}}},{}],307:[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}},{}],308:[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 D(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 P(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=D(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 A(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=D(r,b,n==o),r=0,++n}++r,++t}return w.join("")}if(s={version:"1.4.1",ucs2:{decode:S,encode:T},decode:P,encode:A,toASCII:function(e){return v(e,function(e){return p.test(e)?"xn--"+A(e):e})},toUnicode:function(e){return v(e,function(e){return h.test(e)?P(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:{})},{}],309:[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}},{}],310:[function(e,t,r){var n=e("./stringify"),o=e("./parse"),i=e("./formats");t.exports={formats:i,parse:o,stringify:n}},{"./formats":309,"./parse":311,"./stringify":312}],311:[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":313}],312:[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,D){for(var P,A=t,C=D,k=0,E=!1;void 0!==(C=C.get(f))&&!E;){var L=C.get(t);if(k+=1,void 0!==L){if(L===k)throw new RangeError("Cyclic object value");E=!0}void 0===C.get(f)&&(k=0)}if("function"==typeof g?A=g(r,A):A instanceof Date?A=v(A):"comma"===i&&l(A)&&(A=o.maybeMap(A,function(e){return e instanceof Date?v(e):e})),null===A){if(c)return m&&!w?m(r,u.encoder,x,"key",S):r;A=""}if("string"==typeof(P=A)||"number"==typeof P||"boolean"==typeof P||"symbol"==typeof P||"bigint"==typeof P||o.isBuffer(A))return m?[T(w?r:m(r,u.encoder,x,"key",S))+"="+T(m(A,u.encoder,x,"value",S))]:[T(r)+"="+T(String(A))];var M,F=[];if(void 0===A)return F;if("comma"===i&&l(A))w&&m&&(A=o.maybeMap(A,m)),M=[{value:A.length>0?A.join(",")||null:void 0}];else if(l(g))M=g;else{var R=Object.keys(A);M=y?R.sort(y):R}var _=p?String(r).replace(/\./g,"%2E"):String(r),B=a&&l(A)&&1===A.length?_+"[]":_;if(s&&l(A)&&0===A.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:A[I];if(!h||null!==j){var O=b&&p?String(I).replace(/\./g,"%2E"):String(I),H=l(A)?"function"==typeof i?i(B,O):B:B+(b?"."+O:"["+O+"]");D.set(t,k);var V=n();V.set(f,D),d(F,e(j,H,i,a,s,c,h,p,"comma"===i&&w&&l(A)?null:m,g,y,b,v,S,T,w,x,V))}}return F};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":309,"./utils":313,"side-channel":321}],313:[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":309,"side-channel":321}],314:[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)}},{}],315:[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}},{}],316:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":314,"./encode":315}],317:[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}],318:[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}],319:[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}],320:[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":319}],321:[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":318,"side-channel-map":319,"side-channel-weakmap":320}],322:[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}],323:[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:324,https:113,once:138,querystring:316,"simple-concat":322,url:345}],324:[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":326,"./lib/response":327,"builtin-status-codes":21,url:345,xtend:348}],325:[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:{})},{}],326:[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":325,"./response":327,_process:307,buffer:20,inherits:115,"readable-stream":342}],327:[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":325,_process:307,buffer:20,inherits:115,"readable-stream":342}],328:[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},{}],329:[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":331,"./_stream_writable":333,_process:307,inherits:115}],330:[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":332,inherits:115}],331:[function(e,t,r){(function(r,n){(function(){var o;t.exports=P,P.ReadableState=D;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")(P,a);var w=m.errorOrDestroy,x=["error","close","destroy","pause","resume"];function D(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 P(t){if(o=o||e("./_stream_duplex"),!(this instanceof P))return new P(t);var r=this instanceof o;this._readableState=new D(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 A(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?L(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):C(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?C(e,a,t,!1):F(e,a)):C(e,a,t,!1)}else n||(a.reading=!1,F(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function C(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&&L(e)),F(e,t)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),P.prototype.destroy=m.destroy,P.prototype._undestroy=m.undestroy,P.prototype._destroy=function(e,t){t(e)},P.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),A(this,e,t,!1,r)},P.prototype.unshift=function(e){return A(this,e,null,!0,!1)},P.prototype.isPaused=function(){return!1===this._readableState.flowing},P.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 L(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 F(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(H,t,e))}function H(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 V(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}P.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):L(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},P.prototype._read=function(e){w(this,new S("_read()"))},P.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!==V(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},P.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=V(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},P.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?L(this):o.reading||r.nextTick(B,this))),n},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(_,this),n},P.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(_,this),t},P.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},P.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},P.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&&(P.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=e("./internal/streams/async_iterator")),p(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),P._fromList=j,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(P.from=function(t,r){return void 0===u&&(u=e("./internal/streams/from")),u(P,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":328,"./_stream_duplex":329,"./internal/streams/async_iterator":334,"./internal/streams/buffer_list":335,"./internal/streams/destroy":336,"./internal/streams/from":338,"./internal/streams/state":340,"./internal/streams/stream":341,_process:307,buffer:20,events:50,inherits:115,"string_decoder/":343,util:18}],332:[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":328,"./_stream_duplex":329,inherits:115}],333:[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=P,P.WritableState=D;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 D(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(C,e,n,a,i):C(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 P(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!d.call(P,this))return new P(t);this._writableState=new D(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 A(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 C(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,A(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(A(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 L(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(L,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")(P,s),D.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(D.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(P,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===P&&(e&&e._writableState instanceof D)}})):d=function(e){return e instanceof this},P.prototype.pipe=function(){w(this,new y)},P.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 A(e,t,!1,s,n,o,i);return c}(this,i,s,e,t,n)),a},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||k(this,e))},P.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(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),P.prototype._write=function(e,t,r){r(new m("_write()"))},P.prototype._writev=null,P.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(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),P.prototype.destroy=h.destroy,P.prototype._undestroy=h.undestroy,P.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":328,"./_stream_duplex":329,"./internal/streams/destroy":336,"./internal/streams/state":340,"./internal/streams/stream":341,_process:307,buffer:20,inherits:115,"util-deprecate":346}],334:[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":337,_process:307}],335:[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}],336:[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:307}],337:[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":328}],338:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],339:[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":328,"./end-of-stream":337}],340:[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":328}],341:[function(e,t,r){t.exports=e("events").EventEmitter},{events:50}],342:[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":329,"./lib/_stream_passthrough.js":330,"./lib/_stream_readable.js":331,"./lib/_stream_transform.js":332,"./lib/_stream_writable.js":333,"./lib/internal/streams/end-of-stream.js":337,"./lib/internal/streams/pipeline.js":339}],343:[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":317}],344:[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":307,timers:344}],345:[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,D,P=-1,A=0;A<h.length;A++){-1!==(C=b.indexOf(h[A]))&&(-1===P||C<P)&&(P=C)}-1!==(D=-1===P?b.lastIndexOf("@"):b.lastIndexOf("@",P))&&(x=b.slice(0,D),b=b.slice(D+1),this.auth=decodeURIComponent(x)),P=-1;for(A=0;A<d.length;A++){var C;-1!==(C=b.indexOf(d[A]))&&(-1===P||C<P)&&(P=C)}-1===P&&(P=b.length),this.host=b.slice(0,P),b=b.slice(P),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(/\./),L=(A=0,E.length);A<L;A++){var M=E[A];if(M&&!M.match(p)){for(var F="",R=0,_=M.length;R<_;R++)M.charCodeAt(R)>127?F+="x":F+=M[R];if(!F.match(p)){var B=E.slice(0,A),N=E.slice(A+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(A=0,L=c.length;A<L;A++){var H=c[A];if(-1!==b.indexOf(H)){var V=encodeURIComponent(H);V===H&&(V=escape(H)),b=b.split(H).join(V)}}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 D=w.slice(-1)[0],P=(r.host||e.host||w.length>1)&&("."===D||".."===D)||""===D,A=0,C=w.length;C>=0;C--)"."===(D=w[C])?w.splice(C,1):".."===D?(w.splice(C,1),A++):A&&(w.splice(C,1),A--);if(!S&&!T)for(;A--;A)w.unshift("..");!S||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),P&&"/"!==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/":308,qs:310}],346:[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:{})},{}],347:[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}}},{}],348:[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},{}],349:[function(e,t,r){t.exports={name:"pict-docuserve",version:"1.4.13",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",build:"npx quack build && npx quack copy","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.372","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-provider-theme":"^1.1.2","pict-section-code":"^1.0.11","pict-section-content":"^1.0.13","pict-section-histogram":"^1.0.1","pict-section-modal":"^1.1.4","pict-section-theme":"^1.1.1","pict-service-commandlineutility":"^1.0.19","pict-view":"^1.0.68"},devDependencies:{"pict-docuserve":"^1.4.4",quackage:"^1.3.0"},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"}}}}},{}],350:[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":349}],351:[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"}}},{}],352:[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"),b=e("./views/PictView-Docuserve-Section-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.pict.addView("Docuserve-Section-Playground",b.default_configuration,b),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:"retold-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(){this._resolveHashRoute();let e=this.pict.views["Docuserve-TopBar-User"];e&&"function"==typeof e.render&&e.render()}_resolveHashRoute(){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)}if("playground"===t[0]&&t.length>=2){if("section"===t[1]){let e=t.length>=4?t[2]:this.pict.AppData.Docuserve.CurrentGroup||"",r=t.length>=4?t[3]:this.pict.AppData.Docuserve.CurrentModule||"";return void this.navigateToSectionPlayground(e,r)}this.navigateToPlayground(t[1])}else 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>"))}navigateToSectionPlayground(e,t){this.pict.AppData.Docuserve.CurrentGroup=e,this.pict.AppData.Docuserve.CurrentModule=t,this.pict.AppData.Docuserve.CurrentDemo="",this.pict.AppData.Docuserve.CurrentPath="section-playground";let r=this.pict.views["Docuserve-Layout"];r&&"function"==typeof r.setPlaygroundEnabled&&r.setPlaygroundEnabled(!1);let n=this.pict.views["Docuserve-Section-Playground"];if(!n||"function"!=typeof n.openPlayground){let e=this.pict.views["Docuserve-Content"];return void(e&&"function"==typeof e.displayContent&&(e.render(),e.displayContent("<h1>Section playground unavailable</h1><p>The Section Playground view is not registered.</p>")))}n.openPlayground(e,t);let o=this.pict.views["Docuserve-Sidebar"];o&&(o.renderSidebarGroups(),"function"==typeof o.renderModuleNav&&o.renderModuleNav(e,t))}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);e.setPlaygroundEnabled(o),"function"==typeof e.setPlaygroundTitle&&e.setPlaygroundTitle(n?"JS Playground: "+n:"JS Playground"),t&&"function"==typeof t.loadPlaygroundConfig&&t.loadPlaygroundConfig(r,n).then(o=>{if(this.pict.AppData.Docuserve.Playground||(this.pict.AppData.Docuserve.Playground={}),this.pict.AppData.Docuserve.Playground.Config=o||null,"function"==typeof t.isPlaygroundEnabled){let o=t.isPlaygroundEnabled(r,n);e.setPlaygroundEnabled(o)}let i=this.pict.views["Docuserve-Fable-Playground"];i&&"function"==typeof i._applySandboxMode&&i._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,n)=>{if(e&&!o.match(/(^|\/)README\.md$/i)){let e=o.replace(/\.md$/i,"")+"/README.md";return void t.fetchLocalDocument(e,(e,t)=>{r.displayContent(e?n:t)},"","",e)}r.displayContent(n)},"","",o)}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":350,"./Pict-Application-Docuserve-Configuration.json":351,"./providers/Pict-Provider-Docuserve-Demos.js":353,"./providers/Pict-Provider-Docuserve-Documentation.js":354,"./views/PictView-Docuserve-Content.js":355,"./views/PictView-Docuserve-Demo.js":356,"./views/PictView-Docuserve-Fable-Playground.js":357,"./views/PictView-Docuserve-Layout.js":358,"./views/PictView-Docuserve-Search.js":359,"./views/PictView-Docuserve-Section-Playground.js":360,"./views/PictView-Docuserve-Sidebar.js":361,"./views/PictView-Docuserve-Splash.js":362,"./views/PictView-Docuserve-TopBar-Nav.js":363,"./views/PictView-Docuserve-TopBar-User.js":364,"pict-application":141,"pict-section-modal":172,"pict-section-theme":173}],353:[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":149}],354:[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._KeywordIndexMode=null,this._ContentCache={},this._PlaygroundConfigCache={},this._ContentProvider=this.pict.addProvider("Pict-Content",i.default_configuration,i),this.pict&&this.pict.providers&&this.pict.providers.Icon&&"function"==typeof this.pict.providers.Icon.registerSet&&this.pict.providers.Icon.registerSet({Outline:{GitHub:'<svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>'}})}_createLinkResolver(e,t,r){return(n,o)=>{let i=String(n||""),a="module"===this.getDocsMode();if(!i.match(/^[a-z][a-z0-9+.-]*:/i)&&i.match(/\.html($|[?#])/i))return{href:i,target:"_blank",rel:"noopener"};if(i.match(/^\//)||i.match(/^[^:]+\.md/)){return{href:this.convertDocLink(i,e,t,r)}}return a&&i&&"#"!==i.charAt(0)&&0!==i.indexOf("//")&&!i.match(/^[a-z][a-z0-9+.-]*:/i)?{href:this._toModuleAssetHref(i,r)}: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:[],ExamplesMarkdown:""},r=e.split("\n"),n=!1;for(let e=0;e<r.length;e++){let o=r[e].trim();if("\x3c!-- docuserve:examples:start --\x3e"===o){n=!0;continue}if("\x3c!-- docuserve:examples:end --\x3e"===o){n=!1;continue}if(n){o&&(t.ExamplesMarkdown+=(t.ExamplesMarkdown?"\n":"")+o);continue}if(!o)continue;let i=o.match(/^#+\s+(.+)/);if(i){t.Title=i[1].trim();continue}let a=o.match(/^>\s*(.*)/);if(a){t.Tagline=a[1].trim();continue}let s=o.match(/^[-*+]\s+(.*)/);if(s){let e=s[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 l=o.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);l?t.Actions.push({Text:l[1].trim(),Href:l[2].trim()}):t.Description?t.Description+=" "+o:t.Description=o}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._KeywordIndexMode="module"===e.Mode||"ecosystem"===e.Mode?e.Mode:null,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()))}getDocsMode(){return!this._Catalog||"module"!==this._Catalog.Mode&&"ecosystem"!==this._Catalog.Mode?"module"===this._KeywordIndexMode||"ecosystem"===this._KeywordIndexMode?this._KeywordIndexMode:"legacy":this._Catalog.Mode}_toModulePageRoute(e,t){let r=String(e||"").trim(),n="";if("/"===r.charAt(0))r=r.replace(/^\/+/,"");else if(t){let e=String(t).split("/");e.pop(),n=e.join("/")}let o=this._resolveRelativeDocPath(n,r);return o?"#/page/"+o.replace(/\.md$/i,""):"#/Home"}_resolveRelativeDocPath(e,t){let r=[],n=((e?e+"/":"")+String(t||"")).split("/");for(let e=0;e<n.length;e++){let t=n[e];""!==t&&"."!==t&&(".."!==t?r.push(t):r.length>0&&r.pop())}return r.join("/")}_toModuleAssetHref(e,t){let r=String(e||"").trim();if(!r)return r;let n="";if("/"===r.charAt(0))r=r.replace(/^\/+/,"");else if(t){let e=String(t).split("/");e.pop(),n=e.join("/")}return this._resolveRelativeDocPath(n,r)}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),n=this.getDocsMode();for(let e=0;e<r.length;e++){let o=r[e].ref,i=r[e].score,a=this._KeywordDocuments[o];if(!a)continue;let s="";if("module"===n)s="#/page/"+(a.DocPath||o);else if("ecosystem"===n)s=a.Group&&a.Module&&a.DocPath?"#/doc/"+a.Group+"/"+a.Module+"/"+a.DocPath:"#/page/"+o;else{let e=o.split("/");s=e.length>=2&&this.isModuleInCatalog(e[0],e[1])?"#/doc/"+o:"#/page/"+o}t.push({Key:o,Title:a.Title||o,Group:a.Group||"",Module:a.Module||"",DocPath:a.DocPath||"",Score:i,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.match(/^#\//))return e;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"}if(e.match(/\.html($|[?#])/i)&&!e.match(/^[a-z][a-z0-9+.-]*:/i))return e;if("module"===this.getDocsMode())return this._toModulePageRoute(e);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}resolveGitHubRepoURL(e,t){if(!this._Catalog||!this._Catalog.Groups)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"https://github.com/"+(r.Org||this._Catalog.GitHubOrg||"stevenvelozo")+"/"+r.Repo}}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){let r=(e||"")+"/"+(t||"");if(Object.prototype.hasOwnProperty.call(this._PlaygroundConfigCache,r)){let e=this._PlaygroundConfigCache[r];if(e&&"section"===e.Kind)return!1}if(e&&t){let r=this.getModuleSidebar(e,t);if(Array.isArray(r)&&this._sidebarEntriesIncludePlayground(r))return!0}let n=this.pict.AppData.Docuserve.SidebarGroups;return!(!Array.isArray(n)||!this._sidebarGroupsIncludePlayground(n))}_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){if("module"===this.getDocsMode())return this._toModulePageRoute(e,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":149,"pict-section-content":154}],355:[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/* Dark-mode override for handcrafted mermaid flowchart diagrams that\n\t\t bake per-node inline fill colors via 'style X fill:#...' directives\n\t\t (the architecture / module docs use these to mark layer hierarchy\n\t\t with Material pastels). Mermaid renders those as inline\n\t\t style=\"fill:#...\" SVG attributes — highest specificity, so neither\n\t\t themeVariables nor unflagged CSS can reach them. In light mode the\n\t\t pastels read fine; in dark mode the same light fills stamp a\n\t\t high-contrast island onto the dark page with unreadable text.\n\t\t Force the fills back to a theme background so dark-mode reads;\n\t\t light mode is intentionally unmodified so the per-layer hierarchy\n\t\t stays intact there. Sibling to the block-beta invert filter below:\n\t\t block-beta diagrams need full inversion (their inner palette is\n\t\t baked separately), flowcharts only need a fill swap. */\n\t\t.theme-dark .pict-content pre.mermaid .node rect,\n\t\t.theme-dark .pict-content pre.mermaid .node polygon,\n\t\t.theme-dark .pict-content pre.mermaid .node circle,\n\t\t.theme-dark .pict-content pre.mermaid .node ellipse,\n\t\t.theme-dark .pict-content pre.mermaid .node path,\n\t\t.theme-dark .pict-content pre.mermaid .cluster rect {\n\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t}\n\t\t/* Mirror of the above for theme mode 'system' — when the user\n\t\t hasn't explicitly picked light or dark, the theme provider\n\t\t leaves <html> without .theme-light/.theme-dark and the CSS\n\t\t variables follow prefers-color-scheme. The .theme-dark-prefixed\n\t\t block above doesn't match in that case, so light pastels would\n\t\t win again on dark OSes. Mirror the rule under the media query,\n\t\t gated by :not(.theme-light) so an explicit light override on a\n\t\t dark OS still wins. */\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node rect,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node polygon,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node circle,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node ellipse,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node path,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .cluster rect {\n\t\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t\t}\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/* Same dark-mode fill/stroke override as for inline diagrams, but\n\t\t scoped to the fullscreen-overlay clone — which lives under\n\t\t <body>, NOT inside .pict-content, so the pre.mermaid-scoped\n\t\t rules above don't reach it. */\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node rect,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node polygon,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node circle,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node ellipse,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node path,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .cluster rect {\n\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t}\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node rect,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node polygon,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node circle,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node ellipse,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node path,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .cluster rect {\n\t\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t\t}\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":154}],356:[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":233}],357:[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:243,"pict-section-code":152,"pict-section-histogram":159,"pict-view":233}],358:[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/* Sidebar panel uses the secondary background so the chrome\n\t\t (panel surface AND the collapse tab that pokes out of it) match\n\t\t the inner #Docuserve-Sidebar-Container's secondary fill. Without\n\t\t this the panel is white-cream while the inner is darker-cream,\n\t\t and the collapse tab — which inherits its background from\n\t\t --pict-modal-bg — looks like a foreign sliver hanging off the\n\t\t wrong-colored panel. Overriding --pict-modal-bg also retints the\n\t\t tab's merge-bar box-shadow so the join is invisible. */\n\t\t.pict-modal-shell-panel-left\n\t\t{\n\t\t\t--pict-modal-bg: var(--theme-color-background-secondary, #FAF7F1);\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF7F1);\n\t\t}\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":233}],359:[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":233}],360:[function(e,t,r){const n=e("pict-view"),o=e("pict-section-code"),i="docuserve-section-playground";t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._editors=[],this._activeHash=null,this._scope={Group:"",Module:""}}openPlayground(e,t){this._scope={Group:e,Module:t};let r=this.pict.providers["Docuserve-Documentation"];if(!r||"function"!=typeof r.loadPlaygroundConfig)return void this._renderError("Documentation provider is not registered.");let n=this;r.loadPlaygroundConfig(e,t).then(function(r){r&&"section"===r.Kind?(n._spec=r,n._loadEditors(e,t,r).then(function(){n._mountAndRender()})):n._renderError('This module does not have a section playground configured. Add `Kind: "section"` to `docs/_playground.json` and declare an `Editors` array.')}).catch(function(e){n._renderError("Failed to load _playground.json: "+(e&&e.message?e.message:e))})}selectTab(e){this._activeHash=e,this._refreshEditorRecords();let t=document.querySelectorAll(".docuserve-section-playground-tab");for(let e=0;e<t.length;e++)t[e].classList.remove("active");let r=document.querySelectorAll(".docuserve-section-playground-editor");for(let e=0;e<r.length;e++)r[e].classList.remove("active");for(let t=0;t<this._editors.length;t++){let r=this._editors[t];if(r.Hash===e){let e=document.querySelector(".docuserve-section-playground-tab[onclick*=\"'"+r.Hash+"'\"]");e&&e.classList.add("active");let t=document.getElementById("Docuserve-Section-Playground-Editor-"+r.Hash);t&&t.classList.add("active")}}}run(){let e;try{e=this._readAndValidateEditors()}catch(e){return void this._setStatus(e.message,!0)}this._setStatus("running…",!1);let t=document.getElementById("Docuserve-Section-Playground-Iframe");if(!t)return;let r="";try{r=window.location.href.split("#")[0].replace(/index\.html$/,"")}catch(e){r=""}let n=function(e,t,r){let n=Object.assign({},{SectionType:"pict-section-form",ApplicationGlobal:"PictFormApplication",ApplicationModule:"PictSectionForm",ManifestKey:"DefaultFormManifest",WrapperKind:"application",ViewName:"Section-Playground-View",ViewConfigKey:"ViewConfig",MountID:"",BootstrapMethod:"",BootstrapSeedAddress:"",Imports:[],Stylesheets:[]},t||{}),o=n.Imports&&n.Imports.length>0?n.Imports:[{Name:"pict",Source:"cdn"},{Name:"pict-application",Source:"cdn"},{Name:"pict-section-form",Source:"cdn"},{Name:"pict-section-modal",Source:"cdn"},{Name:"pict-section-theme",Source:"cdn"}],i="",a=[];for(let e=0;e<o.length;e++){let t,r=o[e];if("esm"!==r.Source){if("local"===r.Source)t=r.Path;else{let e=r.Version||"1";t="https://cdn.jsdelivr.net/npm/"+r.Name+"@"+e+"/dist/"+r.Name+".min.js"}i+='<script src="'+t+'"><\/script>\n'}else a.push(r)}let s=Array.isArray(n.Stylesheets)?n.Stylesheets:[],l="";for(let e=0;e<s.length;e++){let t,r=s[e];if("local"===r.Source)t=r.Path;else{let e=r.Version||"1",n=r.Path||"dist/"+r.Name+".min.css";t="https://cdn.jsdelivr.net/npm/"+r.Name+"@"+e+"/"+n}l+='<link rel="stylesheet" href="'+t+'">\n'}let c="";if(a.length>0){c+='<script type="module">\n',c+="window.__SectionPlaygroundESMReady = (async () => {\n";for(let e=0;e<a.length;e++){let t=a[e],r=t.URL;if(!r&&t.Name){let e=t.Version||"1";r="https://cdn.jsdelivr.net/npm/"+t.Name+"@"+e+"/dist/"+t.Name+".min.js"}let n=t.ExportName||t.GlobalName||t.Name,o=t.GlobalName||t.ExportName||t.Name;c+=" try {\n",c+=" const mod = await import("+JSON.stringify(r)+");\n",c+=" window["+JSON.stringify(o)+"] = mod["+JSON.stringify(n)+"] || mod.default || mod;\n",c+=" } catch (err) {\n",c+=' console.error("ESM import failed for " + '+JSON.stringify(r)+", err);\n",c+=" throw err;\n",c+=" }\n"}c+="})();\n",c+="<\/script>\n"}let d=r||"";function h(e){return JSON.stringify(void 0===e?{}:e).replace(/<\/script>/g,"<\\/script>")}let p=h(e.manifest),u=h(e.pictConfig),f=h(e.appConfig),m=h(e.appData),g="string"==typeof e.application?e.application:"",y=JSON.stringify(g).replace(/<\/script>/g,"<\\/script>");return'<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="UTF-8">\n<title>Section Playground</title>\n'+(d?'<base href="'+d+'">\n':"")+'<style>\n html, body { height: 100%; margin: 0; }\n body { display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }\n #playground-topbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--theme-color-border-default, #DDD6CA); background: var(--theme-color-background-panel, #FFFFFF); }\n #playground-topbar-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--theme-color-text-muted, #8A7F72); }\n #playground-topbar-controls { display: flex; align-items: center; gap: 8px; }\n #playground-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px; background: var(--theme-color-background-primary, #FDFBF7); }\n #playground-error { display: none; padding: 14px 18px; background: #FFF4F2; color: #B43A2E; border-bottom: 1px solid #B43A2E; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; white-space: pre-wrap; }\n #playground-error.show { display: block; }\n</style>\n'+l+i+c+'</head>\n<body>\n<div id="playground-error"></div>\n<div id="playground-topbar">\n <div id="playground-topbar-title">Section Sandbox</div>\n <div id="playground-topbar-controls">\n <div id="Theme-Picker"></div>\n <div id="Theme-ModeToggle"></div>\n <div id="Theme-ScaleSelect"></div>\n </div>\n</div>\n<div id="playground-content">\n \x3c!-- The section-form metacontroller renders into #Pict-Form-Container by default. --\x3e\n \x3c!-- Other section types may use a different default; the spec drives the markup. --\x3e\n <div id="Pict-Form-Container"></div>\n <div id="Section-Playground-Mount"></div>\n'+(n.MountID?' <div id="'+n.MountID+'"></div>\n':"")+"</div>\n<script>\n(function() {\n var manifest = "+p+";\n var pictConfig = "+u+";\n var appConfig = "+f+";\n var appData = "+m+";\n var applicationSource = "+y+";\n var sectionType = "+JSON.stringify(n.SectionType)+";\n var applicationModule = "+JSON.stringify(n.ApplicationModule)+";\n var applicationGlobal = "+JSON.stringify(n.ApplicationGlobal)+";\n var manifestKey = "+JSON.stringify(n.ManifestKey)+";\n var wrapperKind = "+JSON.stringify(n.WrapperKind)+";\n var viewName = "+JSON.stringify(n.ViewName)+";\n var viewConfigKey = "+JSON.stringify(n.ViewConfigKey)+";\n var mountID = "+JSON.stringify(n.MountID)+";\n var bootstrapMethod = "+JSON.stringify(n.BootstrapMethod)+";\n var bootstrapSeedAddr = "+JSON.stringify(n.BootstrapSeedAddress)+';\n\n function showError(msg) {\n var el = document.getElementById("playground-error");\n if (el) { el.textContent = msg; el.classList.add("show"); }\n try { parent.postMessage({ type: "section-playground-error", message: msg }, "*"); } catch(e) {}\n }\n\n function ready(fn) {\n if (document.readyState !== "loading") { fn(); }\n else { document.addEventListener("DOMContentLoaded", fn); }\n }\n\n function awaitESM() {\n return (window.__SectionPlaygroundESMReady && typeof window.__SectionPlaygroundESMReady.then === "function")\n ? window.__SectionPlaygroundESMReady\n : Promise.resolve();\n }\n\n ready(function() {\n awaitESM().then(function() { try {\n if (typeof Pict === "undefined") { throw new Error("pict bundle did not load — check the CDN imports in _playground.json"); }\n var libSectionModule = window[applicationModule];\n if (!libSectionModule) { throw new Error("Section module " + applicationModule + " is not loaded; check the Imports in _playground.json"); }\n var ResolvedClass = libSectionModule[applicationGlobal] || libSectionModule;\n if (typeof ResolvedClass !== "function") { throw new Error("Could not resolve " + applicationGlobal + " on " + applicationModule); }\n\n // Wrapper resolution. Two paths:\n // 1. WrapperKind: "application" (default) — the resolved class\n // is already a PictApplication subclass; use it directly.\n // pict-section-form\'s pattern.\n // 2. WrapperKind: "view" — the resolved class is a PictView; the\n // bootstrap synthesizes a PictApplication subclass that\n // registers the view under `viewName` with config drawn\n // from pictConfig[viewConfigKey]. This is the no-wrapper\n // path: section modules ship just their view class and a\n // _playground.json — no per-module Application file needed.\n var BaseApplicationClass;\n if (wrapperKind === "view") {\n if (typeof window.PictApplication !== "function") { throw new Error("WrapperKind: \\"view\\" requires pict-application to be loaded — add it to Imports in _playground.json"); }\n var ViewClass = ResolvedClass;\n // PictApplication is an ES6 class, so the wrapper MUST be one\n // too — ES6 classes throw "cannot be invoked without new" when\n // called via `.call(this, ...)`, so the prototype-style pattern\n // (function + Object.create) silently fails at construction.\n // Build the class via a Function constructor so we can keep\n // closure access to viewName / viewConfigKey / mountID / etc.\n var BuildWrapperClass = new Function(\n "PictApplication", "ViewClass", "pictConfig", "viewName", "viewConfigKey", "mountID", "bootstrapMethod", "bootstrapSeedAddr",\n "return class ViewWrapperApplication extends PictApplication {"\n + " constructor(pFable, pOptions, pServiceHash) {"\n + " super(pFable, pOptions, pServiceHash);"\n + " var tmpDefaultViewConfig = (ViewClass.default_configuration || {});"\n + " var tmpInjectedViewConfig = (pictConfig && pictConfig[viewConfigKey]) || {};"\n + " var tmpMergedViewConfig = Object.assign({}, tmpDefaultViewConfig, tmpInjectedViewConfig);"\n + " var tmpAutoMount = \\"#\\" + (mountID || \\"Section-Playground-Mount\\");"\n + " if (typeof tmpInjectedViewConfig.DefaultDestinationAddress === \\"undefined\\") {"\n + " tmpMergedViewConfig.DefaultDestinationAddress = tmpAutoMount;"\n + " if (Array.isArray(tmpDefaultViewConfig.Renderables)) {"\n + " tmpMergedViewConfig.Renderables = tmpDefaultViewConfig.Renderables.map(function(pRenderable) {"\n + " return Object.assign({}, pRenderable, { DestinationAddress: tmpAutoMount });"\n + " });"\n + " }"\n + " }"\n + " this.pict.addView(viewName, tmpMergedViewConfig, ViewClass);"\n + " }"\n + " onAfterInitialize() {"\n + " super.onAfterInitialize();"\n + " var tmpView = this.pict.views[viewName];"\n + " if (bootstrapMethod && tmpView && typeof tmpView[bootstrapMethod] === \\"function\\") {"\n + " try {"\n + " var tmpSeed;"\n + " if (bootstrapSeedAddr && this.pict && this.pict.manifest && typeof this.pict.manifest.getValueByHash === \\"function\\") {"\n + " tmpSeed = this.pict.manifest.getValueByHash(this.pict.AppData, bootstrapSeedAddr);"\n + " }"\n + " tmpView[bootstrapMethod](tmpSeed);"\n + " } catch (seedErr) { console.warn(\\"BootstrapMethod \\" + bootstrapMethod + \\" threw:\\", seedErr); }"\n + " }"\n + " if (tmpView && typeof tmpView.render === \\"function\\") { tmpView.render(); }"\n + " }"\n + "};"\n );\n BaseApplicationClass = BuildWrapperClass(window.PictApplication, ViewClass, pictConfig, viewName, viewConfigKey, mountID, bootstrapMethod, bootstrapSeedAddr);\n // Carry through whatever defaults the view itself ships, so\n // pict_configuration / Product / Hash stay sensible if the\n // user has not provided their own appConfig / pictConfig.\n BaseApplicationClass.default_configuration = (ViewClass.default_configuration && ViewClass.default_configuration.pict_configuration)\n ? ViewClass.default_configuration\n : { pict_configuration: {} };\n } else {\n BaseApplicationClass = ResolvedClass;\n }\n\n // Subclass. If the user supplied Application Code,\n // wrap it as `function (Base) { ...userBody... }` and\n // expect it to return a class. Otherwise fall back to\n // a no-op extends-Base subclass. class extends handles\n // both ES6 classes and old-style prototype constructors.\n var PlaygroundApplication;\n if (typeof applicationSource === "string" && applicationSource.trim().length > 0) {\n try {\n var customizerFn = new Function("Base", applicationSource);\n var customizerResult = customizerFn(BaseApplicationClass);\n if (typeof customizerResult !== "function") {\n throw new Error("Application Code must `return` a class. Got " + (typeof customizerResult) + ".");\n }\n PlaygroundApplication = customizerResult;\n } catch (customizerErr) {\n throw new Error("Application Code error: " + (customizerErr && customizerErr.message ? customizerErr.message : customizerErr));\n }\n } else {\n PlaygroundApplication = class extends BaseApplicationClass {};\n }\n\n // Precedence: Base class defaults < user-class defaults\n // (if Application Code set its own) < the four editor tabs.\n // The editor tabs are what the playground exists to drive,\n // so they always win.\n var userDefault = PlaygroundApplication.default_configuration || BaseApplicationClass.default_configuration || {};\n var basePict = userDefault.pict_configuration || {};\n var mergedPict = Object.assign({}, basePict, pictConfig);\n mergedPict[manifestKey] = manifest;\n if (appData !== undefined) { mergedPict.DefaultAppData = appData; }\n\n var defaultConfig = Object.assign({}, userDefault, appConfig);\n defaultConfig.pict_configuration = mergedPict;\n PlaygroundApplication.default_configuration = defaultConfig;\n\n // Pict.safeLoadPictApplication will instantiate and run lifecycle.\n Pict.safeOnDocumentReady(function() {\n Pict.safeLoadPictApplication(PlaygroundApplication, 2);\n // Mount the theme controls once the app is up.\n setTimeout(function() {\n try {\n if (window.PictSectionTheme && window._Pict && typeof window._Pict.addProvider === "function") {\n if (!window._Pict.providers || !window._Pict.providers["Theme-Section"]) {\n window._Pict.addProvider("Theme-Section", { ApplyDefault: "retold-default", DefaultMode: "system", DefaultScale: 1.0, Views: ["Picker", "ModeToggle", "ScaleSelect"] }, window.PictSectionTheme);\n window._Pict.views["Theme-Picker"].render();\n if (window._Pict.views["Theme-ModeToggle"]) { window._Pict.views["Theme-ModeToggle"].render(); }\n if (window._Pict.views["Theme-ScaleSelect"]) { window._Pict.views["Theme-ScaleSelect"].render(); }\n }\n }\n } catch (themeErr) { /* theme bootstrap is best-effort */ }\n }, 50);\n try { parent.postMessage({ type: "section-playground-ready" }, "*"); } catch(e) {}\n });\n } catch (err) {\n showError(String(err && err.stack ? err.stack : err));\n } }).catch(function(esmErr) {\n showError("ESM import failed: " + String(esmErr && esmErr.message ? esmErr.message : esmErr));\n });\n });\n}());\n<\/script>\n</body>\n</html>'}(e,this._spec||{},r);t.srcdoc=n;let o=this,i=function(e){e&&e.data&&("section-playground-ready"===e.data.type?o._setStatus("rendered",!1):"section-playground-error"===e.data.type&&o._setStatus("error in sandbox",!0))};window.addEventListener("message",i),setTimeout(function(){window.removeEventListener("message",i)},3e4)}resetAll(){let e=this.pict.views["Pict-Section-Modal"],t=this,r=function(){for(let e=0;e<t._editors.length;e++){let r=t._editors[e];r.Code=r.StarterCode||"";let n=t._storageKey(r.Hash);try{window.localStorage.removeItem(n)}catch(e){}let o=t._editorCodeAddress(r.Hash);t.pict.manifest.setValueByHash(t.pict.AppData,o,r.Code);let i=t.pict.views[t._editorViewIdentifier(r.Hash)];i&&"function"==typeof i.setCode&&i.setCode(r.Code)}t._setStatus("reset to starters",!1)};e&&"function"==typeof e.confirm?e.confirm("Reset all editors to their starter content? Your current edits will be lost.",{title:"Reset playground",confirmLabel:"Reset",cancelLabel:"Keep edits",dangerous:!0}).then(function(e){e&&r()}):r()}_storageKey(e){return i+":"+this._scope.Group+"/"+this._scope.Module+":"+e}_editorViewIdentifier(e){return"Docuserve-Section-Playground-Editor-View-"+e}_editorCodeAddress(e){return"AppData.Docuserve.SectionPlayground.Code."+e}_loadEditors(e,t,r){let n=r.Editors||[],o=this.pict.providers["Docuserve-Documentation"],i=this;this._editors=[];let a=[];for(let r=0;r<n.length;r++)(function(r,n){let s,l={Hash:r.Hash,Label:r.Label||r.Hash,Language:r.Language||"json",StarterCode:r.Default||"",Code:""},c=null;try{c=window.localStorage.getItem(i._storageKey(r.Hash))}catch(e){c=null}if(r.DefaultPath){let n=null;if(e&&t&&o&&"function"==typeof o.resolveDocumentURL&&(n=o.resolveDocumentURL(e,t,r.DefaultPath)),!n){n=(i.pict.AppData.Docuserve.DocsBaseURL||"")+r.DefaultPath}s=fetch(n).then(function(e){return e.ok?e.text():""}).catch(function(){return""})}else s=Promise.resolve(l.StarterCode);a.push(s.then(function(e){l.StarterCode=e||l.StarterCode,l.Code=null!=c?c:l.StarterCode,i._editors[n]=l}))})(n[r],r);return Promise.all(a).then(function(){i._editors=i._editors.filter(function(e){return!!e}),i._editors.length>0&&(i._activeHash=i._editors[0].Hash)})}_refreshEditorRecords(){let e=[];for(let t=0;t<this._editors.length;t++){let r=this._editors[t];e.push({Hash:r.Hash,Label:r.Label,ActiveClass:r.Hash===this._activeHash?" active":""})}this.pict.AppData.Docuserve=this.pict.AppData.Docuserve||{},this.pict.AppData.Docuserve.SectionPlayground=this.pict.AppData.Docuserve.SectionPlayground||{},this.pict.AppData.Docuserve.SectionPlayground.Editors=e,this.pict.AppData.Docuserve.SectionPlayground.Code=this.pict.AppData.Docuserve.SectionPlayground.Code||{};for(let e=0;e<this._editors.length;e++){let t=this._editors[e];this.pict.AppData.Docuserve.SectionPlayground.Code[t.Hash]=t.Code}}_buildShell(){let e=this.pict.views["Pict-Section-Modal"],t=document.getElementById("Docuserve-Section-Playground-Shell-Mount");if(!e||"function"!=typeof e.shell||!t)return t.innerHTML='<div class="docuserve-section-playground-editor-mount" id="Docuserve-Section-Playground-Editor-Mount" style="height:55%;border-bottom:1px solid var(--theme-color-border-default,#DDD6CA)"></div><div class="docuserve-section-playground-iframe-pane" id="Docuserve-Section-Playground-Iframe-Mount" style="height:45%"></div>',void this._populateShellDestinations();let r="docuserve-section-playground:"+this._scope.Group+"/"+this._scope.Module+":split";this._shell=e.shell(t,{PersistenceKey:r}),this._shell.addPanel({Hash:"sandbox",Side:"bottom",Mode:"resizable",Size:360,MinSize:140,MaxSize:1e3,Title:"Sandbox",ContentDestinationId:"Docuserve-Section-Playground-Iframe-Mount"}),this._shell.center({ContentDestinationId:"Docuserve-Section-Playground-Editor-Mount"}),this._populateShellDestinations()}_populateShellDestinations(){let e=document.getElementById("Docuserve-Section-Playground-Editor-Mount");if(e){e.classList.add("docuserve-section-playground-editor-mount");let t="";for(let e=0;e<this._editors.length;e++){let r=this._editors[e];t+='<div class="docuserve-section-playground-editor'+(r.Hash===this._activeHash?" active":"")+'" id="Docuserve-Section-Playground-Editor-'+r.Hash+'" data-editor-hash="'+r.Hash+'"></div>'}e.innerHTML=t}let t=document.getElementById("Docuserve-Section-Playground-Iframe-Mount");t&&(t.classList.add("docuserve-section-playground-iframe-pane"),t.innerHTML='<iframe id="Docuserve-Section-Playground-Iframe" class="docuserve-section-playground-iframe" title="Section playground sandbox" sandbox="allow-scripts allow-same-origin allow-modals allow-popups"></iframe><div id="Docuserve-Section-Playground-Status" class="docuserve-section-playground-status">ready</div>')}_mountAndRender(){let e=document.getElementById("Docuserve-Content-Container");e&&e.classList.add("docuserve-section-playground-host"),this._refreshEditorRecords(),this.render(),this._buildShell();let t=this;for(let e=0;e<this._editors.length;e++){let t=this._editors[e],r=this._editorViewIdentifier(t.Hash),n=this._editorCodeAddress(t.Hash),a="Docuserve-Section-Playground-Editor-"+t.Hash;if(this.pict.views[r]){try{delete this.pict.views[r]}catch(e){}if(this.pict.servicesMap&&this.pict.servicesMap.PictView)try{delete this.pict.servicesMap.PictView[r]}catch(e){}}let s="Section-Playground-CodeMount-"+t.Hash,l=Object.assign({},o.default_configuration,{ViewIdentifier:r,DefaultDestinationAddress:"#"+a,TargetElementAddress:"#"+a,Templates:[{Hash:s,Template:"\x3c!-- pict-section-code mount: "+t.Hash+" --\x3e"}],Renderables:[{RenderableHash:"Section-Playground-CodeRenderable-"+t.Hash,TemplateHash:s,DestinationAddress:"#"+a}],Language:t.Language||"json",ReadOnly:!1,LineNumbers:!0,Tab:"\t",AddClosing:!0,CatchTab:!0,DefaultCode:t.Code,CodeDataAddress:n,AutoRender:!1,RenderOnLoad:!1}),c=class extends o{onCodeChange(e){super.onCodeChange(e),this._lsTimer&&clearTimeout(this._lsTimer);let t=this.options.ViewIdentifier.replace("Docuserve-Section-Playground-Editor-View-","");this._lsTimer=setTimeout(()=>{this._lsTimer=null;try{let r=this.fable.pict.views["Docuserve-Section-Playground"],n=r&&"function"==typeof r._storageKey?r._storageKey(t):i+":"+t;window.localStorage.setItem(n,e),r&&"function"==typeof r._setStatus&&r._setStatus("saved",!1)}catch(e){}},500)}};this.pict.addView(r,l,c)}this._loadCodeJar().then(function(e){for(let r=0;r<t._editors.length;r++){let n=t._editors[r],o=t.pict.views[t._editorViewIdentifier(n.Hash)];if(o){o._codeJarPrototype||o.connectCodeJarPrototype(e);try{o.render()}catch(e){}}}t._setStatus("press Run to render",!1,2500)}).catch(function(e){t._setStatus("CodeJar failed to load — editors disabled",!0,6e3)})}_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(function(e){if(!e||"function"!=typeof e.CodeJar)throw new Error("CodeJar export not found in module");return e.CodeJar})),this._codeJarPromise}_readAndValidateEditors(){let e={manifest:void 0,pictConfig:void 0,appConfig:void 0,appData:void 0};for(let t=0;t<this._editors.length;t++){let r,n=this._editors[t],o=this._editorCodeAddress(n.Hash),i=this.pict.manifest.getValueByHash(this.pict.AppData,o);if("string"!=typeof i&&(i=n.Code||""),"json"===(n.Language||"json").toLowerCase())if(""===i.trim())r={};else try{r=JSON.parse(i)}catch(e){throw new Error('JSON parse error in "'+n.Label+'": '+e.message)}else r=i;e.hasOwnProperty(n.Hash),e[n.Hash]=r}return e}_setStatus(e,t,r){let n=document.getElementById("Docuserve-Section-Playground-Status");if(!n)return;n.textContent=e,n.classList.add("show"),t?n.classList.add("error"):n.classList.remove("error"),this._statusTimer&&clearTimeout(this._statusTimer);let o="number"==typeof r?r:2500;this._statusTimer=setTimeout(function(){n.classList.remove("show"),n.classList.remove("error")},o)}_renderError(e){let t='<div class="docuserve-section-playground-emptystate"><div class="docuserve-section-playground-emptystate-title">Playground unavailable</div><div>'+this._escape(e)+"</div></div>";this.pict.ContentAssignment.assignContent("#Docuserve-Content-Container",t)}_escape(e){return String(e||"").replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]})}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender(e,t,r,n)}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Section-Playground",DefaultRenderable:"Docuserve-Section-Playground-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t/* The content container is provisioned by the layout shell as\n\t\t flex: 1 1 auto with min-height: 0. Promote it to a flex\n\t\t column so the playground inside can use flex: 1 to fill. */\n\t\t#Docuserve-Content-Container.docuserve-section-playground-host {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-section-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\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tbackground: var(--theme-color-background-primary, #FDFBF7);\n\t\t}\n\n\t\t/* Toolbar — tabs on the left, action buttons on the right. */\n\t\t.docuserve-section-playground-toolbar {\n\t\t\tflex: 0 0 auto;\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0 0.5em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t}\n\t\t.docuserve-section-playground-tabs {\n\t\t\tdisplay: flex;\n\t\t\tgap: 0;\n\t\t}\n\t\t.docuserve-section-playground-tab {\n\t\t\tpadding: 0.55em 0.95em;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tbackground: transparent;\n\t\t\tborder: 0;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\tcursor: pointer;\n\t\t\ttransition: color 0.12s, border-color 0.12s, background-color 0.12s;\n\t\t}\n\t\t.docuserve-section-playground-tab:hover {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tbackground: var(--theme-color-background-hover, #EAE3D8);\n\t\t}\n\t\t.docuserve-section-playground-tab.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tborder-bottom-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.docuserve-section-playground-tab-dirty::after {\n\t\t\tcontent: '*';\n\t\t\tmargin-left: 0.25em;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-section-playground-actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t\tpadding: 0.25em 0;\n\t\t}\n\n\t\t/* Icon button — same visual language as the Fable playground for\n\t\t continuity. Run is brighter to draw the eye. */\n\t\t.docuserve-section-playground-iconbtn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.7em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\ttransition: color 0.12s, background-color 0.12s, border-color 0.12s, opacity 0.12s;\n\t\t\topacity: 0.75;\n\t\t}\n\t\t.docuserve-section-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-section-playground-iconbtn svg {\n\t\t\twidth: 1em;\n\t\t\theight: 1em;\n\t\t\tdisplay: block;\n\t\t}\n\t\t.docuserve-section-playground-iconbtn-run {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\topacity: 0.9;\n\t\t}\n\t\t.docuserve-section-playground-iconbtn-run: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\topacity: 1;\n\t\t}\n\t\t.docuserve-section-playground-iconbtn-run svg { fill: currentColor; stroke: none; }\n\n\t\t/* Body — pict-section-modal shell with the editor stack in the\n\t\t center and the iframe sandbox as a resizable + collapsible\n\t\t bottom panel. Layout, drag-to-resize, collapse-tab, and\n\t\t persistence are all owned by the shell; this view just hosts\n\t\t it inside the playground's content area. */\n\t\t.docuserve-section-playground-shell-mount {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-host { height: 100%; }\n\n\t\t/* Editor stack (the shell's center). The tab-slot divs are\n\t\t stacked; only the active one is display:flex. pict-section-code\n\t\t itself draws the editor surface. */\n\t\t.docuserve-section-playground-editor-mount {\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-section-playground-editor {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-section-playground-editor.active {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.docuserve-section-playground-editor > * {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t}\n\n\t\t/* Iframe pane — the rendered section + its theme switcher.\n\t\t Lives inside the shell's bottom panel; the panel owns its\n\t\t own border + sizing chrome. */\n\t\t.docuserve-section-playground-iframe-pane {\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t}\n\t\t.docuserve-section-playground-iframe {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tborder: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-section-playground-status {\n\t\t\tposition: absolute;\n\t\t\ttop: 0.5em;\n\t\t\tright: 0.7em;\n\t\t\tfont-size: 0.7em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 0.15em 0.5em;\n\t\t\tborder-radius: 4px;\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpointer-events: none;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.docuserve-section-playground-status.show { opacity: 0.85; }\n\t\t.docuserve-section-playground-status.error {\n\t\t\tcolor: var(--theme-color-status-error, #B43A2E);\n\t\t\tborder-color: var(--theme-color-status-error, #B43A2E);\n\t\t}\n\n\t\t/* Empty state for the iframe pane before the first Run. */\n\t\t.docuserve-section-playground-emptystate {\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\theight: 100%;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 0.9em;\n\t\t\ttext-align: center;\n\t\t\tpadding: 2em;\n\t\t}\n\t\t.docuserve-section-playground-emptystate-title {\n\t\t\tfont-size: 1.1em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-bottom: 0.4em;\n\t\t}\n\n\t\t/* Wider middle-positioned collapse tab on the sandbox panel —\n\t\t replaces the stock 28×6 right-anchored sliver with a labelled\n\t\t \"Sandbox\" pill centered above the panel's top edge. The pill\n\t\t is wide enough to read at a glance and lives at the boundary\n\t\t between editor and sandbox so the user's eye finds it\n\t\t immediately. */\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab\n\t\t{\n\t\t\t/* Geometry: wide pill positioned fully ABOVE the panel's\n\t\t\t top edge (matches the section-modal default of \"tab\n\t\t\t entirely outside the panel\"; top = -height places the\n\t\t\t tab's bottom edge flush against the panel boundary). */\n\t\t\twidth: 160px;\n\t\t\theight: 18px;\n\t\t\tleft: 50%;\n\t\t\tright: auto;\n\t\t\ttop: -18px;\n\t\t\tmargin-left: -80px;\n\t\t\tborder-radius: 5px 5px 0 0;\n\t\t\tborder-bottom: 0;\n\t\t\t/* Visual: always readable, not just on hover. */\n\t\t\topacity: 0.95;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tborder-color: var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0 10px;\n\t\t\tgap: 6px;\n\t\t\tline-height: 16px;\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.08em;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\t\t/* Title text always visible (the stock CSS only shows it when\n\t\t collapsed); the chevron pseudo is hidden — the label carries\n\t\t the affordance. */\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-title\n\t\t{\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab::before\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Keep the size stable on hover (stock CSS grows it to 36×18) —\n\t\t only color shifts so the user knows it's interactive. */\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n\t\t{\n\t\t\twidth: 160px;\n\t\t\theight: 18px;\n\t\t\ttop: -18px;\n\t\t\tmargin-left: -80px;\n\t\t\topacity: 1;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t",CSSPriority:500,Templates:[{Hash:"Docuserve-Section-Playground-Template",Template:'\n<div class="docuserve-section-playground">\n\t<div class="docuserve-section-playground-toolbar">\n\t\t<div class="docuserve-section-playground-tabs" id="Docuserve-Section-Playground-Tabs">\n\t\t\t{~TS:Docuserve-Section-Playground-Tab-Template:AppData.Docuserve.SectionPlayground.Editors~}\n\t\t</div>\n\t\t<div class="docuserve-section-playground-actions">\n\t\t\t<button type="button" class="docuserve-section-playground-iconbtn"\n\t\t\t\ttitle="Reset all editors to their starter content"\n\t\t\t\tonclick="{~P~}.views[\'Docuserve-Section-Playground\'].resetAll()">\n\t\t\t\t{~I:Refresh~} Reset\n\t\t\t</button>\n\t\t\t<button type="button" class="docuserve-section-playground-iconbtn docuserve-section-playground-iconbtn-run"\n\t\t\t\ttitle="Run — reload the iframe with the current editor contents"\n\t\t\t\tonclick="{~P~}.views[\'Docuserve-Section-Playground\'].run()">\n\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><polygon points="6 4 20 12 6 20"/></svg>\n\t\t\t\tRun\n\t\t\t</button>\n\t\t</div>\n\t</div>\n\t\x3c!-- pict-section-modal shell mount. _mountAndRender() calls\n\t modal.shell(thisDiv) and addPanel() for the bottom sandbox\n\t panel + center() for the editor stack. The shell builds its\n\t own destination divs (#Section-Playground-Editor-Mount and\n\t #Section-Playground-Iframe-Mount) inside this wrapper. --\x3e\n\t<div class="docuserve-section-playground-shell-mount" id="Docuserve-Section-Playground-Shell-Mount"></div>\n</div>'},{Hash:"Docuserve-Section-Playground-Tab-Template",Template:'<button type="button"\n\tclass="docuserve-section-playground-tab{~D:Record.ActiveClass~}"\n\tonclick="{~P~}.views[\'Docuserve-Section-Playground\'].selectTab(\'{~D:Record.Hash~}\')"\n>{~D:Record.Label~}</button>'},{Hash:"Docuserve-Section-Playground-Editor-Slot-Template",Template:'<div class="docuserve-section-playground-editor{~D:Record.ActiveClass~}"\n\tid="Docuserve-Section-Playground-Editor-{~D:Record.Hash~}"\n\tdata-editor-hash="{~D:Record.Hash~}"></div>'}],Renderables:[{RenderableHash:"Docuserve-Section-Playground-Content",TemplateHash:"Docuserve-Section-Playground-Template",ContentDestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-section-code":152,"pict-view":233}],361:[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: none;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t/* The "X" close button is only useful when the sidebar is acting\n\t\t as a responsive drawer (narrow viewports where the panel slid\n\t\t in over the content area). In docked desktop mode the\n\t\t pict-section-modal collapse tab on the panel\'s outer edge is\n\t\t the canonical collapse affordance — a second X inside the\n\t\t panel competes with it and looks messy. Show the X only in\n\t\t drawer mode. */\n\t\t.pict-modal-shell-panel-drawer .docuserve-sidebar-header {\n\t\t\tdisplay: flex;\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":233}],362:[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.renderExamples(o.Cover)):this.renderFromCatalog(o),this.renderPlaygroundButton(),this.renderReadme(),super.onAfterRender(e,t,r,n)}renderPlaygroundButton(){let e=this.pict.providers["Docuserve-Documentation"];if(!e||"function"!=typeof e.loadPlaygroundConfig)return;let t=this.pict.AppData.Docuserve||{},r=t.CurrentGroup||"",n=t.CurrentModule||"";e.loadPlaygroundConfig(r,n).then(e=>{if(!e)return;let t;t="section"===e.Kind?r&&n?"#/playground/section/"+r+"/"+n:"#/playground/section":"#/playground/fable";let o='<a class="secondary" href="'+this.escapeHTML(t)+'">Playground</a>';this.pict.ContentAssignment.projectContent("append","#Docuserve-Splash-Actions",o)}).catch(()=>{})}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","")}renderExamples(e){let t=e&&e.ExamplesMarkdown?e.ExamplesMarkdown:"",r=this.pict.providers["Docuserve-Documentation"];if(!t||!r||!r._ContentProvider)return void this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Examples","");let n=r._createLinkResolver("","",""),o=r._ContentProvider.parseMarkdown(t,n);this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Examples",'<h2 class="docuserve-splash-examples-heading">Interactive Examples</h2>'+o)}renderReadme(){let e=this.pict.providers["Docuserve-Documentation"],t=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(t+"README.md").then(e=>e.ok?e.text():null).then(r=>{if(!r||!e||!e._ContentProvider)return void this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Readme","");let n=e._createLinkResolver("","","README.md"),o=e._createImageResolver(t+"README.md"),i=e._ContentProvider.parseMarkdown(r,n,o);this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Readme",'<div class="pict-content">'+i+"</div>")}).catch(()=>{this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Readme","")})}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\t.docuserve-splash-examples {\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t/* No staged examples — collapse the section entirely. */\n\t\t.docuserve-splash-examples:empty {\n\t\t\tdisplay: none;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.docuserve-splash-examples-heading {\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.08em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tmargin: 0 0 0.85em 0;\n\t\t}\n\t\t.docuserve-splash-examples table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\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\toverflow: hidden;\n\t\t}\n\t\t.docuserve-splash-examples thead th {\n\t\t\ttext-align: left;\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 700;\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\tpadding: 0.7em 1.1em;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F4EFE6);\n\t\t}\n\t\t.docuserve-splash-examples tbody td {\n\t\t\tpadding: 0.7em 1.1em;\n\t\t\tborder-top: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-align: left;\n\t\t}\n\t\t.docuserve-splash-examples tbody tr:hover td {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F4EFE6);\n\t\t}\n\t\t.docuserve-splash-examples a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-splash-examples a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* docs/README.md content rendered beneath the hero. */\n\t\t.docuserve-splash-readme {\n\t\t\tmax-width: 820px;\n\t\t\tmargin: 0 auto;\n\t\t\tpadding: 3.5em 2em 5em 2em;\n\t\t\ttext-align: left;\n\t\t}\n\t\t.docuserve-splash-readme:empty {\n\t\t\tdisplay: none;\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-examples" id="Docuserve-Splash-Examples"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n<div class="docuserve-splash-readme" id="Docuserve-Splash-Readme"></div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":233}],363:[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":233}],364:[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>"}let n=e.CurrentGroup,o=e.CurrentModule;if(n&&o){let e=this.pict.providers["Docuserve-Documentation"],t=e&&"function"==typeof e.resolveGitHubRepoURL?e.resolveGitHubRepoURL(n,o):null;if(t){let e=this.pict.icon("GitHub",{class:"docuserve-octocat",ariaLabel:"View source on GitHub"});r+='<a class="docuserve-repo-link" href="'+this._escapeHTML(t)+'" target="_blank" rel="noopener" title="View '+this._escapeHTML(o)+' source on GitHub">'+e+"</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\t.docuserve-user a.docuserve-repo-link\n\t\t{\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tfont-size: 1.15em;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t}\n\t\t.docuserve-user a.docuserve-repo-link .docuserve-octocat\n\t\t{\n\t\t\tline-height: 0;\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":233}]},{},[352])(352)});
141
+ 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":305,"./WordTree.js":306}],305:[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}}},{}],306:[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}}},{}],307:[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}},{}],308:[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 D(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 P(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=D(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 A(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=D(r,b,n==o),r=0,++n}++r,++t}return w.join("")}if(s={version:"1.4.1",ucs2:{decode:S,encode:T},decode:P,encode:A,toASCII:function(e){return v(e,function(e){return p.test(e)?"xn--"+A(e):e})},toUnicode:function(e){return v(e,function(e){return h.test(e)?P(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:{})},{}],309:[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}},{}],310:[function(e,t,r){var n=e("./stringify"),o=e("./parse"),i=e("./formats");t.exports={formats:i,parse:o,stringify:n}},{"./formats":309,"./parse":311,"./stringify":312}],311:[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":313}],312:[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,D){for(var P,A=t,C=D,k=0,E=!1;void 0!==(C=C.get(f))&&!E;){var L=C.get(t);if(k+=1,void 0!==L){if(L===k)throw new RangeError("Cyclic object value");E=!0}void 0===C.get(f)&&(k=0)}if("function"==typeof g?A=g(r,A):A instanceof Date?A=v(A):"comma"===i&&l(A)&&(A=o.maybeMap(A,function(e){return e instanceof Date?v(e):e})),null===A){if(c)return m&&!w?m(r,u.encoder,x,"key",S):r;A=""}if("string"==typeof(P=A)||"number"==typeof P||"boolean"==typeof P||"symbol"==typeof P||"bigint"==typeof P||o.isBuffer(A))return m?[T(w?r:m(r,u.encoder,x,"key",S))+"="+T(m(A,u.encoder,x,"value",S))]:[T(r)+"="+T(String(A))];var M,F=[];if(void 0===A)return F;if("comma"===i&&l(A))w&&m&&(A=o.maybeMap(A,m)),M=[{value:A.length>0?A.join(",")||null:void 0}];else if(l(g))M=g;else{var R=Object.keys(A);M=y?R.sort(y):R}var _=p?String(r).replace(/\./g,"%2E"):String(r),B=a&&l(A)&&1===A.length?_+"[]":_;if(s&&l(A)&&0===A.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:A[I];if(!h||null!==j){var O=b&&p?String(I).replace(/\./g,"%2E"):String(I),H=l(A)?"function"==typeof i?i(B,O):B:B+(b?"."+O:"["+O+"]");D.set(t,k);var V=n();V.set(f,D),d(F,e(j,H,i,a,s,c,h,p,"comma"===i&&w&&l(A)?null:m,g,y,b,v,S,T,w,x,V))}}return F};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":309,"./utils":313,"side-channel":321}],313:[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":309,"side-channel":321}],314:[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)}},{}],315:[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}},{}],316:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":314,"./encode":315}],317:[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}],318:[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}],319:[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}],320:[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":319}],321:[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":318,"side-channel-map":319,"side-channel-weakmap":320}],322:[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}],323:[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:324,https:113,once:138,querystring:316,"simple-concat":322,url:345}],324:[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":326,"./lib/response":327,"builtin-status-codes":21,url:345,xtend:348}],325:[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:{})},{}],326:[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":325,"./response":327,_process:307,buffer:20,inherits:115,"readable-stream":342}],327:[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":325,_process:307,buffer:20,inherits:115,"readable-stream":342}],328:[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},{}],329:[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":331,"./_stream_writable":333,_process:307,inherits:115}],330:[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":332,inherits:115}],331:[function(e,t,r){(function(r,n){(function(){var o;t.exports=P,P.ReadableState=D;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")(P,a);var w=m.errorOrDestroy,x=["error","close","destroy","pause","resume"];function D(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 P(t){if(o=o||e("./_stream_duplex"),!(this instanceof P))return new P(t);var r=this instanceof o;this._readableState=new D(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 A(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?L(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):C(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?C(e,a,t,!1):F(e,a)):C(e,a,t,!1)}else n||(a.reading=!1,F(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function C(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&&L(e)),F(e,t)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),P.prototype.destroy=m.destroy,P.prototype._undestroy=m.undestroy,P.prototype._destroy=function(e,t){t(e)},P.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),A(this,e,t,!1,r)},P.prototype.unshift=function(e){return A(this,e,null,!0,!1)},P.prototype.isPaused=function(){return!1===this._readableState.flowing},P.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 L(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 F(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(H,t,e))}function H(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 V(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}P.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):L(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},P.prototype._read=function(e){w(this,new S("_read()"))},P.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!==V(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},P.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=V(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},P.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?L(this):o.reading||r.nextTick(B,this))),n},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(_,this),n},P.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(_,this),t},P.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},P.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},P.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&&(P.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=e("./internal/streams/async_iterator")),p(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),P._fromList=j,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(P.from=function(t,r){return void 0===u&&(u=e("./internal/streams/from")),u(P,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":328,"./_stream_duplex":329,"./internal/streams/async_iterator":334,"./internal/streams/buffer_list":335,"./internal/streams/destroy":336,"./internal/streams/from":338,"./internal/streams/state":340,"./internal/streams/stream":341,_process:307,buffer:20,events:50,inherits:115,"string_decoder/":343,util:18}],332:[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":328,"./_stream_duplex":329,inherits:115}],333:[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=P,P.WritableState=D;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 D(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(C,e,n,a,i):C(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 P(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!d.call(P,this))return new P(t);this._writableState=new D(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 A(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 C(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,A(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(A(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 L(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(L,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")(P,s),D.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(D.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(P,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===P&&(e&&e._writableState instanceof D)}})):d=function(e){return e instanceof this},P.prototype.pipe=function(){w(this,new y)},P.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 A(e,t,!1,s,n,o,i);return c}(this,i,s,e,t,n)),a},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||k(this,e))},P.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(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),P.prototype._write=function(e,t,r){r(new m("_write()"))},P.prototype._writev=null,P.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(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),P.prototype.destroy=h.destroy,P.prototype._undestroy=h.undestroy,P.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":328,"./_stream_duplex":329,"./internal/streams/destroy":336,"./internal/streams/state":340,"./internal/streams/stream":341,_process:307,buffer:20,inherits:115,"util-deprecate":346}],334:[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":337,_process:307}],335:[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}],336:[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:307}],337:[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":328}],338:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],339:[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":328,"./end-of-stream":337}],340:[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":328}],341:[function(e,t,r){t.exports=e("events").EventEmitter},{events:50}],342:[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":329,"./lib/_stream_passthrough.js":330,"./lib/_stream_readable.js":331,"./lib/_stream_transform.js":332,"./lib/_stream_writable.js":333,"./lib/internal/streams/end-of-stream.js":337,"./lib/internal/streams/pipeline.js":339}],343:[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":317}],344:[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":307,timers:344}],345:[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,D,P=-1,A=0;A<h.length;A++){-1!==(C=b.indexOf(h[A]))&&(-1===P||C<P)&&(P=C)}-1!==(D=-1===P?b.lastIndexOf("@"):b.lastIndexOf("@",P))&&(x=b.slice(0,D),b=b.slice(D+1),this.auth=decodeURIComponent(x)),P=-1;for(A=0;A<d.length;A++){var C;-1!==(C=b.indexOf(d[A]))&&(-1===P||C<P)&&(P=C)}-1===P&&(P=b.length),this.host=b.slice(0,P),b=b.slice(P),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(/\./),L=(A=0,E.length);A<L;A++){var M=E[A];if(M&&!M.match(p)){for(var F="",R=0,_=M.length;R<_;R++)M.charCodeAt(R)>127?F+="x":F+=M[R];if(!F.match(p)){var B=E.slice(0,A),N=E.slice(A+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(A=0,L=c.length;A<L;A++){var H=c[A];if(-1!==b.indexOf(H)){var V=encodeURIComponent(H);V===H&&(V=escape(H)),b=b.split(H).join(V)}}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 D=w.slice(-1)[0],P=(r.host||e.host||w.length>1)&&("."===D||".."===D)||""===D,A=0,C=w.length;C>=0;C--)"."===(D=w[C])?w.splice(C,1):".."===D?(w.splice(C,1),A++):A&&(w.splice(C,1),A--);if(!S&&!T)for(;A--;A)w.unshift("..");!S||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),P&&"/"!==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/":308,qs:310}],346:[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:{})},{}],347:[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}}},{}],348:[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},{}],349:[function(e,t,r){t.exports={name:"pict-docuserve",version:"1.4.14",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",build:"npx quack build && npx quack copy","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.372","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-provider-theme":"^1.1.2","pict-section-code":"^1.0.11","pict-section-content":"^1.0.13","pict-section-histogram":"^1.0.1","pict-section-modal":"^1.1.4","pict-section-theme":"^1.1.1","pict-service-commandlineutility":"^1.0.19","pict-view":"^1.0.68"},devDependencies:{"pict-docuserve":"^1.4.4",quackage:"^1.3.0"},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"}}}}},{}],350:[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":349}],351:[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"}}},{}],352:[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"),b=e("./views/PictView-Docuserve-Section-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.pict.addView("Docuserve-Section-Playground",b.default_configuration,b),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:"retold-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(){this._resolveHashRoute();let e=this.pict.views["Docuserve-TopBar-User"];e&&"function"==typeof e.render&&e.render()}_resolveHashRoute(){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)}if("playground"===t[0]&&t.length>=2){if("section"===t[1]){let e=t.length>=4?t[2]:this.pict.AppData.Docuserve.CurrentGroup||"",r=t.length>=4?t[3]:this.pict.AppData.Docuserve.CurrentModule||"";return void this.navigateToSectionPlayground(e,r)}this.navigateToPlayground(t[1])}else 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>"))}navigateToSectionPlayground(e,t){this.pict.AppData.Docuserve.CurrentGroup=e,this.pict.AppData.Docuserve.CurrentModule=t,this.pict.AppData.Docuserve.CurrentDemo="",this.pict.AppData.Docuserve.CurrentPath="section-playground";let r=this.pict.views["Docuserve-Layout"];r&&"function"==typeof r.setPlaygroundEnabled&&r.setPlaygroundEnabled(!1);let n=this.pict.views["Docuserve-Section-Playground"];if(!n||"function"!=typeof n.openPlayground){let e=this.pict.views["Docuserve-Content"];return void(e&&"function"==typeof e.displayContent&&(e.render(),e.displayContent("<h1>Section playground unavailable</h1><p>The Section Playground view is not registered.</p>")))}n.openPlayground(e,t);let o=this.pict.views["Docuserve-Sidebar"];o&&(o.renderSidebarGroups(),"function"==typeof o.renderModuleNav&&o.renderModuleNav(e,t))}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);e.setPlaygroundEnabled(o),"function"==typeof e.setPlaygroundTitle&&e.setPlaygroundTitle(n?"JS Playground: "+n:"JS Playground"),t&&"function"==typeof t.loadPlaygroundConfig&&t.loadPlaygroundConfig(r,n).then(o=>{if(this.pict.AppData.Docuserve.Playground||(this.pict.AppData.Docuserve.Playground={}),this.pict.AppData.Docuserve.Playground.Config=o||null,"function"==typeof t.isPlaygroundEnabled){let o=t.isPlaygroundEnabled(r,n);e.setPlaygroundEnabled(o)}let i=this.pict.views["Docuserve-Fable-Playground"];i&&"function"==typeof i._applySandboxMode&&i._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,n)=>{if(e&&!o.match(/(^|\/)README\.md$/i)){let e=o.replace(/\.md$/i,"")+"/README.md";return void t.fetchLocalDocument(e,(e,t)=>{r.displayContent(e?n:t)},"","",e)}r.displayContent(n)},"","",o)}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":350,"./Pict-Application-Docuserve-Configuration.json":351,"./providers/Pict-Provider-Docuserve-Demos.js":353,"./providers/Pict-Provider-Docuserve-Documentation.js":354,"./views/PictView-Docuserve-Content.js":355,"./views/PictView-Docuserve-Demo.js":356,"./views/PictView-Docuserve-Fable-Playground.js":357,"./views/PictView-Docuserve-Layout.js":358,"./views/PictView-Docuserve-Search.js":359,"./views/PictView-Docuserve-Section-Playground.js":360,"./views/PictView-Docuserve-Sidebar.js":361,"./views/PictView-Docuserve-Splash.js":362,"./views/PictView-Docuserve-TopBar-Nav.js":363,"./views/PictView-Docuserve-TopBar-User.js":364,"pict-application":141,"pict-section-modal":172,"pict-section-theme":173}],353:[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":149}],354:[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._KeywordIndexMode=null,this._ContentCache={},this._PlaygroundConfigCache={},this._ContentProvider=this.pict.addProvider("Pict-Content",i.default_configuration,i),this.pict&&this.pict.providers&&this.pict.providers.Icon&&"function"==typeof this.pict.providers.Icon.registerSet&&this.pict.providers.Icon.registerSet({Outline:{GitHub:'<svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>'}})}_createLinkResolver(e,t,r){return(n,o)=>{let i=String(n||""),a="module"===this.getDocsMode();if(!i.match(/^[a-z][a-z0-9+.-]*:/i)&&i.match(/\.html($|[?#])/i))return{href:i,target:"_blank",rel:"noopener"};if(i.match(/^\//)||i.match(/^[^:]+\.md/)){return{href:this.convertDocLink(i,e,t,r)}}return a&&i&&"#"!==i.charAt(0)&&0!==i.indexOf("//")&&!i.match(/^[a-z][a-z0-9+.-]*:/i)?{href:this._toModuleAssetHref(i,r)}: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:[],ExamplesMarkdown:""},r=e.split("\n"),n=!1;for(let e=0;e<r.length;e++){let o=r[e].trim();if("\x3c!-- docuserve:examples:start --\x3e"===o){n=!0;continue}if("\x3c!-- docuserve:examples:end --\x3e"===o){n=!1;continue}if(n){o&&(t.ExamplesMarkdown+=(t.ExamplesMarkdown?"\n":"")+o);continue}if(!o)continue;let i=o.match(/^#+\s+(.+)/);if(i){t.Title=i[1].trim();continue}let a=o.match(/^>\s*(.*)/);if(a){t.Tagline=a[1].trim();continue}let s=o.match(/^[-*+]\s+(.*)/);if(s){let e=s[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 l=o.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);l?t.Actions.push({Text:l[1].trim(),Href:l[2].trim()}):t.Description?t.Description+=" "+o:t.Description=o}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._KeywordIndexMode="module"===e.Mode||"ecosystem"===e.Mode?e.Mode:null,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()))}getDocsMode(){return!this._Catalog||"module"!==this._Catalog.Mode&&"ecosystem"!==this._Catalog.Mode?"module"===this._KeywordIndexMode||"ecosystem"===this._KeywordIndexMode?this._KeywordIndexMode:"legacy":this._Catalog.Mode}_toModulePageRoute(e,t){let r=String(e||"").trim(),n="";if("/"===r.charAt(0))r=r.replace(/^\/+/,"");else if(t){let e=String(t).split("/");e.pop(),n=e.join("/")}let o=this._resolveRelativeDocPath(n,r);return o?"#/page/"+o.replace(/\.md$/i,""):"#/Home"}_resolveRelativeDocPath(e,t){let r=[],n=((e?e+"/":"")+String(t||"")).split("/");for(let e=0;e<n.length;e++){let t=n[e];""!==t&&"."!==t&&(".."!==t?r.push(t):r.length>0&&r.pop())}return r.join("/")}_toModuleAssetHref(e,t){let r=String(e||"").trim();if(!r)return r;let n="";if("/"===r.charAt(0))r=r.replace(/^\/+/,"");else if(t){let e=String(t).split("/");e.pop(),n=e.join("/")}return this._resolveRelativeDocPath(n,r)}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),n=this.getDocsMode();for(let e=0;e<r.length;e++){let o=r[e].ref,i=r[e].score,a=this._KeywordDocuments[o];if(!a)continue;let s="";if("module"===n)s="#/page/"+(a.DocPath||o);else if("ecosystem"===n)s=a.Group&&a.Module&&a.DocPath?"#/doc/"+a.Group+"/"+a.Module+"/"+a.DocPath:"#/page/"+o;else{let e=o.split("/");s=e.length>=2&&this.isModuleInCatalog(e[0],e[1])?"#/doc/"+o:"#/page/"+o}t.push({Key:o,Title:a.Title||o,Group:a.Group||"",Module:a.Module||"",DocPath:a.DocPath||"",Score:i,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.match(/^#\//))return e;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"}if(e.match(/\.html($|[?#])/i)&&!e.match(/^[a-z][a-z0-9+.-]*:/i))return e;if("module"===this.getDocsMode())return this._toModulePageRoute(e);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}resolveGitHubRepoURL(e,t){if(!this._Catalog)return null;if(this._Catalog.Module&&this._Catalog.Module.Name&&(!t||this._Catalog.Module.Name===t)){let e=this._Catalog.Module;return"https://github.com/"+(e.Org||this._Catalog.GitHubOrg||"stevenvelozo")+"/"+(e.Repo||e.Name)}if(!this._Catalog.Groups)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"https://github.com/"+(r.Org||this._Catalog.GitHubOrg||"stevenvelozo")+"/"+r.Repo}}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){let r=(e||"")+"/"+(t||"");if(Object.prototype.hasOwnProperty.call(this._PlaygroundConfigCache,r)){let e=this._PlaygroundConfigCache[r];if(e&&"section"===e.Kind)return!1}if(e&&t){let r=this.getModuleSidebar(e,t);if(Array.isArray(r)&&this._sidebarEntriesIncludePlayground(r))return!0}let n=this.pict.AppData.Docuserve.SidebarGroups;return!(!Array.isArray(n)||!this._sidebarGroupsIncludePlayground(n))}_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){if("module"===this.getDocsMode())return this._toModulePageRoute(e,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":149,"pict-section-content":154}],355:[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/* Dark-mode override for handcrafted mermaid flowchart diagrams that\n\t\t bake per-node inline fill colors via 'style X fill:#...' directives\n\t\t (the architecture / module docs use these to mark layer hierarchy\n\t\t with Material pastels). Mermaid renders those as inline\n\t\t style=\"fill:#...\" SVG attributes — highest specificity, so neither\n\t\t themeVariables nor unflagged CSS can reach them. In light mode the\n\t\t pastels read fine; in dark mode the same light fills stamp a\n\t\t high-contrast island onto the dark page with unreadable text.\n\t\t Force the fills back to a theme background so dark-mode reads;\n\t\t light mode is intentionally unmodified so the per-layer hierarchy\n\t\t stays intact there. Sibling to the block-beta invert filter below:\n\t\t block-beta diagrams need full inversion (their inner palette is\n\t\t baked separately), flowcharts only need a fill swap. */\n\t\t.theme-dark .pict-content pre.mermaid .node rect,\n\t\t.theme-dark .pict-content pre.mermaid .node polygon,\n\t\t.theme-dark .pict-content pre.mermaid .node circle,\n\t\t.theme-dark .pict-content pre.mermaid .node ellipse,\n\t\t.theme-dark .pict-content pre.mermaid .node path,\n\t\t.theme-dark .pict-content pre.mermaid .cluster rect {\n\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t}\n\t\t/* Mirror of the above for theme mode 'system' — when the user\n\t\t hasn't explicitly picked light or dark, the theme provider\n\t\t leaves <html> without .theme-light/.theme-dark and the CSS\n\t\t variables follow prefers-color-scheme. The .theme-dark-prefixed\n\t\t block above doesn't match in that case, so light pastels would\n\t\t win again on dark OSes. Mirror the rule under the media query,\n\t\t gated by :not(.theme-light) so an explicit light override on a\n\t\t dark OS still wins. */\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node rect,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node polygon,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node circle,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node ellipse,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .node path,\n\t\t\thtml:not(.theme-light) .pict-content pre.mermaid .cluster rect {\n\t\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t\t}\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/* Same dark-mode fill/stroke override as for inline diagrams, but\n\t\t scoped to the fullscreen-overlay clone — which lives under\n\t\t <body>, NOT inside .pict-content, so the pre.mermaid-scoped\n\t\t rules above don't reach it. */\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node rect,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node polygon,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node circle,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node ellipse,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node path,\n\t\t.theme-dark .pict-fullscreen-content .pict-fullscreen-mermaid-svg .cluster rect {\n\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t}\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node rect,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node polygon,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node circle,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node ellipse,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .node path,\n\t\t\thtml:not(.theme-light) .pict-fullscreen-content .pict-fullscreen-mermaid-svg .cluster rect {\n\t\t\t\tfill: var(--theme-color-background-tertiary, #2A241E) !important;\n\t\t\t\tstroke: var(--theme-color-border-default, #5E5549) !important;\n\t\t\t}\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":154}],356:[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":233}],357:[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:243,"pict-section-code":152,"pict-section-histogram":159,"pict-view":233}],358:[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/* Sidebar panel uses the secondary background so the chrome\n\t\t (panel surface AND the collapse tab that pokes out of it) match\n\t\t the inner #Docuserve-Sidebar-Container's secondary fill. Without\n\t\t this the panel is white-cream while the inner is darker-cream,\n\t\t and the collapse tab — which inherits its background from\n\t\t --pict-modal-bg — looks like a foreign sliver hanging off the\n\t\t wrong-colored panel. Overriding --pict-modal-bg also retints the\n\t\t tab's merge-bar box-shadow so the join is invisible. */\n\t\t.pict-modal-shell-panel-left\n\t\t{\n\t\t\t--pict-modal-bg: var(--theme-color-background-secondary, #FAF7F1);\n\t\t\tbackground: var(--theme-color-background-secondary, #FAF7F1);\n\t\t}\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":233}],359:[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":233}],360:[function(e,t,r){const n=e("pict-view"),o=e("pict-section-code"),i="docuserve-section-playground";t.exports=class extends n{constructor(e,t,r){super(e,t,r),this._editors=[],this._activeHash=null,this._scope={Group:"",Module:""}}openPlayground(e,t){this._scope={Group:e,Module:t};let r=this.pict.providers["Docuserve-Documentation"];if(!r||"function"!=typeof r.loadPlaygroundConfig)return void this._renderError("Documentation provider is not registered.");let n=this;r.loadPlaygroundConfig(e,t).then(function(r){r&&"section"===r.Kind?(n._spec=r,n._loadEditors(e,t,r).then(function(){n._mountAndRender()})):n._renderError('This module does not have a section playground configured. Add `Kind: "section"` to `docs/_playground.json` and declare an `Editors` array.')}).catch(function(e){n._renderError("Failed to load _playground.json: "+(e&&e.message?e.message:e))})}selectTab(e){this._activeHash=e,this._refreshEditorRecords();let t=document.querySelectorAll(".docuserve-section-playground-tab");for(let e=0;e<t.length;e++)t[e].classList.remove("active");let r=document.querySelectorAll(".docuserve-section-playground-editor");for(let e=0;e<r.length;e++)r[e].classList.remove("active");for(let t=0;t<this._editors.length;t++){let r=this._editors[t];if(r.Hash===e){let e=document.querySelector(".docuserve-section-playground-tab[onclick*=\"'"+r.Hash+"'\"]");e&&e.classList.add("active");let t=document.getElementById("Docuserve-Section-Playground-Editor-"+r.Hash);t&&t.classList.add("active")}}}run(){let e;try{e=this._readAndValidateEditors()}catch(e){return void this._setStatus(e.message,!0)}this._setStatus("running…",!1);let t=document.getElementById("Docuserve-Section-Playground-Iframe");if(!t)return;let r="";try{r=window.location.href.split("#")[0].replace(/index\.html$/,"")}catch(e){r=""}let n=function(e,t,r){let n=Object.assign({},{SectionType:"pict-section-form",ApplicationGlobal:"PictFormApplication",ApplicationModule:"PictSectionForm",ManifestKey:"DefaultFormManifest",WrapperKind:"application",ViewName:"Section-Playground-View",ViewConfigKey:"ViewConfig",MountID:"",BootstrapMethod:"",BootstrapSeedAddress:"",Imports:[],Stylesheets:[]},t||{}),o=n.Imports&&n.Imports.length>0?n.Imports:[{Name:"pict",Source:"cdn"},{Name:"pict-application",Source:"cdn"},{Name:"pict-section-form",Source:"cdn"},{Name:"pict-section-modal",Source:"cdn"},{Name:"pict-section-theme",Source:"cdn"}],i="",a=[];for(let e=0;e<o.length;e++){let t,r=o[e];if("esm"!==r.Source){if("local"===r.Source)t=r.Path;else{let e=r.Version||"1";t="https://cdn.jsdelivr.net/npm/"+r.Name+"@"+e+"/dist/"+r.Name+".min.js"}i+='<script src="'+t+'"><\/script>\n'}else a.push(r)}let s=Array.isArray(n.Stylesheets)?n.Stylesheets:[],l="";for(let e=0;e<s.length;e++){let t,r=s[e];if("local"===r.Source)t=r.Path;else{let e=r.Version||"1",n=r.Path||"dist/"+r.Name+".min.css";t="https://cdn.jsdelivr.net/npm/"+r.Name+"@"+e+"/"+n}l+='<link rel="stylesheet" href="'+t+'">\n'}let c="";if(a.length>0){c+='<script type="module">\n',c+="window.__SectionPlaygroundESMReady = (async () => {\n";for(let e=0;e<a.length;e++){let t=a[e],r=t.URL;if(!r&&t.Name){let e=t.Version||"1";r="https://cdn.jsdelivr.net/npm/"+t.Name+"@"+e+"/dist/"+t.Name+".min.js"}let n=t.ExportName||t.GlobalName||t.Name,o=t.GlobalName||t.ExportName||t.Name;c+=" try {\n",c+=" const mod = await import("+JSON.stringify(r)+");\n",c+=" window["+JSON.stringify(o)+"] = mod["+JSON.stringify(n)+"] || mod.default || mod;\n",c+=" } catch (err) {\n",c+=' console.error("ESM import failed for " + '+JSON.stringify(r)+", err);\n",c+=" throw err;\n",c+=" }\n"}c+="})();\n",c+="<\/script>\n"}let d=r||"";function h(e){return JSON.stringify(void 0===e?{}:e).replace(/<\/script>/g,"<\\/script>")}let p=h(e.manifest),u=h(e.pictConfig),f=h(e.appConfig),m=h(e.appData),g="string"==typeof e.application?e.application:"",y=JSON.stringify(g).replace(/<\/script>/g,"<\\/script>");return'<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="UTF-8">\n<title>Section Playground</title>\n'+(d?'<base href="'+d+'">\n':"")+'<style>\n html, body { height: 100%; margin: 0; }\n body { display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }\n #playground-topbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--theme-color-border-default, #DDD6CA); background: var(--theme-color-background-panel, #FFFFFF); }\n #playground-topbar-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--theme-color-text-muted, #8A7F72); }\n #playground-topbar-controls { display: flex; align-items: center; gap: 8px; }\n #playground-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px; background: var(--theme-color-background-primary, #FDFBF7); }\n #playground-error { display: none; padding: 14px 18px; background: #FFF4F2; color: #B43A2E; border-bottom: 1px solid #B43A2E; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; white-space: pre-wrap; }\n #playground-error.show { display: block; }\n</style>\n'+l+i+c+'</head>\n<body>\n<div id="playground-error"></div>\n<div id="playground-topbar">\n <div id="playground-topbar-title">Section Sandbox</div>\n <div id="playground-topbar-controls">\n <div id="Theme-Picker"></div>\n <div id="Theme-ModeToggle"></div>\n <div id="Theme-ScaleSelect"></div>\n </div>\n</div>\n<div id="playground-content">\n \x3c!-- The section-form metacontroller renders into #Pict-Form-Container by default. --\x3e\n \x3c!-- Other section types may use a different default; the spec drives the markup. --\x3e\n <div id="Pict-Form-Container"></div>\n <div id="Section-Playground-Mount"></div>\n'+(n.MountID?' <div id="'+n.MountID+'"></div>\n':"")+"</div>\n<script>\n(function() {\n var manifest = "+p+";\n var pictConfig = "+u+";\n var appConfig = "+f+";\n var appData = "+m+";\n var applicationSource = "+y+";\n var sectionType = "+JSON.stringify(n.SectionType)+";\n var applicationModule = "+JSON.stringify(n.ApplicationModule)+";\n var applicationGlobal = "+JSON.stringify(n.ApplicationGlobal)+";\n var manifestKey = "+JSON.stringify(n.ManifestKey)+";\n var wrapperKind = "+JSON.stringify(n.WrapperKind)+";\n var viewName = "+JSON.stringify(n.ViewName)+";\n var viewConfigKey = "+JSON.stringify(n.ViewConfigKey)+";\n var mountID = "+JSON.stringify(n.MountID)+";\n var bootstrapMethod = "+JSON.stringify(n.BootstrapMethod)+";\n var bootstrapSeedAddr = "+JSON.stringify(n.BootstrapSeedAddress)+';\n\n function showError(msg) {\n var el = document.getElementById("playground-error");\n if (el) { el.textContent = msg; el.classList.add("show"); }\n try { parent.postMessage({ type: "section-playground-error", message: msg }, "*"); } catch(e) {}\n }\n\n function ready(fn) {\n if (document.readyState !== "loading") { fn(); }\n else { document.addEventListener("DOMContentLoaded", fn); }\n }\n\n function awaitESM() {\n return (window.__SectionPlaygroundESMReady && typeof window.__SectionPlaygroundESMReady.then === "function")\n ? window.__SectionPlaygroundESMReady\n : Promise.resolve();\n }\n\n ready(function() {\n awaitESM().then(function() { try {\n if (typeof Pict === "undefined") { throw new Error("pict bundle did not load — check the CDN imports in _playground.json"); }\n var libSectionModule = window[applicationModule];\n if (!libSectionModule) { throw new Error("Section module " + applicationModule + " is not loaded; check the Imports in _playground.json"); }\n var ResolvedClass = libSectionModule[applicationGlobal] || libSectionModule;\n if (typeof ResolvedClass !== "function") { throw new Error("Could not resolve " + applicationGlobal + " on " + applicationModule); }\n\n // Wrapper resolution. Two paths:\n // 1. WrapperKind: "application" (default) — the resolved class\n // is already a PictApplication subclass; use it directly.\n // pict-section-form\'s pattern.\n // 2. WrapperKind: "view" — the resolved class is a PictView; the\n // bootstrap synthesizes a PictApplication subclass that\n // registers the view under `viewName` with config drawn\n // from pictConfig[viewConfigKey]. This is the no-wrapper\n // path: section modules ship just their view class and a\n // _playground.json — no per-module Application file needed.\n var BaseApplicationClass;\n if (wrapperKind === "view") {\n if (typeof window.PictApplication !== "function") { throw new Error("WrapperKind: \\"view\\" requires pict-application to be loaded — add it to Imports in _playground.json"); }\n var ViewClass = ResolvedClass;\n // PictApplication is an ES6 class, so the wrapper MUST be one\n // too — ES6 classes throw "cannot be invoked without new" when\n // called via `.call(this, ...)`, so the prototype-style pattern\n // (function + Object.create) silently fails at construction.\n // Build the class via a Function constructor so we can keep\n // closure access to viewName / viewConfigKey / mountID / etc.\n var BuildWrapperClass = new Function(\n "PictApplication", "ViewClass", "pictConfig", "viewName", "viewConfigKey", "mountID", "bootstrapMethod", "bootstrapSeedAddr",\n "return class ViewWrapperApplication extends PictApplication {"\n + " constructor(pFable, pOptions, pServiceHash) {"\n + " super(pFable, pOptions, pServiceHash);"\n + " var tmpDefaultViewConfig = (ViewClass.default_configuration || {});"\n + " var tmpInjectedViewConfig = (pictConfig && pictConfig[viewConfigKey]) || {};"\n + " var tmpMergedViewConfig = Object.assign({}, tmpDefaultViewConfig, tmpInjectedViewConfig);"\n + " var tmpAutoMount = \\"#\\" + (mountID || \\"Section-Playground-Mount\\");"\n + " if (typeof tmpInjectedViewConfig.DefaultDestinationAddress === \\"undefined\\") {"\n + " tmpMergedViewConfig.DefaultDestinationAddress = tmpAutoMount;"\n + " if (Array.isArray(tmpDefaultViewConfig.Renderables)) {"\n + " tmpMergedViewConfig.Renderables = tmpDefaultViewConfig.Renderables.map(function(pRenderable) {"\n + " return Object.assign({}, pRenderable, { DestinationAddress: tmpAutoMount });"\n + " });"\n + " }"\n + " }"\n + " this.pict.addView(viewName, tmpMergedViewConfig, ViewClass);"\n + " }"\n + " onAfterInitialize() {"\n + " super.onAfterInitialize();"\n + " var tmpView = this.pict.views[viewName];"\n + " if (bootstrapMethod && tmpView && typeof tmpView[bootstrapMethod] === \\"function\\") {"\n + " try {"\n + " var tmpSeed;"\n + " if (bootstrapSeedAddr && this.pict && this.pict.manifest && typeof this.pict.manifest.getValueByHash === \\"function\\") {"\n + " tmpSeed = this.pict.manifest.getValueByHash(this.pict.AppData, bootstrapSeedAddr);"\n + " }"\n + " tmpView[bootstrapMethod](tmpSeed);"\n + " } catch (seedErr) { console.warn(\\"BootstrapMethod \\" + bootstrapMethod + \\" threw:\\", seedErr); }"\n + " }"\n + " if (tmpView && typeof tmpView.render === \\"function\\") { tmpView.render(); }"\n + " }"\n + "};"\n );\n BaseApplicationClass = BuildWrapperClass(window.PictApplication, ViewClass, pictConfig, viewName, viewConfigKey, mountID, bootstrapMethod, bootstrapSeedAddr);\n // Carry through whatever defaults the view itself ships, so\n // pict_configuration / Product / Hash stay sensible if the\n // user has not provided their own appConfig / pictConfig.\n BaseApplicationClass.default_configuration = (ViewClass.default_configuration && ViewClass.default_configuration.pict_configuration)\n ? ViewClass.default_configuration\n : { pict_configuration: {} };\n } else {\n BaseApplicationClass = ResolvedClass;\n }\n\n // Subclass. If the user supplied Application Code,\n // wrap it as `function (Base) { ...userBody... }` and\n // expect it to return a class. Otherwise fall back to\n // a no-op extends-Base subclass. class extends handles\n // both ES6 classes and old-style prototype constructors.\n var PlaygroundApplication;\n if (typeof applicationSource === "string" && applicationSource.trim().length > 0) {\n try {\n var customizerFn = new Function("Base", applicationSource);\n var customizerResult = customizerFn(BaseApplicationClass);\n if (typeof customizerResult !== "function") {\n throw new Error("Application Code must `return` a class. Got " + (typeof customizerResult) + ".");\n }\n PlaygroundApplication = customizerResult;\n } catch (customizerErr) {\n throw new Error("Application Code error: " + (customizerErr && customizerErr.message ? customizerErr.message : customizerErr));\n }\n } else {\n PlaygroundApplication = class extends BaseApplicationClass {};\n }\n\n // Precedence: Base class defaults < user-class defaults\n // (if Application Code set its own) < the four editor tabs.\n // The editor tabs are what the playground exists to drive,\n // so they always win.\n var userDefault = PlaygroundApplication.default_configuration || BaseApplicationClass.default_configuration || {};\n var basePict = userDefault.pict_configuration || {};\n var mergedPict = Object.assign({}, basePict, pictConfig);\n mergedPict[manifestKey] = manifest;\n if (appData !== undefined) { mergedPict.DefaultAppData = appData; }\n\n var defaultConfig = Object.assign({}, userDefault, appConfig);\n defaultConfig.pict_configuration = mergedPict;\n PlaygroundApplication.default_configuration = defaultConfig;\n\n // Pict.safeLoadPictApplication will instantiate and run lifecycle.\n Pict.safeOnDocumentReady(function() {\n Pict.safeLoadPictApplication(PlaygroundApplication, 2);\n // Mount the theme controls once the app is up.\n setTimeout(function() {\n try {\n if (window.PictSectionTheme && window._Pict && typeof window._Pict.addProvider === "function") {\n if (!window._Pict.providers || !window._Pict.providers["Theme-Section"]) {\n window._Pict.addProvider("Theme-Section", { ApplyDefault: "retold-default", DefaultMode: "system", DefaultScale: 1.0, Views: ["Picker", "ModeToggle", "ScaleSelect"] }, window.PictSectionTheme);\n window._Pict.views["Theme-Picker"].render();\n if (window._Pict.views["Theme-ModeToggle"]) { window._Pict.views["Theme-ModeToggle"].render(); }\n if (window._Pict.views["Theme-ScaleSelect"]) { window._Pict.views["Theme-ScaleSelect"].render(); }\n }\n }\n } catch (themeErr) { /* theme bootstrap is best-effort */ }\n }, 50);\n try { parent.postMessage({ type: "section-playground-ready" }, "*"); } catch(e) {}\n });\n } catch (err) {\n showError(String(err && err.stack ? err.stack : err));\n } }).catch(function(esmErr) {\n showError("ESM import failed: " + String(esmErr && esmErr.message ? esmErr.message : esmErr));\n });\n });\n}());\n<\/script>\n</body>\n</html>'}(e,this._spec||{},r);t.srcdoc=n;let o=this,i=function(e){e&&e.data&&("section-playground-ready"===e.data.type?o._setStatus("rendered",!1):"section-playground-error"===e.data.type&&o._setStatus("error in sandbox",!0))};window.addEventListener("message",i),setTimeout(function(){window.removeEventListener("message",i)},3e4)}resetAll(){let e=this.pict.views["Pict-Section-Modal"],t=this,r=function(){for(let e=0;e<t._editors.length;e++){let r=t._editors[e];r.Code=r.StarterCode||"";let n=t._storageKey(r.Hash);try{window.localStorage.removeItem(n)}catch(e){}let o=t._editorCodeAddress(r.Hash);t.pict.manifest.setValueByHash(t.pict.AppData,o,r.Code);let i=t.pict.views[t._editorViewIdentifier(r.Hash)];i&&"function"==typeof i.setCode&&i.setCode(r.Code)}t._setStatus("reset to starters",!1)};e&&"function"==typeof e.confirm?e.confirm("Reset all editors to their starter content? Your current edits will be lost.",{title:"Reset playground",confirmLabel:"Reset",cancelLabel:"Keep edits",dangerous:!0}).then(function(e){e&&r()}):r()}_storageKey(e){return i+":"+this._scope.Group+"/"+this._scope.Module+":"+e}_editorViewIdentifier(e){return"Docuserve-Section-Playground-Editor-View-"+e}_editorCodeAddress(e){return"AppData.Docuserve.SectionPlayground.Code."+e}_loadEditors(e,t,r){let n=r.Editors||[],o=this.pict.providers["Docuserve-Documentation"],i=this;this._editors=[];let a=[];for(let r=0;r<n.length;r++)(function(r,n){let s,l={Hash:r.Hash,Label:r.Label||r.Hash,Language:r.Language||"json",StarterCode:r.Default||"",Code:""},c=null;try{c=window.localStorage.getItem(i._storageKey(r.Hash))}catch(e){c=null}if(r.DefaultPath){let n=null;if(e&&t&&o&&"function"==typeof o.resolveDocumentURL&&(n=o.resolveDocumentURL(e,t,r.DefaultPath)),!n){n=(i.pict.AppData.Docuserve.DocsBaseURL||"")+r.DefaultPath}s=fetch(n).then(function(e){return e.ok?e.text():""}).catch(function(){return""})}else s=Promise.resolve(l.StarterCode);a.push(s.then(function(e){l.StarterCode=e||l.StarterCode,l.Code=null!=c?c:l.StarterCode,i._editors[n]=l}))})(n[r],r);return Promise.all(a).then(function(){i._editors=i._editors.filter(function(e){return!!e}),i._editors.length>0&&(i._activeHash=i._editors[0].Hash)})}_refreshEditorRecords(){let e=[];for(let t=0;t<this._editors.length;t++){let r=this._editors[t];e.push({Hash:r.Hash,Label:r.Label,ActiveClass:r.Hash===this._activeHash?" active":""})}this.pict.AppData.Docuserve=this.pict.AppData.Docuserve||{},this.pict.AppData.Docuserve.SectionPlayground=this.pict.AppData.Docuserve.SectionPlayground||{},this.pict.AppData.Docuserve.SectionPlayground.Editors=e,this.pict.AppData.Docuserve.SectionPlayground.Code=this.pict.AppData.Docuserve.SectionPlayground.Code||{};for(let e=0;e<this._editors.length;e++){let t=this._editors[e];this.pict.AppData.Docuserve.SectionPlayground.Code[t.Hash]=t.Code}}_buildShell(){let e=this.pict.views["Pict-Section-Modal"],t=document.getElementById("Docuserve-Section-Playground-Shell-Mount");if(!e||"function"!=typeof e.shell||!t)return t.innerHTML='<div class="docuserve-section-playground-editor-mount" id="Docuserve-Section-Playground-Editor-Mount" style="height:55%;border-bottom:1px solid var(--theme-color-border-default,#DDD6CA)"></div><div class="docuserve-section-playground-iframe-pane" id="Docuserve-Section-Playground-Iframe-Mount" style="height:45%"></div>',void this._populateShellDestinations();let r="docuserve-section-playground:"+this._scope.Group+"/"+this._scope.Module+":split";this._shell=e.shell(t,{PersistenceKey:r}),this._shell.addPanel({Hash:"sandbox",Side:"bottom",Mode:"resizable",Size:360,MinSize:140,MaxSize:1e3,Title:"Sandbox",ContentDestinationId:"Docuserve-Section-Playground-Iframe-Mount"}),this._shell.center({ContentDestinationId:"Docuserve-Section-Playground-Editor-Mount"}),this._populateShellDestinations()}_populateShellDestinations(){let e=document.getElementById("Docuserve-Section-Playground-Editor-Mount");if(e){e.classList.add("docuserve-section-playground-editor-mount");let t="";for(let e=0;e<this._editors.length;e++){let r=this._editors[e];t+='<div class="docuserve-section-playground-editor'+(r.Hash===this._activeHash?" active":"")+'" id="Docuserve-Section-Playground-Editor-'+r.Hash+'" data-editor-hash="'+r.Hash+'"></div>'}e.innerHTML=t}let t=document.getElementById("Docuserve-Section-Playground-Iframe-Mount");t&&(t.classList.add("docuserve-section-playground-iframe-pane"),t.innerHTML='<iframe id="Docuserve-Section-Playground-Iframe" class="docuserve-section-playground-iframe" title="Section playground sandbox" sandbox="allow-scripts allow-same-origin allow-modals allow-popups"></iframe><div id="Docuserve-Section-Playground-Status" class="docuserve-section-playground-status">ready</div>')}_mountAndRender(){let e=document.getElementById("Docuserve-Content-Container");e&&e.classList.add("docuserve-section-playground-host"),this._refreshEditorRecords(),this.render(),this._buildShell();let t=this;for(let e=0;e<this._editors.length;e++){let t=this._editors[e],r=this._editorViewIdentifier(t.Hash),n=this._editorCodeAddress(t.Hash),a="Docuserve-Section-Playground-Editor-"+t.Hash;if(this.pict.views[r]){try{delete this.pict.views[r]}catch(e){}if(this.pict.servicesMap&&this.pict.servicesMap.PictView)try{delete this.pict.servicesMap.PictView[r]}catch(e){}}let s="Section-Playground-CodeMount-"+t.Hash,l=Object.assign({},o.default_configuration,{ViewIdentifier:r,DefaultDestinationAddress:"#"+a,TargetElementAddress:"#"+a,Templates:[{Hash:s,Template:"\x3c!-- pict-section-code mount: "+t.Hash+" --\x3e"}],Renderables:[{RenderableHash:"Section-Playground-CodeRenderable-"+t.Hash,TemplateHash:s,DestinationAddress:"#"+a}],Language:t.Language||"json",ReadOnly:!1,LineNumbers:!0,Tab:"\t",AddClosing:!0,CatchTab:!0,DefaultCode:t.Code,CodeDataAddress:n,AutoRender:!1,RenderOnLoad:!1}),c=class extends o{onCodeChange(e){super.onCodeChange(e),this._lsTimer&&clearTimeout(this._lsTimer);let t=this.options.ViewIdentifier.replace("Docuserve-Section-Playground-Editor-View-","");this._lsTimer=setTimeout(()=>{this._lsTimer=null;try{let r=this.fable.pict.views["Docuserve-Section-Playground"],n=r&&"function"==typeof r._storageKey?r._storageKey(t):i+":"+t;window.localStorage.setItem(n,e),r&&"function"==typeof r._setStatus&&r._setStatus("saved",!1)}catch(e){}},500)}};this.pict.addView(r,l,c)}this._loadCodeJar().then(function(e){for(let r=0;r<t._editors.length;r++){let n=t._editors[r],o=t.pict.views[t._editorViewIdentifier(n.Hash)];if(o){o._codeJarPrototype||o.connectCodeJarPrototype(e);try{o.render()}catch(e){}}}t._setStatus("press Run to render",!1,2500)}).catch(function(e){t._setStatus("CodeJar failed to load — editors disabled",!0,6e3)})}_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(function(e){if(!e||"function"!=typeof e.CodeJar)throw new Error("CodeJar export not found in module");return e.CodeJar})),this._codeJarPromise}_readAndValidateEditors(){let e={manifest:void 0,pictConfig:void 0,appConfig:void 0,appData:void 0};for(let t=0;t<this._editors.length;t++){let r,n=this._editors[t],o=this._editorCodeAddress(n.Hash),i=this.pict.manifest.getValueByHash(this.pict.AppData,o);if("string"!=typeof i&&(i=n.Code||""),"json"===(n.Language||"json").toLowerCase())if(""===i.trim())r={};else try{r=JSON.parse(i)}catch(e){throw new Error('JSON parse error in "'+n.Label+'": '+e.message)}else r=i;e.hasOwnProperty(n.Hash),e[n.Hash]=r}return e}_setStatus(e,t,r){let n=document.getElementById("Docuserve-Section-Playground-Status");if(!n)return;n.textContent=e,n.classList.add("show"),t?n.classList.add("error"):n.classList.remove("error"),this._statusTimer&&clearTimeout(this._statusTimer);let o="number"==typeof r?r:2500;this._statusTimer=setTimeout(function(){n.classList.remove("show"),n.classList.remove("error")},o)}_renderError(e){let t='<div class="docuserve-section-playground-emptystate"><div class="docuserve-section-playground-emptystate-title">Playground unavailable</div><div>'+this._escape(e)+"</div></div>";this.pict.ContentAssignment.assignContent("#Docuserve-Content-Container",t)}_escape(e){return String(e||"").replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]})}onAfterRender(e,t,r,n){return this.pict.CSSMap.injectCSS(),super.onAfterRender(e,t,r,n)}},t.exports.default_configuration={ViewIdentifier:"Docuserve-Section-Playground",DefaultRenderable:"Docuserve-Section-Playground-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t/* The content container is provisioned by the layout shell as\n\t\t flex: 1 1 auto with min-height: 0. Promote it to a flex\n\t\t column so the playground inside can use flex: 1 to fill. */\n\t\t#Docuserve-Content-Container.docuserve-section-playground-host {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-section-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\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tbackground: var(--theme-color-background-primary, #FDFBF7);\n\t\t}\n\n\t\t/* Toolbar — tabs on the left, action buttons on the right. */\n\t\t.docuserve-section-playground-toolbar {\n\t\t\tflex: 0 0 auto;\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0 0.5em;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t}\n\t\t.docuserve-section-playground-tabs {\n\t\t\tdisplay: flex;\n\t\t\tgap: 0;\n\t\t}\n\t\t.docuserve-section-playground-tab {\n\t\t\tpadding: 0.55em 0.95em;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tbackground: transparent;\n\t\t\tborder: 0;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\tcursor: pointer;\n\t\t\ttransition: color 0.12s, border-color 0.12s, background-color 0.12s;\n\t\t}\n\t\t.docuserve-section-playground-tab:hover {\n\t\t\tcolor: var(--theme-color-text-primary, #2A241E);\n\t\t\tbackground: var(--theme-color-background-hover, #EAE3D8);\n\t\t}\n\t\t.docuserve-section-playground-tab.active {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tborder-bottom-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.docuserve-section-playground-tab-dirty::after {\n\t\t\tcontent: '*';\n\t\t\tmargin-left: 0.25em;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t\t.docuserve-section-playground-actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t\tpadding: 0.25em 0;\n\t\t}\n\n\t\t/* Icon button — same visual language as the Fable playground for\n\t\t continuity. Run is brighter to draw the eye. */\n\t\t.docuserve-section-playground-iconbtn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.7em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid transparent;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\ttransition: color 0.12s, background-color 0.12s, border-color 0.12s, opacity 0.12s;\n\t\t\topacity: 0.75;\n\t\t}\n\t\t.docuserve-section-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-section-playground-iconbtn svg {\n\t\t\twidth: 1em;\n\t\t\theight: 1em;\n\t\t\tdisplay: block;\n\t\t}\n\t\t.docuserve-section-playground-iconbtn-run {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\topacity: 0.9;\n\t\t}\n\t\t.docuserve-section-playground-iconbtn-run: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\topacity: 1;\n\t\t}\n\t\t.docuserve-section-playground-iconbtn-run svg { fill: currentColor; stroke: none; }\n\n\t\t/* Body — pict-section-modal shell with the editor stack in the\n\t\t center and the iframe sandbox as a resizable + collapsible\n\t\t bottom panel. Layout, drag-to-resize, collapse-tab, and\n\t\t persistence are all owned by the shell; this view just hosts\n\t\t it inside the playground's content area. */\n\t\t.docuserve-section-playground-shell-mount {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-host { height: 100%; }\n\n\t\t/* Editor stack (the shell's center). The tab-slot divs are\n\t\t stacked; only the active one is display:flex. pict-section-code\n\t\t itself draws the editor surface. */\n\t\t.docuserve-section-playground-editor-mount {\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-section-playground-editor {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t\tdisplay: none;\n\t\t}\n\t\t.docuserve-section-playground-editor.active {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.docuserve-section-playground-editor > * {\n\t\t\tflex: 1 1 0;\n\t\t\tmin-height: 0;\n\t\t}\n\n\t\t/* Iframe pane — the rendered section + its theme switcher.\n\t\t Lives inside the shell's bottom panel; the panel owns its\n\t\t own border + sizing chrome. */\n\t\t.docuserve-section-playground-iframe-pane {\n\t\t\theight: 100%;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t}\n\t\t.docuserve-section-playground-iframe {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tborder: 0;\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t}\n\t\t.docuserve-section-playground-status {\n\t\t\tposition: absolute;\n\t\t\ttop: 0.5em;\n\t\t\tright: 0.7em;\n\t\t\tfont-size: 0.7em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tbackground: var(--theme-color-background-panel, #FFFFFF);\n\t\t\tpadding: 0.15em 0.5em;\n\t\t\tborder-radius: 4px;\n\t\t\tborder: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tpointer-events: none;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.docuserve-section-playground-status.show { opacity: 0.85; }\n\t\t.docuserve-section-playground-status.error {\n\t\t\tcolor: var(--theme-color-status-error, #B43A2E);\n\t\t\tborder-color: var(--theme-color-status-error, #B43A2E);\n\t\t}\n\n\t\t/* Empty state for the iframe pane before the first Run. */\n\t\t.docuserve-section-playground-emptystate {\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\theight: 100%;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tfont-size: 0.9em;\n\t\t\ttext-align: center;\n\t\t\tpadding: 2em;\n\t\t}\n\t\t.docuserve-section-playground-emptystate-title {\n\t\t\tfont-size: 1.1em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tmargin-bottom: 0.4em;\n\t\t}\n\n\t\t/* Wider middle-positioned collapse tab on the sandbox panel —\n\t\t replaces the stock 28×6 right-anchored sliver with a labelled\n\t\t \"Sandbox\" pill centered above the panel's top edge. The pill\n\t\t is wide enough to read at a glance and lives at the boundary\n\t\t between editor and sandbox so the user's eye finds it\n\t\t immediately. */\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab\n\t\t{\n\t\t\t/* Geometry: wide pill positioned fully ABOVE the panel's\n\t\t\t top edge (matches the section-modal default of \"tab\n\t\t\t entirely outside the panel\"; top = -height places the\n\t\t\t tab's bottom edge flush against the panel boundary). */\n\t\t\twidth: 160px;\n\t\t\theight: 18px;\n\t\t\tleft: 50%;\n\t\t\tright: auto;\n\t\t\ttop: -18px;\n\t\t\tmargin-left: -80px;\n\t\t\tborder-radius: 5px 5px 0 0;\n\t\t\tborder-bottom: 0;\n\t\t\t/* Visual: always readable, not just on hover. */\n\t\t\topacity: 0.95;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\tbackground: var(--theme-color-background-secondary, #F6F3EE);\n\t\t\tborder-color: var(--theme-color-border-default, #DDD6CA);\n\t\t\tpadding: 0 10px;\n\t\t\tgap: 6px;\n\t\t\tline-height: 16px;\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.08em;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\t\t/* Title text always visible (the stock CSS only shows it when\n\t\t collapsed); the chevron pseudo is hidden — the label carries\n\t\t the affordance. */\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-title\n\t\t{\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab::before\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Keep the size stable on hover (stock CSS grows it to 36×18) —\n\t\t only color shifts so the user knows it's interactive. */\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n\t\t.docuserve-section-playground-shell-mount .pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n\t\t{\n\t\t\twidth: 160px;\n\t\t\theight: 18px;\n\t\t\ttop: -18px;\n\t\t\tmargin-left: -80px;\n\t\t\topacity: 1;\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tborder-color: var(--theme-color-brand-primary, #2E7D74);\n\t\t}\n\t",CSSPriority:500,Templates:[{Hash:"Docuserve-Section-Playground-Template",Template:'\n<div class="docuserve-section-playground">\n\t<div class="docuserve-section-playground-toolbar">\n\t\t<div class="docuserve-section-playground-tabs" id="Docuserve-Section-Playground-Tabs">\n\t\t\t{~TS:Docuserve-Section-Playground-Tab-Template:AppData.Docuserve.SectionPlayground.Editors~}\n\t\t</div>\n\t\t<div class="docuserve-section-playground-actions">\n\t\t\t<button type="button" class="docuserve-section-playground-iconbtn"\n\t\t\t\ttitle="Reset all editors to their starter content"\n\t\t\t\tonclick="{~P~}.views[\'Docuserve-Section-Playground\'].resetAll()">\n\t\t\t\t{~I:Refresh~} Reset\n\t\t\t</button>\n\t\t\t<button type="button" class="docuserve-section-playground-iconbtn docuserve-section-playground-iconbtn-run"\n\t\t\t\ttitle="Run — reload the iframe with the current editor contents"\n\t\t\t\tonclick="{~P~}.views[\'Docuserve-Section-Playground\'].run()">\n\t\t\t\t<svg viewBox="0 0 24 24" aria-hidden="true"><polygon points="6 4 20 12 6 20"/></svg>\n\t\t\t\tRun\n\t\t\t</button>\n\t\t</div>\n\t</div>\n\t\x3c!-- pict-section-modal shell mount. _mountAndRender() calls\n\t modal.shell(thisDiv) and addPanel() for the bottom sandbox\n\t panel + center() for the editor stack. The shell builds its\n\t own destination divs (#Section-Playground-Editor-Mount and\n\t #Section-Playground-Iframe-Mount) inside this wrapper. --\x3e\n\t<div class="docuserve-section-playground-shell-mount" id="Docuserve-Section-Playground-Shell-Mount"></div>\n</div>'},{Hash:"Docuserve-Section-Playground-Tab-Template",Template:'<button type="button"\n\tclass="docuserve-section-playground-tab{~D:Record.ActiveClass~}"\n\tonclick="{~P~}.views[\'Docuserve-Section-Playground\'].selectTab(\'{~D:Record.Hash~}\')"\n>{~D:Record.Label~}</button>'},{Hash:"Docuserve-Section-Playground-Editor-Slot-Template",Template:'<div class="docuserve-section-playground-editor{~D:Record.ActiveClass~}"\n\tid="Docuserve-Section-Playground-Editor-{~D:Record.Hash~}"\n\tdata-editor-hash="{~D:Record.Hash~}"></div>'}],Renderables:[{RenderableHash:"Docuserve-Section-Playground-Content",TemplateHash:"Docuserve-Section-Playground-Template",ContentDestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-section-code":152,"pict-view":233}],361:[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: none;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t/* The "X" close button is only useful when the sidebar is acting\n\t\t as a responsive drawer (narrow viewports where the panel slid\n\t\t in over the content area). In docked desktop mode the\n\t\t pict-section-modal collapse tab on the panel\'s outer edge is\n\t\t the canonical collapse affordance — a second X inside the\n\t\t panel competes with it and looks messy. Show the X only in\n\t\t drawer mode. */\n\t\t.pict-modal-shell-panel-drawer .docuserve-sidebar-header {\n\t\t\tdisplay: flex;\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":233}],362:[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.renderExamples(o.Cover)):this.renderFromCatalog(o),this.renderPlaygroundButton(),this.renderReadme(),super.onAfterRender(e,t,r,n)}renderPlaygroundButton(){let e=this.pict.providers["Docuserve-Documentation"];if(!e||"function"!=typeof e.loadPlaygroundConfig)return;let t=this.pict.AppData.Docuserve||{},r=t.CurrentGroup||"",n=t.CurrentModule||"";e.loadPlaygroundConfig(r,n).then(e=>{if(!e)return;let t;t="section"===e.Kind?r&&n?"#/playground/section/"+r+"/"+n:"#/playground/section":"#/playground/fable";let o='<a class="secondary" href="'+this.escapeHTML(t)+'">Playground</a>';this.pict.ContentAssignment.projectContent("append","#Docuserve-Splash-Actions",o)}).catch(()=>{})}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","")}renderExamples(e){let t=e&&e.ExamplesMarkdown?e.ExamplesMarkdown:"",r=this.pict.providers["Docuserve-Documentation"];if(!t||!r||!r._ContentProvider)return void this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Examples","");let n=r._createLinkResolver("","",""),o=r._ContentProvider.parseMarkdown(t,n);this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Examples",'<h2 class="docuserve-splash-examples-heading">Interactive Examples</h2>'+o)}renderReadme(){let e=this.pict.providers["Docuserve-Documentation"],t=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(t+"README.md").then(e=>e.ok?e.text():null).then(r=>{if(!r||!e||!e._ContentProvider)return void this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Readme","");let n=e._createLinkResolver("","","README.md"),o=e._createImageResolver(t+"README.md"),i=e._ContentProvider.parseMarkdown(r,n,o);this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Readme",'<div class="pict-content">'+i+"</div>")}).catch(()=>{this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Readme","")})}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\t.docuserve-splash-examples {\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t/* No staged examples — collapse the section entirely. */\n\t\t.docuserve-splash-examples:empty {\n\t\t\tdisplay: none;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.docuserve-splash-examples-heading {\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.08em;\n\t\t\tcolor: var(--theme-color-text-muted, #8A7F72);\n\t\t\tmargin: 0 0 0.85em 0;\n\t\t}\n\t\t.docuserve-splash-examples table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\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\toverflow: hidden;\n\t\t}\n\t\t.docuserve-splash-examples thead th {\n\t\t\ttext-align: left;\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 700;\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\tpadding: 0.7em 1.1em;\n\t\t\tbackground: var(--theme-color-background-tertiary, #F4EFE6);\n\t\t}\n\t\t.docuserve-splash-examples tbody td {\n\t\t\tpadding: 0.7em 1.1em;\n\t\t\tborder-top: 1px solid var(--theme-color-border-default, #DDD6CA);\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: var(--theme-color-text-secondary, #5E5549);\n\t\t\ttext-align: left;\n\t\t}\n\t\t.docuserve-splash-examples tbody tr:hover td {\n\t\t\tbackground: var(--theme-color-background-tertiary, #F4EFE6);\n\t\t}\n\t\t.docuserve-splash-examples a {\n\t\t\tcolor: var(--theme-color-brand-primary, #2E7D74);\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-splash-examples a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* docs/README.md content rendered beneath the hero. */\n\t\t.docuserve-splash-readme {\n\t\t\tmax-width: 820px;\n\t\t\tmargin: 0 auto;\n\t\t\tpadding: 3.5em 2em 5em 2em;\n\t\t\ttext-align: left;\n\t\t}\n\t\t.docuserve-splash-readme:empty {\n\t\t\tdisplay: none;\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-examples" id="Docuserve-Splash-Examples"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n<div class="docuserve-splash-readme" id="Docuserve-Splash-Readme"></div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":233}],363:[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":233}],364:[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>"}let n=e.CurrentGroup,o=e.CurrentModule,i=this.pict.providers["Docuserve-Documentation"];if(!o&&i&&i._Catalog&&i._Catalog.Module&&(o=i._Catalog.Module.Name),o&&i&&"function"==typeof i.resolveGitHubRepoURL){let e=i.resolveGitHubRepoURL(n,o);if(e){let t=this.pict.icon("GitHub",{class:"docuserve-octocat",ariaLabel:"View source on GitHub"});r+='<a class="docuserve-repo-link" href="'+this._escapeHTML(e)+'" target="_blank" rel="noopener" title="View '+this._escapeHTML(o)+' source on GitHub">'+t+"</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\t.docuserve-user a.docuserve-repo-link\n\t\t{\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tfont-size: 1.15em;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t}\n\t\t.docuserve-user a.docuserve-repo-link .docuserve-octocat\n\t\t{\n\t\t\tline-height: 0;\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":233}]},{},[352])(352)});
142
142
  //# sourceMappingURL=pict-docuserve.min.js.map