@feathersjs/client 5.0.0-pre.32 → 5.0.0-pre.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.min.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see core.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return function(){"use strict";var e={24:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createDebug=t.setDebug=t.noopDebug=void 0;var r={};function n(){return function(){}}t.noopDebug=n;var o=n;t.setDebug=function(e){o=e,Object.keys(r).forEach((function(t){r[t]=e(t)}))},t.createDebug=function(e){return r[e]||(r[e]=o(e)),function(){return r[e].apply(r,arguments)}}},568:function(e,t,r){function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],u=!0,a=!1;try{for(r=r.call(e);!(u=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);u=!0);}catch(e){a=!0,o=e}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),c=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createSymbol=t.isPromise=t._=t.stripSlashes=void 0,t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")},t._={each:function(e,r){e&&"function"==typeof e.forEach?e.forEach(r):t._.isObject(e)&&Object.keys(e).forEach((function(t){return r(e[t],t)}))},some:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).some((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},every:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).every((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},keys:function(e){return Object.keys(e)},values:function(e){return t._.keys(e).map((function(t){return e[t]}))},isMatch:function(e,r){return t._.keys(r).every((function(t){return e[t]===r[t]}))},isEmpty:function(e){return 0===t._.keys(e).length},isObject:function(e){return"object"===o(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===o(e)&&null!==e},extend:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.assign.apply(Object,[e].concat(r))},omit:function(e){for(var r=t._.extend({},e),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.forEach((function(e){return delete r[e]})),r},pick:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t}),{})},merge:function(e,r){return t._.isObject(e)&&t._.isObject(r)&&Object.keys(r).forEach((function(o){t._.isObject(r[o])?(e[o]||Object.assign(e,n({},o,{})),t._.merge(e[o],r[o])):Object.assign(e,n({},o,r[o]))})),e}},t.isPromise=function(e){return t._.isObject(e)&&"function"==typeof e.then},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol(e):e},c(r(24),t)},352:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),u=new P(n||[]);return i._invoke=function(e,t,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{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=_(u,r);if(a){if(a===p)continue;return a}}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 c=l(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,u),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var d={};s(d,u,(function(){return this}));var b=Object.getPrototypeOf,m=b&&b(b(S([])));m&&m!==t&&r.call(m,u)&&(d=m);var g=v.prototype=h.prototype=Object.create(d);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function o(i,u,a,c){var s=l(e[i],e,u);if("throw"!==s.type){var f=s.arg,p=f.value;return p&&"object"==n(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(p).then((function(e){f.value=e,a(f)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;this._invoke=function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}}function _(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return y.prototype=v,s(g,"constructor",v),s(v,"constructor",y),y.displayName=s(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},w(O.prototype),s(O.prototype,a,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var u=new O(f(t,r,n,o),i);return e.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),s(g,c,"Generator"),s(g,u,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=S,P.prototype={constructor:P,reset:function(e){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(k),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return u.type="throw",u.arg=e,t.next=r,n&&(t.method="next",t.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 a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=e,u.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=void 0;var h=p(r(38)),y=r(699),v=r(568),d=r(382),b=r(156),m=r(665),g=r(717),w=r(665),O=(0,v.createDebug)("@feathersjs/feathers"),_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(k,e);var t,r,n,p,y,_,j=(y=k,_=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(y);if(_){var r=l(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return s(this,e)});function k(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),(e=j.call(this)).services={},e.settings={},e.mixins=[m.hookMixin,b.eventMixin],e.version=h.default,e._isSetup=!1,e.registerHooks=(0,w.enableHooks)(f(e)),e.registerHooks({around:[b.eventHook]}),e}return t=k,r=[{key:"get",value:function(e){return this.settings[e]}},{key:"set",value:function(e,t){return this.settings[e]=t,this}},{key:"configure",value:function(e){return e.call(this,this),this}},{key:"defaultService",value:function(e){throw new Error("Can not find service '".concat(e,"'"))}},{key:"service",value:function(e){var t=(0,v.stripSlashes)(e)||"/",r=this.services[t];return void 0===r?(this.use(t,this.defaultService(t)),this.service(t)):r}},{key:"_setup",value:function(){var e=this;return this._isSetup=!0,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.setup)return O("Setting up service for `".concat(r,"`")),t.setup(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"setup",get:function(){return this._setup},set:function(e){this._setup=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"_teardown",value:function(){var e=this;return this._isSetup=!1,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.teardown)return O("Tearing down service for `".concat(r,"`")),t.teardown(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"teardown",get:function(){return this._teardown},set:function(e){this._teardown=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"use",value:function(e,t,r){var n=this;if("string"!=typeof e)throw new Error("'".concat(e,"' is not a valid service path."));var o=(0,v.stripSlashes)(e)||"/",i=t;if("function"==typeof i.service&&i.services)return Object.keys(i.services).forEach((function(e){return n.use("".concat(o,"/").concat(e),i.service(e))})),this;var a,c=(0,g.wrapService)(o,t,r),s=(0,g.getServiceOptions)(c),f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(g.protectedMethods);try{for(f.s();!(a=f.n()).done;){var l=a.value;if(s.methods.includes(l))throw new Error("'".concat(l,"' on service '").concat(o,"' is not allowed as a custom method name"))}}catch(e){f.e(e)}finally{f.f()}return O("Registering new service at `".concat(o,"`")),this.mixins.forEach((function(e){return e.call(n,c,o,s)})),this.services[o]=c,this._isSetup&&"function"==typeof c.setup&&(O("Setting up service for `".concat(o,"`")),c.setup(this,o)),this}},{key:"unuse",value:(n=o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,v.stripSlashes)(t)||"/",!(n=this.services[r])||"function"!=typeof n.teardown){e.next=5;break}return e.next=5,n.teardown(this,r);case 5:return delete this.services[r],e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})),p=function(){var e=this,t=arguments;return new Promise((function(r,o){var u=n.apply(e,t);function a(e){i(u,r,o,a,c,"next",e)}function c(e){i(u,r,o,a,c,"throw",e)}a(void 0)}))},function(e){return p.apply(this,arguments)})},{key:"hooks",value:function(e){var t=e;return t.before||t.after||t.error||t.around?this.registerHooks(t):t.setup||t.teardown?(0,d.hooks)(this,t):this.registerHooks({around:t}),this}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(y.EventEmitter);t.Feathers=_},263:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},156:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.eventMixin=t.eventHook=void 0;var n=r(699),o=r(717);t.eventHook=function(e,t){var r=(0,o.getServiceOptions)(e.self).events,n=o.defaultEventMap[e.method]||null;return e.event=n,t().then((function(){"string"!=typeof e.event||r.includes(e.event)||(Array.isArray(e.result)?e.result:[e.result]).forEach((function(t){return e.self.emit(e.event,t,e)}))}))},t.eventMixin=function(e){return"function"==typeof e.on&&"function"==typeof e.emit||Object.assign(e,n.EventEmitter.prototype),e}},665:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=i(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},o.apply(this,arguments)}function i(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function a(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function s(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e)||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 f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.hookMixin=t.FeathersHookManager=t.createContext=t.enableHooks=t.collectHooks=t.convertHookData=void 0;var p=r(382),h=r(717),y=["before","after","error","around"];function v(e){var t={};if(Array.isArray(e))t.all=e;else if("object"!==l(e))t.all=[e];else for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=e[o];t[o]=Array.isArray(i)?i:[i]}return t}function d(e,t){var r=e.__hooks,n=r.collected,o=r.around;return[].concat(s(o.all||[]),s(o[t]||[]),s(n.all||[]),s(n[t]||[]))}function b(e){return Object.defineProperty(e,"__hooks",{configurable:!0,value:{around:{},before:{},after:{},error:{},collected:{}},writable:!0}),function(e){var t=this.__hooks,r=Object.keys(e).reduce((function(t,r){if(n=r,!y.includes(n))throw new Error("'".concat(r,"' is not a valid hook type"));var n;return t[r]=v(e[r]),t}),{});return Object.keys(r).forEach((function(e){return Object.keys(r[e]).forEach((function(n){var o,i=r[e][n],u=(o=t[e])[n]||(o[n]=[]);if(u.push.apply(u,s(i)),t.before[n]||t.after[n]||t.error[n]){var a=(0,p.collect)({before:t.before[n]||[],after:t.after[n]||[],error:t.error[n]||[]});t.collected[n]=[a]}}))})),this}}t.convertHookData=v,t.collectHooks=d,t.enableHooks=b,t.createContext=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e[t].createContext;if("function"!=typeof n)throw new Error("Can not create context for method ".concat(t));return n(r)};var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(p,e);var t,r,i,f,l=(i=p,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(i);if(f){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function p(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(r=l.call(this)).app=e,r.method=t,r._middleware=[],r}return t=p,(r=[{key:"collectMiddleware",value:function(e,t){var r=d(this.app,this.method),n=o(c(p.prototype),"collectMiddleware",this).call(this,e,t),i=d(e,this.method);return[].concat(s(r),s(n),s(i))}},{key:"initializeContext",value:function(e,t,r){var n=o(c(p.prototype),"initializeContext",this).call(this,e,t,r);return n.params=n.params||{},n}},{key:"middleware",value:function(e){var t;return(t=this._middleware).push.apply(t,s(e)),this}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(p.HookManager);t.FeathersHookManager=m,t.hookMixin=function(e,t,r){var n=this;if("function"==typeof e.hooks)return e;var o=(0,h.getHookMethods)(e,r).reduce((function(r,o){var i,u=h.defaultServiceArguments[o]||["data","params"];return r[o]=(i=new m(n,o)).params.apply(i,s(u)).props({app:n,path:t,method:o,service:e,event:null,type:null,get statusCode(){var e;return null===(e=this.http)||void 0===e?void 0:e.status},set statusCode(e){this.http=this.http||{},this.http.status=e}}),r}),{}),i=b(e);return(0,p.hooks)(e,o),e.hooks=function(e){var t=this;return e.before||e.after||e.error||e.around?i.call(this,e):Array.isArray(e)?(0,p.hooks)(this,e):(Object.keys(e).forEach((function(r){var n=(0,p.getManager)(t[r]);if(!(n instanceof m))throw new Error("Method ".concat(r," is not a Feathers hooks enabled service method"));n.middleware(e[r])})),this)},e}},62:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=t.version=t.feathers=void 0;var u=r(568),a=i(r(38));t.version=a.default;var c=r(352);function s(){return new c.Feathers}Object.defineProperty(t,"Feathers",{enumerable:!0,get:function(){return c.Feathers}}),t.feathers=s,s.setDebug=u.setDebug,o(r(665),t),o(r(263),t),o(r(717),t),e.exports=Object.assign(s,e.exports)},717:function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.wrapService=t.getServiceOptions=t.getHookMethods=t.protectedMethods=t.defaultEventMap=t.defaultServiceMethods=t.defaultServiceArguments=t.SERVICE=void 0;var u=r(699),a=r(568);function c(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e[t.SERVICE];if(n)return n;var i=r.methods,u=void 0===i?t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]})):i,a=r.events,c=void 0===a?e.events||[]:a,s=r.serviceEvents,f=void 0===s?Object.values(t.defaultEventMap).concat(c):s;return o(o({},r),{},{events:c,methods:u,serviceEvents:f})}t.SERVICE=(0,a.createSymbol)("@feathersjs/service"),t.defaultServiceArguments={find:["params"],get:["id","params"],create:["data","params"],update:["id","data","params"],patch:["id","data","params"],remove:["id","params"]},t.defaultServiceMethods=["find","get","create","update","patch","remove"],t.defaultEventMap={create:"created",update:"updated",patch:"patched",remove:"removed"},t.protectedMethods=Object.keys(Object.prototype).concat(Object.keys(u.EventEmitter.prototype)).concat(["all","around","before","after","error","hooks","setup","teardown","publish"]),t.getHookMethods=function(e,r){var n=r.methods;return t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]&&!n.includes(t)})).concat(n)},t.getServiceOptions=c,t.wrapService=function(e,r,n){if(r[t.SERVICE])return r;var o=Object.create(r),i=c(r,n);if(0===Object.keys(i.methods).length&&"function"!=typeof r.setup)throw new Error("Invalid service object passed for path `".concat(e,"`"));return Object.defineProperty(o,t.SERVICE,{value:i}),o}},38:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default="development"},699:function(e){var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var u=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function s(e,t,r,n){var o,i,u,s;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),u=i[t]),void 0===u)u=i[t]=r,++e._eventsCount;else if("function"==typeof u?u=i[t]=n?[r,u]:[u,r]:n?u.unshift(r):u.push(r),(o=c(e))>0&&u.length>o&&!u.warned){u.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=u.length,s=f,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):y(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var a=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw a.context=u,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var s=c.length,f=y(c,s);for(r=0;r<s;++r)n(f[r],this,t)}return!0},i.prototype.addListener=function(e,t){return s(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return s(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,u;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){u=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,u||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},782:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(62),t)},154:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=s(e);if(t){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.setMiddleware=t.getMiddleware=t.setManager=t.getManager=t.convertOptions=t.HookManager=t.BaseHookContext=t.HOOKS=void 0;var h=r(122);t.HOOKS=Symbol("@feathersjs/hooks");var y=l((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),Object.defineProperty(this,"self",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.assign(this,t)}));t.BaseHookContext=y;var v=function(){function e(){p(this,e),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_params",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_middleware",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_props",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_defaults",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return l(e,[{key:"parent",value:function(e){return this._parent=e,this}},{key:"middleware",value:function(e){return this._middleware=null!=e&&e.length?e:null,this}},{key:"getMiddleware",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getMiddleware();return t&&this._middleware?t.concat(this._middleware):t||this._middleware}},{key:"collectMiddleware",value:function(e,t){var r=m(e),n=this.getMiddleware();return r&&n?r.concat(n):r||n||[]}},{key:"props",value:function(e){return this._props||(this._props={}),(0,h.copyProperties)(this._props,e),this}},{key:"getProps",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getProps();return t&&this._props?(0,h.copyProperties)({},t,this._props):t||this._props||null}},{key:"params",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this._params=t,this}},{key:"getParams",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getParams();return t&&this._params?t.concat(this._params):t||this._params}},{key:"defaults",value:function(e){return this._defaults=e,this}},{key:"getDefaults",value:function(e,t,r){var n,o="function"==typeof this._defaults?this._defaults(e,t,r):null,i=null===(n=this._parent)||void 0===n?void 0:n.getDefaults(e,t,r);return i&&o?Object.assign({},i,o):i||o}},{key:"getContextClass",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=function(e){o(r,e);var t=u(r);function r(e){var n;return p(this,r),n=t.call(this,e),(0,h.copyToSelf)(c(n)),n}return l(r)}(e),r=this.getParams(),n=this.getProps();return r&&r.forEach((function(e,r){if(void 0!==(null==n?void 0:n[e]))throw new Error("Hooks can not have a property and param named '".concat(e,"'. Use .defaults instead."));Object.defineProperty(t.prototype,e,{enumerable:!0,get:function(){return null==this?void 0:this.arguments[r]},set:function(e){this.arguments[r]=e}})})),n&&(0,h.copyProperties)(t.prototype,n),t}},{key:"initializeContext",value:function(e,t,r){var n=this._parent?this._parent.initializeContext(e,t,r):r,o=this.getDefaults(e,t,n);if(e&&(n.self=e),n.arguments=t,o)for(var i=0,u=Object.keys(o);i<u.length;i++){var a=u[i];void 0===n[a]&&(n[a]=o[a])}return n}}]),e}();function d(e){return e&&e[t.HOOKS]||null}function b(e,r){var n=d(e);return e[t.HOOKS]=r.parent(n),e}function m(e){var t=d(e);return t?t.getMiddleware():null}t.HookManager=v,t.convertOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?Array.isArray(e)?(new v).middleware(e):e:new v},t.getManager=d,t.setManager=b,t.getMiddleware=m,t.setMiddleware=function(e,t){return b(e,(new v).middleware(t))}},509:function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.compose=void 0,t.compose=function(e){if(!Array.isArray(e))throw new TypeError("Middleware stack must be an array!");var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 u,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw u}}}}(e);try{for(n.s();!(t=n.n()).done;)if("function"!=typeof t.value)throw new TypeError("Middleware must be composed of functions!")}catch(e){n.e(e)}finally{n.f()}return function(t,r){var n=-1;return function o(i){if(i<=n)return Promise.reject(new Error("next() called multiple times"));n=i;var u=e[i];if(i===e.length&&(u=r),!u)return Promise.resolve();try{return Promise.resolve(u.call(this,t,o.bind(this,i+1)))}catch(e){return Promise.reject(e)}}.call(this,0)}}},232:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hookDecorator=t.objectHooks=t.functionHooks=t.getOriginal=void 0;var n=r(509),o=r(154),i=r(122);function u(e){return"function"==typeof e.original?u(e.original):e}function a(e,t){if("function"!=typeof e)throw new Error("Can not apply hooks to non-function");var r=(0,o.convertOptions)(t),a=function e(){for(var t=this,o=e.Context,i=e.original,u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];var s=a[a.length-1]instanceof o,f=s?a.pop():new o,l=r.initializeContext(this,a,f),p=[function(e,t){return t().then((function(){return s?e:e.result}))}],h=r.collectMiddleware(this,a);return h&&Array.prototype.push.apply(p,h),p.push((function(e,r){return Object.prototype.hasOwnProperty.call(l,"result")?r():Promise.resolve(i.apply(t,e.arguments)).then((function(t){return e.result=t,r()}))})),(0,n.compose)(p).call(this,l)};return(0,i.copyFnProperties)(a,e),(0,i.copyProperties)(a,e),(0,o.setManager)(a,r),Object.assign(a,{original:u(e),Context:r.getContextClass(),createContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new a.Context(e)}})}t.getOriginal=u,t.functionHooks=a,t.objectHooks=function(e,t){if(Array.isArray(t))return(0,o.setMiddleware)(e,t);for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r],u="function"==typeof e[i]?e:e.prototype,c=u&&u[i];if("function"!=typeof c)throw new Error("Can not apply hooks. '".concat(i,"' is not a function"));var s=(0,o.convertOptions)(t[i]);u[i]=a(c,s.props({method:i}))}return e},t.hookDecorator=function(e){return function(t,r,n){var i=(0,o.convertOptions)(e);if(!n)return(0,o.setManager)(t.prototype,i),t;var u=n.value;if("function"!=typeof u)throw new Error("Can not apply hooks. '".concat(r,"' is not a function"));return n.value=a(u,i.props({method:r})),n}}},382:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=t.middleware=void 0;var u=r(154),a=r(232);i(r(232),t),i(r(509),t),i(r(154),t),i(r(755),t),t.middleware=function(e,t){var r,o=(new u.HookManager).middleware(e);return t&&(t.params&&o.params.apply(o,function(e){if(Array.isArray(e))return n(e)}(r=t.params)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(r)||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.")}()),t.defaults&&o.defaults(t.defaults),t.props&&o.props(t.props)),o},t.hooks=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=t[1];return"function"==typeof n&&(o instanceof u.HookManager||Array.isArray(o)||1===t.length)?(0,a.functionHooks)(n,o):2===t.length?(0,a.objectHooks)(n,o):(0,a.hookDecorator)(n)}},755:function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.collect=t.fromErrorHook=t.fromAfterHook=t.fromBeforeHook=t.runHooks=t.runHook=void 0;var a=r(509);function c(e){return function(r,n){return(0,t.runHook)(e,r,"before").then(n)}}function s(e){return function(r,n){return n().then((function(){return(0,t.runHook)(e,r,"after")}))}}function f(e){return function(r,n){return n().catch((function(n){return r.error===n&&void 0===r.result||(r.original=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r),r.error=n,delete r.result),(0,t.runHook)(e,r,"error").then((function(){if(void 0===r.result&&void 0!==r.error)throw r.error}))}))}}t.runHook=function(e,t,r){return r&&(t.type=r),Promise.resolve(e.call(t.self,t)).then((function(e){r&&(t.type=null),e&&e!==t&&Object.assign(t,e)}))},t.runHooks=function(e){return function(r){return e.reduce((function(e,n){return e.then((function(){return(0,t.runHook)(n,r)}))}),Promise.resolve(r))}},t.fromBeforeHook=c,t.fromAfterHook=s,t.fromErrorHook=f,t.collect=function(e){var r=e.before,o=void 0===r?[]:r,i=e.after,u=void 0===i?[]:i,l=e.error,p=void 0===l?[]:l,h=o.map(c),y=n(u).reverse().map(s),v=p.length?[f((0,t.runHooks)(p))]:[];return(0,a.compose)([].concat(v,n(h),n(y)))}},122:function(e,t){function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 u,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw u}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.copyFnProperties=t.copyProperties=t.copyToSelf=void 0;var o=Object.prototype,i="function"==typeof o.__lookupGetter__&&"function"==typeof o.__defineGetter__&&"function"==typeof o.__defineSetter__;t.copyToSelf=function(e){for(var t in e)if(!Object.hasOwnProperty.call(e,t)){var r=i?e.constructor.prototype.__lookupGetter__(t):Object.getOwnPropertyDescriptor(e,t);if(i&&r){e.__defineGetter__(t,r);var n=e.constructor.prototype.__lookupSetter__(t);n&&e.__defineSetter__(t,n)}else r?Object.defineProperty(e,t,r):e[t]=e[t]}},t.copyProperties=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(var i=0,u=n;i<u.length;i++){var a,c=u[i],s=Object.keys(c).concat(Object.getOwnPropertySymbols(c)),f=r(s);try{for(f.s();!(a=f.n()).done;){var l=a.value,p=Object.getOwnPropertyDescriptor(c,l);p&&!Object.prototype.hasOwnProperty.call(e,l)&&Object.defineProperty(e,l,p)}}catch(e){f.e(e)}finally{f.f()}}return e},t.copyFnProperties=function(e,t){try{for(var r=0,n=["name","length"];r<n.length;r++){var o=n[r],i=t[o];Object.defineProperty(e,o,{value:i})}}catch(e){}return e}}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(782)}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return function(){"use strict";var e={24:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createDebug=t.setDebug=t.noopDebug=void 0;var r={};function n(){return function(){}}t.noopDebug=n;var o=n;t.setDebug=function(e){o=e,Object.keys(r).forEach((function(t){r[t]=e(t)}))},t.createDebug=function(e){return r[e]||(r[e]=o(e)),function(){return r[e].apply(r,arguments)}}},568:function(e,t,r){function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],u=!0,a=!1;try{for(r=r.call(e);!(u=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);u=!0);}catch(e){a=!0,o=e}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),c=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createSymbol=t.isPromise=t._=t.stripSlashes=void 0,t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")},t._={each:function(e,r){e&&"function"==typeof e.forEach?e.forEach(r):t._.isObject(e)&&Object.keys(e).forEach((function(t){return r(e[t],t)}))},some:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).some((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},every:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).every((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},keys:function(e){return Object.keys(e)},values:function(e){return t._.keys(e).map((function(t){return e[t]}))},isMatch:function(e,r){return t._.keys(r).every((function(t){return e[t]===r[t]}))},isEmpty:function(e){return 0===t._.keys(e).length},isObject:function(e){return"object"===o(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===o(e)&&null!==e},extend:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.assign.apply(Object,[e].concat(r))},omit:function(e){for(var r=t._.extend({},e),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.forEach((function(e){return delete r[e]})),r},pick:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t}),{})},merge:function(e,r){return t._.isObject(e)&&t._.isObject(r)&&Object.keys(r).forEach((function(o){t._.isObject(r[o])?(e[o]||Object.assign(e,n({},o,{})),t._.merge(e[o],r[o])):Object.assign(e,n({},o,r[o]))})),e}},t.isPromise=function(e){return t._.isObject(e)&&"function"==typeof e.then},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol(e):e},c(r(24),t)},352:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,u=Object.create(o.prototype),a=new E(n||[]);return i(u,"_invoke",{value:j(e,r,a)}),u}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h={};function y(){}function v(){}function d(){}var b={};f(b,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(x([])));g&&g!==t&&r.call(g,a)&&(b=g);var w=d.prototype=y.prototype=Object.create(b);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(i,u,a,c){var s=p(e[i],e,u);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==n(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var u;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return u=u?u.then(n,n):n()}})}function j(e,t,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{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=k(u,r);if(a){if(a===h)continue;return a}}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 c=p(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function k(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=p(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function x(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:M}}function M(){return{value:void 0,done:!0}}return v.prototype=d,i(w,"constructor",{value:d,configurable:!0}),i(d,"constructor",{value:v,configurable:!0}),v.displayName=f(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,f(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},O(_.prototype),f(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var u=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},O(w),f(w,s,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=x,E.prototype={constructor:E,reset:function(e){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(S),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return u.type="throw",u.arg=e,t.next=r,n&&(t.method="next",t.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 a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=e,u.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function i(e,t,r,n,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=void 0;var h=p(r(38)),y=r(699),v=r(568),d=r(382),b=r(156),m=r(665),g=r(717),w=r(665),O=(0,v.createDebug)("@feathersjs/feathers"),_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(k,e);var t,r,n,p,y,_,j=(y=k,_=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(y);if(_){var r=l(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return s(this,e)});function k(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),(e=j.call(this)).services={},e.settings={},e.mixins=[m.hookMixin,b.eventMixin],e.version=h.default,e._isSetup=!1,e.registerHooks=(0,w.enableHooks)(f(e)),e.registerHooks({around:[b.eventHook]}),e}return t=k,r=[{key:"get",value:function(e){return this.settings[e]}},{key:"set",value:function(e,t){return this.settings[e]=t,this}},{key:"configure",value:function(e){return e.call(this,this),this}},{key:"defaultService",value:function(e){throw new Error("Can not find service '".concat(e,"'"))}},{key:"service",value:function(e){var t=(0,v.stripSlashes)(e)||"/",r=this.services[t];return void 0===r?(this.use(t,this.defaultService(t)),this.service(t)):r}},{key:"_setup",value:function(){var e=this;return this._isSetup=!0,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.setup)return O("Setting up service for `".concat(r,"`")),t.setup(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"setup",get:function(){return this._setup},set:function(e){this._setup=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"_teardown",value:function(){var e=this;return this._isSetup=!1,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.teardown)return O("Tearing down service for `".concat(r,"`")),t.teardown(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"teardown",get:function(){return this._teardown},set:function(e){this._teardown=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"use",value:function(e,t,r){var n=this;if("string"!=typeof e)throw new Error("'".concat(e,"' is not a valid service path."));var o=(0,v.stripSlashes)(e)||"/",i=t;if("function"==typeof i.service&&i.services)return Object.keys(i.services).forEach((function(e){return n.use("".concat(o,"/").concat(e),i.service(e))})),this;var a,c=(0,g.wrapService)(o,t,r),s=(0,g.getServiceOptions)(c),f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(g.protectedMethods);try{for(f.s();!(a=f.n()).done;){var l=a.value;if(s.methods.includes(l))throw new Error("'".concat(l,"' on service '").concat(o,"' is not allowed as a custom method name"))}}catch(e){f.e(e)}finally{f.f()}return O("Registering new service at `".concat(o,"`")),this.mixins.forEach((function(e){return e.call(n,c,o,s)})),this.services[o]=c,this._isSetup&&"function"==typeof c.setup&&(O("Setting up service for `".concat(o,"`")),c.setup(this,o)),this}},{key:"unuse",value:(n=o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,v.stripSlashes)(t)||"/",!(n=this.services[r])||"function"!=typeof n.teardown){e.next=5;break}return e.next=5,n.teardown(this,r);case 5:return delete this.services[r],e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})),p=function(){var e=this,t=arguments;return new Promise((function(r,o){var u=n.apply(e,t);function a(e){i(u,r,o,a,c,"next",e)}function c(e){i(u,r,o,a,c,"throw",e)}a(void 0)}))},function(e){return p.apply(this,arguments)})},{key:"hooks",value:function(e){var t=e;return t.before||t.after||t.error||t.around?this.registerHooks(t):t.setup||t.teardown?(0,d.hooks)(this,t):this.registerHooks({around:t}),this}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(y.EventEmitter);t.Feathers=_},263:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},156:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.eventMixin=t.eventHook=void 0;var n=r(699),o=r(717);t.eventHook=function(e,t){var r=(0,o.getServiceOptions)(e.self).events,n=o.defaultEventMap[e.method]||null;return e.event=n,t().then((function(){"string"!=typeof e.event||r.includes(e.event)||(Array.isArray(e.result)?e.result:[e.result]).forEach((function(t){return e.self.emit(e.event,t,e)}))}))},t.eventMixin=function(e){return"function"==typeof e.on&&"function"==typeof e.emit||Object.assign(e,n.EventEmitter.prototype),e}},665:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=i(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},o.apply(this,arguments)}function i(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function a(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function s(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e)||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 f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.hookMixin=t.FeathersHookManager=t.createContext=t.enableHooks=t.collectHooks=t.convertHookData=void 0;var p=r(382),h=r(717),y=["before","after","error","around"];function v(e){var t={};if(Array.isArray(e))t.all=e;else if("object"!==l(e))t.all=[e];else for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=e[o];t[o]=Array.isArray(i)?i:[i]}return t}function d(e,t){var r=e.__hooks,n=r.collected,o=r.around;return[].concat(s(o.all||[]),s(o[t]||[]),s(n.all||[]),s(n[t]||[]))}function b(e){return Object.defineProperty(e,"__hooks",{configurable:!0,value:{around:{},before:{},after:{},error:{},collected:{}},writable:!0}),function(e){var t=this.__hooks,r=Object.keys(e).reduce((function(t,r){if(n=r,!y.includes(n))throw new Error("'".concat(r,"' is not a valid hook type"));var n;return t[r]=v(e[r]),t}),{});return Object.keys(r).forEach((function(e){return Object.keys(r[e]).forEach((function(n){var o,i=r[e][n],u=(o=t[e])[n]||(o[n]=[]);if(u.push.apply(u,s(i)),t.before[n]||t.after[n]||t.error[n]){var a=(0,p.collect)({before:t.before[n]||[],after:t.after[n]||[],error:t.error[n]||[]});t.collected[n]=[a]}}))})),this}}t.convertHookData=v,t.collectHooks=d,t.enableHooks=b,t.createContext=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e[t].createContext;if("function"!=typeof n)throw new Error("Can not create context for method ".concat(t));return n(r)};var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(p,e);var t,r,i,f,l=(i=p,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(i);if(f){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function p(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(r=l.call(this)).app=e,r.method=t,r._middleware=[],r}return t=p,(r=[{key:"collectMiddleware",value:function(e,t){var r=d(this.app,this.method),n=o(c(p.prototype),"collectMiddleware",this).call(this,e,t),i=d(e,this.method);return[].concat(s(r),s(n),s(i))}},{key:"initializeContext",value:function(e,t,r){var n=o(c(p.prototype),"initializeContext",this).call(this,e,t,r);return n.params=n.params||{},n}},{key:"middleware",value:function(e){var t;return(t=this._middleware).push.apply(t,s(e)),this}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(p.HookManager);t.FeathersHookManager=m,t.hookMixin=function(e,t,r){var n=this;if("function"==typeof e.hooks)return e;var o=(0,h.getHookMethods)(e,r).reduce((function(r,o){var i,u=h.defaultServiceArguments[o]||["data","params"];return r[o]=(i=new m(n,o)).params.apply(i,s(u)).props({app:n,path:t,method:o,service:e,event:null,type:null,get statusCode(){var e;return null===(e=this.http)||void 0===e?void 0:e.status},set statusCode(e){this.http=this.http||{},this.http.status=e}}),r}),{}),i=b(e);return(0,p.hooks)(e,o),e.hooks=function(e){var t=this;return e.before||e.after||e.error||e.around?i.call(this,e):Array.isArray(e)?(0,p.hooks)(this,e):(Object.keys(e).forEach((function(r){var n=(0,p.getManager)(t[r]);if(!(n instanceof m))throw new Error("Method ".concat(r," is not a Feathers hooks enabled service method"));n.middleware(e[r])})),this)},e}},62:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=t.version=t.feathers=void 0;var u=r(568),a=i(r(38));t.version=a.default;var c=r(352);function s(){return new c.Feathers}Object.defineProperty(t,"Feathers",{enumerable:!0,get:function(){return c.Feathers}}),t.feathers=s,s.setDebug=u.setDebug,o(r(665),t),o(r(263),t),o(r(717),t),e.exports=Object.assign(s,e.exports)},717:function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.wrapService=t.getServiceOptions=t.getHookMethods=t.protectedMethods=t.defaultEventMap=t.defaultServiceMethods=t.defaultServiceArguments=t.SERVICE=void 0;var u=r(699),a=r(568);function c(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e[t.SERVICE];if(n)return n;var i=r.methods,u=void 0===i?t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]})):i,a=r.events,c=void 0===a?e.events||[]:a,s=r.serviceEvents,f=void 0===s?Object.values(t.defaultEventMap).concat(c):s;return o(o({},r),{},{events:c,methods:u,serviceEvents:f})}t.SERVICE=(0,a.createSymbol)("@feathersjs/service"),t.defaultServiceArguments={find:["params"],get:["id","params"],create:["data","params"],update:["id","data","params"],patch:["id","data","params"],remove:["id","params"]},t.defaultServiceMethods=["find","get","create","update","patch","remove"],t.defaultEventMap={create:"created",update:"updated",patch:"patched",remove:"removed"},t.protectedMethods=Object.keys(Object.prototype).concat(Object.keys(u.EventEmitter.prototype)).concat(["all","around","before","after","error","hooks","setup","teardown","publish"]),t.getHookMethods=function(e,r){var n=r.methods;return t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]&&!n.includes(t)})).concat(n)},t.getServiceOptions=c,t.wrapService=function(e,r,n){if(r[t.SERVICE])return r;var o=Object.create(r),i=c(r,n);if(0===Object.keys(i.methods).length&&"function"!=typeof r.setup)throw new Error("Invalid service object passed for path `".concat(e,"`"));return Object.defineProperty(o,t.SERVICE,{value:i}),o}},38:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default="development"},699:function(e){var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var u=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function s(e,t,r,n){var o,i,u,s;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),u=i[t]),void 0===u)u=i[t]=r,++e._eventsCount;else if("function"==typeof u?u=i[t]=n?[r,u]:[u,r]:n?u.unshift(r):u.push(r),(o=c(e))>0&&u.length>o&&!u.warned){u.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=u.length,s=f,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):y(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var a=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw a.context=u,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var s=c.length,f=y(c,s);for(r=0;r<s;++r)n(f[r],this,t)}return!0},i.prototype.addListener=function(e,t){return s(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return s(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,u;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){u=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,u||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},782:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(62),t)},154:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=s(e);if(t){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.setMiddleware=t.getMiddleware=t.setManager=t.getManager=t.convertOptions=t.HookManager=t.BaseHookContext=t.HOOKS=void 0;var h=r(122);t.HOOKS=Symbol("@feathersjs/hooks");var y=l((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),Object.defineProperty(this,"self",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.assign(this,t)}));t.BaseHookContext=y;var v=function(){function e(){p(this,e),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_params",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_middleware",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_props",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_defaults",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return l(e,[{key:"parent",value:function(e){return this._parent=e,this}},{key:"middleware",value:function(e){return this._middleware=null!=e&&e.length?e:null,this}},{key:"getMiddleware",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getMiddleware();return t&&this._middleware?t.concat(this._middleware):t||this._middleware}},{key:"collectMiddleware",value:function(e,t){var r=m(e),n=this.getMiddleware();return r&&n?r.concat(n):r||n||[]}},{key:"props",value:function(e){return this._props||(this._props={}),(0,h.copyProperties)(this._props,e),this}},{key:"getProps",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getProps();return t&&this._props?(0,h.copyProperties)({},t,this._props):t||this._props||null}},{key:"params",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this._params=t,this}},{key:"getParams",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getParams();return t&&this._params?t.concat(this._params):t||this._params}},{key:"defaults",value:function(e){return this._defaults=e,this}},{key:"getDefaults",value:function(e,t,r){var n,o="function"==typeof this._defaults?this._defaults(e,t,r):null,i=null===(n=this._parent)||void 0===n?void 0:n.getDefaults(e,t,r);return i&&o?Object.assign({},i,o):i||o}},{key:"getContextClass",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=function(e){o(r,e);var t=u(r);function r(e){var n;return p(this,r),n=t.call(this,e),(0,h.copyToSelf)(c(n)),n}return l(r)}(e),r=this.getParams(),n=this.getProps();return r&&r.forEach((function(e,r){if(void 0!==(null==n?void 0:n[e]))throw new Error("Hooks can not have a property and param named '".concat(e,"'. Use .defaults instead."));Object.defineProperty(t.prototype,e,{enumerable:!0,get:function(){return null==this?void 0:this.arguments[r]},set:function(e){this.arguments[r]=e}})})),n&&(0,h.copyProperties)(t.prototype,n),t}},{key:"initializeContext",value:function(e,t,r){var n=this._parent?this._parent.initializeContext(e,t,r):r,o=this.getDefaults(e,t,n);if(e&&(n.self=e),n.arguments=t,o)for(var i=0,u=Object.keys(o);i<u.length;i++){var a=u[i];void 0===n[a]&&(n[a]=o[a])}return n}}]),e}();function d(e){return e&&e[t.HOOKS]||null}function b(e,r){var n=d(e);return e[t.HOOKS]=r.parent(n),e}function m(e){var t=d(e);return t?t.getMiddleware():null}t.HookManager=v,t.convertOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?Array.isArray(e)?(new v).middleware(e):e:new v},t.getManager=d,t.setManager=b,t.getMiddleware=m,t.setMiddleware=function(e,t){return b(e,(new v).middleware(t))}},509:function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.compose=void 0,t.compose=function(e){if(!Array.isArray(e))throw new TypeError("Middleware stack must be an array!");var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 u,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw u}}}}(e);try{for(n.s();!(t=n.n()).done;)if("function"!=typeof t.value)throw new TypeError("Middleware must be composed of functions!")}catch(e){n.e(e)}finally{n.f()}return function(t,r){var n=-1;return function o(i){if(i<=n)return Promise.reject(new Error("next() called multiple times"));n=i;var u=e[i];if(i===e.length&&(u=r),!u)return Promise.resolve();try{return Promise.resolve(u.call(this,t,o.bind(this,i+1)))}catch(e){return Promise.reject(e)}}.call(this,0)}}},232:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hookDecorator=t.objectHooks=t.functionHooks=t.getOriginal=void 0;var n=r(509),o=r(154),i=r(122);function u(e){return"function"==typeof e.original?u(e.original):e}function a(e,t){if("function"!=typeof e)throw new Error("Can not apply hooks to non-function");var r=(0,o.convertOptions)(t),a=function e(){for(var t=this,o=e.Context,i=e.original,u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];var s=a[a.length-1]instanceof o,f=s?a.pop():new o,l=r.initializeContext(this,a,f),p=[function(e,t){return t().then((function(){return s?e:e.result}))}],h=r.collectMiddleware(this,a);return h&&Array.prototype.push.apply(p,h),p.push((function(e,r){return Object.prototype.hasOwnProperty.call(l,"result")?r():Promise.resolve(i.apply(t,e.arguments)).then((function(t){return e.result=t,r()}))})),(0,n.compose)(p).call(this,l)};return(0,i.copyFnProperties)(a,e),(0,i.copyProperties)(a,e),(0,o.setManager)(a,r),Object.assign(a,{original:u(e),Context:r.getContextClass(),createContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new a.Context(e)}})}t.getOriginal=u,t.functionHooks=a,t.objectHooks=function(e,t){if(Array.isArray(t))return(0,o.setMiddleware)(e,t);for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r],u="function"==typeof e[i]?e:e.prototype,c=u&&u[i];if("function"!=typeof c)throw new Error("Can not apply hooks. '".concat(i,"' is not a function"));var s=(0,o.convertOptions)(t[i]);u[i]=a(c,s.props({method:i}))}return e},t.hookDecorator=function(e){return function(t,r,n){var i=(0,o.convertOptions)(e);if(!n)return(0,o.setManager)(t.prototype,i),t;var u=n.value;if("function"!=typeof u)throw new Error("Can not apply hooks. '".concat(r,"' is not a function"));return n.value=a(u,i.props({method:r})),n}}},382:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=t.middleware=void 0;var u=r(154),a=r(232);i(r(232),t),i(r(509),t),i(r(154),t),i(r(755),t),t.middleware=function(e,t){var r,o=(new u.HookManager).middleware(e);return t&&(t.params&&o.params.apply(o,function(e){if(Array.isArray(e))return n(e)}(r=t.params)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(r)||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.")}()),t.defaults&&o.defaults(t.defaults),t.props&&o.props(t.props)),o},t.hooks=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=t[1];return"function"==typeof n&&(o instanceof u.HookManager||Array.isArray(o)||1===t.length)?(0,a.functionHooks)(n,o):2===t.length?(0,a.objectHooks)(n,o):(0,a.hookDecorator)(n)}},755:function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.collect=t.fromErrorHook=t.fromAfterHook=t.fromBeforeHook=t.runHooks=t.runHook=void 0;var a=r(509);function c(e){return function(r,n){return(0,t.runHook)(e,r,"before").then(n)}}function s(e){return function(r,n){return n().then((function(){return(0,t.runHook)(e,r,"after")}))}}function f(e){return function(r,n){return n().catch((function(n){return r.error===n&&void 0===r.result||(r.original=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r),r.error=n,delete r.result),(0,t.runHook)(e,r,"error").then((function(){if(void 0===r.result&&void 0!==r.error)throw r.error}))}))}}t.runHook=function(e,t,r){return r&&(t.type=r),Promise.resolve(e.call(t.self,t)).then((function(e){r&&(t.type=null),e&&e!==t&&Object.assign(t,e)}))},t.runHooks=function(e){return function(r){return e.reduce((function(e,n){return e.then((function(){return(0,t.runHook)(n,r)}))}),Promise.resolve(r))}},t.fromBeforeHook=c,t.fromAfterHook=s,t.fromErrorHook=f,t.collect=function(e){var r=e.before,o=void 0===r?[]:r,i=e.after,u=void 0===i?[]:i,l=e.error,p=void 0===l?[]:l,h=o.map(c),y=n(u).reverse().map(s),v=p.length?[f((0,t.runHooks)(p))]:[];return(0,a.compose)([].concat(v,n(h),n(y)))}},122:function(e,t){function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 u,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw u}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.copyFnProperties=t.copyProperties=t.copyToSelf=void 0;var o=Object.prototype,i="function"==typeof o.__lookupGetter__&&"function"==typeof o.__defineGetter__&&"function"==typeof o.__defineSetter__;t.copyToSelf=function(e){for(var t in e)if(!Object.hasOwnProperty.call(e,t)){var r=i?e.constructor.prototype.__lookupGetter__(t):Object.getOwnPropertyDescriptor(e,t);if(i&&r){e.__defineGetter__(t,r);var n=e.constructor.prototype.__lookupSetter__(t);n&&e.__defineSetter__(t,n)}else r?Object.defineProperty(e,t,r):e[t]=e[t]}},t.copyProperties=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(var i=0,u=n;i<u.length;i++){var a,c=u[i],s=Object.keys(c).concat(Object.getOwnPropertySymbols(c)),f=r(s);try{for(f.s();!(a=f.n()).done;){var l=a.value,p=Object.getOwnPropertyDescriptor(c,l);p&&!Object.prototype.hasOwnProperty.call(e,l)&&Object.defineProperty(e,l,p)}}catch(e){f.e(e)}finally{f.f()}}return e},t.copyFnProperties=function(e,t){try{for(var r=0,n=["name","length"];r<n.length;r++){var o=n[r],i=t[o];Object.defineProperty(e,o,{value:i})}}catch(e){}return e}}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(782)}()}));
package/dist/feathers.js CHANGED
@@ -1028,7 +1028,7 @@ exports.convert = convert;
1028
1028
 
1029
1029
 
1030
1030
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1031
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
1031
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
1032
1032
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
1033
1033
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
1034
1034
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }