orator 6.0.2 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/source/Orator-ServiceServer-IPC.js +3 -3
- package/dist/indoctrinate_content_staging/Indoctrinate-Catalog-AppData.json +0 -2364
- package/dist/orator.compatible.js +0 -4889
- package/dist/orator.compatible.min.js +0 -17
- package/dist/orator.compatible.min.js.map +0 -1
- package/dist/orator.js +0 -4487
- package/dist/orator.min.js +0 -17
- package/dist/orator.min.js.map +0 -1
- /package/docs/{cover.md → _cover.md} +0 -0
package/dist/orator.min.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";const _excluded=["version","host"];function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach((function(e){_defineProperty(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _objectWithoutProperties(t,e){if(null==t)return{};var r,n,i=_objectWithoutPropertiesLoose(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function _objectWithoutPropertiesLoose(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==typeof e?e:String(e)}function _toPrimitive(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Orator=t()}}((function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};e[s][0].call(l.exports,(function(t){return i(e[s][1][t]||t)}),l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){(function(r){(function(){var n=t("object-assign");
|
|
2
|
-
/*!
|
|
3
|
-
* The buffer module from node.js, for the browser.
|
|
4
|
-
*
|
|
5
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
6
|
-
* @license MIT
|
|
7
|
-
*/function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function o(t){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=t("util/"),a=Object.prototype.hasOwnProperty,c=Array.prototype.slice,u="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function h(t){return!o(t)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=e.exports=m,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(s.isFunction(t)){if(u)return t.name;var e=t.toString().match(p);return e&&e[1]}}function g(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function y(t){if(u||!s.isFunction(t))return s.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function v(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function m(t,e){t||v(t,!0,e,"==",f.ok)}function b(t,e,r,n){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(h(t)&&h(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=S(t),o=S(e);if(i&&!o||!i&&o)return!1;if(i)return b(t=c.call(t),e=c.call(e),r);var a,u,l=C(t),h=C(e);if(l.length!==h.length)return!1;for(l.sort(),h.sort(),u=l.length-1;u>=0;u--)if(l[u]!==h[u])return!1;for(u=l.length-1;u>=0;u--)if(!b(t[a=l[u]],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function S(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function P(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&v(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!t&&i&&!r;if((!t&&s.isError(i)&&o&&P(i,r)||a)&&v(i,r,"Got unwanted exception"+n),t&&i&&r&&!P(i,r)||!t&&i)throw i}f.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(y(t.actual),128)+" "+t.operator+" "+g(y(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},s.inherits(f.AssertionError,Error),f.fail=v,f.ok=m,f.equal=function(t,e,r){t!=e&&v(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&v(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){b(t,e,!1)||v(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){b(t,e,!0)||v(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){b(t,e,!1)&&v(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){b(e,r,!0)&&v(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&v(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){w(!0,t,e,r)},f.doesNotThrow=function(t,e,r){w(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n((function t(e,r){e||v(e,!0,r,"==",t)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var C=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":23,"util/":4}],2:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],3:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],4:[function(t,e,r){(function(e,n){(function(){var i=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),c=n[r];r<o;c=n[++r])g(c)||!S(c)?s+=" "+c:s+=" "+a(c);return s},r.deprecate=function(t,i){if(m(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var o,s={};function a(t,e){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,t,n.depth)}function c(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function u(t,e){return t}function l(t,e,n){if(t.customInspect&&e&&C(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=l(t,i,n)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(o)return o;var s=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),w(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(e);if(0===s.length){if(C(e)){var c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(b(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(P(e))return t.stylize(Date.prototype.toString.call(e),"date");if(w(e))return h(e)}var u,S="",O=!1,x=["{","}"];(p(e)&&(O=!0,x=["[","]"]),C(e))&&(S=" [Function"+(e.name?": "+e.name:"")+"]");return b(e)&&(S=" "+RegExp.prototype.toString.call(e)),P(e)&&(S=" "+Date.prototype.toUTCString.call(e)),w(e)&&(S=" "+h(e)),0!==s.length||O&&0!=e.length?n<0?b(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),u=O?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)E(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))})),o}(t,e,n,a,s):s.map((function(r){return f(t,e,n,a,r,O)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(u,S,x)):x[0]+S+x[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),E(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=g(r)?l(t,c.value,null):l(t,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),m(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function v(t){return"string"==typeof t}function m(t){return void 0===t}function b(t){return S(t)&&"[object RegExp]"===O(t)}function S(t){return"object"==typeof t&&null!==t}function P(t){return S(t)&&"[object Date]"===O(t)}function w(t){return S(t)&&("[object Error]"===O(t)||t instanceof Error)}function C(t){return"function"==typeof t}function O(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(m(o)&&(o=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=e.pid;s[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else s[t]=function(){};return s[t]},r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=y,r.isString=v,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=m,r.isRegExp=b,r.isObject=S,r.isDate=P,r.isError=w,r.isFunction=C,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":"),[t.getDate(),A[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":3,_process:24,inherits:2}],5:[function(t,e,r){class n{constructor(t,e){this.fable=!1,this.options="object"==typeof t?t:{},this.serviceType="Unknown",this.UUID="CORESVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof e?e:"".concat(this.UUID)}connectFable(t){return this.fable=t,!0}}_defineProperty(n,"isFableService",!0),e.exports=n},{}],6:[function(t,e,r){class n{constructor(t,e,r){this.fable=t,this.options="object"==typeof e?e:"object"!=typeof t||t.isFable?{}:t,this.serviceType="Unknown","function"==typeof t.getUUID?this.UUID=t.getUUID():this.UUID="NoFABLESVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof r?r:"".concat(this.UUID),this.log=this.fable.log,this.servicesMap=this.fable.servicesMap,this.services=this.fable.services}}_defineProperty(n,"isFableService",!0),e.exports=n,e.exports.CoreServiceProviderBase=t("./Fable-ServiceProviderBase-Preinit.js")},{"./Fable-ServiceProviderBase-Preinit.js":5}],7:[function(t,e,r){var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];var i={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function o(t,e){var r=i[t];return void 0===r?255:r<<e}e.exports=function(t){var e=t.indexOf("%");if(-1===e)return t;for(var r=t.length,i="",s=0,a=0,c=e,u=12;e>-1&&e<r;){var l=o(t[e+1],4)|o(t[e+2],0),h=n[l];if(a=a<<6|l&n[364+h],12!==(u=n[256+u+h])){if(0===u)return null;if((e+=3)<r&&37===t.charCodeAt(e))continue;return null}i+=t.slice(s,c),i+=a<=65535?String.fromCharCode(a):String.fromCharCode(55232+(a>>10),56320+(1023&a)),a=0,s=e+3,e=c=t.indexOf("%",s)}return i+t.slice(s)}},{}],8:[function(t,e,r){e.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(i=n;0!=i--;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r}},{}],9:[function(t,e,r){const n=t("./parse"),i=t("./stringify"),o={parse:n,stringify:i};e.exports=o,e.exports.default=o,e.exports.parse=n,e.exports.stringify=i},{"./parse":11,"./stringify":12}],10:[function(t,e,r){const n=Array.from({length:256},((t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase())),i=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);e.exports={encodeString:function(t){const e=t.length;if(0===e)return"";let r="",o=0,s=0;t:for(;s<e;s++){let a=t.charCodeAt(s);for(;a<128;){if(1!==i[a]&&(o<s&&(r+=t.slice(o,s)),o=s+1,r+=n[a]),++s===e)break t;a=t.charCodeAt(s)}if(o<s&&(r+=t.slice(o,s)),a<2048){o=s+1,r+=n[192|a>>6]+n[128|63&a];continue}if(a<55296||a>=57344){o=s+1,r+=n[224|a>>12]+n[128|a>>6&63]+n[128|63&a];continue}if(++s,s>=e)throw new Error("URI malformed");o=s+1,a=65536+((1023&a)<<10|1023&t.charCodeAt(s)),r+=n[240|a>>18]+n[128|a>>12&63]+n[128|a>>6&63]+n[128|63&a]}return 0===o?t:o<e?r+t.slice(o):r}}},{}],11:[function(t,e,r){const n=t("fast-decode-uri-component"),i=/\+/g,o=function(){};o.prototype=Object.create(null),e.exports=function(t){const e=new o;if("string"!=typeof t)return e;let r=t.length,s="",a="",c=-1,u=-1,l=!1,h=!1,f=!1,p=!1,d=!1,g=0;for(let o=0;o<r+1;o++)if(g=o!==r?t.charCodeAt(o):38,38===g){if(d=u>c,d||(u=o),s=t.slice(c+1,u),d||s.length>0){f&&(s=s.replace(i," ")),l&&(s=n(s)||s),d&&(a=t.slice(u+1,o),p&&(a=a.replace(i," ")),h&&(a=n(a)||a));const r=e[s];void 0===r?e[s]=a:r.pop?r.push(a):e[s]=[r,a]}a="",c=o,u=o,l=!1,h=!1,f=!1,p=!1}else 61===g?u<=c?u=o:h=!0:43===g?u>c?p=!0:f=!0:37===g&&(u>c?h=!0:l=!0);return e}},{"fast-decode-uri-component":7}],12:[function(t,e,r){const{encodeString:n}=t("./internals/querystring");function i(t){const e=typeof t;return"string"===e?n(t):"bigint"===e?t.toString():"boolean"===e?t?"true":"false":"number"===e&&Number.isFinite(t)?t<1e21?""+t:n(""+t):""}e.exports=function(t){let e="";if(null===t||"object"!=typeof t)return e;const r=Object.keys(t),o=r.length;let s=0;for(let a=0;a<o;a++){const o=r[a],c=t[o],u=n(o)+"=";if(a&&(e+="&"),Array.isArray(c)){s=c.length;for(let t=0;t<s;t++)t&&(e+="&"),e+=u,e+=i(c[t])}else e+=u,e+=i(c)}return e}},{"./internals/querystring":10}],13:[function(t,e,r){const n=t("assert"),i=t("fast-querystring"),o=t("safe-regex2"),s=t("fast-deep-equal"),{prettyPrintTree:a}=t("./lib/pretty-print"),{StaticNode:c,NODE_TYPES:u}=t("./lib/node"),l=t("./lib/constrainer"),h=t("./lib/http-methods"),f=t("./lib/strategies/http-method"),{safeDecodeURI:p,safeDecodeURIComponent:d}=t("./lib/url-sanitizer"),g=/^https?:\/\/.*?\//,y=/(\/:[^/()]*?)\?(\/?)/;if(!o(g))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!o(y))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function v(t){if(!(this instanceof v))return new v(t);t=t||{},this._opts=t,t.defaultRoute?(n("function"==typeof t.defaultRoute,"The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(n("function"==typeof t.onBadUrl,"The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(n("function"==typeof t.buildPrettyMeta,"buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=C,t.querystringParser?(n("function"==typeof t.querystringParser,"querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=t=>""===t?{}:i.parse(t),this.caseSensitive=void 0===t.caseSensitive||t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new l(t.constraints),this.routes=[],this.trees={}}for(var m in v.prototype.on=function(t,e,r,i,o){"function"==typeof r&&(void 0!==i&&(o=i),i=r,r={}),n("string"==typeof e,"Path should be a string"),n(e.length>0,"The path could not be empty"),n("/"===e[0]||"*"===e[0],"The first character of a path should be `/` or `*`"),n("function"==typeof i,"Handler should be a function");const s=e.match(y);if(s){n(e.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");const a=e.replace(y,"$1$2"),c=e.replace(y,"$2");return this.on(t,a,r,i,o),void this.on(t,c,r,i,o)}const a=e;this.ignoreDuplicateSlashes&&(e=b(e)),this.ignoreTrailingSlash&&(e=S(e));const c=Array.isArray(t)?t:[t];for(const t of c)n("string"==typeof t,"Method should be a string"),n(h.includes(t),"Method '".concat(t,"' is not an http method.")),this._on(t,e,r,i,o,a)},v.prototype._on=function(t,e,r,i,a){let u={};void 0!==r.constraints&&(n("object"==typeof r.constraints&&null!==r.constraints,"Constraints should be an object"),0!==Object.keys(r.constraints).length&&(u=r.constraints)),this.constrainer.validateConstraints(u),this.constrainer.noteUsage(u),void 0===this.trees[t]&&(this.trees[t]=new c("/"));let l=e;if("*"===l&&0!==this.trees[t].prefix.length){const e=this.trees[t];this.trees[t]=new c(""),this.trees[t].staticChildren["/"]=e}let h=this.trees[t],f=h.prefix.length;const p=[];for(let t=0;t<=l.length;t++){if(58===l.charCodeAt(t)&&58===l.charCodeAt(t+1)){t++;continue}const e=58===l.charCodeAt(t)&&58!==l.charCodeAt(t+1),r=42===l.charCodeAt(t);if(e||r||t===l.length&&t!==f){let e=l.slice(f,t);this.caseSensitive||(e=e.toLowerCase()),e=e.split("::").join(":"),e=e.split("%").join("%25"),h=h.createStaticChild(e)}if(e){let e=!1;const r=[];let i=t+1;for(let s=i;;s++){const a=l.charCodeAt(s),c=40===a,u=45===a||46===a,d=47===a||s===l.length;if(c||u||d){const a=l.slice(i,s);if(p.push(a),e=e||c||u,c){const t=w(l,s),e=l.slice(s,t+1);this.allowUnsafeRegex||n(o(new RegExp(e)),"The regex '".concat(e,"' is not safe!")),r.push(P(e)),s=t+1}else r.push("(.*?)");const g=s;for(;s<l.length;s++){const t=l.charCodeAt(s);if(47===t)break;if(58===t){if(58!==l.charCodeAt(s+1))break;s++}}let y=l.slice(g,s);if(y&&(y=y.split("::").join(":"),y=y.split("%").join("%25"),r.push(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))),i=s+1,d||47===l.charCodeAt(s)||s===l.length){const n=e?"()"+y:y,i=l.slice(t,s);l=l.slice(0,t+1)+n+l.slice(s),t+=n.length;const o=e?new RegExp("^"+r.join("")+"$"):null;h=h.createParametricChild(o,y||null,i),f=t+1;break}}}}else if(r&&(p.push("*"),h=h.createWildcardChild(),f=t+1,t!==l.length-1))throw new Error("Wildcard must be the last character in the route")}this.caseSensitive||(l=l.toLowerCase()),"*"===l&&(l="/*");for(const e of this.routes){const r=e.opts.constraints||{};if(e.method===t&&e.pattern===l&&s(r,u))throw new Error("Method '".concat(t,"' already declared for route '").concat(l,"' with constraints '").concat(JSON.stringify(u),"'"))}const d={method:t,path:e,pattern:l,params:p,opts:r,handler:i,store:a};this.routes.push(d),h.addRoute(d,this.constrainer)},v.prototype.hasConstraintStrategy=function(t){return this.constrainer.hasConstraintStrategy(t)},v.prototype.addConstraintStrategy=function(t){this.constrainer.addConstraintStrategy(t),this._rebuild(this.routes)},v.prototype.reset=function(){this.trees={},this.routes=[]},v.prototype.off=function(t,e,r){n("string"==typeof e,"Path should be a string"),n(e.length>0,"The path could not be empty"),n("/"===e[0]||"*"===e[0],"The first character of a path should be `/` or `*`"),n(void 0===r||"object"==typeof r&&!Array.isArray(r)&&null!==r,"Constraints should be an object or undefined.");const i=e.match(y);if(i){n(e.length===i.index+i[0].length,"Optional Parameter needs to be the last parameter of the path");const o=e.replace(y,"$1$2"),s=e.replace(y,"$2");return this.off(t,o,r),void this.off(t,s,r)}this.ignoreDuplicateSlashes&&(e=b(e)),this.ignoreTrailingSlash&&(e=S(e));const o=Array.isArray(t)?t:[t];for(const t of o)this._off(t,e,r)},v.prototype._off=function(t,e,r){function i(r){return t!==r.method||e!==r.path}n("string"==typeof t,"Method should be a string"),n(h.includes(t),"Method '".concat(t,"' is not an http method."));const o=r?function(t){return i(t)||!s(r,t.opts.constraints||{})}:i,a=this.routes.filter(o);this._rebuild(a)},v.prototype.lookup=function(t,e,r,n){if("function"==typeof r&&(n=r,r=void 0),void 0===n){const n=this.constrainer.deriveConstraints(t,r),i=this.find(t.method,t.url,n);return this.callHandler(i,t,e,r)}this.constrainer.deriveConstraints(t,r,((i,o)=>{if(null===i)try{const i=this.find(t.method,t.url,o),s=this.callHandler(i,t,e,r);n(null,s)}catch(i){n(i)}else n(i)}))},v.prototype.callHandler=function(t,e,r,n){return null===t?this._defaultRoute(e,r,n):void 0===n?t.handler(e,r,t.params,t.store,t.searchParams):t.handler.call(n,e,r,t.params,t.store,t.searchParams)},v.prototype.find=function(t,e,r){let n,i,o,s=this.trees[t];if(void 0===s)return null;47!==e.charCodeAt(0)&&(e=e.replace(g,"/")),this.ignoreDuplicateSlashes&&(e=b(e));try{n=p(e),e=n.path,i=n.querystring,o=n.shouldDecodeParam}catch(t){return this._onBadUrl(e)}this.ignoreTrailingSlash&&(e=S(e));const a=e;!1===this.caseSensitive&&(e=e.toLowerCase());const c=this.maxParamLength;let l=s.prefix.length;const h=[],f=e.length,y=[];for(;;){if(l===f&&s.isLeafNode){const t=s.handlerStorage.getMatchingHandler(r);if(null!==t)return{handler:t.handler,store:t.store,params:t._createParamsObject(h),searchParams:this.querystringParser(i)}}let t=s.getNextNode(e,l,y,h.length);if(null===t){if(0===y.length)return null;const e=y.pop();l=e.brotherPathIndex,h.splice(e.paramsCount),t=e.brotherNode}if(s=t,s.kind!==u.STATIC)if(s.kind!==u.WILDCARD){if(s.kind===u.PARAMETRIC){let t=a.indexOf("/",l);-1===t&&(t=f);let e=a.slice(l,t);if(o&&(e=d(e)),s.isRegex){const t=s.regex.exec(e);if(null===t)continue;for(let e=1;e<t.length;e++){const r=t[e];if(r.length>c)return null;h.push(r)}}else{if(e.length>c)return null;h.push(e)}l=t}}else{let t=a.slice(l);o&&(t=d(t)),h.push(t),l=f}else l+=s.prefix.length}},v.prototype._rebuild=function(t){this.reset();for(const e of t){const{method:t,path:r,opts:n,handler:i,store:o}=e;this._on(t,r,n,i,o)}},v.prototype._defaultRoute=function(t,e,r){if(null!==this.defaultRoute)return void 0===r?this.defaultRoute(t,e):this.defaultRoute.call(r,t,e);e.statusCode=404,e.end()},v.prototype._onBadUrl=function(t){if(null===this.onBadUrl)return null;const e=this.onBadUrl;return{handler:(r,n,i)=>e(t,r,n),params:{},store:null}},v.prototype.prettyPrint=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.method;t.buildPrettyMeta=this.buildPrettyMeta.bind(this);let r=null;if(void 0===e){const t=this.constrainer.strategies,{version:e,host:n}=t,i=_objectWithoutProperties(t,_excluded);i[f.name]=f;const o=new v(_objectSpread(_objectSpread({},this._opts),{},{constraints:i})),s=this.routes.map((t=>{const e=_objectSpread(_objectSpread({},t.opts.constraints),{},{[f.name]:t.method});return _objectSpread(_objectSpread({},t),{},{method:"MERGED",opts:{constraints:e}})}));o._rebuild(s),r=o.trees.MERGED}else r=this.trees[e];return null==r?"(empty tree)":a(r,t)},h){if(!h.hasOwnProperty(m))continue;const t=h[m],e=t.toLowerCase();if(v.prototype[e])throw new Error("Method already exists: "+e);v.prototype[e]=function(e,r,n){return this.on(t,e,r,n)}}function b(t){return t.replace(/\/\/+/g,"/")}function S(t){return t.length>1&&47===t.charCodeAt(t.length-1)?t.slice(0,-1):t}function P(t){return 94===t.charCodeAt(1)&&(t=t.slice(0,1)+t.slice(2)),36===t.charCodeAt(t.length-2)&&(t=t.slice(0,t.length-2)+t.slice(t.length-1)),t}function w(t,e){for(var r=1;e<t.length;)if("\\"!==t[++e]){if(")"===t[e]?r--:"("===t[e]&&r++,!r)return e}else e++;throw new TypeError('Invalid regexp expression in "'+t+'"')}function C(t){return t&&t.store?Object.assign({},t.store):{}}v.prototype.all=function(t,e,r){this.on(h,t,e,r)},e.exports=v},{"./lib/constrainer":14,"./lib/http-methods":16,"./lib/node":17,"./lib/pretty-print":18,"./lib/strategies/http-method":21,"./lib/url-sanitizer":22,assert:1,"fast-deep-equal":8,"fast-querystring":9,"safe-regex2":25}],14:[function(t,e,r){const n=t("./strategies/accept-version"),i=t("./strategies/accept-host"),o=t("assert");e.exports=class{constructor(t){if(this.strategies={version:n,host:i},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,t)for(const e of Object.values(t))this.addConstraintStrategy(e)}isStrategyUsed(t){return this.strategiesInUse.has(t)||this.asyncStrategiesInUse.has(t)}hasConstraintStrategy(t){const e=this.strategies[t];return void 0!==e&&(e.isCustom||this.isStrategyUsed(t))}addConstraintStrategy(t){if(o("string"==typeof t.name&&""!==t.name,"strategy.name is required."),o(t.storage&&"function"==typeof t.storage,"strategy.storage function is required."),o(t.deriveConstraint&&"function"==typeof t.deriveConstraint,"strategy.deriveConstraint function is required."),this.strategies[t.name]&&this.strategies[t.name].isCustom)throw new Error("There already exists a custom constraint with the name ".concat(t.name,"."));if(this.isStrategyUsed(t.name))throw new Error("There already exists a route with ".concat(t.name," constraint."));t.isCustom=!0,t.isAsync=3===t.deriveConstraint.length,this.strategies[t.name]=t,t.mustMatchWhenDerived&&this.noteUsage({[t.name]:t})}deriveConstraints(t,e,r){const n=this.deriveSyncConstraints(t,e);if(void 0===r)return n;this.deriveAsyncConstraints(n,t,e,r)}deriveSyncConstraints(t,e){}noteUsage(t){if(t){const e=this.strategiesInUse.size;for(const e in t){this.strategies[e].isAsync?this.asyncStrategiesInUse.add(e):this.strategiesInUse.add(e)}e!==this.strategiesInUse.size&&this._buildDeriveConstraints()}}newStoreForConstraint(t){if(!this.strategies[t])throw new Error("No strategy registered for constraint key ".concat(t));return this.strategies[t].storage()}validateConstraints(t){for(const e in t){const r=t[e];if(void 0===r)throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");const n=this.strategies[e];if(!n)throw new Error("No strategy registered for constraint key ".concat(e));n.validate&&n.validate(r)}}deriveAsyncConstraints(t,e,r,n){let i=this.asyncStrategiesInUse.size;if(0!==i){t=t||{};for(const o of this.asyncStrategiesInUse){this.strategies[o].deriveConstraint(e,r,((e,r)=>{null===e?(t[o]=r,0==--i&&n(null,t)):n(e)}))}}else n(null,t)}_buildDeriveConstraints(){if(0===this.strategiesInUse.size)return;const t=["return {"];for(const e of this.strategiesInUse){const r=this.strategies[e];if(r.isCustom)t.push(" ".concat(r.name,": this.strategies.").concat(e,".deriveConstraint(req, ctx),"));else if("version"===e)t.push(" version: req.headers['accept-version'],");else{if("host"!==e)throw new Error("unknown non-custom strategy for compiling constraint derivation function");t.push(" host: req.headers.host || req.headers[':authority'],")}}t.push("}"),this.deriveSyncConstraints=new Function("req","ctx",t.join("\n")).bind(this)}}},{"./strategies/accept-host":19,"./strategies/accept-version":20,assert:1}],15:[function(t,e,r){const n=t("./strategies/http-method");e.exports=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(t){return void 0===t?this.unconstrainedHandler:this._getHandlerMatchingConstraints(t)}addHandler(t,e){const r=e.params,i=e.opts.constraints||{},o={params:r,constraints:i,handler:e.handler,store:e.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(i);0===s.length&&(this.unconstrainedHandler=o);for(const t of s)this.constraints.includes(t)||("version"===t?this.constraints.unshift(t):this.constraints.push(t));const a=s.includes(n.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(o),this.handlers.sort(((t,e)=>Object.keys(t.constraints).length-Object.keys(e.constraints).length)),a||this._compileGetHandlerMatchingConstraints(t,i)}_compileCreateParamsObject(t){const e=[];for(let r=0;r<t.length;r++)e.push("'".concat(t[r],"': paramsArray[").concat(r,"]"));return new Function("paramsArray","return {".concat(e.join(","),"}"))}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(t,e){for(let r=0;r<this.handlers.length;r++){const n=this.handlers[r].constraints[e];if(void 0!==n){let e=t.get(n)||0;e|=1<<r,t.set(n,e)}}}_constrainedIndexBitmask(t){let e=0;for(let r=0;r<this.handlers.length;r++){void 0!==this.handlers[r].constraints[t]&&(e|=1<<r)}return~e}_compileGetHandlerMatchingConstraints(t){this.constrainedHandlerStores={};for(const e of this.constraints){const r=t.newStoreForConstraint(e);this.constrainedHandlerStores[e]=r,this._buildConstraintStore(r,e)}const e=[];e.push("\n let candidates = ".concat((1<<this.handlers.length)-1,"\n let mask, matches\n "));for(const r of this.constraints){e.push("\n mask = ".concat(this._constrainedIndexBitmask(r),"\n value = derivedConstraints.").concat(r,"\n "));const n=t.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)";e.push("\n if (value === undefined) {\n candidates &= mask\n } else {\n matches = this.constrainedHandlerStores.".concat(r,".get(value) || 0\n candidates &= ").concat(n,"\n }\n if (candidates === 0) return null;\n "))}for(const r in t.strategies){t.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&e.push("if (derivedConstraints.".concat(r," !== undefined) return null"))}e.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",e.join("\n"))}}},{"./strategies/http-method":21}],16:[function(t,e,r){e.exports=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"]},{}],17:[function(t,e,r){const n=t("./handler-storage"),i={STATIC:0,PARAMETRIC:1,WILDCARD:2};class o{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(t,e){null===this.routes&&(this.routes=[]),null===this.handlerStorage&&(this.handlerStorage=new n),this.isLeafNode=!0,this.routes.push(t),this.handlerStorage.addHandler(e,t)}}class s extends o{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(t,e){const r=this.staticChildren[t.charAt(e)];return void 0!==r&&r.matchPrefix(t,e)?r:null}createStaticChild(t){if(0===t.length)return this;let e=this.staticChildren[t.charAt(0)];if(e){let r=1;for(;r<e.prefix.length;r++)if(t.charCodeAt(r)!==e.prefix.charCodeAt(r)){e=e.split(this,r);break}return e.createStaticChild(t.slice(r))}const r=t.charAt(0);return this.staticChildren[r]=new a(t),this.staticChildren[r]}}class a extends s{constructor(t){super(),this.prefix=t,this.wildcardChild=null,this.parametricChildren=[],this.kind=i.STATIC,this._compilePrefixMatch()}createParametricChild(t,e,r){const n=t&&t.source;let i=this.parametricChildren.find((t=>(t.regex&&t.regex.source)===n));return i?(i.nodePaths.add(r),i):(i=new c(t,e,r),this.parametricChildren.push(i),this.parametricChildren.sort(((t,e)=>t.isRegex?e.isRegex?null===t.staticSuffix?1:null===e.staticSuffix?-1:e.staticSuffix.endsWith(t.staticSuffix)?1:t.staticSuffix.endsWith(e.staticSuffix)?-1:0:-1:1)),i)}createWildcardChild(){return this.wildcardChild||(this.wildcardChild=new u),this.wildcardChild}split(t,e){const r=this.prefix.slice(0,e),n=this.prefix.slice(e);this.prefix=n,this._compilePrefixMatch();const i=new a(r);return i.staticChildren[n.charAt(0)]=this,t.staticChildren[r.charAt(0)]=i,i}getNextNode(t,e,r,n){let i=this.findStaticMatchingChild(t,e),o=0;if(null===i){if(0===this.parametricChildren.length)return this.wildcardChild;i=this.parametricChildren[0],o=1}null!==this.wildcardChild&&r.push({paramsCount:n,brotherPathIndex:e,brotherNode:this.wildcardChild});for(let t=this.parametricChildren.length-1;t>=o;t--)r.push({paramsCount:n,brotherPathIndex:e,brotherNode:this.parametricChildren[t]});return i}_compilePrefixMatch(){if(1===this.prefix.length)return void(this.matchPrefix=()=>!0);const t=[];for(let e=1;e<this.prefix.length;e++){const r=this.prefix.charCodeAt(e);t.push("path.charCodeAt(i + ".concat(e,") === ").concat(r))}this.matchPrefix=new Function("path","i","return ".concat(t.join(" && ")))}}class c extends s{constructor(t,e,r){super(),this.isRegex=!!t,this.regex=t||null,this.staticSuffix=e||null,this.kind=i.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(t,e){return this.findStaticMatchingChild(t,e)}}class u extends o{constructor(){super(),this.kind=i.WILDCARD}getNextNode(){return null}}e.exports={StaticNode:a,ParametricNode:c,WildcardNode:u,NODE_TYPES:i}},{"./handler-storage":15}],18:[function(t,e,r){const n=t("fast-deep-equal"),i=t("./strategies/http-method"),o=Symbol("treeData");function s(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="";const n=Object.keys(t);for(let i=0;i<n.length;i++){const a=n[i],c=t[a],u=i===n.length-1,l=u?" ":"│ ";r+=e+(u?"└── ":"├── ")+a+(c[o]||"").split("\n").join("\n"+e+l)+"\n",r+=s(c,e+l)}return r}function a(t){return Array.isArray(t)?t.map((t=>a(t))):"symbol"==typeof t?t.toString():"function"==typeof t?function(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}(t):t}function c(t){const e=_objectSpread({},t.opts.constraints),r=e[i.name];return delete e[i.name],_objectSpread(_objectSpread({},t),{},{method:r,opts:{constraints:e}})}function u(t){let e=" (".concat(t.method,")");const r=t.opts.constraints||{};return 0!==Object.keys(r).length&&(e+=" "+JSON.stringify(r)),e+=function(t){let e="";for(const[r,n]of Object.entries(t))e+="\n• (".concat(r,") ").concat(n);return e}(t.metaData),e}function l(t,e,r){let i=t.routes;return void 0===r.method&&(i=i.map(c)),i=i.map((t=>(t.metaData=function(t,e){if(!e.includeMeta)return{};const r=e.buildPrettyMeta(t),n={};let i=e.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(r));for(const t of i){if(!Object.prototype.hasOwnProperty.call(r,t))continue;const e=t.toString(),i=r[t];if(null!=i){const t=JSON.stringify(a(i));n[e]=t}}return n}(t,r),t))),void 0===r.method&&(i=function(t){return t.reduce(((t,e)=>{for(const r of t)if(n(e.opts.constraints,r.opts.constraints)&&n(e.metaData,r.metaData))return r.method+=", "+e.method,t;return t.push(e),t}),[])}(i)),i.map(u).join("\n".concat(e))}function h(t,e,r,n){if((t.isLeafNode||!1!==n.commonPrefix)&&(e=e[r=r||"(empty root node)"]={},t.isLeafNode&&(e[o]=l(t,r,n)),r=""),t.staticChildren)for(const i of Object.values(t.staticChildren))h(i,e,r+i.prefix,n);if(t.parametricChildren)for(const i of Object.values(t.parametricChildren)){h(i,e,r+Array.from(i.nodePaths).join("|"),n)}t.wildcardChild&&h(t.wildcardChild,e,"*",n)}e.exports={prettyPrintTree:function(t,e){const r={};return h(t,r,t.prefix,e),s(r)}}},{"./strategies/http-method":21,"fast-deep-equal":8}],19:[function(t,e,r){const n=t("assert");e.exports={name:"host",mustMatchWhenDerived:!1,storage:function(){const t={},e=[];return{get:r=>{const n=t[r];if(n)return n;for(const t of e)if(t.host.test(r))return t.value},set:(r,n)=>{r instanceof RegExp?e.push({host:r,value:n}):t[r]=n}}},validate(t){n("string"==typeof t||"[object RegExp]"===Object.prototype.toString.call(t),"Host should be a string or a RegExp")}}},{assert:1}],20:[function(t,e,r){const n=t("assert");function i(){if(!(this instanceof i))return new i;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}i.prototype.set=function(t,e){if("string"!=typeof t)throw new TypeError("Version should be a string");let[r,n,i]=t.split(".");return r=Number(r)||0,n=Number(n)||0,i=Number(i)||0,r>=this.maxMajor&&(this.maxMajor=r,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),n>=(this.maxMinors[r]||0)&&(this.maxMinors[r]=n,this.store["".concat(r,".x")]=e,this.store["".concat(r,".x.x")]=e),i>=(this.store["".concat(r,".").concat(n)]||0)&&(this.maxPatches["".concat(r,".").concat(n)]=i,this.store["".concat(r,".").concat(n,".x")]=e),this.store["".concat(r,".").concat(n,".").concat(i)]=e,this},i.prototype.get=function(t){return this.store[t]},e.exports={name:"version",mustMatchWhenDerived:!0,storage:i,validate(t){n("string"==typeof t,"Version should be a string")}}},{assert:1}],21:[function(t,e,r){e.exports={name:"__fmw_internal_strategy_merged_tree_http_method__",storage:function(){const t={};return{get:e=>t[e]||null,set:(e,r)=>{t[e]=r}}},deriveConstraint:t=>t.method,mustMatchWhenDerived:!0}},{}],22:[function(t,e,r){function n(t,e){return 50===t?53===e?"%":51===e?"#":52===e?"$":54===e?"&":66===e||98===e?"+":67===e||99===e?",":70===e||102===e?"/":null:51===t?65===e||97===e?":":66===e||98===e?";":68===e||100===e?"=":70===e||102===e?"?":null:52===t&&48===e?"@":null}e.exports={safeDecodeURI:function(t){let e=!1,r=!1,i="";for(let o=1;o<t.length;o++){const s=t.charCodeAt(o);if(37===s){const i=t.charCodeAt(o+1),s=t.charCodeAt(o+2);null===n(i,s)?e=!0:(r=!0,50===i&&53===s&&(e=!0,t=t.slice(0,o+1)+"25"+t.slice(o+1),o+=2),o+=2)}else if(63===s||59===s||35===s){i=t.slice(o+1),t=t.slice(0,o);break}}return{path:e?decodeURI(t):t,querystring:i,shouldDecodeParam:r}},safeDecodeURIComponent:function(t){const e=t.indexOf("%");if(-1===e)return t;let r="",i=e;for(let o=e;o<t.length;o++)if(37===t.charCodeAt(o)){const e=n(t.charCodeAt(o+1),t.charCodeAt(o+2));r+=t.slice(i,o)+e,i=o+3}return t.slice(0,e)+r+t.slice(i)}}},{}],23:[function(t,e,r){var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,a=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),c=1;c<arguments.length;c++){for(var u in r=Object(arguments[c]))i.call(r,u)&&(a[u]=r[u]);if(n){s=n(r);for(var l=0;l<s.length;l++)o.call(r,s[l])&&(a[s[l]]=r[s[l]])}}return a}},{}],24:[function(t,e,r){var n,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var u,l=[],h=!1,f=-1;function p(){h&&u&&(h=!1,u.length?l=u.concat(l):f=-1,l.length&&d())}function d(){if(!h){var t=c(p);h=!0;for(var e=l.length;e;){for(u=l,l=[];++f<e;)u&&u[f].run();f=-1,e=l.length}u=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new g(t,e)),1!==l.length||h||c(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],25:[function(t,e,r){var n=t("ret"),i=n.types;e.exports=function(t,e){e||(e={});var r,o=void 0===e.limit?25:e.limit;r=t,"[object RegExp]"==={}.toString.call(r)?t=t.source:"string"!=typeof t&&(t=String(t));try{t=n(t)}catch(t){return!1}var s=0;return function t(e,r){var n,a;if(e.type===i.REPETITION){if(r++,s++,r>1)return!1;if(s>o)return!1}if(e.options)for(n=0,a=e.options.length;n<a;n++)if(!t({stack:e.options[n]},r))return!1;var c=e.stack||e.value&&e.value.stack;if(!c)return!0;for(n=0;n<c.length;n++)if(!t(c[n],r))return!1;return!0}(t,0)}},{ret:26}],26:[function(t,e,r){const n=t("./util"),i=t("./types"),o=t("./sets"),s=t("./positions");e.exports=t=>{var e,r,a=0,c={type:i.ROOT,stack:[]},u=c,l=c.stack,h=[],f=e=>{n.error(t,"Nothing to repeat at column ".concat(e-1))},p=n.strToChars(t);for(e=p.length;a<e;)switch(r=p[a++]){case"\\":switch(r=p[a++]){case"b":l.push(s.wordBoundary());break;case"B":l.push(s.nonWordBoundary());break;case"w":l.push(o.words());break;case"W":l.push(o.notWords());break;case"d":l.push(o.ints());break;case"D":l.push(o.notInts());break;case"s":l.push(o.whitespace());break;case"S":l.push(o.notWhitespace());break;default:/\d/.test(r)?l.push({type:i.REFERENCE,value:parseInt(r,10)}):l.push({type:i.CHAR,value:r.charCodeAt(0)})}break;case"^":l.push(s.begin());break;case"$":l.push(s.end());break;case"[":var d;"^"===p[a]?(d=!0,a++):d=!1;var g=n.tokenizeClass(p.slice(a),t);a+=g[1],l.push({type:i.SET,set:g[0],not:d});break;case".":l.push(o.anyChar());break;case"(":var y={type:i.GROUP,stack:[],remember:!0};"?"===(r=p[a])&&(r=p[a+1],a+=2,"="===r?y.followedBy=!0:"!"===r?y.notFollowedBy=!0:":"!==r&&n.error(t,"Invalid group, character '".concat(r,"'")+" after '?' at column ".concat(a-1)),y.remember=!1),l.push(y),h.push(u),u=y,l=y.stack;break;case")":0===h.length&&n.error(t,"Unmatched ) at column ".concat(a-1)),l=(u=h.pop()).options?u.options[u.options.length-1]:u.stack;break;case"|":u.options||(u.options=[u.stack],delete u.stack);var v=[];u.options.push(v),l=v;break;case"{":var m,b,S=/^(\d+)(,(\d+)?)?\}/.exec(p.slice(a));null!==S?(0===l.length&&f(a),m=parseInt(S[1],10),b=S[2]?S[3]?parseInt(S[3],10):1/0:m,a+=S[0].length,l.push({type:i.REPETITION,min:m,max:b,value:l.pop()})):l.push({type:i.CHAR,value:123});break;case"?":0===l.length&&f(a),l.push({type:i.REPETITION,min:0,max:1,value:l.pop()});break;case"+":0===l.length&&f(a),l.push({type:i.REPETITION,min:1,max:1/0,value:l.pop()});break;case"*":0===l.length&&f(a),l.push({type:i.REPETITION,min:0,max:1/0,value:l.pop()});break;default:l.push({type:i.CHAR,value:r.charCodeAt(0)})}return 0!==h.length&&n.error(t,"Unterminated group"),c},e.exports.types=i},{"./positions":27,"./sets":28,"./types":29,"./util":30}],27:[function(t,e,r){const n=t("./types");r.wordBoundary=()=>({type:n.POSITION,value:"b"}),r.nonWordBoundary=()=>({type:n.POSITION,value:"B"}),r.begin=()=>({type:n.POSITION,value:"^"}),r.end=()=>({type:n.POSITION,value:"$"})},{"./types":29}],28:[function(t,e,r){const n=t("./types"),i=()=>[{type:n.RANGE,from:48,to:57}],o=()=>[{type:n.CHAR,value:95},{type:n.RANGE,from:97,to:122},{type:n.RANGE,from:65,to:90}].concat(i()),s=()=>[{type:n.CHAR,value:9},{type:n.CHAR,value:10},{type:n.CHAR,value:11},{type:n.CHAR,value:12},{type:n.CHAR,value:13},{type:n.CHAR,value:32},{type:n.CHAR,value:160},{type:n.CHAR,value:5760},{type:n.RANGE,from:8192,to:8202},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233},{type:n.CHAR,value:8239},{type:n.CHAR,value:8287},{type:n.CHAR,value:12288},{type:n.CHAR,value:65279}];r.words=()=>({type:n.SET,set:o(),not:!1}),r.notWords=()=>({type:n.SET,set:o(),not:!0}),r.ints=()=>({type:n.SET,set:i(),not:!1}),r.notInts=()=>({type:n.SET,set:i(),not:!0}),r.whitespace=()=>({type:n.SET,set:s(),not:!1}),r.notWhitespace=()=>({type:n.SET,set:s(),not:!0}),r.anyChar=()=>({type:n.SET,set:[{type:n.CHAR,value:10},{type:n.CHAR,value:13},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233}],not:!0})},{"./types":29}],29:[function(t,e,r){e.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},{}],30:[function(t,e,r){const n=t("./types"),i=t("./sets"),o={0:0,t:9,n:10,v:11,f:12,r:13};r.strToChars=function(t){return t=t.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(t,e,r,n,i,s,a,c){if(r)return t;var u=e?8:n?parseInt(n,16):i?parseInt(i,16):s?parseInt(s,8):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):o[c],l=String.fromCharCode(u);return/[[\]{}^$.|?*+()]/.test(l)&&(l="\\"+l),l}))},r.tokenizeClass=(t,e)=>{for(var o,s,a=[],c=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(o=c.exec(t));)if(o[1])a.push(i.words());else if(o[2])a.push(i.ints());else if(o[3])a.push(i.whitespace());else if(o[4])a.push(i.notWords());else if(o[5])a.push(i.notInts());else if(o[6])a.push(i.notWhitespace());else if(o[7])a.push({type:n.RANGE,from:(o[8]||o[9]).charCodeAt(0),to:o[10].charCodeAt(0)});else{if(!(s=o[12]))return[a,c.lastIndex];a.push({type:n.CHAR,value:s.charCodeAt(0)})}r.error(e,"Unterminated character class")},r.error=(t,e)=>{throw new SyntaxError("Invalid regular expression: /"+t+"/: "+e)}},{"./sets":28,"./types":29}],31:[function(t,e,r){e.exports={Product:"Unnamed_Service",ProductVersion:"0.0.1",ServicePort:8080}},{}],32:[function(t,e,r){e.exports=t("./Orator-ServiceServer-IPC.js")},{"./Orator-ServiceServer-IPC.js":35}],33:[function(t,e,r){const n=t("fable-serviceproviderbase");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="OratorServiceServer",this.ServiceServerType="Base",this.Name=this.fable.settings.Product,this.URL="BASE_SERVICE_SERVER",this.Port=this.options.ServicePort,this.Active=!1}listen(t,e){return this.Active=!0,e()}close(t){return this.Active=!1,t()}bodyParser(t){return(t,e,r)=>{r()}}use(t){return"function"==typeof t||(this.log.error("Orator USE global handler mapping failed -- parameter was expected to be a function with prototype function(Request, Response, Next) but type was ".concat(typeof t," instead of a string.")),!1)}doGet(t){return!0}get(t){if("string"!=typeof t)return this.log.error("Orator GET Route mapping failed -- route parameter was ".concat(typeof t," instead of a string.")),!1;for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.doGet(t,...r)}getWithBodyParser(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.get(t,this.bodyParser(),...r)}doPut(t){return!0}put(t){if("string"!=typeof t)return this.log.error("Orator PUT Route mapping failed -- route parameter was ".concat(typeof t," instead of a string.")),!1;for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.doPut(t,...r)}putWithBodyParser(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.put(t,this.bodyParser(),...r)}doPost(t){return!0}post(t){if("string"!=typeof t)return this.log.error("Orator POST Route mapping failed -- route parameter was ".concat(typeof t," instead of a string.")),!1;for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.doPost(t,...r)}postWithBodyParser(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.post(t,this.bodyParser(),...r)}doDel(t){return!0}del(t){if("string"!=typeof t)return this.log.error("Orator DEL Route mapping failed -- route parameter was ".concat(typeof t," instead of a string.")),!1;for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.doDel(t,...r)}delWithBodyParser(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.del(t,this.bodyParser(),...r)}doPatch(t){return!0}patch(t){if("string"!=typeof t)return this.log.error("Orator PATCH Route mapping failed -- route parameter was ".concat(typeof t," instead of a string.")),!1;for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.doPatch(t,...r)}patchWithBodyParser(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.patch(t,this.bodyParser(),...r)}doOpts(t){return!0}opts(t){if("string"!=typeof t)return this.log.error("Orator OPTS Route mapping failed -- route parameter was ".concat(typeof t," instead of a string.")),!1;for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.doOpts(t,...r)}optsWithBodyParser(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.opts(t,this.bodyParser(),...r)}doHead(t){return!0}head(t){return"string"==typeof t||(this.log.error("Orator HEAD Route mapping failed -- route parameter was ".concat(typeof t," instead of a string.")),!1)}headWithBodyParser(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.head(t,this.bodyParser(),...r)}invoke(t,e,r,n){return this.log.debug("Orator invoke called for route [".concat(e,"] and landed on the base class; the service provider likely does not implement programmatic invoke capabilities."),r),!1}}},{"fable-serviceproviderbase":6}],34:[function(t,e,r){e.exports=class{constructor(t,e,r){this.log=e,t.hasOwnProperty("params")?this.params=t.params:this.params={},t.hasOwnProperty("searchParams")?this.searchParams=t.searchParams:this.searchParams={},this.requestGUID=r,this.responseData=null,this.responseStatus=-1}send(t){return"string"==typeof t?null===this.responseData?(this.responseData=t,!0):"string"==typeof this.responseData?(this.responseData=this.responseData+t,!0):(this.log("Request ".concat(this.requestGUID," has tried to send() a string value after send()ing data type ").concat(typeof this.responseData,"."),t),!1):"object"==typeof t?null===this.responseData?(this.responseData=JSON.stringify(t),!0):"string"==typeof this.responseData?(this.responseData+=this.responseData+JSON.stringify(t),!0):(this.log("Request ".concat(this.requestGUID," has tried to send() an object value to be auto stringified after send()ing data type ").concat(typeof this.responseData,"."),t),!1):void 0}}},{}],35:[function(t,e,r){const n=t("./Orator-ServiceServer-Base.js"),i=t("./Orator-ServiceServer-IPC-SynthesizedResponse.js"),o=t("find-my-way");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.router=o(this.options),this.ServiceServerType="IPC",this.URL="IPC",this.Port=0,this.preBehaviorFunctions=[],this.behaviorMap={},this.postBehaviorFunctions=[]}use(t){return this.addPreBehaviorFunction(t)}addPreBehaviorFunction(t){return super.use(t)?(this.preBehaviorFunctions.push(t),!0):(this.log.error("IPC provider failed to map USE handler function!"),!1)}executePreBehaviorFunctions(t,e,r){let n=this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Anticipate");for(let r=0;r<this.preBehaviorFunctions.length;r++){let i=this.preBehaviorFunctions[r];n.anticipate((r=>i(t,e,r)))}n.wait((t=>(t&&this.log.error("IPC Provider preBehaviorFunction ".concat(pFunctionIndex," failed with error: ").concat(t),t),r(t))))}addPostBehaviorFunction(t){return super.use(t)?(this.postBehaviorFunctions.push(t),!0):(this.log.error("IPC provider failed to map USE handler function!"),!1)}executePostBehaviorFunctions(t,e,r){let n=this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Anticipate");for(let r=0;r<this.postBehaviorFunctions.length;r++){let i=this.postBehaviorFunctions[r];n.anticipate((r=>i(t,e,r)))}n.wait((t=>(t&&this.log.error("IPC Provider postBehaviorFunction ".concat(pFunctionIndex," failed with error: ").concat(t),t),r(t))))}addRouteProcessor(t,e,r){return this.router.on(t,e,this.buildFindMyWayHandler(r)),!0}buildFindMyWayHandler(t){let e=t;return(t,r,n)=>{let i=this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Anticipate");i.anticipate((e=>this.executePreBehaviorFunctions(t,r,e)));for(let n=0;n<e.length;n++){let o=e[n];i.anticipate((e=>o(t,r,e)))}return i.anticipate((e=>this.executePostBehaviorFunctions(t,r,e))),new Promise(((t,e)=>{i.wait((r=>r?(this.log.error("IPC Provider behavior function ".concat(pFunctionIndex," failed with error: ").concat(r),r),e(r)):t()))}))}}bodyParser(){return(t,e,r)=>r()}doGet(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.addRouteProcessor("GET",t,Array.from(r))}doPut(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.addRouteProcessor("PUT",t,Array.from(r))}doPost(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.addRouteProcessor("POST",t,Array.from(r))}doDel(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.addRouteProcessor("DELETE",t,Array.from(r))}doPatch(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.addRouteProcessor("PATCH",t,Array.from(r))}doOpts(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.addRouteProcessor("OPTIONS",t,Array.from(r))}doHead(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.addRouteProcessor("HEAD",t,Array.from(r))}invoke(t,e,r,n){let o="function"==typeof n?n:"function"==typeof r&&r;if(!o)throw new Error("IPC Provider invoke() called without a callback function.");let s={method:t,url:e,guid:this.fable.getUUID()},a=this.router.find(s.method,s.url),c=new i(a,this.log,s.guid);s.params=c.params,s.searchParams=c.searchParams,a.handler(s,c,r).then((t=>o(null,c.responseData,c,t)),(t=>(this.log.trace("IPC Response Received",{Error:t}),t&&this.log.error("IPC Request Error Request GUID [".concat(s.guid,"] handling route [").concat(e,"]: ").concat(t),{Error:t,Route:e,Data:r}),o(t,c.responseData,c))))}}},{"./Orator-ServiceServer-Base.js":33,"./Orator-ServiceServer-IPC-SynthesizedResponse.js":34,"find-my-way":13}],36:[function(t,e,r){
|
|
8
|
-
/**
|
|
9
|
-
* Orator Service Abstraction
|
|
10
|
-
*
|
|
11
|
-
* @license MIT
|
|
12
|
-
*
|
|
13
|
-
* @author Steven Velozo <steven@velozo.com>
|
|
14
|
-
* @module Orator Service
|
|
15
|
-
*/
|
|
16
|
-
const n=t("fable-serviceproviderbase"),i=t("./Orator-Default-ServiceServer.js"),o=t("./Orator-Default-Configuration.js");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="Orator",this.serviceServer=!1,this.serviceServerProvider=!1,"undefined"!=typeof pServiceProvider&&(this.serviceServerProvider=pServiceProvider),this.options.hasOwnProperty("ServicePort")||(this.fable.settings.hasOwnProperty("APIServerPort")?this.options.ServicePort=this.fable.settings.APIServerPort:this.options.ServicePort=o.ServicePort),this.options.hasOwnProperty("Product")||(this.options.Product=o.Product)}onBeforeInitialize(){this.fable.settings.LogNoisiness>3&&this.log.trace("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," onBeforeInitialize:"))}onBeforeInitializeAsync(t){if(this.onBeforeInitialize(),this.serviceServer)this.log.warn("Orator attempting to initialize a service server after initialization has already completed.");else{if(!this.fable.OratorServiceServer){let t=void 0===this.options.ServiceServerOptions?{}:this.options.ServiceServerOptions;this.fable.serviceManager.servicesMap.hasOwnProperty("OratorServiceServer")||this.fable.serviceManager.addServiceType("OratorServiceServer",i),this.fable.serviceManager.instantiateServiceProvider("OratorServiceServer",t,"OratorServiceServer-AutoInit")}this.serviceServer=this.fable.OratorServiceServer,this.webServer=this.serviceServer}t()}onInitialize(){this.fable.settings.LogNoisiness>3&&this.log.trace("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," onInitialize:"))}onInitializeAsync(t){return this.onInitialize(),t()}onAfterInitialize(){this.fable.settings.LogNoisiness>3&&this.log.trace("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," onAfterInitialize:"))}onAfterInitializeAsync(t){return this.onAfterInitialize(),t()}initialize(t){let e="function"==typeof t?t:()=>{};if(this.initializeTimestamp)return this.log.warn("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," async initialize called but initialization is already completed. Aborting.")),e();{let t=this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Anticipate");this.fable.LogNoisiness>3&&this.log.trace("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," beginning initialization steps...")),t.anticipate(this.onBeforeInitializeAsync.bind(this)),t.anticipate(this.onInitializeAsync.bind(this)),t.anticipate(this.onAfterInitializeAsync.bind(this)),t.wait((t=>(this.initializeTimestamp=this.fable.log.getTimeStamp(),this.fable.LogNoisiness>2&&this.log.trace("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," initialization steps complete.")),e(t))))}}onBeforeStartService(t){return t()}onStartService(t){return this.onAfterInitialize(),this.serviceServer.listen(this.options.ServicePort,(e=>(this.log.info("".concat(this.serviceServer.Name," listening at ").concat(this.serviceServer.URL," port ").concat(this.serviceServer.Port)),t(e))))}onAfterStartService(t){return t()}startService(t){var e="function"==typeof t?t:()=>{};let r=this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Anticipate");this.fable.LogNoisiness>3&&this.log.trace("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," beginning startService steps...")),this.serviceServer||r.anticipate(this.initialize.bind(this)),r.anticipate(this.onBeforeStartService.bind(this)),r.anticipate(this.onStartService.bind(this)),r.anticipate(this.onAfterStartService.bind(this)),r.wait((t=>(this.startServiceTimestamp=this.fable.log.getTimeStamp(),this.fable.LogNoisiness>2&&this.log.trace("Orator [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Product," startService steps complete.")),e(t))))}stopService(t){var e="function"==typeof t?t:()=>{};if(!this.serviceServer){let t="Orator attempting to stop a service server but the service server has not been intialized yet.";return this.log.warn(t),e(t)}if(!this.serviceServer.Active){let t="Orator attempting to stop a service server but the service server is not actively running.";return this.log.warn(t),e(t)}return this.serviceServer.close(e)}invoke(t,e,r,n){return this.serviceServer.invoke(t,e,r,n)}startWebServer(t){return this.startService(t)}stopWebServer(t){return this.stopService(t)}getWebServer(){return this.serviceServer||this.initializeServiceServer(),this.serviceServer}},e.exports.ServiceServerBase=t("./Orator-ServiceServer-Base.js"),e.exports.ServiceServerIPC=t("./Orator-ServiceServer-IPC.js")},{"./Orator-Default-Configuration.js":31,"./Orator-Default-ServiceServer.js":32,"./Orator-ServiceServer-Base.js":33,"./Orator-ServiceServer-IPC.js":35,"fable-serviceproviderbase":6}]},{},[36])(36)}));
|
|
17
|
-
//# sourceMappingURL=orator.min.js.map
|