UNPKG

@feathersjs/client

Version:

A module that consolidates Feathers client modules for REST (jQuery, Request, Superagent) and Websocket (Socket.io, Primus) connections

2 lines 131 kB
/*! For license information please see feathers.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.feathers=e():t.feathers=e()}(this,(function(){return function(){var t={46:function(t){"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function i(){i.init.call(this)}t.exports=i,t.exports.once=function(t,e){return new Promise((function(r,n){function o(r){t.removeListener(e,i),n(r)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),r([].slice.call(arguments))}d(t,e,i,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&d(t,"error",e,{once:!0})}(t,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function s(t,e,r,n){var o,i,a,s;if(u(r),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),a=i[e]),void 0===a)a=i[e]=r,++t._eventsCount;else if("function"==typeof a?a=i[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=c(t))>0&&a.length>o&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=a.length,s=f,console&&console.warn&&console.warn(s)}return t}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(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(t,e,r){var n=t._events;if(void 0===n)return[];var o=n[e];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(o):h(o,o.length)}function y(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function d(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(i){n.once&&t.removeEventListener(e,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),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(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var o="error"===t,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)n(c,this,e);else{var s=c.length,f=h(c,s);for(r=0;r<s;++r)n(f[r],this,e)}return!0},i.prototype.addListener=function(t,e){return s(this,t,e,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(t,e){return s(this,t,e,!0)},i.prototype.once=function(t,e){return u(e),this.on(t,l(this,t,e)),this},i.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,l(this,t,e)),this},i.prototype.removeListener=function(t,e){var r,n,o,i,a;if(u(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===e||r[i].listener===e){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,o),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(t){var e,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[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),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(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},i.prototype.listeners=function(t){return p(this,t,!0)},i.prototype.rawListeners=function(t){return p(this,t,!1)},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},i.prototype.listenerCount=y,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},220:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.authentication=void 0;var n=r(4271);e.authentication=function(){return function(t,e){var r=t.app,o=t.params,i=t.path,a=t.method,u=t.app.authentication;return(0,n.stripSlashes)(u.options.path)===i&&"create"===a?e():Promise.resolve(r.get("authentication")).then((function(e){e&&(t.params=Object.assign({},e,o))})).then(e)}}},351:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.SuperagentClient=void 0;var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),r=e,(i=[{key:"request",value:function(t,e){var r=this.connection(t.method,t.url).set(this.options.headers||{}).set("Accept","application/json").set(e.connection||{}).set(t.headers||{}).type(t.type||"json");return new Promise((function(e,n){r.set(t.headers),t.body&&r.send(t.body),r.end((function(t,r){if(t){try{var o=t.response;(t=JSON.parse(t.response.text)).response=o}catch(t){}return n(t)}e(r&&r.body)}))}))}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(1030).Base);e.SuperagentClient=s},522:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function u(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationClient=void 0;var y=r(6380),h=r(2408),d=function(t){function e(t,r){return s(this,e),o=this,a=[t,"OauthError",401,"oauth-error",r],i=l(i=e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(o,f()?Reflect.construct(i,a||[],l(o).constructor):i.apply(o,a));var o,i,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),u(e)}(y.FeathersError),v=function(t,e){var r=new RegExp("(?:&?)".concat(e,"=([^&]*)")),n=t.hash?t.hash.match(r):null;return null!==n?[o(n,2)[1],r]:[null,r]},b=function(){return u((function t(e,r){s(this,t);var n=e.io,o=new h.StorageWrapper(e.get("storage")||r.storage);this.app=e,this.options=r,this.authenticated=!1,this.app.set("storage",o),n&&this.handleSocket(n)}),[{key:"service",get:function(){return this.app.service(this.options.path)}},{key:"storage",get:function(){return this.app.get("storage")}},{key:"handleSocket",value:function(t){var e=this;t.on("disconnect",(function(){e.authenticated&&e.reAuthenticate(!0)}))}},{key:"getFromLocation",value:function(t){var e=o(v(t,this.options.locationKey),2),r=e[0],n=e[1];if(null!==r)return t.hash=t.hash.replace(n,""),Promise.resolve(r);var i=o(v(t,this.options.locationErrorKey),2),a=i[0],u=i[1];return null!==a?(t.hash=t.hash.replace(u,""),Promise.reject(new d(decodeURIComponent(a)))):Promise.resolve(null)}},{key:"setAccessToken",value:function(t){return this.storage.setItem(this.options.storageKey,t)}},{key:"getAccessToken",value:function(){var t=this;return this.storage.getItem(this.options.storageKey).then((function(e){return!e&&"undefined"!=typeof window&&window.location?t.getFromLocation(window.location):e||null}))}},{key:"removeAccessToken",value:function(){return this.storage.removeItem(this.options.storageKey)}},{key:"reset",value:function(){return this.app.set("authentication",null),this.authenticated=!1,Promise.resolve(null)}},{key:"handleError",value:function(t,e){var r=this;if(t.code>400&&t.code<408){var n=this.removeAccessToken().then((function(){return r.reset()}));return"logout"===e?n:n.then((function(){return Promise.reject(t)}))}return this.reset().then((function(){return Promise.reject(t)}))}},{key:"reAuthenticate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=this.app.get("authentication");return o&&!0!==e||(o=this.getAccessToken().then((function(e){return e?t.authenticate({strategy:r||t.options.jwtStrategy,accessToken:e},n):t.handleError(new y.NotAuthenticated("No accessToken found in storage"),"authenticate")})),this.app.set("authentication",o)),o}},{key:"authenticate",value:function(t,e){var r=this;if(!t)return this.reAuthenticate();var n=this.service.create(t,e).then((function(t){var e=t.accessToken;return r.authenticated=!0,r.app.emit("login",t),r.app.emit("authenticated",t),r.setAccessToken(e).then((function(){return t}))})).catch((function(t){return r.handleError(t,"authenticate")}));return this.app.set("authentication",n),n}},{key:"logout",value:function(){var t=this;return Promise.resolve(this.app.get("authentication")).then((function(){return t.service.remove(null).then((function(e){return t.removeAccessToken().then((function(){return t.reset()})).then((function(){return t.app.emit("logout",e),e}))}))})).catch((function(e){return t.handleError(e,"logout")}))}}])}();e.AuthenticationClient=b},528:function(t,e,r){"use strict";var n,o=r(9629),i=r(9838),a=r(9110),u=r(1155),c=r(4943),s=r(5731),f=r(3468),l=r(2140),p=r(8479),y=r(8449),h=r(8129),d=r(2387),v=r(5865),b=r(1319),m=r(6882),g=Function,w=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},O=r(9336),j=r(4940),S=function(){throw new f},P=O?function(){try{return S}catch(t){try{return O(arguments,"callee").get}catch(t){return S}}}():S,_=r(3558)(),E=r(6369),A=r(7345),k=r(7859),x=r(6095),M=r(4531),T={},I="undefined"!=typeof Uint8Array&&E?E(Uint8Array):n,C={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":_&&E?E([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":T,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&E?E(E([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&E?E((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":O,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":u,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&E?E((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&E?E(""[Symbol.iterator]()):n,"%Symbol%":_?Symbol:n,"%SyntaxError%":s,"%ThrowTypeError%":P,"%TypedArray%":I,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":x,"%Object.defineProperty%":j,"%Object.getPrototypeOf%":A,"%Math.abs%":p,"%Math.floor%":y,"%Math.max%":h,"%Math.min%":d,"%Math.pow%":v,"%Math.round%":b,"%Math.sign%":m,"%Reflect.getPrototypeOf%":k};if(E)try{null.error}catch(t){var R=E(E(t));C["%Error.prototype%"]=R}var D=function t(e){var r;if("%AsyncFunction%"===e)r=w("async function () {}");else if("%GeneratorFunction%"===e)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=w("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&E&&(r=E(o.prototype))}return C[e]=r,r},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=r(9138),L=r(8554),B=N.call(M,Array.prototype.concat),U=N.call(x,Array.prototype.splice),H=N.call(M,String.prototype.replace),q=N.call(M,String.prototype.slice),W=N.call(M,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,$=function(t,e){var r,n=t;if(L(F,n)&&(n="%"+(r=F[n])[0]+"%"),L(C,n)){var o=C[n];if(o===T&&(o=D(n)),void 0===o&&!e)throw new f("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new f('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,t))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=q(t,0,1),r=q(t,-1);if("%"===e&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return H(t,G,(function(t,e,r,o){n[n.length]=r?H(o,K,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=$("%"+n+"%",e),i=o.name,a=o.value,u=!1,c=o.alias;c&&(n=c[0],U(r,B([0,1],c)));for(var l=1,p=!0;l<r.length;l+=1){var y=r[l],h=q(y,0,1),d=q(y,-1);if(('"'===h||"'"===h||"`"===h||'"'===d||"'"===d||"`"===d)&&h!==d)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&p||(u=!0),L(C,i="%"+(n+="."+y)+"%"))a=C[i];else if(null!=a){if(!(y in a)){if(!e)throw new f("base intrinsic for "+t+" exists, but the property is not available.");return}if(O&&l+1>=r.length){var v=O(a,y);a=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[y]}else p=L(a,y),a=a[y];p&&!u&&(C[i]=a)}}return a}},539:function(t,e){"use strict";function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},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 a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.copyFnProperties=e.copyProperties=void 0,e.copyProperties=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];for(var i=0,a=n;i<a.length;i++){var u,c=a[i],s=r(Object.keys(c).concat(Object.getOwnPropertySymbols(c)));try{for(s.s();!(u=s.n()).done;){var f=u.value,l=Object.getOwnPropertyDescriptor(c,f);l&&!Object.prototype.hasOwnProperty.call(t,f)&&Object.defineProperty(t,f,l)}}catch(t){s.e(t)}finally{s.f()}}return t},e.copyFnProperties=function(t,e){try{for(var r=0,n=["name","length"];r<n.length;r++){var o=n[r],i=e[o];Object.defineProperty(t,o,{value:i})}}catch(t){}return t}},694:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.eventHook=function(t,e){var r=(0,o.getServiceOptions)(t.self).events,n=o.defaultEventMap[t.method]||null;return t.event=n,e().then((function(){"string"!=typeof t.event||r.includes(t.event)||(Array.isArray(t.result)?t.result:[t.result]).forEach((function(e){return t.self.emit(t.event,e,t)}))}))},e.eventMixin=function(t){return"function"==typeof t.on&&"function"==typeof t.emit||Object.assign(t,n.EventEmitter.prototype),t};var n=r(46),o=r(2452)},745:function(t,e,r){"use strict";function n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(n=function(){return!!t})()}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function f(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.setMiddleware=e.getMiddleware=e.setManager=e.getManager=e.convertOptions=e.HookManager=e.BaseHookContext=e.HOOKS=void 0;var p=r(539);e.HOOKS=Symbol.for("@feathersjs/hooks");var y=function(){return f((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,t),Object.defineProperty(this,"self",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.assign(this,e)}),[{key:"toJSON",value:function(){for(var t=this,e=Object.keys(this),r=Object.getPrototypeOf(this);r;)e.push.apply(e,function(t){if(Array.isArray(t))return u(t)}(n=Object.keys(r))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(n)||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.")}()),r=Object.getPrototypeOf(r);var n;return e.reduce((function(e,r){return e[r]=t[r],e}),{})}}])}();e.BaseHookContext=y;var h=function(){return f((function t(){c(this,t),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})}),[{key:"parent",value:function(t){return this._parent=t,this}},{key:"middleware",value:function(t){return this._middleware=null!=t&&t.length?t:null,this}},{key:"getMiddleware",value:function(){var t,e=null===(t=this._parent)||void 0===t?void 0:t.getMiddleware();return e&&this._middleware?e.concat(this._middleware):e||this._middleware}},{key:"collectMiddleware",value:function(t,e){var r=b(t),n=this.getMiddleware();return r&&n?r.concat(n):r||n||[]}},{key:"props",value:function(t){return this._props||(this._props={}),(0,p.copyProperties)(this._props,t),this}},{key:"getProps",value:function(){var t,e=null===(t=this._parent)||void 0===t?void 0:t.getProps();return e&&this._props?(0,p.copyProperties)({},e,this._props):e||this._props||null}},{key:"params",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this._params=e,this}},{key:"getParams",value:function(){var t,e=null===(t=this._parent)||void 0===t?void 0:t.getParams();return e&&this._params?e.concat(this._params):e||this._params}},{key:"defaults",value:function(t){return this._defaults=t,this}},{key:"getDefaults",value:function(t,e,r){var n,o="function"==typeof this._defaults?this._defaults(t,e,r):null,i=null===(n=this._parent)||void 0===n?void 0:n.getDefaults(t,e,r);return i&&o?Object.assign({},i,o):i||o}},{key:"getContextClass",value:function(){var t=function(t){function e(t){return c(this,e),r=this,u=[t],i=o(i=e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(r,n()?Reflect.construct(i,u||[],o(r).constructor):i.apply(r,u));var r,i,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(e,t),f(e)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:y),e=this.getParams(),r=this.getProps();return e&&e.forEach((function(e,n){if(void 0!==(null==r?void 0:r[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[n]},set:function(t){this.arguments[n]=t}})})),r&&(0,p.copyProperties)(t.prototype,r),t}},{key:"initializeContext",value:function(t,e,r){var n=this._parent?this._parent.initializeContext(t,e,r):r,o=this.getDefaults(t,e,n);if(t&&(n.self=t),n.arguments=e,o)for(var i=0,a=Object.keys(o);i<a.length;i++){var u=a[i];void 0===n[u]&&(n[u]=o[u])}return n}}])}();function d(t){return t&&t[e.HOOKS]||null}function v(t,r){var n=d(t);return t[e.HOOKS]=r.parent(n),t}function b(t){var e=d(t);return e?e.getMiddleware():null}e.HookManager=h,e.convertOptions=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?Array.isArray(t)?(new h).middleware(t):t:new h},e.getManager=d,e.setManager=v,e.getMiddleware=b,e.setMiddleware=function(t,e){return v(t,(new h).middleware(e))}},1030:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var u=a(r(5810)),c=r(6380),s=r(4271);function f(t){if("ECONNREFUSED"===t.code)throw new c.Unavailable(t.message,s._.pick(t,"address","port","config"));throw(0,c.convert)(t)}var l=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=(0,s.stripSlashes)(e.name),this.options=e.options,this.connection=e.connection,this.base="".concat(e.base,"/").concat(this.name)},e=[{key:"makeUrl",value:function(t,e,r){var n=this.base;return r&&Object.keys(r).forEach((function(t){n=n.replace(":".concat(t),r[t])})),t=t||{},null!=e&&(n+="/".concat(encodeURIComponent(e))),n+this.getQuery(t)}},{key:"getQuery",value:function(t){if(0!==Object.keys(t).length){var e=u.default.stringify(t);return"?".concat(e)}return""}},{key:"methods",value:function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){var r="_".concat(e);t[r]=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request({body:t,url:this.makeUrl(r.query,null,r.route),method:"POST",headers:Object.assign({"Content-Type":"application/json","X-Service-Method":e},r.headers)},r).catch(f)},t[e]=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this[r](t,e)}})),this}},{key:"_find",value:function(t){return this.request({url:this.makeUrl(t.query,null,t.route),method:"GET",headers:Object.assign({},t.headers)},t).catch(f)}},{key:"find",value:function(t){return this._find(t)}},{key:"_get",value:function(t,e){return void 0===t?Promise.reject(new Error("id for 'get' can not be undefined")):this.request({url:this.makeUrl(e.query,t,e.route),method:"GET",headers:Object.assign({},e.headers)},e).catch(f)}},{key:"get",value:function(t,e){return this._get(t,e)}},{key:"_create",value:function(t,e){return this.request({url:this.makeUrl(e.query,null,e.route),body:t,method:"POST",headers:Object.assign({"Content-Type":"application/json"},e.headers)},e).catch(f)}},{key:"create",value:function(t,e){return this._create(t,e)}},{key:"_update",value:function(t,e,r){return void 0===t?Promise.reject(new Error("id for 'update' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(r.query,t,r.route),body:e,method:"PUT",headers:Object.assign({"Content-Type":"application/json"},r.headers)},r).catch(f)}},{key:"update",value:function(t,e,r){return this._update(t,e,r)}},{key:"_patch",value:function(t,e,r){return void 0===t?Promise.reject(new Error("id for 'patch' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(r.query,t,r.route),body:e,method:"PATCH",headers:Object.assign({"Content-Type":"application/json"},r.headers)},r).catch(f)}},{key:"patch",value:function(t,e,r){return this._patch(t,e,r)}},{key:"_remove",value:function(t,e){return void 0===t?Promise.reject(new Error("id for 'remove' can not be undefined, only 'null' when removing multiple entries")):this.request({url:this.makeUrl(e.query,t,e.route),method:"DELETE",headers:Object.assign({},e.headers)},e).catch(f)}},{key:"remove",value:function(t,e){return this._remove(t,e)}}],e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.Base=l},1146:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.populateHeader=e.authentication=void 0;var n=r(220);Object.defineProperty(e,"authentication",{enumerable:!0,get:function(){return n.authentication}});var o=r(1742);Object.defineProperty(e,"populateHeader",{enumerable:!0,get:function(){return o.populateHeader}})},1155:function(t){"use strict";t.exports=RangeError},1156:function(t,e,r){t.exports=r(4884)},1292:function(t){"use strict";t.exports=Object.getOwnPropertyDescriptor},1319:function(t){"use strict";t.exports=Math.round},1539:function(t,e,r){"use strict";var n=r(1830),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),u=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},c=1024;t.exports={arrayToObject:u,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],a=o.obj[o.prop],u=Object.keys(a),c=0;c<u.length;++c){var s=u[c],f=a[s];"object"==typeof f&&null!==f&&-1===r.indexOf(f)&&(e.push({obj:a,prop:s}),r.push(f))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,o,i){if(0===t.length)return t;var u=t;if("symbol"==typeof t?u=Symbol.prototype.toString.call(t):"string"!=typeof t&&(u=String(t)),"iso-8859-1"===r)return escape(u).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var s="",f=0;f<u.length;f+=c){for(var l=u.length>=c?u.slice(f,f+c):u,p=[],y=0;y<l.length;++y){var h=l.charCodeAt(y);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===n.RFC1738&&(40===h||41===h)?p[p.length]=l.charAt(y):h<128?p[p.length]=a[h]:h<2048?p[p.length]=a[192|h>>6]+a[128|63&h]:h<55296||h>=57344?p[p.length]=a[224|h>>12]+a[128|h>>6&63]+a[128|63&h]:(y+=1,h=65536+((1023&h)<<10|1023&l.charCodeAt(y)),p[p.length]=a[240|h>>18]+a[128|h>>12&63]+a[128|h>>6&63]+a[128|63&h])}s+=p.join("")}return s},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=typeof r&&"function"!=typeof r){if(i(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var a=e;return i(e)&&!i(r)&&(a=u(e,n)),i(e)&&i(r)?(r.forEach((function(r,i){if(o.call(e,i)){var a=e[i];a&&"object"==typeof a&&r&&"object"==typeof r?e[i]=t(a,r,n):e.push(r)}else e[i]=r})),e):Object.keys(r).reduce((function(e,i){var a=r[i];return o.call(e,i)?e[i]=t(e[i],a,n):e[i]=a,e}),a)}}},1742:function(t,e){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.populateHeader=void 0,e.populateHeader=function(){return function(t,e){var n,o,i,a=t.app,u=t.params.accessToken,c=a.authentication;if(a.rest&&u){var s=c.options,f=s.scheme,l=s.header,p="".concat(f," ").concat(u);t.params.headers=Object.assign({},(n={},i=p,(o=function(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}(o=l))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n),t.params.headers)}return e()}}},1830:function(t){"use strict";var e=String.prototype.replace,r=/%20/g,n="RFC3986";t.exports={default:n,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:n}},1986:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2110:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.legacyDecorator=e.hookDecorator=e.objectHooks=e.functionHooks=e.getOriginal=void 0;var n=r(5054),o=r(745),i=r(539);function a(t){return"function"==typeof t.original?a(t.original):t}function u(t,e){if("function"!=typeof t)throw new Error("Can not apply hooks to non-function");var r=(0,o.convertOptions)(e),u=function(){for(var t=this,e=u.Context,o=u.original,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];var s=a[a.length-1]instanceof e,f=s?a.pop():new e,l=r.initializeContext(this,a,f),p=[function(t,e){return e().then((function(){return s?t:t.result}))}],y=r.collectMiddleware(this,a);return y&&Array.prototype.push.apply(p,y),p.push((function(e,r){return Object.prototype.hasOwnProperty.call(l,"result")?r():Promise.resolve(o.apply(t,e.arguments)).then((function(t){return e.result=t,r()}))})),(0,n.compose)(p).call(this,l)};return(0,i.copyFnProperties)(u,t),(0,i.copyProperties)(u,t),(0,o.setManager)(u,r),Object.assign(u,{original:a(t),Context:r.getContextClass(),createContext:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new u.Context(t)}})}e.getOriginal=a,e.functionHooks=u,e.objectHooks=function(t,e){if(Array.isArray(e))return(0,o.setMiddleware)(t,e);for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r],a="function"==typeof t[i]?t:t.prototype,c=a&&a[i];if("function"!=typeof c)throw new Error("Can not apply hooks. '".concat(i,"' is not a function"));var s=(0,o.convertOptions)(e[i]);a[i]=u(c,s.props({method:i}))}return t},e.hookDecorator=function(t){return function(e,r){var n=(0,o.convertOptions)(t);if("class"===r.kind)return(0,o.setManager)(e.prototype,n),e;if("method"===r.kind){var i=String(r.name);return u(e,n.props({method:i}))}throw new Error("Can not apply hooks.")}},e.legacyDecorator=function(t){return function(e,r,n){var i=(0,o.convertOptions)(t);if(!n)return(0,o.setManager)(e.prototype,i),e;var a=n.value;if("function"!=typeof a)throw new Error("Can not apply hooks. '".concat(r,"' is not a function"));return n.value=u(a,i.props({method:r})),n}}},2140:function(t){"use strict";t.exports=URIError},2387:function(t){"use strict";t.exports=Math.min},2408:function(t,e){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function i(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.StorageWrapper=e.MemoryStorage=void 0;var u=function(){return i((function t(){n(this,t),this.store={}}),[{key:"getItem",value:function(t){return Promise.resolve(this.store[t])}},{key:"setItem",value:function(t,e){return Promise.resolve(this.store[t]=e)}},{key:"removeItem",value:function(t){var e=this.store[t];return delete this.store[t],Promise.resolve(e)}}])}();e.MemoryStorage=u;var c=function(){return i((function t(e){n(this,t),this.storage=e}),[{key:"getItem",value:function(t){var e;return Promise.resolve(null===(e=this.storage)||void 0===e?void 0:e.getItem(t))}},{key:"setItem",value:function(t,e){var r;return Promise.resolve(null===(r=this.storage)||void 0===r?void 0:r.setItem(t,e))}},{key:"removeItem",value:function(t){var e;return Promise.resolve(null===(e=this.storage)||void 0===e?void 0:e.removeItem(t))}}])}();e.StorageWrapper=c},2422:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},2452:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeServiceOptions=e.protectedMethods=e.defaultServiceEvents=e.defaultEventMap=e.defaultServiceMethods=e.defaultServiceArguments=e.SERVICE=void 0,e.getHookMethods=function(t,r){var n=r.methods;return e.defaultServiceMethods.filter((function(e){return"function"==typeof t[e]&&!n.includes(e)})).concat(n)},e.getServiceOptions=function(t){return t[e.SERVICE]},e.wrapService=function(t,r,n){if(r[e.SERVICE])return r;var i,a=Object.create(r),u=(0,e.normalizeServiceOptions)(r,n);if(0===Object.keys(u.methods).length&&![].concat((i=e.defaultServiceMethods,function(t){if(Array.isArray(t))return o(t)}(i)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(i)||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.")}()),["setup","teardown"]).some((function(t){return"function"==typeof r[t]})))throw new Error("Invalid service object passed for path `".concat(t,"`"));return Object.defineProperty(a,e.SERVICE,{value:u}),a};var c=r(46),s=r(4271);e.SERVICE=(0,s.createSymbol)("@feathersjs/service"),e.defaultServiceArguments={find:["params"],get:["id","params"],create:["data","params"],update:["id","data","params"],patch:["id","data","params"],remove:["id","params"]},e.defaultServiceMethods=["find","get","create","update","patch","remove"],e.defaultEventMap={create:"created",update:"updated",patch:"patched",remove:"removed"},e.defaultServiceEvents=Object.values(e.defaultEventMap),e.protectedMethods=Object.keys(Object.prototype).concat(Object.keys(c.EventEmitter.prototype)).concat(["all","around","before","after","error","hooks","setup","teardown","publish"]),e.normalizeServiceOptions=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.methods,o=void 0===n?e.defaultServiceMethods.filter((function(e){return"function"==typeof t[e]})):n,i=r.events,u=void 0===i?t.events||[]:i,c=r.serviceEvents||e.defaultServiceEvents.concat(u);return a(a({},r),{},{events:u,methods:o,serviceEvents:c})}},2908:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.proto