Comparing version 2.25.0 to 2.26.0
@@ -0,1 +1,7 @@ | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
/* | ||
@@ -38,2 +44,8 @@ * Copyright (c) 2020 Anton Bagdatyev (Tonix) | ||
/** | ||
* @type {Function} | ||
*/ | ||
const dummyNoOp = () => {// Just a dummy no-op function. Required when the Proxy API is polyfilled with proxy-polyfill (https://github.com/GoogleChrome/proxy-polyfill/) | ||
}; | ||
/** | ||
* Builtin function using pigretto's API to create a POJO promiser, | ||
@@ -54,5 +66,11 @@ * i.e. a proxy object with syntactic sugar which lets creating a queue of properties to resolve | ||
export default function POJOPromiser(obj, { | ||
mutateTargetOnSettledPromiseQueue = false | ||
} = {}) { | ||
const originalTarget = obj; // This is needed because the Proxy API may be polyfilled with proxy-polyfill (https://github.com/GoogleChrome/proxy-polyfill/). | ||
// Cloning "obj" allows setting properties on the target clone. | ||
const target = _objectSpread({}, obj); | ||
const that = { | ||
@@ -84,3 +102,4 @@ [queueTupleProp]: void 0, | ||
if (obj && mutateTargetOnSettledPromiseQueue) { | ||
Object.assign(target, obj); // Assign resolved values to the proxy target, so that promise won't have to be called again. | ||
// Assign resolved values to the original target, so that properties which value is a promise will be replaced with the resolved value. | ||
Object.assign(originalTarget, obj); | ||
} | ||
@@ -131,8 +150,11 @@ }); | ||
return pigretto(target, rules); | ||
target.then = dummyNoOp; | ||
const pigrettarget = pigretto(target, rules); | ||
return pigrettarget; | ||
}) | ||
}; | ||
const pigrettarget = pigretto(obj, rules); | ||
target.then = dummyNoOp; | ||
const pigrettarget = pigretto(target, rules); | ||
return pigrettarget; | ||
} | ||
//# sourceMappingURL=POJOPromiser.js.map |
@@ -26,4 +26,4 @@ /* | ||
export default function reflectConstruct(target, argumentsList, newTarget) { | ||
return Reflect.construct(target, argumentsList, newTarget); | ||
return newTarget ? Reflect.construct(target, argumentsList, newTarget) : new target(...argumentsList); | ||
} | ||
//# sourceMappingURL=reflectConstruct.js.map |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("pigretto",[],e):"object"==typeof exports?exports.pigretto=e():t.pigretto=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=29)}([function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return n})),r.d(e,"e",(function(){return o})),r.d(e,"f",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"c",(function(){return a})),r.d(e,"m",(function(){return f})),r.d(e,"j",(function(){return s})),r.d(e,"i",(function(){return l})),r.d(e,"h",(function(){return p})),r.d(e,"l",(function(){return h})),r.d(e,"g",(function(){return y})),r.d(e,"d",(function(){return v})),r.d(e,"k",(function(){return d}));r(11);const n={uniqueIdPrefix:"",elementUniqueIdPrefix:"",checkNetworkURI:null};function o(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}const i=Object.prototype.toString.call({}),u=t=>null!==t&&"object"==typeof t&&t.constructor===Object&&function(t){return i===Object.prototype.toString.call(t)}(t);function c(t){return Object.prototype.toString.call(t)===Object.prototype.toString.call([])}function a(t){return!t||0===t.length}function f(e){const r=void 0!==t?t:window;r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH=r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH||0,r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH++;const o=r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH;return(e||n.uniqueIdPrefix)+o}const s=(t,e,r)=>{let n=0,o=t;for(;n<e.length-1;){const t=e[n],r=o.get(t);if(r instanceof Map||r instanceof WeakMap)o=r;else{const e=new Map;o.set(t,e),o=e}n++}o.set(e[n],r)},l=(t,e)=>{let r=t,n=0;const o=e.length;for(;(r instanceof Map||r instanceof WeakMap)&&r.has(e[n])&&n<o;)r=r.get(e[n]),n++;return n==o};Symbol("treeMapSubtree");function*p(t,e,r){t.map();const n=e.bind(r);for(let e=0;e<t.length;e++)yield n(t[e],e,t)}function h(t){return Object.prototype.toString.call(t)}function y(t){return void 0===t}function v(t){try{JSON.parse(t)}catch(t){return!1}return!0}function d(t,{stopAtPrototype:e=null,stopAtPrototypeInclude:r=!0}={}){let n=t;const o={};let i=!1,u=!1;for(;!u&&n&&(!i||r);){i&&(u=!0);Object.getOwnPropertyNames(n).map(t=>o[t]=!0),n=Object.getPrototypeOf(n),e&&(i=n===e)}return Object.keys(o)}}).call(this,r(21))},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){var n=r(18),o=r(19),i=r(14),u=r(20);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||u()}},function(t,e,r){var n=r(26);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,r){var n=r(13),o=r(9);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e,r){var n=r(22),o=r(23),i=r(14),u=r(24);t.exports=function(t){return n(t)||o(t)||i(t)||u()}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){var n=r(25);function o(e,r,i){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=o=Reflect.get:t.exports=o=function(t,e,r){var o=n(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(r):i.value}},o(e,r,i||e)}t.exports=o},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return u}));const n=Object.prototype.hasOwnProperty;function o(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function i(t,e,r){return n.call(e,r)&&o(t[r],e[r])}function u(t,e){if(o(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++){if(!i(t,e,r[n]))return!1}return!0}},function(t,e,r){t.exports=r(27)},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=r=function(t){return typeof t}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(e)}t.exports=r},function(t,e,r){var n=r(15);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e,r){"use strict";const n=/[|\\{}()[\]^$+*?.-]/g;t.exports=t=>{if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(n,"\\$&")}},function(t,e,r){var n=r(28);t.exports=function(t,e){if(null==t)return{};var r,o,i=n(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)r=u[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(n=(u=c.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(15);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){var n=r(1);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t}},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function c(t,e,r,n){var o=e&&e.prototype instanceof s?e:s,i=Object.create(o.prototype),u=new A(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var c=b(u,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=a(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,u),i}function a(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function s(){}function l(){}function p(){}var h={};h[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(O([])));v&&v!==e&&r.call(v,o)&&(h=v);var d=p.prototype=s.prototype=Object.create(h);function x(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var n;this._invoke=function(o,i){function u(){return new e((function(n,u){!function n(o,i,u,c){var f=a(t[o],t,i);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(f.arg)}(o,i,n,u)}))}return n=n?n.then(u,u):u()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=a(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function m(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return l.prototype=d.constructor=p,p.constructor=l,p[u]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(d),t},t.awrap=function(t){return{__await:t}},x(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new g(c(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},x(d),d[u]="Generator",d[o]=function(){return this},d.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),a=r.call(i,"finallyLoc");if(c&&a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}},function(t,e,r){"use strict";r.r(e),r.d(e,"call",(function(){return qt})),r.d(e,"get",(function(){return Jt})),r.d(e,"set",(function(){return Qt})),r.d(e,"applyRule",(function(){return st})),r.d(e,"apply",(function(){return pt})),r.d(e,"constructRule",(function(){return lt})),r.d(e,"construct",(function(){return ht})),r.d(e,"lazyObject",(function(){return Xt})),r.d(e,"throwErrorForUnknownProperty",(function(){return ee})),r.d(e,"POJOPromiser",(function(){return oe}));var n=r(3),o=r.n(n),i=r(7),u=r.n(i),c=r(12),a=r.n(c),f=r(0);!function(){let t=0}();const s=t=>Boolean("function"==typeof t?t():t);function l(t){return(()=>{let e=0;for(;e<t.length-1;e++){const r=t[e],[n,o]=r;if(s(n))return o}const r=t[e];if(Object(f.b)(r)&&2===r.length){const[t,e]=r;return s(t)?e:void 0}return r})()}var p=a.a.mark(x);function h(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var v=a.a.mark((function t(e){var r,n,o,i,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Reflect.ownKeys(e),n=h(r),t.prev=2,n.s();case 4:if((o=n.n()).done){t.next=11;break}return i=o.value,u=e[i],t.next=9,{rule:i,pointcut:u};case 9:t.next=4;break;case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(2),n.e(t.t0);case 16:return t.prev=16,n.f(),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[2,13,16,19]])})),d=a.a.mark((function t(e){var r,n,i,u,c,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=h(e),t.prev=1,r.s();case 3:if((n=r.n()).done){t.next=14;break}if(i=n.value,!Object(f.b)(i)){t.next=11;break}return u=o()(i,2),c=u[0],s=u[1],t.next=9,{rule:c,pointcut:s};case 9:t.next=12;break;case 11:return t.delegateYield(v(i),"t0",12);case 12:t.next=3;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(1),r.e(t.t1);case 19:return t.prev=19,r.f(),t.finish(19);case 22:case"end":return t.stop()}}),t,null,[[1,16,19,22]])}));function x(t){var e;return a.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=l([[Object(f.b)(t),d],v]),r.delegateYield(e(t),"t0",2);case 2:case"end":return r.stop()}}),p)}var g=r(2),b=r.n(g),m=r(6),w=r.n(m),A=r(4),O=r.n(A),k=r(5),S=r.n(k),P=r(1),R=r.n(P),j=function t(){b()(this,t)};function C(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function I(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var E=function(t){O()(r,t);var e=I(r);function r(t){var n;return b()(this,r),(n=e.call(this)).rules=t,n}return w()(r,[{key:"matches",value:function(t){var e,r=C(this.rules);try{for(r.s();!(e=r.n()).done;){if(e.value.matches(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}}]),r}(j),L=r(13),M=r.n(L);function T(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var U=function(t){O()(r,t);var e=T(r);function r(t){var n;return b()(this,r),(n=e.call(this)).regex=new RegExp(t),n}return w()(r,[{key:"matches",value:function(t){return this.regex.lastIndex=0,"symbol"!==M()(t)&&this.regex.test(t)}}]),r}(j);function _(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var V=function(t){O()(r,t);var e=_(r);function r(t){var n;return b()(this,r),(n=e.call(this)).property=t,n}return w()(r,[{key:"matches",value:function(t){return this.property===t}}]),r}(j);function N(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return F(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var z=function(t){return new U(t)},W=function(t){return new V(t)},B=function(t){var e=t;return l([[function(){return t instanceof RegExp},z],[function(){if("string"!=typeof t)return!1;var r=t.indexOf("/"),n=t.lastIndexOf("/");if(0===r&&n>0){var o=t.substring(1,n),i=t.substring(n+1)||void 0;return e=new RegExp(o,i),!0}return!1},z],W])(e)},G=function(t){var e,r=[],n=N(t);try{for(n.s();!(e=n.n()).done;){var o=e.value,i=B(o);r.push(i)}}catch(t){n.e(t)}finally{n.f()}return new E(r)};function K(t){return l([[Object(f.b)(t),G],B])(t)}var $=function t(){b()(this,t),u()(this,"advices",[])},q=function t(e){b()(this,t),this.fn=e};function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var Q=function(t){O()(r,t);var e=J(r);function r(){return b()(this,r),e.apply(this,arguments)}return r}(q);function H(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var Y=function(t){O()(r,t);var e=H(r);function r(){return b()(this,r),e.apply(this,arguments)}return r}(q);function X(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var Z=function(t){O()(r,t);var e=X(r);function r(){return b()(this,r),e.apply(this,arguments)}return r}(q);function tt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var et=function(t){O()(r,t);var e=tt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function rt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var nt=function(t){O()(r,t);var e=rt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function ot(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var it=function(t){O()(r,t);var e=ot(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var ct=function(t){O()(r,t);var e=ut(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function at(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var ft=function(t){O()(r,t);var e=at(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($),st=Symbol("applyRule"),lt=Symbol("constructRule");function pt(){return new ct}function ht(){return new ft}var yt=r(8),vt=r.n(yt),dt=r(10),xt=r.n(dt);function gt(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return bt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var mt=Symbol("noReturnValue"),wt=function(){function t(){b()(this,t),u()(this,"execContextStack",[]),u()(this,"execContextID",-1)}return w()(t,[{key:"execute",value:function(t,e,r,n){this.newExecutionContext(),this.setUpExecutionContext(e,r),this.startExecutionContext(t),this.beforePhase(t,e),this.aroundPhase(t,r);var o=this.proceedPhase(t);return this.afterPhase(t,n,o),this.endExecutionContext(t),this.cleanUpExecutionContext(),o}},{key:"newExecutionContext",value:function(){var t={proceeds:[],hasAtLeastOneAroundAdvice:!1,hasAtLeastOneBeforeAdvice:!1,returnValue:mt};this.execContextStack.push(t),this.execContextID++}},{key:"setUpExecutionContext",value:function(t,e){this.execContextStack[this.execContextID].hasAtLeastOneBeforeAdvice=!!t.length,this.execContextStack[this.execContextID].hasAtLeastOneAroundAdvice=!!e.length}},{key:"startExecutionContext",value:function(t){}},{key:"endExecutionContext",value:function(t){}},{key:"cleanUpExecutionContext",value:function(){this.execContextStack.pop(),this.execContextID--}},{key:"unsupportedMultipleProceeds",value:function(t,e){console.error("pigretto - Multiple proceeds for the same advice are not supported, subsequent proceed has been ignored.","\n\tadvice: ",t,"\n\trule: ",e)}},{key:"executeBeforeAdvice",value:function(t,e,r){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeBeforeAdvice".'))}},{key:"executeAroundAdvice",value:function(t,e,r,n){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeAroundAdvice".'))}},{key:"executeAfterAdvice",value:function(t,e,r,n){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeAfterAdvice".'))}},{key:"performUnderlyingOperation",value:function(t){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "performUnderlyingOperation".'))}},{key:"executeProceedCallback",value:function(t,e,r,n){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeProceedCallback".'))}},{key:"beforePhase",value:function(t,e){var r,n=gt(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=o.rule,u=o.advice;this.executeBefore(t,u,i)}}catch(t){n.e(t)}finally{n.f()}}},{key:"executeBefore",value:function(t,e,r){this.executeBeforeAdvice(t,e,r)}},{key:"aroundPhase",value:function(t,e){var r,n=gt(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=o.rule,u=o.advice;if(this.executeAround(t,u,i),this.execContextStack[this.execContextID].returnValue!==mt)break}}catch(t){n.e(t)}finally{n.f()}}},{key:"executeAround",value:function(t,e,r){var n=this,o=!1,i=this.executeAroundAdvice(t,e,r,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(o)n.unsupportedMultipleProceeds(e,r);else{o=!0;var u=void 0,c=void 0;Object(f.b)(t)?(u=t,c="function"==typeof i?i:void 0):"function"==typeof t&&(c=t),n.execContextStack[n.execContextID].proceeds.push({params:u,fn:c,rule:r})}}));o||(this.execContextStack[this.execContextID].returnValue=i)}},{key:"afterPhase",value:function(t,e,r){var n,o=gt(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,u=i.rule,c=i.advice;this.executeAfter(t,c,u,r)}}catch(t){o.e(t)}finally{o.f()}}},{key:"executeAfter",value:function(t,e,r,n){this.executeAfterAdvice(t,e,r,n)}},{key:"proceedPhase",value:function(t){if(this.execContextStack[this.execContextID].returnValue!==mt)return this.return(t,this.execContextStack[this.execContextID].returnValue);var e,r=this.performUnderlyingOperation(t),n=gt(this.execContextStack[this.execContextID].proceeds);try{for(n.s();!(e=n.n()).done;){var o=e.value,i=o.fn,u=o.rule;"function"==typeof i&&(r=this.executeProceedCallback(t,u,r,i))}}catch(t){n.e(t)}finally{n.f()}return this.return(t,r)}},{key:"return",value:function(t,e){return e}}]),t}(),At=r(9),Ot=r.n(At),kt=function(t,e,r){if("function"!=typeof t[e])throw new Error("pigretto - ".concat(r.name,' trap executor does not implement "').concat(e,'".'))};function St(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var Pt=function(t){var e=function(e){O()(n,e);var r=St(n);function n(){var t;b()(this,n);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return t=r.call.apply(r,[this].concat(o)),u()(Ot()(t),"executedAtLeastOnce",!1),u()(Ot()(t),"lastProceedWithParamsIndexMap",{}),u()(Ot()(t),"finalTrapArgsMap",{}),t}return w()(n,[{key:"startExecutionContext",value:function(e){if(!this.executedAtLeastOnce&&kt(t.prototype,"startExecutionContext",t),xt()(R()(n.prototype),"startExecutionContext",this).call(this,e),!this.executedAtLeastOnce&&!Object.prototype.hasOwnProperty.call(this,"execContextID"))throw new Error("pigretto - ".concat(t.name,' trap executor does not have "execContextID" property.'));this.lastProceedWithParamsIndexMap[this.execContextID]=-1,this.finalTrapArgsMap[this.execContextID]=void 0}},{key:"endExecutionContext",value:function(e){!this.executedAtLeastOnce&&kt(t.prototype,"endExecutionContext",t),xt()(R()(n.prototype),"endExecutionContext",this).call(this,e),this.finalTrapArgsMap[this.execContextID]=void 0,this.executedAtLeastOnce=!0}},{key:"getFinalTrapArgs",value:function(e){!this.executedAtLeastOnce&&kt(this,"getTrapArgsArgumentsListIndex",t);var r=this.getTrapArgsArgumentsListIndex();if(!this.executedAtLeastOnce&&!Object.prototype.hasOwnProperty.call(this,"execContextStack"))throw new Error("pigretto - ".concat(t.name,' trap executor does not have "execContextStack" property.'));var n=this.execContextStack[this.execContextID].proceeds.length;if(n){for(var o=!1,i=n-1;i>this.lastProceedWithParamsIndexMap[this.execContextID];i--){var u=this.execContextStack[this.execContextID].proceeds[i].params;if(Object(f.b)(u)){o=!0,this.lastProceedWithParamsIndexMap[this.execContextID]=i,(e=vt()(e))[r]=u,this.finalTrapArgsMap[this.execContextID]=e;break}}o||(this.lastProceedWithParamsIndexMap[this.execContextID]=n-1)}return Object(f.g)(this.finalTrapArgsMap[this.execContextID])?e:this.finalTrapArgsMap[this.execContextID]}},{key:"executeAroundAdvice",value:function(e,r,o,i){return e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"executeAroundAdvice",t),xt()(R()(n.prototype),"executeAroundAdvice",this).call(this,e,r,o,i)}},{key:"executeAfterAdvice",value:function(e,r,o,i){e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"executeAfterAdvice",t),xt()(R()(n.prototype),"executeAfterAdvice",this).call(this,e,r,o,i)}},{key:"performUnderlyingOperation",value:function(e){return e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"performUnderlyingOperation",t),xt()(R()(n.prototype),"performUnderlyingOperation",this).call(this,e)}},{key:"executeProceedCallback",value:function(e,r,o,i){return e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"executeProceedCallback",t),xt()(R()(n.prototype),"executeProceedCallback",this).call(this,e,r,o,i)}}]),n}(t);return Object.defineProperty(e,"name",{value:"WithFunctionTrapExecutor(".concat(t.name,")"),configurable:!0}),e};function Rt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var jt=Pt(function(t){O()(r,t);var e=Rt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"getTrapArgsArgumentsListIndex",value:function(){return 4}},{key:"execute",value:function(t,e,n,i){var u=this,c=o()(t,4),a=c[0],s=c[1],l=c[2],p=c[3];if("function"==typeof p&&[e,n,i].some((function(t){return!Object(f.c)(t)}))){var h=function(t){return xt()(R()(r.prototype),"execute",u).call(u,t,e,n,i)};return function(){var t;t=this!==l?this:a,p=p.bind(t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=[a,s,l,p,r];return h(o)}}return p}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,5),i=n[0],u=n[1],c=n[2],a=n[4],f={target:i,property:u,receiver:c,rule:r};e.fn.apply(f,a)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,5),u=i[0],c=i[1],a=i[2],f=i[4],s={target:u,property:c,receiver:a,rule:r};return e.fn(n).apply(s,f)}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,5),u=i[0],c=i[1],a=i[2],f=i[4],s={target:u,property:c,receiver:a,rule:r};e.fn.apply(e,vt()(f)).apply(s,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,5),r=e[3],n=e[4];return r.apply(void 0,vt()(n))}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,5),u={target:i[0],property:i[1],receiver:i[2],rule:e,argumentsList:i[4]};return n.apply(u,[r])}}]),r}(wt));function Ct(t,e,r){return Reflect.get(t,e,r)}function Dt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var It=function(t){O()(r,t);var e=Dt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,3),i={target:n[0],property:n[1],receiver:n[2],rule:r};e.fn.apply(i)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],property:i[1],receiver:i[2],rule:r};return e.fn.apply(u,[n])}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],property:i[1],receiver:i[2],rule:r};e.fn.apply(u,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,3);return Ct(e[0],e[1],e[2])}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],property:i[1],receiver:i[2],rule:e};return n.apply(u,[r])}}]),r}(wt);function Et(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var Lt=function(t){O()(r,t);var e=Et(r);function r(){var t;b()(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t=e.call.apply(e,[this].concat(o)),u()(Ot()(t),"previousPropertyValueMap",{}),u()(Ot()(t),"returnNewPropertyValueMap",{}),u()(Ot()(t),"updateWasSuccessfulMap",{}),t}return w()(r,[{key:"startExecutionContext",value:function(t){var e=o()(t,4),r=e[0],n=e[1],i=e[3];if(!Object.prototype.hasOwnProperty.call(this.previousPropertyValueMap,this.execContextID)){var u=Ct(r,n,i);this.previousPropertyValueMap[this.execContextID]=u,this.returnNewPropertyValueMap[this.execContextID]=void 0,this.updateWasSuccessfulMap[this.execContextID]=!1}}},{key:"endExecutionContext",value:function(t){o()(t,3);delete this.previousPropertyValueMap[this.execContextID],delete this.returnNewPropertyValueMap[this.execContextID],delete this.updateWasSuccessfulMap[this.execContextID]}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,4),i=n[0],u=n[1],c=n[2],a=n[3],f=this.previousPropertyValueMap[this.execContextID],s={target:i,property:u,value:c,receiver:a,rule:r};e.fn.apply(s,[f])}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,4),u=i[0],c=i[1],a=i[2],f=i[3],s=this.previousPropertyValueMap[this.execContextID],l={target:u,property:c,value:a,receiver:f,rule:r};return e.fn(n).apply(l,[s])}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,4),u=i[0],c=i[1],a=i[2],f=i[3],s=this.previousPropertyValueMap[this.execContextID],l=this.returnNewPropertyValueMap[this.execContextID],p={target:u,property:c,value:a,receiver:f,rule:r,updateWasSuccessful:n};e.fn(s).apply(p,[l])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,4),r=e[0],n=e[1],i=e[2],u=function(t,e,r,n){return Reflect.set(t,e,r,n)}(r,n,i,e[3]);return this.updateWasSuccessfulMap[this.execContextID]=u,this.returnNewPropertyValueMap[this.execContextID]=i,i}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,4),u={target:i[0],property:i[1],value:i[2],receiver:i[3],rule:e};return n.apply(u,[r])}},{key:"return",value:function(t,e){var r=o()(t,4),n=r[0],i=r[1],u=r[3];return e!==this.returnNewPropertyValueMap[this.execContextID]&&this.performUnderlyingOperation([n,i,e,u]),this.updateWasSuccessfulMap[this.execContextID]}}]),r}(wt);function Mt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var Tt=Pt(function(t){O()(r,t);var e=Mt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"getTrapArgsArgumentsListIndex",value:function(){return 2}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,3),i=n[0],u=n[1],c=n[2],a={target:i,thisArg:u,rule:r};e.fn.apply(a,c)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a=i[2],f={target:u,thisArg:c,rule:r};return e.fn(n).apply(f,a)}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a=i[2],f={target:u,thisArg:c,rule:r};e.fn.apply(e,vt()(a)).apply(f,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,3);return function(t,e,r){return Reflect.apply(t,e,r)}(e[0],e[1],e[2])}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],thisArg:i[1],rule:e,argumentsList:i[2]};return n.apply(u,[r])}}]),r}(wt));function Ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R()(t);if(e){var o=R()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S()(this,r)}}var _t=Pt(function(t){O()(r,t);var e=Ut(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"getTrapArgsArgumentsListIndex",value:function(){return 1}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,3),i=n[0],u=n[1],c={target:i,newTarget:n[2],rule:r};e.fn.apply(c,u)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a={target:u,newTarget:i[2],rule:r};return e.fn(n).apply(a,c)}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a={target:u,newTarget:i[2],rule:r};e.fn.apply(e,vt()(c)).apply(a,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,3);return function(t,e,r){return Reflect.construct(t,e,r)}(e[0],e[1],e[2])}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a={target:u,newTarget:i[2],rule:e,argumentsList:c};return n.apply(a,[r])}}]),r}(wt));function Vt(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Nt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function Nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ft=function(){function t(){b()(this,t),u()(this,"advices",{call:[],get:[],set:[],apply:[],construct:[]}),u()(this,"distributedAdvices",{call:{before:void 0,around:void 0,after:void 0},get:{before:void 0,around:void 0,after:void 0},set:{before:void 0,around:void 0,after:void 0},apply:{before:void 0,around:void 0,after:void 0},construct:{before:void 0,around:void 0,after:void 0}}),u()(this,"matchedDistributedAdvices",{call:new Map,get:new Map,set:new Map}),u()(this,"trapExecutors",{call:new jt,get:new It,set:new Lt,apply:new Tt,construct:new _t})}return w()(t,[{key:"hasAtLeastOneAdviceOfPointcutType",value:function(t){return!!this.advices[t].length}},{key:"addAdvices",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n.map((function(n){return r.advices[t].push({rule:e,advice:n})}))}},{key:"lazilyDistributeAdvices",value:function(t){var e=this;if(Object(f.g)(this.distributedAdvices[t].before)){this.distributedAdvices[t].before=[],this.distributedAdvices[t].around=[],this.distributedAdvices[t].after=[];var r,n=Vt(this.advices[t]);try{var o=function(){var n=r.value,o=n.rule,i=n.advice,u=l([[function(){return i instanceof Q},"before"],[function(){return i instanceof Z},"around"],"after"]);e.distributedAdvices[t][u].push({rule:o,advice:i})};for(n.s();!(r=n.n()).done;)o()}catch(t){n.e(t)}finally{n.f()}}}},{key:"lazilyMatchAdvices",value:function(t,e){this.lazilyDistributeAdvices(t);var r=this.matchedDistributedAdvices[t];if(!r.has(e)){var n={before:[],around:[],after:[]};r.set(e,n);var o=this.distributedAdvices[t].before,i=this.distributedAdvices[t].around,u=this.distributedAdvices[t].after,c=function(t){return function(r){var o,i=Vt(t);try{for(i.s();!(o=i.n()).done;){var u=o.value,c=u.rule,a=u.advice;c.matches(e)&&n[r].push({rule:c,advice:a})}}catch(t){i.e(t)}finally{i.f()}}};c(o)("before"),c(i)("around"),c(u)("after")}}},{key:"addPointcutRule",value:function(t,e){var r=function(){return"function"==typeof t&&e instanceof V},n=l([[function(){return t instanceof et},"call"],[function(){return t instanceof nt},"get"],[function(){return t instanceof it},"set"],[function(){var n=r()&&e.property===st;return!!(n||t instanceof ct)&&(n&&(t=pt().before(t)),!0)},"apply"],[function(){var n=r()&&e.property===lt;return!!(n||t instanceof ft)&&(n&&(t=ht().before(t)),!0)},"construct"]]);if(n){var o=t.advices;this.addAdvices(n,e,o)}return this}},{key:"hasGets",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("call")||this.hasAtLeastOneAdviceOfPointcutType("get")}},{key:"hasSets",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("set")}},{key:"hasApplies",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("apply")}},{key:"hasConstructs",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("construct")}},{key:"get",value:function(t,e,r){this.lazilyMatchAdvices("get",e),this.lazilyMatchAdvices("call",e);var n=this.matchedDistributedAdvices.get.get(e),o=n.before,i=n.around,u=n.after,c=this.trapExecutors.get.execute([t,e,r],o,i,u),a=this.matchedDistributedAdvices.call.get(e),f=a.before,s=a.around,l=a.after;return this.trapExecutors.call.execute([t,e,r,c],f,s,l)}},{key:"set",value:function(t,e,r,n){this.lazilyMatchAdvices("set",e);var o=this.matchedDistributedAdvices.set.get(e),i=o.before,u=o.around,c=o.after;return this.trapExecutors.set.execute([t,e,r,n],i,u,c)}},{key:"apply",value:function(t,e,r){this.lazilyDistributeAdvices("apply");var n=this.distributedAdvices.apply,o=n.before,i=n.around,u=n.after;return this.trapExecutors.apply.execute([t,e,r],o,i,u)}},{key:"construct",value:function(t,e,r){this.lazilyDistributeAdvices("construct");var n=this.distributedAdvices.construct,o=n.before,i=n.around,u=n.after;return this.trapExecutors.construct.execute([t,e,r],o,i,u)}}]),t}();function zt(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 Wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zt(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bt(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Kt(t){return function(t){var e,r=new Ft,n=Bt(x(t));try{for(n.s();!(e=n.n()).done;){var o=e.value,i=o.rule,u=o.pointcut,c=K(i);r.addPointcutRule(u,c)}}catch(t){n.e(t)}finally{n.f()}return Wt(Wt(Wt(Wt({},r.hasGets()?{get:function(t,e,n){return r.get(t,e,n)}}:{}),r.hasSets()?{set:function(t,e,n,o){return r.set(t,e,n,o)}}:{}),r.hasApplies()?{apply:function(t,e,n){return r.apply(t,e,n)}}:{}),r.hasConstructs()?{construct:function(t,e,n){return r.construct(t,e,n)}}:{})}(t)}function $t(t,e){var r=Kt(e);return new Proxy(t,r)}function qt(){return new et}function Jt(){return new nt}function Qt(){return new it}var Ht=r(16),Yt=r.n(Ht);function Xt(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.onceCallback,n=e.ignoredTypes,o=void 0===n?[Object]:n,i=e.interceptConstructor,u=void 0!==i&&i,c=e.propertiesToIgnore,a=void 0===c?[]:c,f=e.pointcuts,s=void 0===f?[qt,Jt,Qt]:f,l=!1,p=!1,h=!1,y=[],v={},d=o.map((function(t){return t.prototype.constructor})),x=t,g=!1;x;){var b=x.constructor;if(!g||!d.includes(b)){var m=Reflect.ownKeys(x);m.map((function(e){return v[e]={isMethod:"constructor"!==e&&"function"==typeof t[e]}}))}x=Object.getPrototypeOf(x),g=!0}a.map((function(t){return delete v[t]})),!u&&delete v.constructor,s.map((function(t){t===qt?l=!0:t===Jt?p=!0:t===Qt&&(h=!0)}));var w=Object.keys(v),A=!0,O=function(){if(A){A=!1;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.apply(this,e)}},k=function(t){return t.map(Yt.a)},S=function(t){return new RegExp("^(".concat(t.join("|"),")$"))},P=function(t){return function(e){return y.push([t,e().before(O)])}};if(l){var R=w.filter((function(t){return v[t].isMethod})),j=k(R);P(S(j))(qt)}if(p||h){var C=w.filter((function(t){return!v[t].isMethod})),D=k(C);p&&P(S(D))(Jt),h&&P(S(D))(Qt)}var I=$t(t,y);return I}var Zt=r(17),te=r.n(Zt);function ee(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.dynamic,n=void 0===r||r,o=e.errorToThrow,i=void 0===o?null:o,u=te()(e,["dynamic","errorToThrow"]),c=/.?/,a={},s=function(){var e=Object(f.k)(t,u);a=e.reduce((function(t,e){return!(t[e]=!0)||t}),{})};!n&&s();var l=function(){var e=this.property,r=Object(f.l)(t),o='Accessing unknown property "'.concat(e,'" of object ').concat(r,".");if(n&&s(),!a[e])throw i=i?"function"==typeof i?i({target:t,propertyName:e,targetTypeToStr:r,defaultErrorMessage:o}):i:new Error(o)},p=$t(t,[[c,Jt().before(l)],[c,Qt().before(l)]]);return p}var re=Symbol("queueTupleProp"),ne=Symbol("dataProp");function oe(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.mutateTargetOnSettledPromiseQueue,i=void 0!==n&&n,c=(e={},u()(e,re,void 0),u()(e,ne,{}),e),a=u()({},"/.?/",Jt().around((function(){var t,e=this.property,r=this.target;if("then"===e&&c[re]){var n=o()(c[re],2),u=n[0],f=n[1].then((function(t){var e=c[ne];return e[u]=t,new Promise((function(t){c[ne]={},c[re]=void 0,t(e),e&&i&&Object.assign(r,e)}))}));return f.then.bind(f)}if(!(r[e]instanceof Promise)&&"then"!==e)if(c[re]){var s=o()(c[re],2),l=s[0],p=s[1],h=c[ne];t=p.then((function(t){return h[l]=t,Promise.resolve(r[e])}))}else c[ne]={},t=Promise.resolve(r[e]);if(c[re]){var y=o()(c[re],2),v=y[0],d=y[1],x=c[ne];t=d.then((function(t){return x[v]=t,r[e]}))}else t||(c[ne]={},t=r[e]);return c[re]=[e,t],$t(r,a)}))),f=$t(t,a);return f}$t.pointcuts={},[["call",qt],["get",Jt],["set",Qt],["applyRule",st],["apply",pt],["constructRule",lt],["construct",ht]].map((function(t){var e=o()(t,2),r=e[0],n=e[1];return $t.pointcuts[r]=n})),$t.builtin={},[["lazyObject",Xt],["throwErrorForUnknownProperty",ee],["POJOPromiser",oe]].map((function(t){var e=o()(t,2),r=e[0],n=e[1];return $t.builtin[r]=n}));e.default=$t}]).default})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("pigretto",[],e):"object"==typeof exports?exports.pigretto=e():t.pigretto=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=31)}([function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return n})),r.d(e,"e",(function(){return o})),r.d(e,"f",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"c",(function(){return a})),r.d(e,"m",(function(){return f})),r.d(e,"j",(function(){return s})),r.d(e,"i",(function(){return l})),r.d(e,"h",(function(){return p})),r.d(e,"l",(function(){return h})),r.d(e,"g",(function(){return y})),r.d(e,"d",(function(){return v})),r.d(e,"k",(function(){return d}));r(11);const n={uniqueIdPrefix:"",elementUniqueIdPrefix:"",checkNetworkURI:null};function o(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}const i=Object.prototype.toString.call({}),u=t=>null!==t&&"object"==typeof t&&t.constructor===Object&&function(t){return i===Object.prototype.toString.call(t)}(t);function c(t){return Object.prototype.toString.call(t)===Object.prototype.toString.call([])}function a(t){return!t||0===t.length}function f(e){const r=void 0!==t?t:window;r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH=r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH||0,r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH++;const o=r.JSUtlUniqueIdCounterLEzKKl87QCDxwVH;return(e||n.uniqueIdPrefix)+o}const s=(t,e,r)=>{let n=0,o=t;for(;n<e.length-1;){const t=e[n],r=o.get(t);if(r instanceof Map||r instanceof WeakMap)o=r;else{const e=new Map;o.set(t,e),o=e}n++}o.set(e[n],r)},l=(t,e)=>{let r=t,n=0;const o=e.length;for(;(r instanceof Map||r instanceof WeakMap)&&r.has(e[n])&&n<o;)r=r.get(e[n]),n++;return n==o};Symbol("treeMapSubtree");function*p(t,e,r){t.map();const n=e.bind(r);for(let e=0;e<t.length;e++)yield n(t[e],e,t)}function h(t){return Object.prototype.toString.call(t)}function y(t){return void 0===t}function v(t){try{JSON.parse(t)}catch(t){return!1}return!0}function d(t,{stopAtPrototype:e=null,stopAtPrototypeInclude:r=!0}={}){let n=t;const o={};let i=!1,u=!1;for(;!u&&n&&(!i||r);){i&&(u=!0);Object.getOwnPropertyNames(n).map(t=>o[t]=!0),n=Object.getPrototypeOf(n),e&&(i=n===e)}return Object.keys(o)}}).call(this,r(23))},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){var n=r(20),o=r(21),i=r(14),u=r(22);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||u()}},function(t,e,r){var n=r(16);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,r){var n=r(13),o=r(9);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e,r){var n=r(24),o=r(25),i=r(14),u=r(26);t.exports=function(t){return n(t)||o(t)||i(t)||u()}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){var n=r(27);function o(e,r,i){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=o=Reflect.get:t.exports=o=function(t,e,r){var o=n(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(r):i.value}},o(e,r,i||e)}t.exports=o},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return u}));const n=Object.prototype.hasOwnProperty;function o(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function i(t,e,r){return n.call(e,r)&&o(t[r],e[r])}function u(t,e){if(o(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++){if(!i(t,e,r[n]))return!1}return!0}},function(t,e,r){t.exports=r(29)},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=r=function(t){return typeof t}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(e)}t.exports=r},function(t,e,r){var n=r(15);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},function(t,e,r){var n=r(16),o=r(28);function i(e,r,u){return o()?t.exports=i=Reflect.construct:t.exports=i=function(t,e,r){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return r&&n(i,r.prototype),i},i.apply(null,arguments)}t.exports=i},function(t,e,r){"use strict";const n=/[|\\{}()[\]^$+*?.-]/g;t.exports=t=>{if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(n,"\\$&")}},function(t,e,r){var n=r(30);t.exports=function(t,e){if(null==t)return{};var r,o,i=n(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)r=u[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(n=(u=c.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(15);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){var n=r(1);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t}},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function c(t,e,r,n){var o=e&&e.prototype instanceof s?e:s,i=Object.create(o.prototype),u=new A(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var c=b(u,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=a(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,u),i}function a(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function s(){}function l(){}function p(){}var h={};h[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(O([])));v&&v!==e&&r.call(v,o)&&(h=v);var d=p.prototype=s.prototype=Object.create(h);function x(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var n;this._invoke=function(o,i){function u(){return new e((function(n,u){!function n(o,i,u,c){var f=a(t[o],t,i);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(f.arg)}(o,i,n,u)}))}return n=n?n.then(u,u):u()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=a(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function m(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return l.prototype=d.constructor=p,p.constructor=l,p[u]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(d),t},t.awrap=function(t){return{__await:t}},x(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new g(c(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},x(d),d[u]="Generator",d[o]=function(){return this},d.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),a=r.call(i,"finallyLoc");if(c&&a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}},function(t,e,r){"use strict";r.r(e),r.d(e,"call",(function(){return Qt})),r.d(e,"get",(function(){return Ht})),r.d(e,"set",(function(){return Yt})),r.d(e,"applyRule",(function(){return st})),r.d(e,"apply",(function(){return pt})),r.d(e,"constructRule",(function(){return lt})),r.d(e,"construct",(function(){return ht})),r.d(e,"lazyObject",(function(){return te})),r.d(e,"throwErrorForUnknownProperty",(function(){return ne})),r.d(e,"POJOPromiser",(function(){return fe}));var n=r(3),o=r.n(n),i=r(7),u=r.n(i),c=r(12),a=r.n(c),f=r(0);!function(){let t=0}();const s=t=>Boolean("function"==typeof t?t():t);function l(t){return(()=>{let e=0;for(;e<t.length-1;e++){const r=t[e],[n,o]=r;if(s(n))return o}const r=t[e];if(Object(f.b)(r)&&2===r.length){const[t,e]=r;return s(t)?e:void 0}return r})()}var p=a.a.mark(x);function h(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var v=a.a.mark((function t(e){var r,n,o,i,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Reflect.ownKeys(e),n=h(r),t.prev=2,n.s();case 4:if((o=n.n()).done){t.next=11;break}return i=o.value,u=e[i],t.next=9,{rule:i,pointcut:u};case 9:t.next=4;break;case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(2),n.e(t.t0);case 16:return t.prev=16,n.f(),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[2,13,16,19]])})),d=a.a.mark((function t(e){var r,n,i,u,c,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=h(e),t.prev=1,r.s();case 3:if((n=r.n()).done){t.next=14;break}if(i=n.value,!Object(f.b)(i)){t.next=11;break}return u=o()(i,2),c=u[0],s=u[1],t.next=9,{rule:c,pointcut:s};case 9:t.next=12;break;case 11:return t.delegateYield(v(i),"t0",12);case 12:t.next=3;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(1),r.e(t.t1);case 19:return t.prev=19,r.f(),t.finish(19);case 22:case"end":return t.stop()}}),t,null,[[1,16,19,22]])}));function x(t){var e;return a.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=l([[Object(f.b)(t),d],v]),r.delegateYield(e(t),"t0",2);case 2:case"end":return r.stop()}}),p)}var g=r(2),b=r.n(g),m=r(6),w=r.n(m),A=r(4),O=r.n(A),k=r(5),P=r.n(k),S=r(1),j=r.n(S),R=function t(){b()(this,t)};function C(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function I(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var E=function(t){O()(r,t);var e=I(r);function r(t){var n;return b()(this,r),(n=e.call(this)).rules=t,n}return w()(r,[{key:"matches",value:function(t){var e,r=C(this.rules);try{for(r.s();!(e=r.n()).done;){if(e.value.matches(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}}]),r}(R),L=r(13),M=r.n(L);function T(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var U=function(t){O()(r,t);var e=T(r);function r(t){var n;return b()(this,r),(n=e.call(this)).regex=new RegExp(t),n}return w()(r,[{key:"matches",value:function(t){return this.regex.lastIndex=0,"symbol"!==M()(t)&&this.regex.test(t)}}]),r}(R);function _(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var V=function(t){O()(r,t);var e=_(r);function r(t){var n;return b()(this,r),(n=e.call(this)).property=t,n}return w()(r,[{key:"matches",value:function(t){return this.property===t}}]),r}(R);function N(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return F(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var z=function(t){return new U(t)},W=function(t){return new V(t)},B=function(t){var e=t;return l([[function(){return t instanceof RegExp},z],[function(){if("string"!=typeof t)return!1;var r=t.indexOf("/"),n=t.lastIndexOf("/");if(0===r&&n>0){var o=t.substring(1,n),i=t.substring(n+1)||void 0;return e=new RegExp(o,i),!0}return!1},z],W])(e)},G=function(t){var e,r=[],n=N(t);try{for(n.s();!(e=n.n()).done;){var o=e.value,i=B(o);r.push(i)}}catch(t){n.e(t)}finally{n.f()}return new E(r)};function K(t){return l([[Object(f.b)(t),G],B])(t)}var $=function t(){b()(this,t),u()(this,"advices",[])},q=function t(e){b()(this,t),this.fn=e};function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var Q=function(t){O()(r,t);var e=J(r);function r(){return b()(this,r),e.apply(this,arguments)}return r}(q);function H(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var Y=function(t){O()(r,t);var e=H(r);function r(){return b()(this,r),e.apply(this,arguments)}return r}(q);function X(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var Z=function(t){O()(r,t);var e=X(r);function r(){return b()(this,r),e.apply(this,arguments)}return r}(q);function tt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var et=function(t){O()(r,t);var e=tt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function rt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var nt=function(t){O()(r,t);var e=rt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function ot(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var it=function(t){O()(r,t);var e=ot(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var ct=function(t){O()(r,t);var e=ut(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($);function at(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var ft=function(t){O()(r,t);var e=at(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"before",value:function(t){return this.advices.push(new Q(t)),this}},{key:"after",value:function(t){return this.advices.push(new Y(t)),this}},{key:"around",value:function(t){return this.advices.push(new Z(t)),this}}]),r}($),st=Symbol("applyRule"),lt=Symbol("constructRule");function pt(){return new ct}function ht(){return new ft}var yt=r(8),vt=r.n(yt),dt=r(10),xt=r.n(dt);function gt(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return bt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var mt=Symbol("noReturnValue"),wt=function(){function t(){b()(this,t),u()(this,"execContextStack",[]),u()(this,"execContextID",-1)}return w()(t,[{key:"execute",value:function(t,e,r,n){this.newExecutionContext(),this.setUpExecutionContext(e,r),this.startExecutionContext(t),this.beforePhase(t,e),this.aroundPhase(t,r);var o=this.proceedPhase(t);return this.afterPhase(t,n,o),this.endExecutionContext(t),this.cleanUpExecutionContext(),o}},{key:"newExecutionContext",value:function(){var t={proceeds:[],hasAtLeastOneAroundAdvice:!1,hasAtLeastOneBeforeAdvice:!1,returnValue:mt};this.execContextStack.push(t),this.execContextID++}},{key:"setUpExecutionContext",value:function(t,e){this.execContextStack[this.execContextID].hasAtLeastOneBeforeAdvice=!!t.length,this.execContextStack[this.execContextID].hasAtLeastOneAroundAdvice=!!e.length}},{key:"startExecutionContext",value:function(t){}},{key:"endExecutionContext",value:function(t){}},{key:"cleanUpExecutionContext",value:function(){this.execContextStack.pop(),this.execContextID--}},{key:"unsupportedMultipleProceeds",value:function(t,e){console.error("pigretto - Multiple proceeds for the same advice are not supported, subsequent proceed has been ignored.","\n\tadvice: ",t,"\n\trule: ",e)}},{key:"executeBeforeAdvice",value:function(t,e,r){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeBeforeAdvice".'))}},{key:"executeAroundAdvice",value:function(t,e,r,n){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeAroundAdvice".'))}},{key:"executeAfterAdvice",value:function(t,e,r,n){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeAfterAdvice".'))}},{key:"performUnderlyingOperation",value:function(t){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "performUnderlyingOperation".'))}},{key:"executeProceedCallback",value:function(t,e,r,n){throw new Error("pigretto - ".concat(this.constructor.name,' trap executor does not implement "executeProceedCallback".'))}},{key:"beforePhase",value:function(t,e){var r,n=gt(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=o.rule,u=o.advice;this.executeBefore(t,u,i)}}catch(t){n.e(t)}finally{n.f()}}},{key:"executeBefore",value:function(t,e,r){this.executeBeforeAdvice(t,e,r)}},{key:"aroundPhase",value:function(t,e){var r,n=gt(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=o.rule,u=o.advice;if(this.executeAround(t,u,i),this.execContextStack[this.execContextID].returnValue!==mt)break}}catch(t){n.e(t)}finally{n.f()}}},{key:"executeAround",value:function(t,e,r){var n=this,o=!1,i=this.executeAroundAdvice(t,e,r,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(o)n.unsupportedMultipleProceeds(e,r);else{o=!0;var u=void 0,c=void 0;Object(f.b)(t)?(u=t,c="function"==typeof i?i:void 0):"function"==typeof t&&(c=t),n.execContextStack[n.execContextID].proceeds.push({params:u,fn:c,rule:r})}}));o||(this.execContextStack[this.execContextID].returnValue=i)}},{key:"afterPhase",value:function(t,e,r){var n,o=gt(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,u=i.rule,c=i.advice;this.executeAfter(t,c,u,r)}}catch(t){o.e(t)}finally{o.f()}}},{key:"executeAfter",value:function(t,e,r,n){this.executeAfterAdvice(t,e,r,n)}},{key:"proceedPhase",value:function(t){if(this.execContextStack[this.execContextID].returnValue!==mt)return this.return(t,this.execContextStack[this.execContextID].returnValue);var e,r=this.performUnderlyingOperation(t),n=gt(this.execContextStack[this.execContextID].proceeds);try{for(n.s();!(e=n.n()).done;){var o=e.value,i=o.fn,u=o.rule;"function"==typeof i&&(r=this.executeProceedCallback(t,u,r,i))}}catch(t){n.e(t)}finally{n.f()}return this.return(t,r)}},{key:"return",value:function(t,e){return e}}]),t}(),At=r(9),Ot=r.n(At),kt=function(t,e,r){if("function"!=typeof t[e])throw new Error("pigretto - ".concat(r.name,' trap executor does not implement "').concat(e,'".'))};function Pt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var St=function(t){var e=function(e){O()(n,e);var r=Pt(n);function n(){var t;b()(this,n);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return t=r.call.apply(r,[this].concat(o)),u()(Ot()(t),"executedAtLeastOnce",!1),u()(Ot()(t),"lastProceedWithParamsIndexMap",{}),u()(Ot()(t),"finalTrapArgsMap",{}),t}return w()(n,[{key:"startExecutionContext",value:function(e){if(!this.executedAtLeastOnce&&kt(t.prototype,"startExecutionContext",t),xt()(j()(n.prototype),"startExecutionContext",this).call(this,e),!this.executedAtLeastOnce&&!Object.prototype.hasOwnProperty.call(this,"execContextID"))throw new Error("pigretto - ".concat(t.name,' trap executor does not have "execContextID" property.'));this.lastProceedWithParamsIndexMap[this.execContextID]=-1,this.finalTrapArgsMap[this.execContextID]=void 0}},{key:"endExecutionContext",value:function(e){!this.executedAtLeastOnce&&kt(t.prototype,"endExecutionContext",t),xt()(j()(n.prototype),"endExecutionContext",this).call(this,e),this.finalTrapArgsMap[this.execContextID]=void 0,this.executedAtLeastOnce=!0}},{key:"getFinalTrapArgs",value:function(e){!this.executedAtLeastOnce&&kt(this,"getTrapArgsArgumentsListIndex",t);var r=this.getTrapArgsArgumentsListIndex();if(!this.executedAtLeastOnce&&!Object.prototype.hasOwnProperty.call(this,"execContextStack"))throw new Error("pigretto - ".concat(t.name,' trap executor does not have "execContextStack" property.'));var n=this.execContextStack[this.execContextID].proceeds.length;if(n){for(var o=!1,i=n-1;i>this.lastProceedWithParamsIndexMap[this.execContextID];i--){var u=this.execContextStack[this.execContextID].proceeds[i].params;if(Object(f.b)(u)){o=!0,this.lastProceedWithParamsIndexMap[this.execContextID]=i,(e=vt()(e))[r]=u,this.finalTrapArgsMap[this.execContextID]=e;break}}o||(this.lastProceedWithParamsIndexMap[this.execContextID]=n-1)}return Object(f.g)(this.finalTrapArgsMap[this.execContextID])?e:this.finalTrapArgsMap[this.execContextID]}},{key:"executeAroundAdvice",value:function(e,r,o,i){return e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"executeAroundAdvice",t),xt()(j()(n.prototype),"executeAroundAdvice",this).call(this,e,r,o,i)}},{key:"executeAfterAdvice",value:function(e,r,o,i){e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"executeAfterAdvice",t),xt()(j()(n.prototype),"executeAfterAdvice",this).call(this,e,r,o,i)}},{key:"performUnderlyingOperation",value:function(e){return e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"performUnderlyingOperation",t),xt()(j()(n.prototype),"performUnderlyingOperation",this).call(this,e)}},{key:"executeProceedCallback",value:function(e,r,o,i){return e=this.getFinalTrapArgs(e),!this.executedAtLeastOnce&&kt(t.prototype,"executeProceedCallback",t),xt()(j()(n.prototype),"executeProceedCallback",this).call(this,e,r,o,i)}}]),n}(t);return Object.defineProperty(e,"name",{value:"WithFunctionTrapExecutor(".concat(t.name,")"),configurable:!0}),e};function jt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var Rt=St(function(t){O()(r,t);var e=jt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"getTrapArgsArgumentsListIndex",value:function(){return 4}},{key:"execute",value:function(t,e,n,i){var u=this,c=o()(t,4),a=c[0],s=c[1],l=c[2],p=c[3];if("function"==typeof p&&[e,n,i].some((function(t){return!Object(f.c)(t)}))){var h=function(t){return xt()(j()(r.prototype),"execute",u).call(u,t,e,n,i)};return function(){var t;t=this!==l?this:a,p=p.bind(t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=[a,s,l,p,r];return h(o)}}return p}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,5),i=n[0],u=n[1],c=n[2],a=n[4],f={target:i,property:u,receiver:c,rule:r};e.fn.apply(f,a)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,5),u=i[0],c=i[1],a=i[2],f=i[4],s={target:u,property:c,receiver:a,rule:r};return e.fn(n).apply(s,f)}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,5),u=i[0],c=i[1],a=i[2],f=i[4],s={target:u,property:c,receiver:a,rule:r};e.fn.apply(e,vt()(f)).apply(s,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,5),r=e[3],n=e[4];return r.apply(void 0,vt()(n))}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,5),u={target:i[0],property:i[1],receiver:i[2],rule:e,argumentsList:i[4]};return n.apply(u,[r])}}]),r}(wt));function Ct(t,e,r){return Reflect.get(t,e,r)}function Dt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var It=function(t){O()(r,t);var e=Dt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,3),i={target:n[0],property:n[1],receiver:n[2],rule:r};e.fn.apply(i)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],property:i[1],receiver:i[2],rule:r};return e.fn.apply(u,[n])}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],property:i[1],receiver:i[2],rule:r};e.fn.apply(u,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,3);return Ct(e[0],e[1],e[2])}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],property:i[1],receiver:i[2],rule:e};return n.apply(u,[r])}}]),r}(wt);function Et(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var Lt=function(t){O()(r,t);var e=Et(r);function r(){var t;b()(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t=e.call.apply(e,[this].concat(o)),u()(Ot()(t),"previousPropertyValueMap",{}),u()(Ot()(t),"returnNewPropertyValueMap",{}),u()(Ot()(t),"updateWasSuccessfulMap",{}),t}return w()(r,[{key:"startExecutionContext",value:function(t){var e=o()(t,4),r=e[0],n=e[1],i=e[3];if(!Object.prototype.hasOwnProperty.call(this.previousPropertyValueMap,this.execContextID)){var u=Ct(r,n,i);this.previousPropertyValueMap[this.execContextID]=u,this.returnNewPropertyValueMap[this.execContextID]=void 0,this.updateWasSuccessfulMap[this.execContextID]=!1}}},{key:"endExecutionContext",value:function(t){o()(t,3);delete this.previousPropertyValueMap[this.execContextID],delete this.returnNewPropertyValueMap[this.execContextID],delete this.updateWasSuccessfulMap[this.execContextID]}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,4),i=n[0],u=n[1],c=n[2],a=n[3],f=this.previousPropertyValueMap[this.execContextID],s={target:i,property:u,value:c,receiver:a,rule:r};e.fn.apply(s,[f])}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,4),u=i[0],c=i[1],a=i[2],f=i[3],s=this.previousPropertyValueMap[this.execContextID],l={target:u,property:c,value:a,receiver:f,rule:r};return e.fn(n).apply(l,[s])}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,4),u=i[0],c=i[1],a=i[2],f=i[3],s=this.previousPropertyValueMap[this.execContextID],l=this.returnNewPropertyValueMap[this.execContextID],p={target:u,property:c,value:a,receiver:f,rule:r,updateWasSuccessful:n};e.fn(s).apply(p,[l])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,4),r=e[0],n=e[1],i=e[2],u=function(t,e,r,n){return Reflect.set(t,e,r,n)}(r,n,i,e[3]);return this.updateWasSuccessfulMap[this.execContextID]=u,this.returnNewPropertyValueMap[this.execContextID]=i,i}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,4),u={target:i[0],property:i[1],value:i[2],receiver:i[3],rule:e};return n.apply(u,[r])}},{key:"return",value:function(t,e){var r=o()(t,4),n=r[0],i=r[1],u=r[3];return e!==this.returnNewPropertyValueMap[this.execContextID]&&this.performUnderlyingOperation([n,i,e,u]),this.updateWasSuccessfulMap[this.execContextID]}}]),r}(wt);function Mt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var Tt=St(function(t){O()(r,t);var e=Mt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"getTrapArgsArgumentsListIndex",value:function(){return 2}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,3),i=n[0],u=n[1],c=n[2],a={target:i,thisArg:u,rule:r};e.fn.apply(a,c)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a=i[2],f={target:u,thisArg:c,rule:r};return e.fn(n).apply(f,a)}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a=i[2],f={target:u,thisArg:c,rule:r};e.fn.apply(e,vt()(a)).apply(f,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,3);return function(t,e,r){return Reflect.apply(t,e,r)}(e[0],e[1],e[2])}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,3),u={target:i[0],thisArg:i[1],rule:e,argumentsList:i[2]};return n.apply(u,[r])}}]),r}(wt)),Ut=r(17),_t=r.n(Ut);function Vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return P()(this,r)}}var Nt=St(function(t){O()(r,t);var e=Vt(r);function r(){return b()(this,r),e.apply(this,arguments)}return w()(r,[{key:"getTrapArgsArgumentsListIndex",value:function(){return 1}},{key:"executeBeforeAdvice",value:function(t,e,r){var n=o()(t,3),i=n[0],u=n[1],c={target:i,newTarget:n[2],rule:r};e.fn.apply(c,u)}},{key:"executeAroundAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a={target:u,newTarget:i[2],rule:r};return e.fn(n).apply(a,c)}},{key:"executeAfterAdvice",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a={target:u,newTarget:i[2],rule:r};e.fn.apply(e,vt()(c)).apply(a,[n])}},{key:"performUnderlyingOperation",value:function(t){var e=o()(t,3);return function(t,e,r){return r?Reflect.construct(t,e,r):_t()(t,vt()(e))}(e[0],e[1],e[2])}},{key:"executeProceedCallback",value:function(t,e,r,n){var i=o()(t,3),u=i[0],c=i[1],a={target:u,newTarget:i[2],rule:e,argumentsList:c};return n.apply(a,[r])}}]),r}(wt));function Ft(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return zt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Wt=function(){function t(){b()(this,t),u()(this,"advices",{call:[],get:[],set:[],apply:[],construct:[]}),u()(this,"distributedAdvices",{call:{before:void 0,around:void 0,after:void 0},get:{before:void 0,around:void 0,after:void 0},set:{before:void 0,around:void 0,after:void 0},apply:{before:void 0,around:void 0,after:void 0},construct:{before:void 0,around:void 0,after:void 0}}),u()(this,"matchedDistributedAdvices",{call:new Map,get:new Map,set:new Map}),u()(this,"trapExecutors",{call:new Rt,get:new It,set:new Lt,apply:new Tt,construct:new Nt})}return w()(t,[{key:"hasAtLeastOneAdviceOfPointcutType",value:function(t){return!!this.advices[t].length}},{key:"addAdvices",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n.map((function(n){return r.advices[t].push({rule:e,advice:n})}))}},{key:"lazilyDistributeAdvices",value:function(t){var e=this;if(Object(f.g)(this.distributedAdvices[t].before)){this.distributedAdvices[t].before=[],this.distributedAdvices[t].around=[],this.distributedAdvices[t].after=[];var r,n=Ft(this.advices[t]);try{var o=function(){var n=r.value,o=n.rule,i=n.advice,u=l([[function(){return i instanceof Q},"before"],[function(){return i instanceof Z},"around"],"after"]);e.distributedAdvices[t][u].push({rule:o,advice:i})};for(n.s();!(r=n.n()).done;)o()}catch(t){n.e(t)}finally{n.f()}}}},{key:"lazilyMatchAdvices",value:function(t,e){this.lazilyDistributeAdvices(t);var r=this.matchedDistributedAdvices[t];if(!r.has(e)){var n={before:[],around:[],after:[]};r.set(e,n);var o=this.distributedAdvices[t].before,i=this.distributedAdvices[t].around,u=this.distributedAdvices[t].after,c=function(t){return function(r){var o,i=Ft(t);try{for(i.s();!(o=i.n()).done;){var u=o.value,c=u.rule,a=u.advice;c.matches(e)&&n[r].push({rule:c,advice:a})}}catch(t){i.e(t)}finally{i.f()}}};c(o)("before"),c(i)("around"),c(u)("after")}}},{key:"addPointcutRule",value:function(t,e){var r=function(){return"function"==typeof t&&e instanceof V},n=l([[function(){return t instanceof et},"call"],[function(){return t instanceof nt},"get"],[function(){return t instanceof it},"set"],[function(){var n=r()&&e.property===st;return!!(n||t instanceof ct)&&(n&&(t=pt().before(t)),!0)},"apply"],[function(){var n=r()&&e.property===lt;return!!(n||t instanceof ft)&&(n&&(t=ht().before(t)),!0)},"construct"]]);if(n){var o=t.advices;this.addAdvices(n,e,o)}return this}},{key:"hasGets",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("call")||this.hasAtLeastOneAdviceOfPointcutType("get")}},{key:"hasSets",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("set")}},{key:"hasApplies",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("apply")}},{key:"hasConstructs",value:function(){return this.hasAtLeastOneAdviceOfPointcutType("construct")}},{key:"get",value:function(t,e,r){this.lazilyMatchAdvices("get",e),this.lazilyMatchAdvices("call",e);var n=this.matchedDistributedAdvices.get.get(e),o=n.before,i=n.around,u=n.after,c=this.trapExecutors.get.execute([t,e,r],o,i,u),a=this.matchedDistributedAdvices.call.get(e),f=a.before,s=a.around,l=a.after;return this.trapExecutors.call.execute([t,e,r,c],f,s,l)}},{key:"set",value:function(t,e,r,n){this.lazilyMatchAdvices("set",e);var o=this.matchedDistributedAdvices.set.get(e),i=o.before,u=o.around,c=o.after;return this.trapExecutors.set.execute([t,e,r,n],i,u,c)}},{key:"apply",value:function(t,e,r){this.lazilyDistributeAdvices("apply");var n=this.distributedAdvices.apply,o=n.before,i=n.around,u=n.after;return this.trapExecutors.apply.execute([t,e,r],o,i,u)}},{key:"construct",value:function(t,e,r){this.lazilyDistributeAdvices("construct");var n=this.distributedAdvices.construct,o=n.before,i=n.around,u=n.after;return this.trapExecutors.construct.execute([t,e,r],o,i,u)}}]),t}();function Bt(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 Gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bt(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Kt(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return $t(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $t(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function qt(t){return function(t){var e,r=new Wt,n=Kt(x(t));try{for(n.s();!(e=n.n()).done;){var o=e.value,i=o.rule,u=o.pointcut,c=K(i);r.addPointcutRule(u,c)}}catch(t){n.e(t)}finally{n.f()}return Gt(Gt(Gt(Gt({},r.hasGets()?{get:function(t,e,n){return r.get(t,e,n)}}:{}),r.hasSets()?{set:function(t,e,n,o){return r.set(t,e,n,o)}}:{}),r.hasApplies()?{apply:function(t,e,n){return r.apply(t,e,n)}}:{}),r.hasConstructs()?{construct:function(t,e,n){return r.construct(t,e,n)}}:{})}(t)}function Jt(t,e){var r=qt(e);return new Proxy(t,r)}function Qt(){return new et}function Ht(){return new nt}function Yt(){return new it}var Xt=r(18),Zt=r.n(Xt);function te(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.onceCallback,n=e.ignoredTypes,o=void 0===n?[Object]:n,i=e.interceptConstructor,u=void 0!==i&&i,c=e.propertiesToIgnore,a=void 0===c?[]:c,f=e.pointcuts,s=void 0===f?[Qt,Ht,Yt]:f,l=!1,p=!1,h=!1,y=[],v={},d=o.map((function(t){return t.prototype.constructor})),x=t,g=!1;x;){var b=x.constructor;if(!g||!d.includes(b)){var m=Reflect.ownKeys(x);m.map((function(e){return v[e]={isMethod:"constructor"!==e&&"function"==typeof t[e]}}))}x=Object.getPrototypeOf(x),g=!0}a.map((function(t){return delete v[t]})),!u&&delete v.constructor,s.map((function(t){t===Qt?l=!0:t===Ht?p=!0:t===Yt&&(h=!0)}));var w=Object.keys(v),A=!0,O=function(){if(A){A=!1;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.apply(this,e)}},k=function(t){return t.map(Zt.a)},P=function(t){return new RegExp("^(".concat(t.join("|"),")$"))},S=function(t){return function(e){return y.push([t,e().before(O)])}};if(l){var j=w.filter((function(t){return v[t].isMethod})),R=k(j);S(P(R))(Qt)}if(p||h){var C=w.filter((function(t){return!v[t].isMethod})),D=k(C);p&&S(P(D))(Ht),h&&S(P(D))(Yt)}var I=Jt(t,y);return I}var ee=r(19),re=r.n(ee);function ne(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.dynamic,n=void 0===r||r,o=e.errorToThrow,i=void 0===o?null:o,u=re()(e,["dynamic","errorToThrow"]),c=/.?/,a={},s=function(){var e=Object(f.k)(t,u);a=e.reduce((function(t,e){return!(t[e]=!0)||t}),{})};!n&&s();var l=function(){var e=this.property,r=Object(f.l)(t),o='Accessing unknown property "'.concat(e,'" of object ').concat(r,".");if(n&&s(),!a[e])throw i=i?"function"==typeof i?i({target:t,propertyName:e,targetTypeToStr:r,defaultErrorMessage:o}):i:new Error(o)},p=Jt(t,[[c,Ht().before(l)],[c,Yt().before(l)]]);return p}function oe(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 ie(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?oe(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ue=Symbol("queueTupleProp"),ce=Symbol("dataProp"),ae=function(){};function fe(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.mutateTargetOnSettledPromiseQueue,i=void 0!==n&&n,c=t,a=ie({},t),f=(e={},u()(e,ue,void 0),u()(e,ce,{}),e),s=u()({},"/.?/",Ht().around((function(){var t,e=this.property,r=this.target;if("then"===e&&f[ue]){var n=o()(f[ue],2),u=n[0],a=n[1].then((function(t){var e=f[ce];return e[u]=t,new Promise((function(t){f[ce]={},f[ue]=void 0,t(e),e&&i&&Object.assign(c,e)}))}));return a.then.bind(a)}if(!(r[e]instanceof Promise)&&"then"!==e)if(f[ue]){var l=o()(f[ue],2),p=l[0],h=l[1],y=f[ce];t=h.then((function(t){return y[p]=t,Promise.resolve(r[e])}))}else f[ce]={},t=Promise.resolve(r[e]);if(f[ue]){var v=o()(f[ue],2),d=v[0],x=v[1],g=f[ce];t=x.then((function(t){return g[d]=t,r[e]}))}else t||(f[ce]={},t=r[e]);return f[ue]=[e,t],r.then=ae,Jt(r,s)})));a.then=ae;var l=Jt(a,s);return l}Jt.pointcuts={},[["call",Qt],["get",Ht],["set",Yt],["applyRule",st],["apply",pt],["constructRule",lt],["construct",ht]].map((function(t){var e=o()(t,2),r=e[0],n=e[1];return Jt.pointcuts[r]=n})),Jt.builtin={},[["lazyObject",te],["throwErrorForUnknownProperty",ne],["POJOPromiser",fe]].map((function(t){var e=o()(t,2),r=e[0],n=e[1];return Jt.builtin[r]=n}));e.default=Jt}]).default})); |
{ | ||
"name": "pigretto", | ||
"version": "2.25.0", | ||
"version": "2.26.0", | ||
"description": "A JS library to easily implement proxies, facades, lazy loading and monkey patching using an API with an AOP flavor.", | ||
@@ -22,3 +22,3 @@ "keywords": [ | ||
"watch": "WEBPACK_ENV=watch webpack --progress --colors --watch", | ||
"clear-build": "find ./dist ! -name '.gitignore' -exec rm -Rf {} +", | ||
"clear-build": "rm -Rf ./dist && mkdir ./dist", | ||
"dev-build": "WEBPACK_ENV=dev webpack --progress --colors", | ||
@@ -25,0 +25,0 @@ "build": "WEBPACK_ENV=build webpack", |
@@ -40,2 +40,9 @@ /* | ||
/** | ||
* @type {Function} | ||
*/ | ||
const dummyNoOp = () => { | ||
// Just a dummy no-op function. Required when the Proxy API is polyfilled with proxy-polyfill (https://github.com/GoogleChrome/proxy-polyfill/) | ||
}; | ||
/** | ||
* Builtin function using pigretto's API to create a POJO promiser, | ||
@@ -59,2 +66,10 @@ * i.e. a proxy object with syntactic sugar which lets creating a queue of properties to resolve | ||
) { | ||
const originalTarget = obj; | ||
// This is needed because the Proxy API may be polyfilled with proxy-polyfill (https://github.com/GoogleChrome/proxy-polyfill/). | ||
// Cloning "obj" allows setting properties on the target clone. | ||
const target = { | ||
...obj, | ||
}; | ||
const that = { | ||
@@ -79,3 +94,4 @@ [queueTupleProp]: void 0, | ||
if (obj && mutateTargetOnSettledPromiseQueue) { | ||
Object.assign(target, obj); // Assign resolved values to the proxy target, so that promise won't have to be called again. | ||
// Assign resolved values to the original target, so that properties which value is a promise will be replaced with the resolved value. | ||
Object.assign(originalTarget, obj); | ||
} | ||
@@ -125,7 +141,10 @@ }); | ||
// All alternations ensure that no matter what the value, a promise which must be resolved is always given. | ||
return pigretto(target, rules); | ||
target.then = dummyNoOp; | ||
const pigrettarget = pigretto(target, rules); | ||
return pigrettarget; | ||
}), | ||
}; | ||
const pigrettarget = pigretto(obj, rules); | ||
target.then = dummyNoOp; | ||
const pigrettarget = pigretto(target, rules); | ||
return pigrettarget; | ||
} |
@@ -27,3 +27,5 @@ /* | ||
export default function reflectConstruct(target, argumentsList, newTarget) { | ||
return Reflect.construct(target, argumentsList, newTarget); | ||
return newTarget | ||
? Reflect.construct(target, argumentsList, newTarget) | ||
: new target(...argumentsList); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3794767
38037