text: /**
  * @author Jason Dobry <jason.dobry@gmail.com>
  * @file js-data-http.min.js
  * @version 1.2.1 - Homepage <http://www.js-data.io/docs/dshttpadapter>
  * @copyright (c) 2014 Jason Dobry
  * @license MIT <https://github.com/js-data/js-data-http/blob/master/LICENSE>
  *
  * @overview My Adapter.
  */
  
  !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.DSHttpAdapter=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){b.exports=a("./lib/axios")},{"./lib/axios":3}],2:[function(a,b){var c=a("./../defaults"),d=a("./../utils"),e=a("./../helpers/buildUrl"),f=a("./../helpers/cookies"),g=a("./../helpers/parseHeaders"),h=a("./../helpers/transformData"),i=a("./../helpers/urlIsSameOrigin");b.exports=function(a,b,j){var k=h(j.data,j.headers,j.transformRequest),l=d.merge(c.headers.common,c.headers[j.method]||{},j.headers||{});d.isFormData(k)&&delete l["Content-Type"];var m=new(XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP");m.open(j.method.toUpperCase(),e(j.url,j.params),!0),m.onreadystatechange=function(){if(m&&4===m.readyState){var c=g(m.getAllResponseHeaders()),d={data:h(m.responseText,c,j.transformResponse),status:m.status,headers:c,config:j};(m.status>=200&&m.status<300?a:b)(d),m=null}};var n=i(j.url)?f.read(j.xsrfCookieName||c.xsrfCookieName):void 0;if(n&&(l[j.xsrfHeaderName||c.xsrfHeaderName]=n),d.forEach(l,function(a,b){k||"content-type"!==b.toLowerCase()?m.setRequestHeader(b,a):delete l[b]}),j.withCredentials&&(m.withCredentials=!0),j.responseType)try{m.responseType=j.responseType}catch(o){if("json"!==m.responseType)throw o}d.isArrayBuffer(k)&&(k=new DataView(k)),m.send(k)}},{"./../defaults":6,"./../helpers/buildUrl":7,"./../helpers/cookies":8,"./../helpers/parseHeaders":10,"./../helpers/transformData":12,"./../helpers/urlIsSameOrigin":13,"./../utils":14}],3:[function(a,b){function c(){f.forEach(arguments,function(a){j[a]=function(b,c){return j(f.merge(c||{},{method:a,url:b}))}})}function d(){f.forEach(arguments,function(a){j[a]=function(b,c,d){return j(f.merge(d||{},{method:a,url:b,data:c}))}})}var e=a("./defaults"),f=a("./utils"),g=a("./helpers/deprecatedMethod"),h=a("./core/dispatchRequest"),i=a("./core/InterceptorManager");a("es6-promise").polyfill();var j=b.exports=function k(a){a=f.merge({method:"get",headers:{},transformRequest:e.transformRequest,transformResponse:e.transformResponse},a),a.withCredentials=a.withCredentials||e.withCredentials;var b=[h,void 0],c=Promise.resolve(a);for(k.interceptors.request.forEach(function(a){b.unshift(a.fulfilled,a.rejected)}),k.interceptors.response.forEach(function(a){b.push(a.fulfilled,a.rejected)});b.length;)c=c.then(b.shift(),b.shift());return c.success=function(a){return g("success","then","https://github.com/mzabriskie/axios/blob/master/README.md#response-api"),c.then(function(b){a(b.data,b.status,b.headers,b.config)}),c},c.error=function(a){return g("error","catch","https://github.com/mzabriskie/axios/blob/master/README.md#response-api"),c.then(null,function(b){a(b.data,b.status,b.headers,b.config)}),c},c};j.defaults=e,j.all=function(a){return Promise.all(a)},j.spread=a("./helpers/spread"),j.interceptors={request:new i,response:new i},c("delete","get","head"),d("post","put","patch")},{"./core/InterceptorManager":4,"./core/dispatchRequest":5,"./defaults":6,"./helpers/deprecatedMethod":9,"./helpers/spread":11,"./utils":14,"es6-promise":15}],4:[function(a,b){"use strict";function c(){this.handlers=[]}var d=a("./../utils");c.prototype.use=function(a,b){return this.handlers.push({fulfilled:a,rejected:b}),this.handlers.length-1},c.prototype.eject=function(a){this.handlers[a]&&(this.handlers[a]=null)},c.prototype.forEach=function(a){d.forEach(this.handlers,function(b){null!==b&&a(b)})},b.exports=c},{"./../utils":14}],5:[function(a,b){(function(c){"use strict";var d=a("es6-promise").Promise;b.exports=function(b){return new d(function(d,e){try{"undefined"!=typeof window?a("../adapters/xhr")(d,e,b):"undefined"!=typeof c&&a("../adapters/http")(d,e,b)}catch(f){e(f)}})}}).call(this,a("_process"))},{"../adapters/http":2,"../adapters/xhr":2,_process:16,"es6-promise":15}],6:[function(a,b){"use strict";var c=a("./utils"),d=/^\s*(\[|\{[^\{])/,e=/[\}\]]\s*$/,f=/^\)\]\}',?\n/,g={"Content-Type":"application/x-www-form-urlencoded"};b.exports={transformRequest:[function(a,b){return c.isArrayBuffer(a)?a:c.isArrayBufferView(a)?a.buffer:!c.isObject(a)||c.isFile(a)||c.isBlob(a)?a:(!c.isUndefined(b)&&c.isUndefined(b["Content-Type"])&&(b["Content-Type"]="application/json;charset=utf-8"),JSON.stringify(a))}],transformResponse:[function(a){return"string"==typeof a&&(a=a.replace(f,""),d.test(a)&&e.test(a)&&(a=JSON.parse(a))),a}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:c.merge(g),post:c.merge(g),put:c.merge(g)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"}},{"./utils":14}],7:[function(a,b){"use strict";function c(a){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}var d=a("./../utils");b.exports=function(a,b){if(!b)return a;var e=[];return d.forEach(b,function(a,b){null!==a&&"undefined"!=typeof a&&(d.isArray(a)||(a=[a]),d.forEach(a,function(a){d.isDate(a)?a=a.toISOString():d.isObject(a)&&(a=JSON.stringify(a)),e.push(c(b)+"="+c(a))}))}),e.length>0&&(a+=(-1===a.indexOf("?")?"?":"&")+e.join("&")),a}},{"./../utils":14}],8:[function(a,b){"use strict";var c=a("./../utils");b.exports={write:function(a,b,d,e,f,g){var h=[];h.push(a+"="+encodeURIComponent(b)),c.isNumber(d)&&h.push("expires="+new Date(d).toGMTString()),c.isString(e)&&h.push("path="+e),c.isString(f)&&h.push("domain="+f),g===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(a){var b=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return b?decodeURIComponent(b[3]):null},remove:function(a){this.write(a,"",Date.now()-864e5)}}},{"./../utils":14}],9:[function(a,b){"use strict";b.exports=function(a,b,c){try{console.warn("DEPRECATED method `"+a+"`."+(b?" Use `"+b+"` instead.":"")+" This method will be removed in a future release."),c&&console.warn("For more information about usage see "+c)}catch(d){}}},{}],10:[function(a,b){"use strict";var c=a("./../utils");b.exports=function(a){var b,d,e,f={};return a?(c.forEach(a.split("\n"),function(a){e=a.indexOf(":"),b=c.trim(a.substr(0,e)).toLowerCase(),d=c.trim(a.substr(e+1)),b&&(f[b]=f[b]?f[b]+", "+d:d)}),f):f}},{"./../utils":14}],11:[function(a,b){b.exports=function(a){return function(b){a.apply(null,b)}}},{}],12:[function(a,b){"use strict";var c=a("./../utils");b.exports=function(a,b,d){return c.forEach(d,function(c){a=c(a,b)}),a}},{"./../utils":14}],13:[function(a,b){"use strict";function c(a){var b=a;return d&&(f.setAttribute("href",b),b=f.href),f.setAttribute("href",b),{href:f.href,protocol:f.protocol?f.protocol.replace(/:$/,""):"",host:f.host,search:f.search?f.search.replace(/^\?/,""):"",hash:f.hash?f.hash.replace(/^#/,""):"",hostname:f.hostname,port:f.port,pathname:"/"===f.pathname.charAt(0)?f.pathname:"/"+f.pathname}}var d=/(msie|trident)/i.test(navigator.userAgent),e=a("./../utils"),f=document.createElement("a"),g=c(window.location.href);b.exports=function(a){var b=e.isString(a)?c(a):a;return b.protocol===g.protocol&&b.host===g.host}},{"./../utils":14}],14:[function(a,b){function c(a){return"[object Array]"===q.call(a)}function d(a){return"[object ArrayBuffer]"===q.call(a)}function e(a){return"[object FormData]"===q.call(a)}function f(a){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(a):a&&a.buffer&&a.buffer instanceof ArrayBuffer}function g(a){return"string"==typeof a}function h(a){return"number"==typeof a}function i(a){return"undefined"==typeof a}function j(a){return null!==a&&"object"==typeof a}function k(a){return"[object Date]"===q.call(a)}function l(a){return"[object File]"===q.call(a)}function m(a){return"[object Blob]"===q.call(a)}function n(a){return a.replace(/^\s*/,"").replace(/\s*$/,"")}function o(a,b){if(null!==a&&"undefined"!=typeof a){var c=a.constructor===Array||"function"==typeof a.callee;if("object"==typeof a||c||(a=[a]),c)for(var d=0,e=a.length;e>d;d++)b.call(null,a[d],d,a);else for(var f in a)a.hasOwnProperty(f)&&b.call(null,a[f],f,a)}}function p(){var a={};return o(arguments,function(b){o(b,function(b,c){a[c]=b})}),a}var q=Object.prototype.toString;b.exports={isArray:c,isArrayBuffer:d,isFormData:e,isArrayBufferView:f,isString:g,isNumber:h,isObject:j,isUndefined:i,isDate:k,isFile:l,isBlob:m,forEach:o,merge:p,trim:n}},{}],15:[function(b,c){(function(b,d){(function(){"use strict";function e(a){return"function"==typeof a||"object"==typeof a&&null!==a}function f(a){return"function"==typeof a}function g(a){return"object"==typeof a&&null!==a}function h(){}function i(){return function(){b.nextTick(m)}}function j(){var a=0,b=new P(m),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function k(){var a=new MessageChannel;return a.port1.onmessage=m,function(){a.port2.postMessage(0)}}function l(){return function(){setTimeout(m,1)}}function m(){for(var a=0;M>a;a+=2){var b=R[a],c=R[a+1];b(c),R[a]=void 0,R[a+1]=void 0}M=0}function n(){}function o(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function q(a){try{return a.then}catch(b){return V.error=b,V}}function r(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function s(a,b,c){N(function(a){var d=!1,e=r(c,b,function(c){d||(d=!0,b!==c?v(a,c):x(a,c))},function(b){d||(d=!0,y(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,y(a,e))},a)}function t(a,b){b._state===T?x(a,b._result):a._state===U?y(a,b._result):z(b,void 0,function(b){v(a,b)},function(b){y(a,b)})}function u(a,b){if(b.constructor===a.constructor)t(a,b);else{var c=q(b);c===V?y(a,V.error):void 0===c?x(a,b):f(c)?s(a,b,c):x(a,b)}}function v(a,b){a===b?y(a,o()):e(b)?u(a,b):x(a,b)}function w(a){a._onerror&&a._onerror(a._result),A(a)}function x(a,b){a._state===S&&(a._result=b,a._state=T,0===a._subscribers.length||N(A,a))}function y(a,b){a._state===S&&(a._state=U,a._result=b,N(w,a))}function z(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+T]=c,e[f+U]=d,0===f&&a._state&&N(A,a)}function A(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?D(c,d,e,f):e(f);a._subscribers.length=0}}function B(){this.error=null}function C(a,b){try{return a(b)}catch(c){return W.error=c,W}}function D(a,b,c,d){var e,g,h,i,j=f(c);if(j){if(e=C(c,d),e===W?(i=!0,g=e.error,e=null):h=!0,b===e)return void y(b,p())}else e=d,h=!0;b._state!==S||(j&&h?v(b,e):i?y(b,g):a===T?x(b,e):a===U&&y(b,e))}function E(a,b){try{b(function(b){v(a,b)},function(b){y(a,b)})}catch(c){y(a,c)}}function F(a,b,c,d){this._instanceConstructor=a,this.promise=new a(n,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&x(this.promise,this._result))):y(this.promise,this._validationError())}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function I(a){this._id=ab++,this._state=void 0,this._result=void 0,this._subscribers=[],n!==a&&(f(a)||G(),this instanceof I||H(),E(this,a))}var J;J=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var K,L=J,M=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return h.prototype=a,new h},0),N=function(a,b){R[M]=a,R[M+1]=b,M+=2,2===M&&K()},O="undefined"!=typeof window?window:{},P=O.MutationObserver||O.WebKitMutationObserver,Q="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,R=new Array(1e3);K="undefined"!=typeof b&&"[object process]"==={}.toString.call(b)?i():P?j():Q?k():l();var S=void 0,T=1,U=2,V=new B,W=new B;F.prototype._validateInput=function(a){return L(a)},F.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},F.prototype._init=function(){this._result=new Array(this.length)};var X=F;F.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===S&&a>d;d++)this._eachEntry(c[d],d)},F.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;g(a)?a.constructor===c&&a._state!==S?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(T,b,a))},F.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===S&&(this._remaining--,this._abortOnReject&&a===U?y(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&x(d,this._result)},F.prototype._makeResult=function(a,b,c){return c},F.prototype._willSettleAt=function(a,b){var c=this;z(a,void 0,function(a){c._settledAt(T,b,a)},function(a){c._settledAt(U,b,a)})};var Y=function(a,b){return new X(this,a,!0,b).promise},Z=function(a,b){function c(a){v(f,a)}function d(a){y(f,a)}var e=this,f=new e(n,b);if(!L(a))return y(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===S&&g>h;h++)z(e.resolve(a[h]),void 0,c,d);return f},$=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(n,b);return v(d,a),d},_=function(a,b){var c=this,d=new c(n,b);return y(d,a),d},ab=0,bb=I;I.all=Y,I.race=Z,I.resolve=$,I.reject=_,I.prototype={constructor:I,then:function(a,b){var c=this,d=c._state;if(d===T&&!a||d===U&&!b)return this;var e=new this.constructor(n),f=c._result;if(d){var g=arguments[d-1];N(function(){D(d,e,g,f)})}else z(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var cb=function(){var a;a="undefined"!=typeof d?d:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),f(b)}();b||(a.Promise=bb)},db={Promise:bb,polyfill:cb};"function"==typeof a&&a.amd?a(function(){return db}):"undefined"!=typeof c&&c.exports?c.exports=db:"undefined"!=typeof this&&(this.ES6Promise=db)}).call(this)}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:16}],16:[function(a,b){function c(){if(!g){g=!0;for(var a,b=f.length;b;){a=f,f=[];for(var c=-1;++c<b;)a[c]();b=f.length}g=!1}}function d(){}var e=b.exports={},f=[],g=!1;e.nextTick=function(a){f.push(a),g||setTimeout(c,0)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.on=d,e.addListener=d,e.once=d,e.off=d,e.removeListener=d,e.removeAllListeners=d,e.emit=d,e.binding=function(){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},{}],17:[function(a,b){function c(){}function d(a){this.defaults=new c,h(this.defaults,a)}var e;try{e=a("js-data")}catch(f){}if(!e)try{e=window.JSData}catch(f){}if(!e)throw new Error("js-data must be loaded!");var g=e.DSUtils,h=e.DSUtils.deepMixIn,i=a("axios"),j=g.Promise,k=c.prototype;k.queryTransform=function(a,b){return b},k.basePath="",k.forceTrailingSlash="",k.httpConfig={},k.log=console?function(a,b){console["function"==typeof console.info?"info":"log"](a,b)}:function(){},k.error=console?function(a,b){console["function"==typeof console.error?"error":"log"](a,b)}:function(){},k.deserialize=function(a,b){return b&&"data"in b?b.data:b},k.serialize=function(a,b){return b};var l=d.prototype;l.getPath=function(a,b,c,d){var e=this;d=d||{};var f=[d.basePath||e.defaults.basePath||b.basePath,b.getEndpoint(g.isString(c)||g.isNumber(c)||"create"===a?c:null,d)];return("find"===a||"update"===a||"destroy"===a)&&f.push(c),g.makePath.apply(g,f)},l.HTTP=function(a){function b(a){var b=d.toUTCString()+" - "+a.config.method.toUpperCase()+" "+a.config.url+" - "+a.status+" "+((new Date).getTime()-d.getTime())+"ms";if(a.status>=200&&a.status<300)return c.defaults.log&&c.defaults.log(b,a),a;throw c.defaults.error&&c.defaults.error("FAILED: "+b,a),a}var c=this,d=new Date;a=g.copy(a),a=h(a,c.defaults.httpConfig),c.defaults.forceTrailingSlash&&"/"!==a.url[a.url.length-1]&&(a.url+="/"),"object"==typeof a.data&&(a.data=g.removeCircular(a.data));var e=a.suffix||c.defaults.suffix;return e&&a.url.substr(a.url.length-e.length)!==e&&(a.url+=e),i(a).then(b,b)},l.GET=function(a,b){return b=b||{},"method"in b||(b.method="get"),this.HTTP(h(b,{url:a}))},l.POST=function(a,b,c){return c=c||{},"method"in c||(c.method="post"),this.HTTP(h(c,{url:a,data:b}))},l.PUT=function(a,b,c){return c=c||{},"method"in c||(c.method="put"),this.HTTP(h(c,{url:a,data:b||{}}))},l.DEL=function(a,b){return b=b||{},"method"in b||(b.method="delete"),this.HTTP(h(b,{url:a}))},l.find=function(a,b,c){var d=this;return c=c||{},c.suffix=c.suffix||a.suffix,d.GET(d.getPath("find",a,b,c),c).then(function(b){var e=(c.deserialize?c.deserialize:d.defaults.deserialize)(a,b);return e?e:j.reject(new Error("Not Found!"))})},l.findAll=function(a,b,c){var d=this;return c=c||{},c=g.copy(c),c.suffix=c.suffix||a.suffix,c.params=c.params||{},b&&(b=d.defaults.queryTransform(a,b),h(c.params,b)),d.GET(d.getPath("findAll",a,b,c),c).then(function(b){return(c.deserialize?c.deserialize:d.defaults.deserialize)(a,b)})},l.create=function(a,b,c){var d=this;return c=c||{},c.suffix=c.suffix||a.suffix,d.POST(d.getPath("create",a,b,c),c.serialize?c.serialize(a,b):d.defaults.serialize(a,b),c).then(function(b){return(c.deserialize?c.deserialize:d.defaults.deserialize)(a,b)})},l.update=function(a,b,c,d){var e=this;return d=d||{},d.suffix=d.suffix||a.suffix,e.PUT(e.getPath("update",a,b,d),d.serialize?d.serialize(a,c):e.defaults.serialize(a,c),d).then(function(b){return(d.deserialize?d.deserialize:e.defaults.deserialize)(a,b)})},l.updateAll=function(a,b,c,d){var e=this;return d=d||{},d=g.copy(d),d.suffix=d.suffix||a.suffix,d.params=d.params||{},c&&(c=e.defaults.queryTransform(a,c),h(d.params,c)),this.PUT(e.getPath("updateAll",a,b,d),d.serialize?d.serialize(a,b):e.defaults.serialize(a,b),d).then(function(b){return(d.deserialize?d.deserialize:e.defaults.deserialize)(a,b)})},l.destroy=function(a,b,c){var d=this;return c=c||{},c.suffix=c.suffix||a.suffix,d.DEL(d.getPath("destroy",a,b,c),c).then(function(b){return(c.deserialize?c.deserialize:d.defaults.deserialize)(a,b)})},l.destroyAll=function(a,b,c){var d=this;return c=c||{},c=g.copy(c),c.suffix=c.suffix||a.suffix,c.params=c.params||{},b&&(b=d.defaults.queryTransform(a,b),h(c.params,b)),this.DEL(d.getPath("destroyAll",a,b,c),c).then(function(b){return(c.deserialize?c.deserialize:d.defaults.deserialize)(a,b)})},b.exports=d},{axios:1,"js-data":"js-data"}]},{},[17])(17)});
  //# sourceMappingURL=js-data-http.min.map