From 33e78c170006927ecc4923a8527effbd7522c1f0 Mon Sep 17 00:00:00 2001 From: Emmanuel QUENTIN Date: Tue, 19 May 2015 17:34:26 +0200 Subject: [PATCH] Update dist file --- dist/FakeRest.min.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dist/FakeRest.min.js b/dist/FakeRest.min.js index ef9f1cd..9818820 100644 --- a/dist/FakeRest.min.js +++ b/dist/FakeRest.min.js @@ -1,2 +1 @@ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):"object"==typeof exports?exports.FakeRest=n():t.FakeRest=n()}(this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t};e(3);var i=r(e(1)),o=r(e(2));t.exports={Server:i,Collection:o}},function(t,n,e){"use strict";function r(t){if(!t)return{};var n={},e=t.split("&");return e.map(function(t){if(-1===t.indexOf("="))n[t]=!0;else{var e=t.split("="),r=o(e,2),i=r[0],u=r[1];(0===u.indexOf("[")||0===u.indexOf("{"))&&(u=JSON.parse(u)),n[i.trim()]=u}}),n}var i=function(t){return t&&t.__esModule?t["default"]:t},o=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){for(var e,r=[],i=t[Symbol.iterator]();!(e=i.next()).done&&(r.push(e.value),!n||r.length!==n););return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=function(){function t(t,n){for(var e in n){var r=n[e];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(t,n)}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}(),c=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")};e(3);var a=i(e(2)),s=function(){function t(){var n=void 0===arguments[0]?"":arguments[0];c(this,t),this.baseUrl=n,this.collections={},this.loggingEnabled=!1,this.requestInterceptors=[],this.responseInterceptors=[]}return u(t,{init:{value:function(t){for(var n in t)this.addCollection(n,new a(t[n]))}},toggleLogging:{value:function(){this.loggingEnabled=!this.loggingEnabled}},addCollection:{value:function(t,n){this.collections[t]=n}},getCollection:{value:function(t){return this.collections[t]}},getCollectionNames:{value:function(){return Object.keys(this.collections)}},addRequestInterceptor:{value:function(t){this.requestInterceptors.push(t)}},addResponseInterceptor:{value:function(t){this.responseInterceptors.push(t)}},getCount:{value:function(t,n){return this.collections[t].getCount(n)}},getAll:{value:function(t,n){return this.collections[t].getAll(n)}},getOne:{value:function(t,n){return this.collections[t].getOne(n)}},addOne:{value:function(t,n){return this.collections[t].addOne(n)}},updateOne:{value:function(t,n,e){return this.collections[t].updateOne(n,e)}},removeOne:{value:function(t,n){return this.collections[t].removeOne(n)}},decode:{value:function(t){if(t.queryString=decodeURIComponent(t.url.slice(t.url.indexOf("?")+1)),t.params=r(t.queryString),t.requestBody)try{t.json=JSON.parse(t.requestBody)}catch(n){}return this.requestInterceptors.reduce(function(t,n){return n(t)},t)}},respond:{value:function(t,n,e){var r=void 0===arguments[3]?200:arguments[3];n||(n={}),n["Content-Type"]||(n["Content-Type"]="application/json");var i={status:r,headers:n,body:t};return i=this.responseInterceptors.reduce(function(t,n){return n(t)},i),this.log(e,i),e.respond(i.status,i.headers,JSON.stringify(i.body))}},log:{value:function(t,n){this.loggingEnabled&&(console.group?(console.groupCollapsed(t.method,t.url,"(FakeRest)"),console.group("request"),console.log(t.method,t.url),console.log("headers",t.requestHeaders),console.log("body ",t.requestBody),console.groupEnd(),console.group("response",n.status),console.log("headers",n.headers),console.log("body ",n.body),console.groupEnd(),console.groupEnd()):(console.log("FakeRest request ",t.method,t.url,"headers",t.requestHeaders,"body",t.requestBody),console.log("FakeRest response",n.status,"headers",n.headers,"body",n.body)))}},handle:{value:function(t){t=this.decode(t);var n=!0,e=!1,r=void 0;try{for(var i,o=this.getCollectionNames()[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var u=i.value,c=t.url.match(new RegExp("^"+this.baseUrl+"\\/("+u+")(\\/(\\d+))?(\\?.*)?$"));if(c)if(c[2]){var a=c[3];if("GET"==t.method)try{var s=this.getOne(u,a);return this.respond(s,null,t)}catch(f){return t.respond(404)}if("PUT"==t.method)try{var s=this.updateOne(u,a,t.json);return this.respond(s,null,t)}catch(f){return t.respond(404)}if("DELETE"==t.method)try{var s=this.removeOne(u,a);return this.respond(s,null,t)}catch(f){return t.respond(404)}}else{if("GET"==t.method){var l=t.params,h={};for(var p in l)"range"!==p&&(h[p]=l[p]);var d=this.getCount(u,h),v=void 0,g=void 0,y=void 0;if(d>0){v=this.getAll(u,l);var m=l.range?l.range[0]:0,w=l.range?Math.min(v.length-1+m,l.range[1]):v.length-1;g="items "+m+"-"+w+"/"+d,y=v.length==d?200:206}else v=[],g="items */0",y=200;return this.respond(v,{"Content-Range":g},t,y)}if("POST"==t.method){var b=this.addOne(u,t.json),x=this.baseUrl+"/"+u+"/"+b[this.getCollection(u).identifierName];return this.respond(b,{Location:x},t,201)}}}}catch(E){e=!0,r=E}finally{try{!n&&o["return"]&&o["return"]()}finally{if(e)throw r}}}},getHandler:{value:function(){return this.handle.bind(this)}}}),t}();t.exports=s},function(t,n,e){"use strict";function r(t,n){if("function"==typeof n)return t.filter(n);if(n instanceof Object)return t.filter(function(t){for(var e in n)if(t[e]!=n[e])return!1;return!0});throw new Error("Unsupported filter type")}function i(t,n){if("function"==typeof n)return t.sort(n);if("string"==typeof n)return t.sort(function(t,e){return t[n]>e[n]?1:t[n]n[e]?r:t[e]n;++n)this[t]=null},stop:function(){this.done=!0;var t=this.tryEntries[0],n=t.completion;if("throw"===n.type)throw n.arg;return this.rval},dispatchException:function(t){function n(n,r){return o.type="throw",o.arg=t,e.next=n,!!r}if(this.done)throw t;for(var e=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=p.call(i,"catchLoc"),c=p.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&p.call(r,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc)}},"catch":function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;a(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:f(t),resultName:n,nextLoc:e},x}}}("object"==typeof n?n:"object"==typeof window?window:this)}).call(n,function(){return this}())},function(t){!function(n,e,r){"use strict";function i(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function o(t){return"function"==typeof t}function u(t,n,e){t&&!ye(t=e?t:t[mn],Me)&&Ae(t,Me,n)}function c(t){return oe.call(t).slice(8,-1)}function a(t){var n,e;return t==r?t===r?"Undefined":"Null":"string"==typeof(e=(n=jn(t))[Me])?e:c(n)}function s(){for(var t=k(this),n=arguments.length,e=kn(n),r=0,i=De._,o=!1;n>r;)(e[r]=arguments[r++])===i&&(o=!0);return function(){var r,u=this,c=arguments.length,a=0,s=0;if(!o&&!c)return l(t,e,u);if(r=e.slice(),o)for(;n>a;a++)r[a]===i&&(r[a]=arguments[s++]);for(;c>s;)r.push(arguments[s++]);return l(t,r,u)}}function f(t,n,e){if(k(t),~e&&n===r)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}function l(t,n,e){var i=e===r;switch(0|n.length){case 0:return i?t():t.call(e);case 1:return i?t(n[0]):t.call(e,n[0]);case 2:return i?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return i?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return i?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3]);case 5:return i?t(n[0],n[1],n[2],n[3],n[4]):t.call(e,n[0],n[1],n[2],n[3],n[4])}return t.apply(e,n)}function h(t){return me(j(t))}function p(t){return t}function d(){return this}function v(t,n){return ye(t,n)?t[n]:void 0}function g(t){return C(t),ve?de(t).concat(ve(t)):de(t)}function y(t,n){for(var e,r=h(t),i=pe(r),o=i.length,u=0;o>u;)if(r[e=i[u++]]===n)return e}function m(t){return Cn(t).split(",")}function w(t){var n=1==t,e=2==t,i=3==t,o=4==t,u=6==t,c=5==t||u;return function(a){for(var s,l,h=jn(j(this)),p=arguments[1],d=me(h),v=f(a,p,3),g=I(d.length),y=0,m=n?kn(g):e?[]:r;g>y;y++)if((c||y in d)&&(s=d[y],l=v(s,y,h),t))if(n)m[y]=l;else if(l)switch(t){case 3:return!0;case 5:return s;case 6:return y;case 2:m.push(s)}else if(o)return!1;return u?-1:i||o?o:m}}function b(t){return function(n){var e=h(this),r=I(e.length),i=N(arguments[1],r);if(t&&n!=n){for(;r>i;i++)if(E(e[i]))return t||i}else for(;r>i;i++)if((t||i in e)&&e[i]===n)return t||i;return!t&&-1}}function x(t,n){return"function"==typeof t?t:n}function E(t){return t!=t}function O(t){return isNaN(t)?0:ke(t)}function I(t){return t>0?Se(O(t),Ee):0}function N(t,n){var t=O(t);return 0>t?Pe(t+n,0):Se(t,n)}function L(t,n,e){var r=i(n)?function(t){return n[t]}:n;return function(n){return Cn(e?n:this).replace(t,r)}}function P(t){return function(n){var e,i,o=Cn(j(this)),u=O(n),c=o.length;return 0>u||u>=c?t?"":r:(e=o.charCodeAt(u),55296>e||e>56319||u+1===c||(i=o.charCodeAt(u+1))<56320||i>57343?t?o.charAt(u):e:t?o.slice(u,u+2):(e-55296<<10)+(i-56320)+65536)}}function S(t,n,e){if(!t)throw Un(e?n+e:n)}function j(t){if(t==r)throw Un("Function called on null or undefined");return t}function k(t){return S(o(t),t," is not a function!"),t}function C(t){return S(i(t),t," is not an object!"),t}function _(t,n,e){S(t instanceof n,e,": use the 'new' operator!")}function A(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}function F(t,n,e){return t[n]=e,t}function T(t){return Ce?function(n,e,r){return le(n,e,A(t,r))}:F}function q(t){return dn+"("+t+")_"+(++_e+je())[bn](36)}function R(t,n){return Mn&&Mn[t]||(n?Mn:Te)(dn+re+t)}function M(t,n){for(var e in n)Ae(t,e,n[e]);return t}function G(t){!Ce||!e&&ie(t)||le(t,Ge,{configurable:!0,get:d})}function U(t,r,i){var u,c,a,s,l=t&$e,h=l?n:t&Be?n[r]:(n[r]||te)[mn],p=l?ze:ze[r]||(ze[r]={});l&&(i=r);for(u in i)c=!(t&Je)&&h&&u in h&&(!o(h[u])||ie(h[u])),a=(c?h:i)[u],e||!l||o(h[u])?t&Ye&&c?s=f(a,n):t&He&&!e&&h[u]==a?(s=function(t){return this instanceof a?new a(t):a(t)},s[mn]=a[mn]):s=t&Ve&&o(a)?f(ue,a):a:s=i[u],e&&h&&!c&&(l?h[u]=a:delete h[u]&&Ae(h,u,a)),p[u]!=a&&Ae(p,u,s)}function z(t,n){Ae(t,tn,n),Nn in Zn&&Ae(t,Nn,n)}function D(t,n,e,r){t[mn]=ae(r||tr,{next:A(1,e)}),u(t,n+" Iterator")}function W(t,n,r,i){var o=t[mn],c=v(o,tn)||v(o,Nn)||i&&v(o,i)||r;if(e&&(z(o,c),c!==r)){var a=se(c.call(new t));u(a,n+" Iterator",!0),ye(o,Nn)&&z(a,d)}return Ze[n]=c,Ze[n+" Iterator"]=d,c}function J(t,n,e,r,i,o){function u(t){return function(){return new e(this,t)}}D(e,n,r);var c=u(Ke+Qe),a=u(Qe);i==Qe?a=W(t,n,a,"values"):c=W(t,n,c,"entries"),i&&U(Ve+Je*nr,n,{entries:c,keys:o?a:u(Ke),values:a})}function $(t,n){return{value:n,done:!!t}}function B(t){var e=jn(t),r=n[dn],i=(r&&r[In]||Nn)in e;return i||tn in e||ye(Ze,a(e))}function V(t){var e=n[dn],r=t[e&&e[In]||Nn],i=r||t[tn]||Ze[a(t)];return C(i.call(t))}function Y(t,n,e){return e?l(t,n):t(n)}function H(t){var n=!0,e={next:function(){throw 1},"return":function(){n=!1}};e[tn]=d;try{t(e)}catch(r){}return n}function X(t){var n=t["return"];n!==r&&n.call(t)}function K(t,n){try{t(n)}catch(e){throw X(n),e}}function Q(t,n,e,r){K(function(t){for(var i,o=f(e,r,n?2:1);!(i=t.next()).done;)if(Y(o,i.value,n)===!1)return X(t)},V(t))}var Z,tn,nn,en="Object",rn="Function",on="Array",un="String",cn="Number",an="RegExp",sn="Date",fn="Map",ln="Set",hn="WeakMap",pn="WeakSet",dn="Symbol",vn="Promise",gn="Math",yn="Arguments",mn="prototype",wn="constructor",bn="toString",xn=bn+"Tag",En="hasOwnProperty",On="forEach",In="iterator",Nn="@@"+In,Ln="process",Pn="createElement",Sn=n[rn],jn=n[en],kn=n[on],Cn=n[un],_n=n[cn],An=n[an],Fn=(n[sn],n[fn]),Tn=n[ln],qn=n[hn],Rn=n[pn],Mn=n[dn],Gn=n[gn],Un=n.TypeError,zn=n.RangeError,Dn=n.setTimeout,Wn=n.setImmediate,Jn=n.clearImmediate,$n=n.parseInt,Bn=n.isFinite,Vn=n[Ln],Yn=Vn&&Vn.nextTick,Hn=n.document,Xn=Hn&&Hn.documentElement,Kn=(n.navigator,n.define),Qn=n.console||{},Zn=kn[mn],te=jn[mn],ne=Sn[mn],ee=1/0,re=".",ie=f(/./.test,/\[native code\]\s*\}\s*$/,1),oe=te[bn],ue=ne.call,ce=ne.apply,ae=jn.create,se=jn.getPrototypeOf,fe=jn.setPrototypeOf,le=jn.defineProperty,he=(jn.defineProperties,jn.getOwnPropertyDescriptor),pe=jn.keys,de=jn.getOwnPropertyNames,ve=jn.getOwnPropertySymbols,ge=jn.isFrozen,ye=f(ue,te[En],2),me=jn,we=jn.assign||function(t){for(var n=jn(j(t)),e=arguments.length,r=1;e>r;)for(var i,o=me(arguments[r++]),u=pe(o),c=u.length,a=0;c>a;)n[i=u[a++]]=o[i];return n},be=Zn.push,xe=(Zn.unshift,Zn.slice,Zn.splice,Zn.indexOf,Zn[On]),Ee=9007199254740991,Oe=Gn.pow,Ie=Gn.abs,Ne=Gn.ceil,Le=Gn.floor,Pe=Gn.max,Se=Gn.min,je=Gn.random,ke=Gn.trunc||function(t){return(t>0?Le:Ne)(t)},Ce=!!function(){try{return 2==le({},"a",{get:function(){return 2}}).a}catch(t){}}(),_e=0,Ae=T(1),Fe=Mn?F:Ae,Te=Mn||q,qe=R("unscopables"),Re=Zn[qe]||{},Me=R(xn),Ge=R("species"),Ue=c(Vn)==Ln,ze={},De=e?n:ze,We=n.core,Je=1,$e=2,Be=4,Ve=8,Ye=16,He=32;"undefined"!=typeof t&&t.exports?t.exports=ze:o(Kn)&&Kn.amd?Kn(function(){return ze}):nn=!0,(nn||e)&&(ze.noConflict=function(){return n.core=We,ze},n.core=ze),tn=R(In);var Xe=Te("iter"),Ke=1,Qe=2,Ze={},tr={},nr="keys"in Zn&&!("next"in[].keys());z(tr,d),!function(t,e,r,i){ie(Mn)||(Mn=function(n){S(!(this instanceof Mn),dn+" is not a "+wn);var e=q(n),o=Fe(ae(Mn[mn]),t,e);return r[e]=o,Ce&&i&&le(te,e,{configurable:!0,set:function(t){Ae(this,e,t)}}),o},Ae(Mn[mn],bn,function(){return this[t]})),U($e+He,{Symbol:Mn});var o={"for":function(t){return ye(e,t+="")?e[t]:e[t]=Mn(t)},iterator:tn||R(In),keyFor:s.call(y,e),species:Ge,toStringTag:Me=R(xn,!0),unscopables:qe,pure:Te,set:Fe,useSetter:function(){i=!0},useSimple:function(){i=!1}};xe.call(m("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(t){o[t]=R(t)}),U(Be,dn,o),u(Mn,dn),U(Be+Je*!ie(Mn),en,{getOwnPropertyNames:function(t){for(var n,e=de(h(t)),i=[],o=0;e.length>o;)ye(r,n=e[o++])||i.push(n);return i},getOwnPropertySymbols:function(t){for(var n,e=de(h(t)),i=[],o=0;e.length>o;)ye(r,n=e[o++])&&i.push(r[n]);return i}}),u(Gn,gn,!0),u(n.JSON,"JSON",!0)}(Te("tag"),{},{},!0),!function(){var t={assign:we,is:function(t,n){return t===n?0!==t||1/t===1/n:t!=t&&n!=n}};"__proto__"in te&&function(n,e){try{e=f(ue,he(te,"__proto__").set,2),e({},Zn)}catch(r){n=!0}t.setPrototypeOf=fe=fe||function(t,r){return C(t),S(null===r||i(r),r,": can't set as prototype!"),n?t.__proto__=r:e(t,r),t}}(),U(Be,en,t)}(),!function(t){t[Me]=re,c(t)!=re&&Ae(te,bn,function(){return"[object "+a(this)+"]"})}({}),!function(){function t(t,n){var e=jn[t],r=ze[en][t],o=0,u={};if(!r||ie(r)){u[t]=1==n?function(t){return i(t)?e(t):t}:2==n?function(t){return i(t)?e(t):!0}:3==n?function(t){return i(t)?e(t):!1}:4==n?function(t,n){return e(h(t),n)}:function(t){return e(h(t))};try{e(re)}catch(c){o=1}U(Be+Je*o,en,u)}}t("freeze",1),t("seal",1),t("preventExtensions",1),t("isFrozen",2),t("isSealed",2),t("isExtensible",3),t("getOwnPropertyDescriptor",4),t("getPrototypeOf"),t("keys"),t("getOwnPropertyNames")}(),!function(t){t in ne||Ce&&le(ne,t,{configurable:!0,get:function(){var n=Cn(this).match(/^\s*function ([^ (]*)/),e=n?n[1]:"";return ye(this,t)||le(this,t,A(5,e)),e},set:function(n){ye(this,t)||le(this,t,A(0,n))}})}("name"),_n("0o1")&&_n("0b1")||function(t,e){function r(t){if(i(t)&&(t=u(t)),"string"==typeof t&&t.length>2&&48==t.charCodeAt(0)){var n=!1;switch(t.charCodeAt(1)){case 66:case 98:n=!0;case 79:case 111:return $n(t.slice(2),n?2:8)}}return+t}function u(t){var n,e;if(o(n=t.valueOf)&&!i(e=n.call(t)))return e;if(o(n=t[bn])&&!i(e=n.call(t)))return e;throw Un("Can't convert object to number")}_n=function c(n){return this instanceof c?new t(r(n)):r(n)},xe.call(Ce?de(t):m("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY"),function(n){n in _n||le(_n,n,he(t,n))}),_n[mn]=e,e[wn]=_n,Ae(n,cn,_n)}(_n,_n[mn]),!function(t){U(Be,cn,{EPSILON:Oe(2,-52),isFinite:function(t){return"number"==typeof t&&Bn(t)},isInteger:t,isNaN:E,isSafeInteger:function(n){return t(n)&&Ie(n)<=Ee},MAX_SAFE_INTEGER:Ee,MIN_SAFE_INTEGER:-Ee,parseFloat:parseFloat,parseInt:$n})}(_n.isInteger||function(t){return!i(t)&&Bn(t)&&Le(t)===t}),!function(){function t(n){return Bn(n=+n)&&0!=n?0>n?-t(-n):i(n+o(n*n+1)):n}function n(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:r(t)-1}var e=Gn.E,r=Gn.exp,i=Gn.log,o=Gn.sqrt,u=Gn.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1};U(Be,gn,{acosh:function(t){return(t=+t)<1?0/0:Bn(t)?i(t/e+o(t+1)*o(t-1)/e)+1:t},asinh:t,atanh:function(t){return 0==(t=+t)?t:i((1+t)/(1-t))/2},cbrt:function(t){return u(t=+t)*Oe(Ie(t),1/3)},clz32:function(t){return(t>>>=0)?32-t[bn](2).length:32},cosh:function(t){return(r(t=+t)+r(-t))/2},expm1:n,fround:function(t){return new Float32Array([t])[0]},hypot:function(){for(var t,n=0,e=arguments.length,r=e,i=kn(e),u=-ee;e--;){if(t=i[e]=+arguments[e],t==ee||t==-ee)return ee;t>u&&(u=t)}for(u=t||1;r--;)n+=Oe(i[r]/u,2);return u*o(n)},imul:function(t,n){var e=65535,r=+t,i=+n,o=e&r,u=e&i;return 0|o*u+((e&r>>>16)*u+o*(e&i>>>16)<<16>>>0)},log1p:function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:i(1+t)},log10:function(t){return i(t)/Gn.LN10},log2:function(t){return i(t)/Gn.LN2},sign:u,sinh:function(t){return Ie(t=+t)<1?(n(t)-n(-t))/2:(r(t-1)-r(-t-1))*(e/2)},tanh:function(t){var e=n(t=+t),i=n(-t);return e==ee?1:i==ee?-1:(e-i)/(r(t)+r(-t))},trunc:ke})}(),!function(t){function n(t){if(c(t)==an)throw Un()}U(Be,un,{fromCodePoint:function(){for(var n,e=[],r=arguments.length,i=0;r>i;){if(n=+arguments[i++],N(n,1114111)!==n)throw zn(n+" is not a valid code point");e.push(65536>n?t(n):t(((n-=65536)>>10)+55296,n%1024+56320))}return e.join("")},raw:function(t){for(var n=h(t.raw),e=I(n.length),r=arguments.length,i=[],o=0;e>o;)i.push(Cn(n[o++])),r>o&&i.push(Cn(arguments[o]));return i.join("")}}),U(Ve,un,{codePointAt:P(!1),endsWith:function(t){n(t);var e=Cn(j(this)),i=arguments[1],o=I(e.length),u=i===r?o:Se(I(i),o);return t+="",e.slice(u-t.length,u)===t},includes:function(t){return n(t),!!~Cn(j(this)).indexOf(t,arguments[1])},repeat:function(t){var n=Cn(j(this)),e="",r=O(t);if(0>r||r==ee)throw zn("Count can't be negative");for(;r>0;(r>>>=1)&&(n+=n))1&r&&(e+=n);return e},startsWith:function(t){n(t);var e=Cn(j(this)),r=I(Se(arguments[1],e.length));return t+="",e.slice(r,r+t.length)===t}})}(Cn.fromCharCode),!function(){U(Be+Je*H(kn.from),on,{from:function(t){var n,e,i,o=jn(j(t)),u=arguments[1],c=u!==r,a=c?f(u,arguments[2],2):r,s=0;if(B(o))e=new(x(this,kn)),K(function(t){for(;!(i=t.next()).done;s++)e[s]=c?a(i.value,s):i.value},V(o));else for(e=new(x(this,kn))(n=I(o.length));n>s;s++)e[s]=c?a(o[s],s):o[s];return e.length=s,e}}),U(Be,on,{of:function(){for(var t=0,n=arguments.length,e=new(x(this,kn))(n);n>t;)e[t]=arguments[t++];return e.length=n,e}}),G(kn)}(),!function(){U(Ve,on,{copyWithin:function(t,n){var e=jn(j(this)),i=I(e.length),o=N(t,i),u=N(n,i),c=arguments[2],a=c===r?i:N(c,i),s=Se(a-u,i-o),f=1;for(o>u&&u+s>o&&(f=-1,u=u+s-1,o=o+s-1);s-->0;)u in e?e[o]=e[u]:delete e[o],o+=f,u+=f;return e},fill:function(t){for(var n=jn(j(this)),e=I(n.length),i=N(arguments[1],e),o=arguments[2],u=o===r?e:N(o,e);u>i;)n[i++]=t;return n},find:w(5),findIndex:w(6)}),e&&(xe.call(m("find,findIndex,fill,copyWithin,entries,keys,values"),function(t){Re[t]=!0}),qe in Zn||Ae(Zn,qe,Re))}(),!function(t){J(kn,on,function(t,n){Fe(this,Xe,{o:h(t),i:0,k:n})},function(){var t=this[Xe],n=t.o,e=t.k,i=t.i++;return!n||i>=n.length?(t.o=r,$(1)):e==Ke?$(0,i):e==Qe?$(0,n[i]):$(0,[i,n[i]])},Qe),Ze[yn]=Ze[on],J(Cn,un,function(t){Fe(this,Xe,{o:Cn(t),i:0})},function(){var n,e=this[Xe],r=e.o,i=e.i;return i>=r.length?$(1):(n=t.call(r,i),e.i+=n.length,$(0,n))})}(P(!0)),Ce&&!function(t,e){(function(){try{return"/a/i"==An(/a/g,"i")}catch(t){}})()||(An=function(t,n){return new e(c(t)==an&&n!==r?t.source:t,n)},xe.call(de(e),function(t){t in An||le(An,t,{configurable:!0,get:function(){return e[t]},set:function(n){e[t]=n}})}),t[wn]=An,An[mn]=t,Ae(n,an,An)),"g"!=/./g.flags&&le(t,"flags",{configurable:!0,get:L(/^.*\/(\w*)$/,"$1")}),G(An)}(An[mn],An),o(Wn)&&o(Jn)||function(t){function e(t){if(ye(v,t)){var n=v[t];delete v[t],n()}}function r(t){e(t.data)}var i,u,c,a=n.postMessage,h=n.addEventListener,p=n.MessageChannel,d=0,v={};Wn=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return v[++d]=function(){l(o(t)?t:Sn(t),n)},i(d),d},Jn=function(t){delete v[t]},Ue?i=function(t){Yn(s.call(e,t))}:h&&o(a)&&!n.importScripts?(i=function(t){a(t,"*")},h("message",r,!1)):o(p)?(u=new p,c=u.port2,u.port1.onmessage=r,i=f(c.postMessage,c,1)):i=Hn&&t in Hn[Pn]("script")?function(n){Xn.appendChild(Hn[Pn]("script"))[t]=function(){Xn.removeChild(this),e(n)}}:function(t){Dn(e,0,t)}}("onreadystatechange"),U($e+Ye,{setImmediate:Wn,clearImmediate:Jn}),!function(t,n){o(t)&&o(t.resolve)&&t.resolve(n=new t(function(){}))==n||function(n,e){function u(t){var n;return i(t)&&(n=t.then),o(n)?n:!1}function c(t){var n,r=t[e],i=r.c,o=0;if(r.h)return!0;for(;i.length>o;)if(n=i[o++],n.fail||c(n.P))return!0}function a(t,e){var r=t.c;(e||r.length)&&n(function(){var n=t.p,i=t.v,a=1==t.s,s=0;if(e&&!c(n))Dn(function(){c(n)||(Ue?!Vn.emit("unhandledRejection",i,n):o(Qn.error)&&Qn.error("Unhandled promise rejection",i))},1e3);else for(;r.length>s;)!function(n){var e,r,o=a?n.ok:n.fail;try{o?(a||(t.h=!0),e=o===!0?i:o(i),e===n.P?n.rej(Un(vn+"-chain cycle")):(r=u(e))?r.call(e,n.res,n.rej):n.res(e)):n.rej(i)}catch(c){n.rej(c)}}(r[s++]);r.length=0})}function s(t){var n,e,r=this;if(!r.d){r.d=!0,r=r.r||r;try{(n=u(t))?(e={r:r,d:!1},n.call(t,f(s,e,1),f(l,e,1))):(r.v=t,r.s=1,a(r))}catch(i){l.call(e||{r:r,d:!1},i)}}}function l(t){var n=this;n.d||(n.d=!0,n=n.r||n,n.v=t,n.s=2,a(n,!0))}function h(t){var n=C(t)[Ge];return n!=r?n:t}t=function(n){k(n),_(this,t,vn);var i={p:this,c:[],s:0,d:!1,v:r,h:!1};Ae(this,e,i);try{n(f(s,i,1),f(l,i,1))}catch(o){l.call(i,o)}},M(t[mn],{then:function(n,i){var u=C(C(this)[wn])[Ge],c={ok:o(n)?n:!0,fail:o(i)?i:!1},s=c.P=new(u!=r?u:t)(function(t,n){c.res=k(t),c.rej=k(n)}),f=this[e];return f.c.push(c),f.s&&a(f),s},"catch":function(t){return this.then(r,t)}}),M(t,{all:function(t){var n=h(this),e=[];return new n(function(r,i){Q(t,!1,be,e);var o=e.length,u=kn(o);o?xe.call(e,function(t,e){n.resolve(t).then(function(t){u[e]=t,--o||r(u)},i)}):r(u)})},race:function(t){var n=h(this);return new n(function(e,r){Q(t,!1,function(t){n.resolve(t).then(e,r)})})},reject:function(t){return new(h(this))(function(n,e){e(t)})},resolve:function(t){return i(t)&&e in t&&se(t)===this[mn]?t:new(h(this))(function(n){n(t)})}})}(Yn||Wn,Te("record")),u(t,vn),G(t),U($e+Je*!ie(t),{Promise:t})}(n[vn]),!function(){function t(t,n,i,o,c,a){function s(t,n){return n!=r&&Q(n,c,t[p],t),t}function f(t,n){var r=d[t];e&&(d[t]=function(t,e){var i=r.call(this,0===t?0:t,e);return n?this:i})}var p=c?"set":"add",d=t&&t[mn],m={};if(ie(t)&&(a||!nr&&ye(d,On)&&ye(d,"entries"))){var b,x=t,E=new t,O=E[p](a?{}:-0,1);H(function(n){new t(n)})&&(t=function(e){return _(this,t,n),s(new x,e)},t[mn]=d,e&&(d[wn]=t)),a||E[On](function(t,n){b=1/n===-ee}),b&&(f("delete"),f("has"),c&&f("get")),(b||O!==E)&&f(p,!0)}else t=a?function(e){_(this,t,n),Fe(this,l,w++),s(this,e)}:function(e){var i=this;_(i,t,n),Fe(i,h,ae(null)),Fe(i,y,0),Fe(i,v,r),Fe(i,g,r),s(i,e)},M(M(t[mn],i),o),a||!Ce||le(t[mn],"size",{get:function(){return j(this[y])}});return u(t,n),G(t),m[n]=t,U($e+He+Je*!ie(t),m),a||J(t,n,function(t,n){Fe(this,Xe,{o:t,k:n})},function(){for(var t=this[Xe],n=t.k,e=t.l;e&&e.r;)e=e.p;return t.o&&(t.l=e=e?e.n:t.o[g])?n==Ke?$(0,e.k):n==Qe?$(0,e.v):$(0,[e.k,e.v]):(t.o=r,$(1))},c?Ke+Qe:Qe,!c),t}function n(t,n){if(!i(t))return("string"==typeof t?"S":"P")+t;if(ge(t))return"F";if(!ye(t,l)){if(!n)return"E";Ae(t,l,++w)}return"O"+t[l]}function o(t,e){var r,i=n(e);if("F"!=i)return t[h][i];for(r=t[g];r;r=r.n)if(r.k==e)return r}function c(t,e,i){var u,c,a=o(t,e);return a?a.v=i:(t[v]=a={i:c=n(e,!0),k:e,v:i,p:u=t[v],n:r,r:!1},t[g]||(t[g]=a),u&&(u.n=a),t[y]++,"F"!=c&&(t[h][c]=a)),t}function a(t,n,e){return ge(C(n))?s(t).set(n,e):(ye(n,p)||Ae(n,p,{}),n[p][t[l]]=e),t}function s(t){return t[d]||Ae(t,d,new Fn)[d]}var l=Te("uid"),h=Te("O1"),p=Te("weak"),d=Te("leak"),v=Te("last"),g=Te("first"),y=Ce?Te("size"):"size",w=0,b={},x={clear:function(){for(var t=this,n=t[h],e=t[g];e;e=e.n)e.r=!0,e.p&&(e.p=e.p.n=r),delete n[e.i];t[g]=t[v]=r,t[y]=0},"delete":function(t){var n=this,e=o(n,t);if(e){var r=e.n,i=e.p;delete n[h][e.i],e.r=!0,i&&(i.n=r),r&&(r.p=i),n[g]==e&&(n[g]=r),n[v]==e&&(n[v]=i),n[y]--}return!!e},forEach:function(t){for(var n,e=f(t,arguments[1],3);n=n?n.n:this[g];)for(e(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!o(this,t)}};Fn=t(Fn,fn,{get:function(t){var n=o(this,t);return n&&n.v},set:function(t,n){return c(this,0===t?0:t,n)}},x,!0),Tn=t(Tn,ln,{add:function(t){return c(this,t=0===t?0:t,t)}},x);var E={"delete":function(t){return i(t)?ge(t)?s(this)["delete"](t):ye(t,p)&&ye(t[p],this[l])&&delete t[p][this[l]]:!1},has:function(t){return i(t)?ge(t)?s(this).has(t):ye(t,p)&&ye(t[p],this[l]):!1}};qn=t(qn,hn,{get:function(t){if(i(t)){if(ge(t))return s(this).get(t);if(ye(t,p))return t[p][this[l]]}},set:function(t,n){return a(this,t,n)}},E,!0,!0),e&&7!=(new qn).set(jn.freeze(b),7).get(b)&&xe.call(m("delete,has,get,set"),function(t){var n=qn[mn][t];qn[mn][t]=function(e,r){if(i(e)&&ge(e)){var o=s(this)[t](e,r);return"set"==t?this:o}return n.call(this,e,r)}}),Rn=t(Rn,pn,{add:function(t){return a(this,t,!0)}},E,!1,!0)}(),!function(){function t(t){var n,e=[];for(n in t)e.push(n);Fe(this,Xe,{o:t,a:e,i:0})}function n(t){return function(n){C(n);try{return t.apply(r,arguments),!0}catch(e){return!1}}}function e(t,n){var o,u=arguments.length<3?t:arguments[2],c=he(C(t),n);return c?ye(c,"value")?c.value:c.get===r?r:c.get.call(u):i(o=se(t))?e(o,n,u):r -}function o(t,n,e){var u,c,a=arguments.length<4?t:arguments[3],s=he(C(t),n);if(!s){if(i(c=se(t)))return o(c,n,e,a);s=A(0)}return ye(s,"value")?s.writable!==!1&&i(a)?(u=he(a,n)||A(0),u.value=e,le(a,n,u),!0):!1:s.set===r?!1:(s.set.call(a,e),!0)}D(t,en,function(){var t,n=this[Xe],e=n.a;do if(n.i>=e.length)return $(1);while(!((t=e[n.i++])in n.o));return $(0,t)});var u=jn.isExtensible||p,c={apply:f(ue,ce,3),construct:function(t,n){var e=k(arguments.length<3?t:arguments[2])[mn],r=ae(i(e)?e:te),o=ce.call(t,r,n);return i(o)?o:r},defineProperty:n(le),deleteProperty:function(t,n){var e=he(C(t),n);return e&&!e.configurable?!1:delete t[n]},enumerate:function(n){return new t(C(n))},get:e,getOwnPropertyDescriptor:function(t,n){return he(C(t),n)},getPrototypeOf:function(t){return se(C(t))},has:function(t,n){return n in t},isExtensible:function(t){return!!u(C(t))},ownKeys:g,preventExtensions:n(jn.preventExtensions||p),set:o};fe&&(c.setPrototypeOf=function(t,n){return fe(C(t),n),!0}),U($e,{Reflect:{}}),U(Be,"Reflect",c)}(),!function(){function t(t){return function(n){var e,r=h(n),i=pe(n),o=i.length,u=0,c=kn(o);if(t)for(;o>u;)c[u]=[e=i[u++],r[e]];else for(;o>u;)c[u]=r[i[u++]];return c}}U(Ve,on,{includes:b(!0)}),U(Ve,un,{at:P(!0)}),U(Be,en,{getOwnPropertyDescriptors:function(t){var n=h(t),e={};return xe.call(g(n),function(t){le(e,t,A(0,he(n,t)))}),e},values:t(!1),entries:t(!0)}),U(Be,an,{escape:L(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",!0)})}(),!function(t){function n(t){if(t){var n=t[mn];Ae(n,Z,n.get),Ae(n,e,n.set),Ae(n,r,n["delete"])}}Z=R(t+"Get",!0);var e=R(t+ln,!0),r=R(t+"Delete",!0);U(Be,dn,{referenceGet:Z,referenceSet:e,referenceDelete:r}),Ae(ne,Z,d),n(Fn),n(qn)}("reference"),!function(t){function n(n,e){xe.call(m(n),function(n){n in Zn&&(t[n]=f(ue,Zn[n],e))})}n("pop,reverse,shift,keys,values,entries",1),n("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),n("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill,turn"),U(Be,on,t)}({}),!function(t){!e||!t||tn in t[mn]||Ae(t[mn],tn,Ze[on]),Ze.NodeList=Ze[on]}(n.NodeList)}("undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),!0)}])}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.FakeRest=t():e.FakeRest=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=n(4)["default"],o=n(3)["default"];r(t,"__esModule",{value:!0});var i=n(16),u=o(i),s=n(2),a=o(s);t["default"]={Server:u["default"],Collection:a["default"]},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return isNaN(e=+e)?0:(e>0?y:p)(e)}function o(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function i(e,t,n){return e[t]=n,e}function u(e){return m?function(t,n,r){return O.setDesc(t,n,o(e,r))}:i}function s(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function a(e){return"function"==typeof e}function c(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}var f="undefined"!=typeof self?self:Function("return this")(),l={},d=Object.defineProperty,h={}.hasOwnProperty,p=Math.ceil,y=Math.floor,v=Math.max,g=Math.min,m=!!function(){try{return 2==d({},"a",{get:function(){return 2}}).a}catch(e){}}(),b=u(1),O=e.exports=n(28)({g:f,core:l,html:f.document&&document.documentElement,isObject:s,isFunction:a,it:function(e){return e},that:function(){return this},toInteger:r,toLength:function(e){return e>0?g(r(e),9007199254740991):0},toIndex:function(e,t){return e=r(e),0>e?v(e+t,0):g(e,t)},has:function(e,t){return h.call(e,t)},create:Object.create,getProto:Object.getPrototypeOf,DESC:m,desc:o,getDesc:Object.getOwnPropertyDescriptor,setDesc:d,setDescs:Object.defineProperties,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:c,ES5Object:Object,toObject:function(e){return O.ES5Object(c(e))},hide:b,def:u(0),set:f.Symbol?i:b,each:[].forEach});"undefined"!=typeof __e&&(__e=l),"undefined"!=typeof __g&&(__g=f)},function(e,t,n){"use strict";function r(e,t){if("function"==typeof t)return e.filter(t);if(t instanceof Object)return e.filter(function(e){for(var n in t)if(e[n]!=t[n])return!1;return!0});throw new Error("Unsupported filter type")}function o(e,t){if("function"==typeof t)return e.sort(t);if("string"==typeof t)return e.sort(function(e,n){return e[t]>n[t]?1:e[t]t[n]?r:e[n]>>0;if(0===n)return-1;if("function"!=typeof e||"[object Function]"!==Object.prototype.toString.call(e))throw new TypeError("Array#findIndex: predicate must be a function");for(var r=arguments.length>1?arguments[1]:void 0,o=0;n>o;o++)if(e.call(r,t[o],o,t))return o;return-1};if(Object.defineProperty)try{Object.defineProperty(Array.prototype,"findIndex",{value:t,configurable:!0,writable:!0})}catch(n){}Array.prototype.findIndex||(Array.prototype.findIndex=t)}}(this)},function(e,t,n){e.exports={"default":n(15),__esModule:!0}},function(e,t,n){n(17),n(18),n(19),e.exports=n(1).core.getIterator},function(e,t,n){var r=n(1);e.exports=function(e,t,n){return r.setDesc(e,t,n)}},function(e,t,n){n(20),e.exports=n(1).core.Object.keys},function(e,t,n){n(17),n(18),n(19),e.exports=n(1).core.isIterable},function(e,t,n){"use strict";function r(e){if(!e)return{};var t={},n=e.split("&");return n.map(function(e){if(-1===e.indexOf("="))t[e]=!0;else{var n=e.split("="),r=u(n,2),o=r[0],i=r[1];(0===i.indexOf("[")||0===i.indexOf("{"))&&(i=JSON.parse(i)),t[o.trim()]=i}}),t}var o=n(6)["default"],i=n(7)["default"],u=n(8)["default"],s=n(4)["default"],a=n(5)["default"],c=n(9)["default"],f=n(3)["default"];s(t,"__esModule",{value:!0});var l=n(2),d=f(l),h=function(){function e(){var t=void 0===arguments[0]?"":arguments[0];i(this,e),this.baseUrl=t,this.collections={},this.loggingEnabled=!1,this.requestInterceptors=[],this.responseInterceptors=[]}return o(e,[{key:"init",value:function(e){for(var t in e)this.addCollection(t,new d["default"](e[t]))}},{key:"toggleLogging",value:function(){this.loggingEnabled=!this.loggingEnabled}},{key:"addCollection",value:function(e,t){this.collections[e]=t}},{key:"getCollection",value:function(e){return this.collections[e]}},{key:"getCollectionNames",value:function(){return a(this.collections)}},{key:"addRequestInterceptor",value:function(e){this.requestInterceptors.push(e)}},{key:"addResponseInterceptor",value:function(e){this.responseInterceptors.push(e)}},{key:"getCount",value:function(e,t){return this.collections[e].getCount(t)}},{key:"getAll",value:function(e,t){return this.collections[e].getAll(t)}},{key:"getOne",value:function(e,t){return this.collections[e].getOne(t)}},{key:"addOne",value:function(e,t){return this.collections[e].addOne(t)}},{key:"updateOne",value:function(e,t,n){return this.collections[e].updateOne(t,n)}},{key:"removeOne",value:function(e,t){return this.collections[e].removeOne(t)}},{key:"decode",value:function(e){if(e.queryString=decodeURIComponent(e.url.slice(e.url.indexOf("?")+1)),e.params=r(e.queryString),e.requestBody)try{e.json=JSON.parse(e.requestBody)}catch(t){}return this.requestInterceptors.reduce(function(e,t){return t(e)},e)}},{key:"respond",value:function(e,t,n){var r=void 0===arguments[3]?200:arguments[3];t||(t={}),t["Content-Type"]||(t["Content-Type"]="application/json");var o={status:r,headers:t,body:e};return o=this.responseInterceptors.reduce(function(e,t){return t(e)},o),this.log(n,o),n.respond(o.status,o.headers,JSON.stringify(o.body))}},{key:"log",value:function(e,t){this.loggingEnabled&&(console.group?(console.groupCollapsed(e.method,e.url,"(FakeRest)"),console.group("request"),console.log(e.method,e.url),console.log("headers",e.requestHeaders),console.log("body ",e.requestBody),console.groupEnd(),console.group("response",t.status),console.log("headers",t.headers),console.log("body ",t.body),console.groupEnd(),console.groupEnd()):(console.log("FakeRest request ",e.method,e.url,"headers",e.requestHeaders,"body",e.requestBody),console.log("FakeRest response",t.status,"headers",t.headers,"body",t.body)))}},{key:"handle",value:function(e){e=this.decode(e);var t=!0,n=!1,r=void 0;try{for(var o,i=c(this.getCollectionNames());!(t=(o=i.next()).done);t=!0){var u=o.value,s=e.url.match(new RegExp("^"+this.baseUrl+"\\/("+u+")(\\/(\\d+))?(\\?.*)?$"));if(s)if(s[2]){var a=s[3];if("GET"==e.method)try{var f=this.getOne(u,a);return this.respond(f,null,e)}catch(l){return e.respond(404)}if("PUT"==e.method)try{var f=this.updateOne(u,a,e.json);return this.respond(f,null,e)}catch(l){return e.respond(404)}if("DELETE"==e.method)try{var f=this.removeOne(u,a);return this.respond(f,null,e)}catch(l){return e.respond(404)}}else{if("GET"==e.method){var d=e.params,h={};for(var p in d)"range"!==p&&(h[p]=d[p]);var y=this.getCount(u,h),v=void 0,g=void 0,m=void 0;if(y>0){v=this.getAll(u,d);var b=d.range?d.range[0]:0,O=d.range?Math.min(v.length-1+b,d.range[1]):v.length-1;g="items "+b+"-"+O+"/"+y,m=v.length==y?200:206}else v=[],g="items */0",m=200;return this.respond(v,{"Content-Range":g},e,m)}if("POST"==e.method){var x=this.addOne(u,e.json),w=this.baseUrl+"/"+u+"/"+x[this.getCollection(u).identifierName];return this.respond(x,{Location:w},e,201)}}}}catch(j){n=!0,r=j}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}}},{key:"getHandler",value:function(){return this.handle.bind(this)}}]),e}();t["default"]=h,e.exports=t["default"]},function(e,t,n){n(21);var r=n(1),o=n(22).Iterators,i=n(23)("iterator"),u=o.Array,s=r.g.NodeList;!r.FW||!s||i in s.prototype||r.hide(s.prototype,i,u),o.NodeList=u},function(e,t,n){var r=n(1).set,o=n(24)(!0),i=n(25).safe("iter"),u=n(22),s=u.step;n(26)(String,"String",function(e){r(this,i,{o:String(e),i:0})},function(){var e,t=this[i],n=t.o,r=t.i;return r>=n.length?s(1):(e=o(n,r),t.i+=e.length,s(0,e))})},function(e,t,n){var r=n(1).core,o=n(22);r.isIterable=o.is,r.getIterator=o.get},function(e,t,n){var r=n(1),o=n(27),i=r.isObject,u=r.toObject;r.each.call("freeze,seal,preventExtensions,isFrozen,isSealed,isExtensible,getOwnPropertyDescriptor,getPrototypeOf,keys,getOwnPropertyNames".split(","),function(e,t){var n=(r.core.Object||{})[e]||Object[e],s=0,a={};a[e]=0==t?function(e){return i(e)?n(e):e}:1==t?function(e){return i(e)?n(e):e}:2==t?function(e){return i(e)?n(e):e}:3==t?function(e){return i(e)?n(e):!0}:4==t?function(e){return i(e)?n(e):!0}:5==t?function(e){return i(e)?n(e):!1}:6==t?function(e,t){return n(u(e),t)}:7==t?function(e){return n(Object(r.assertDefined(e)))}:8==t?function(e){return n(u(e))}:function(e){return n(u(e))};try{n("z")}catch(c){s=1}o(o.S+o.F*s,"Object",a)})},function(e,t,n){var r=n(1),o=n(29),i=n(25).safe("iter"),u=n(22),s=u.step,a=u.Iterators;n(26)(Array,"Array",function(e,t){r.set(this,i,{o:r.toObject(e),i:0,k:t})},function(){var e=this[i],t=e.o,n=e.k,r=e.i++;return!t||r>=t.length?(e.o=void 0,s(1)):"keys"==n?s(0,r):"values"==n?s(0,t[r]):s(0,[r,t[r]])},"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";function r(e,t){o.hide(e,s,t),a in[]&&o.hide(e,a,t)}var o=n(1),i=n(30),u=n(31).obj,s=n(23)("iterator"),a="@@iterator",c={},f={};r(f,o.that),e.exports={BUGGY:"keys"in[]&&!("next"in[].keys()),Iterators:c,step:function(e,t){return{value:t,done:!!e}},is:function(e){var t=Object(e),n=o.g.Symbol,r=n&&n.iterator||a;return r in t||s in t||o.has(c,i.classof(t))},get:function(e){var t=o.g.Symbol,n=e[t&&t.iterator||a],r=n||e[s]||c[i.classof(e)];return u(r.call(e))},set:r,create:function(e,t,n,r){e.prototype=o.create(r||f,{next:o.desc(1,n)}),i.set(e,t+" Iterator")}}},function(e,t,n){var r=n(1).g,o={};e.exports=function(e){return o[e]||(o[e]=r.Symbol&&r.Symbol[e]||n(25).safe("Symbol."+e))}},function(e,t,n){var r=n(1);e.exports=function(e){return function(t,n){var o,i,u=String(r.assertDefined(t)),s=r.toInteger(n),a=u.length;return 0>s||s>=a?e?"":void 0:(o=u.charCodeAt(s),55296>o||o>56319||s+1===a||(i=u.charCodeAt(s+1))<56320||i>57343?e?u.charAt(s):o:e?u.slice(s,s+2):(o-55296<<10)+(i-56320)+65536)}}},function(e,t,n){function r(e){return"Symbol(".concat(void 0===e?"":e,")_",(++o+Math.random()).toString(36))}var o=0;r.safe=n(1).g.Symbol||r,e.exports=r},function(e,t,n){var r=n(27),o=n(32),i=n(1),u=n(30),s=n(22),a=n(23)("iterator"),c="@@iterator",f="keys",l="values",d=s.Iterators;e.exports=function(e,t,n,h,p,y,v){function g(e){function t(t){return new n(t,e)}switch(e){case f:return function(){return t(this)};case l:return function(){return t(this)}}return function(){return t(this)}}s.create(n,t,h);var m,b,O=t+" Iterator",x=e.prototype,w=x[a]||x[c]||p&&x[p],j=w||g(p);if(w){var k=i.getProto(j.call(new e));u.set(k,O,!0),i.FW&&i.has(x,c)&&s.set(k,i.that)}if(i.FW&&s.set(x,j),d[t]=j,d[O]=i.that,p)if(m={keys:y?j:g(f),values:p==l?j:g(l),entries:p!=l?j:g("entries")},v)for(b in m)b in x||o(x,b,m[b]);else r(r.P+r.F*s.BUGGY,t,m)}},function(e,t,n){function r(e,t){return function(){return e.apply(t,arguments)}}function o(e,t,n){var i,c,f,l,d=e&o.G,h=e&o.P,p=d?u:e&o.S?u[t]:(u[t]||{}).prototype,y=d?s:s[t]||(s[t]={});d&&(n=t);for(i in n)c=!(e&o.F)&&p&&i in p,c&&i in y||(f=c?p[i]:n[i],d&&!a(p[i])?l=n[i]:e&o.B&&c?l=r(f,u):e&o.W&&p[i]==f?!function(e){l=function(t){return this instanceof e?new e(t):e(t)},l.prototype=e.prototype}(f):l=h&&a(f)?r(Function.call,f):f,y[i]=l,h&&((y.prototype||(y.prototype={}))[i]=f))}var i=n(1),u=i.g,s=i.core,a=i.isFunction;o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,e.exports=o},function(e,t,n){e.exports=function(e){return e.FW=!1,e.path=e.core,e}},function(e,t,n){var r=n(1),o=n(23)("unscopables");!r.FW||o in[]||r.hide(Array.prototype,o,{}),e.exports=function(e){r.FW&&([][o][e]=!0)}},function(e,t,n){function r(e){return u.call(e).slice(8,-1)}var o=n(1),i=n(23)("toStringTag"),u={}.toString;r.classof=function(e){var t,n;return void 0==e?void 0===e?"Undefined":"Null":"string"==typeof(n=(t=Object(e))[i])?n:r(t)},r.set=function(e,t,n){e&&!o.has(e=n?e:e.prototype,i)&&o.hide(e,i,t)},e.exports=r},function(e,t,n){function r(e,t,n){if(!e)throw TypeError(n?t+n:t)}var o=n(1);r.def=o.assertDefined,r.fn=function(e){if(!o.isFunction(e))throw TypeError(e+" is not a function!");return e},r.obj=function(e){if(!o.isObject(e))throw TypeError(e+" is not an object!");return e},r.inst=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e},e.exports=r},function(e,t,n){e.exports=n(1).hide}])}); \ No newline at end of file