UNPKG

@busmarket/bmapi-js

Version:

BmApiJS | BusMarket API JS client

1 lines 72.7 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BmApi=t():e.BmApi=t()}(global,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=16)}([function(e,t,r){"use strict";e.exports={token:"\n\n🚨️️ BmApi. Authorization token is not defined!\n \n🔗 https://developer.bm.parts/api/v2/overview.html#api\n\n",BmApiMethodError:function(e,t){return"\n\n🚨️️ BmApi.There is an error in the '".concat(e,"' method! Check documentation!\n 🔗 https://developer.bm.parts/api/v2").concat(t||"/"," \n\n")},BmApiError:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inputOptions:{},requireParameters:null,url:{base:"",hash:""}},t=Object.keys(e.inputOptions),r=e.requireParameters,n="".concat(e.url.base,".html#").concat(e.url.hash||""),i=r.some(function(e){return!t.includes(e)});if(i)throw Error("\n\n\t🚨️️ BmApi.".concat(r.length>1?"One or more r":"R","equired parameter").concat(r.length>1?"s":""," { ").concat(r.join(", ")," } ").concat(r.length>1?"are":"is"," not defined! \n\t🔗 https://developer.bm.parts/api/v2").concat(n||"/"," \n\n"))}}},function(e,t,r){"use strict";var n=r(4),i=r(20),o=Object.prototype.toString;function s(e){return"[object Array]"===o.call(e)}function a(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:i,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,i=arguments.length;n<i;n++)u(arguments[n],r);return t},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):r}for(var n=0,i=arguments.length;n<i;n++)u(arguments[n],r);return t},extend:function(e,t,r){return u(t,function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,r){"use strict";var n=r(1);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))}))}),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t,r,i,o){var s=new Error(e);return n(s,t,r,i,o)}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(1),i=r(25),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,c={adapter:("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?a=r(26):"undefined"!=typeof XMLHttpRequest&&(a=r(40)),a),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],function(e){c.headers[e]={}}),n.forEach(["post","put","patch"],function(e){c.headers[e]=n.merge(o)}),e.exports=c},function(e,t,r){"use strict";var n=r(3);e.exports=function(e,t,r){var i=r.config.validateStatus;!i||i(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("https")},function(e,t,r){var n=r(12),i=r(9),o=r(10),s=r(27),a=r(28).Writable,c=r(29)("follow-redirects"),u={GET:!0,HEAD:!0,OPTIONS:!0,TRACE:!0},p=Object.create(null);function f(e,t){a.call(this),e.headers=e.headers||{},this._options=e,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e.host&&(e.hostname||(e.hostname=e.host),delete e.host),t&&this.on("response",t);var r=this;if(this._onNativeResponse=function(e){r._processResponse(e)},!e.pathname&&e.path){var n=e.path.indexOf("?");n<0?e.pathname=e.path:(e.pathname=e.path.substring(0,n),e.search=e.path.substring(n))}this._performRequest()}function h(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(i){var o=i+":",a=r[o]=e[i],u=t[i]=Object.create(a);u.request=function(e,i){return"string"==typeof e?(e=n.parse(e)).maxRedirects=t.maxRedirects:e=Object.assign({protocol:o,maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e),e.nativeProtocols=r,s.equal(e.protocol,o,"protocol mismatch"),c("options",e),new f(e,i)},u.get=function(e,t){var r=u.request(e,t);return r.end(),r}}),t}["abort","aborted","error","socket","timeout"].forEach(function(e){p[e]=function(t){this._redirectable.emit(e,t)}}),f.prototype=Object.create(a.prototype),f.prototype.write=function(e,t,r){if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new Error("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Error("Request body larger than maxBodyLength limit")),this.abort()):r&&r()},f.prototype.end=function(e,t,r){"function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null);var n=this._currentRequest;this.write(e||"",t,function(){n.end(null,null,r)})},f.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},f.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive","setTimeout"].forEach(function(e){f.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}}),["aborted","connection","socket"].forEach(function(e){Object.defineProperty(f.prototype,e,{get:function(){return this._currentRequest[e]}})}),f.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o in this._currentUrl=n.format(this._options),i._redirectable=this,p)o&&i.on(o,p[o]);if(this._isRedirect){var s=0,a=this._requestBodyBuffers;!function e(){if(s<a.length){var t=a[s++];i.write(t.data,t.encoding,e)}else i.end()}()}}else this.emit("error",new Error("Unsupported protocol "+e))},f.prototype._processResponse=function(e){this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:e.statusCode});var t=e.headers.location;if(t&&!1!==this._options.followRedirects&&e.statusCode>=300&&e.statusCode<400){if(++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Error("Max redirects exceeded."));var r,i=this._options.headers;if(307!==e.statusCode&&!(this._options.method in u))for(r in this._options.method="GET",this._requestBodyBuffers=[],i)/^content-/i.test(r)&&delete i[r];if(!this._isRedirect)for(r in i)/^host$/i.test(r)&&delete i[r];var o=n.resolve(this._currentUrl,t);c("redirecting to",o),Object.assign(this._options,n.parse(o)),this._isRedirect=!0,this._performRequest(),e.destroy()}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]},e.exports=h({http:i,https:o}),e.exports.wrap=h},function(e,t){e.exports=require("url")},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;c++;var i=t.formatters[n];if("function"==typeof i){var o=s[c];r=i.call(e,o),s.splice(c,1),c--}return r}),t.formatArgs.call(e,s),(n.log||t.log||void 0).apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),n.destroy=i,"function"==typeof t.init&&t.init(n),t.instances.push(n),n}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var r;t.save(e),t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(r=0;r<t.instances.length;r++){var o=t.instances[r];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(31),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,r){"use strict";var n=r(1);e.exports=function(e,t){t=t||{};var r={};return n.forEach(["url","method","params","data"],function(e){void 0!==t[e]&&(r[e]=t[e])}),n.forEach(["headers","auth","proxy"],function(i){n.isObject(t[i])?r[i]=n.deepMerge(e[i],t[i]):void 0!==t[i]?r[i]=t[i]:n.isObject(e[i])?r[i]=n.deepMerge(e[i]):void 0!==e[i]&&(r[i]=e[i])}),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(17),a=r(0),c={profile:r(48),claims:r(49),product:r(50),catalog:r(51),documents:r(52),finance:r(53),delivery:r(54),shopping:r(55),company:r(56),aggregations:r(57),search:r(58),news:r(59),reports:r(60),processing:r(61),returns:r(62),advertising:r(63),trainings:r(64),garage:r(65)};function u(e){if(!(this instanceof u))return new u(e);if(!e)throw Error(a.token);var t=this._apiClient(e);this._apiResources(t)}u.prototype={_apiResources:function(e){for(var t in c)this[t]=new c[t](e)},_apiClient:function(e){return{get:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e).get(encodeURI(t),{params:r}).catch(function(e){return e.response})},post:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e).post(encodeURI(t),i({},r)).catch(function(e){return e.response})},put:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e).put(encodeURI(t),i({},r)).catch(function(e){return e.response})},delete:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e).delete(encodeURI(t),{params:r}).catch(function(e){return e.response})}}}},e.exports=u},function(e,t,r){"use strict";var n=r(18);e.exports=function(e){return n.create({baseURL:"https://api.bm.parts",headers:{Authorization:e}})}},function(e,t,r){e.exports=r(19)},function(e,t,r){"use strict";var n=r(1),i=r(4),o=r(21),s=r(14);function a(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var c=a(r(6));c.Axios=o,c.create=function(e){return a(s(c.defaults,e))},c.Cancel=r(15),c.CancelToken=r(46),c.isCancel=r(5),c.all=function(e){return Promise.all(e)},c.spread=r(47),e.exports=c,e.exports.default=c},function(e,t){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(1),i=r(2),o=r(22),s=r(23),a=r(14);function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},c.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}}),n.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,r,i){return this.request(n.merge(i||{},{method:e,url:t,data:r}))}}),e.exports=c},function(e,t,r){"use strict";var n=r(1);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,r){"use strict";var n=r(1),i=r(24),o=r(5),s=r(6),a=r(44),c=r(45);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return u(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(1);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(1);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(1),i=r(7),o=r(2),s=r(9),a=r(10),c=r(11).http,u=r(11).https,p=r(12),f=r(38),h=r(39),l=r(3),d=r(8),g=/https:?/;e.exports=function(e){return new Promise(function(t,r){var m,v=function(e){clearTimeout(m),t(e)},b=function(e){clearTimeout(m),r(e)},y=e.data,O=e.headers;if(O["User-Agent"]||O["user-agent"]||(O["User-Agent"]="axios/"+h.version),y&&!n.isStream(y)){if(Buffer.isBuffer(y));else if(n.isArrayBuffer(y))y=Buffer.from(new Uint8Array(y));else{if(!n.isString(y))return b(l("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));y=Buffer.from(y,"utf-8")}O["Content-Length"]=y.length}var _=void 0;e.auth&&(_=(e.auth.username||"")+":"+(e.auth.password||""));var C=p.parse(e.url),w=C.protocol||"http:";if(!_&&C.auth){var P=C.auth.split(":");_=(P[0]||"")+":"+(P[1]||"")}_&&delete O.Authorization;var x=g.test(w),j=x?e.httpsAgent:e.httpAgent,q={path:o(C.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:O,agent:j,auth:_};e.socketPath?q.socketPath=e.socketPath:(q.hostname=C.hostname,q.port=C.port);var E,R=e.proxy;if(!R&&!1!==R){var A=w.slice(0,-1)+"_proxy",F=process.env[A]||process.env[A.toUpperCase()];if(F){var k=p.parse(F),S=process.env.no_proxy||process.env.NO_PROXY,B=!0;if(S&&(B=!S.split(",").map(function(e){return e.trim()}).some(function(e){return!!e&&("*"===e||"."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e&&e.match(/\./g).length===C.hostname.match(/\./g).length||C.hostname===e)})),B&&(R={host:k.hostname,port:k.port},k.auth)){var D=k.auth.split(":");R.auth={username:D[0],password:D[1]}}}}if(R&&(q.hostname=R.host,q.host=R.host,q.headers.host=C.hostname+(C.port?":"+C.port:""),q.port=R.port,q.path=w+"//"+C.hostname+(C.port?":"+C.port:"")+q.path,R.auth)){var T=Buffer.from(R.auth.username+":"+R.auth.password,"utf8").toString("base64");q.headers["Proxy-Authorization"]="Basic "+T}var L=x&&(!R||g.test(R.protocol));e.transport?E=e.transport:0===e.maxRedirects?E=L?a:s:(e.maxRedirects&&(q.maxRedirects=e.maxRedirects),E=L?u:c),e.maxContentLength&&e.maxContentLength>-1&&(q.maxBodyLength=e.maxContentLength);var N=E.request(q,function(t){if(!N.aborted){var r=t;switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=204===t.statusCode?r:r.pipe(f.createUnzip()),delete t.headers["content-encoding"]}var n=t.req||N,o={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:n};if("stream"===e.responseType)o.data=r,i(v,b,o);else{var s=[];r.on("data",function(t){s.push(t),e.maxContentLength>-1&&Buffer.concat(s).length>e.maxContentLength&&(r.destroy(),b(l("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,n)))}),r.on("error",function(t){N.aborted||b(d(t,e,null,n))}),r.on("end",function(){var t=Buffer.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding)),o.data=t,i(v,b,o)})}}});N.on("error",function(t){N.aborted||b(d(t,e,null,N))}),e.timeout&&(m=setTimeout(function(){N.abort(),b(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",N))},e.timeout)),e.cancelToken&&e.cancelToken.promise.then(function(e){N.aborted||(N.abort(),b(e))}),n.isStream(y)?y.on("error",function(t){b(d(t,e,null,N))}).pipe(N):N.end(y)})}},function(e,t){e.exports=require("assert")},function(e,t){e.exports=require("stream")},function(e,t,r){"undefined"==typeof process||"renderer"===process.type?e.exports=r(30):e.exports=r(32)},function(e,t,r){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(13)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(o=++i)}),e.splice(o,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())},function(e,t){var r=1e3,n=6e4,i=36e5,o=24*i;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,t){t=t||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,n,"minute")||s(a,r,"second")||a+" ms":function(e){return e>=o?Math.round(e/o)+"d":e>=i?Math.round(e/i)+"h":e>=n?Math.round(e/n)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){var n=r(33),i=r(34);(t=e.exports=r(13)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){return process.stderr.write(i.format.apply(i,arguments)+"\n")},t.formatArgs=function(e){var r=this.namespace;if(this.useColors){var n=this.color,i="[3"+(n<8?n:"8;5;"+n),o=" "+i+";1m"+r+" ";e[0]=o+e[0].split("\n").join("\n"+o),e.push(i+"m+"+t.humanize(this.diff)+"")}else e[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=s,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.colors=[6,2,3,4,5,1];try{var o=r(35);o&&o.level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}function s(){return process.env.DEBUG}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)},t.enable(s())},function(e,t){e.exports=require("tty")},function(e,t){e.exports=require("util")},function(e,t,r){"use strict";const n=r(36),i=r(37),{env:o}=process;let s;function a(e){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(function(e){if(0===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&void 0===s)return 0;const t=s||0;if("dumb"===o.TERM)return t;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||"codeship"===o.CI_NAME?1:t;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)?1:"COLORTERM"in o?1:t}(e))}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?s=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=1),"FORCE_COLOR"in o&&(s=!0===o.FORCE_COLOR||"true"===o.FORCE_COLOR?1:!1===o.FORCE_COLOR||"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(parseInt(o.FORCE_COLOR,10),3)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},function(e,t){e.exports=require("os")},function(e,t,r){"use strict";e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n<i)}},function(e,t){e.exports=require("zlib")},function(e){e.exports=JSON.parse('{"name":"axios","version":"0.19.0","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test && bundlesize","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://github.com/axios/axios","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"typings":"./index.d.ts","dependencies":{"follow-redirects":"1.5.10","is-buffer":"^2.0.2"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},function(e,t,r){"use strict";var n=r(1),i=r(7),o=r(2),s=r(41),a=r(42),c=r(3);e.exports=function(e){return new Promise(function(t,u){var p=e.data,f=e.headers;n.isFormData(p)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",d=e.auth.password||"";f.Authorization="Basic "+btoa(l+":"+d)}if(h.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?s(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,u,n),h=null}},h.onabort=function(){h&&(u(c("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){u(c("Network Error",e,null,h)),h=null},h.ontimeout=function(){u(c("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var g=r(43),m=(e.withCredentials||a(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;m&&(f[e.xsrfHeaderName]=m)}if("setRequestHeader"in h&&n.forEach(f,function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),u(e),h=null)}),void 0===p&&(p=null),h.send(p)})}},function(e,t,r){"use strict";var n=r(1),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,s={};return e?(n.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}}),s):s}},function(e,t,r){"use strict";var n=r(1);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(1);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(15);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(0),a=s.BmApiError;function c(e){for(var t=0,r=["get","post","put","delete"];t<r.length;t++){var n=r[t];this[n]=e[n]}}var u="/profile";c.prototype={changeWarehouse:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["warehouse_uuid"],url:{base:u,hash:"post-profile-change-warehouse"}}))return this.post("".concat(u,"/change_warehouse"),e)},getBoundClients:function(e){return this.get("".concat(u,"/bound_clients"),i({client_as:"obj"},e))},getMailing:function(){return this.get("".concat(u,"/mailing"))},saveMailing:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Reflect.ownKeys(e).length)return this.post("".concat(u,"/mailing"),e);throw Error(s.profile.mailing_save)},history:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(u,"/history"),e)},profileMasq:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["client_uuid"],url:{base:u,hash:"post-profile-masq"}}))return this.post("".concat(u,"/masq"),e)},me:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["clients_as"],url:{base:u,hash:"get-profile-me"}}))return this.get("".concat(u,"/me"),i({clients_as:"obj"},e))},updateApp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["app_name"],url:{base:u,hash:"post-profile-settings-string-app-name-update"}}))return this.post("/".concat(u,"/settings/").concat(e.app_name,"/update"))},settingsGet:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["app_name"],url:{base:u,hash:"get-profile-settings-string-app-name"}}))return this.get("/".concat(u,"/settings/").concat(e.app_name))},settingsSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["app_name","settings"],url:{base:u,hash:"post-garage-car-string-car-uuid"}}))return this.post("".concat(u,"/settings/").concat(e.app_name))},settingsCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["app_name","settings"],url:{base:u,hash:"post-garage-car-string-car-uuid"}}))return this.post("".concat(u,"/settings/").concat(e.app_name))},settingsDelete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a({inputOptions:e,requireParameters:["app_name"],url:{base:u,hash:"delete-profile-settings-string-app-name"}}))return this.delete("".concat(u,"/settings/").concat(e.app_name),e)}},e.exports=c},function(e,t,r){"use strict";var n=r(0),i=n.BmApiError,o=n.BmApiMethodError;function s(e){var t=this;["get","post","put","delete"].map(function(r){t[r]=e[r]})}var a="/claims";s.prototype={types:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/claims/issues/types",e)},getIssues:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/claims/issues",e)},setIssues:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:e,requireParameters:["summary","description","issue_type"],url:{base:a,hash:"post-claims-issues"}}))return this.post("/claims/issues",e)},attachments:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:e,requireParameters:["issue_id"],url:{base:a,hash:"get-claims-issue-string-issue-id-attachments"}}))return this.get("/claims/issue/".concat(e.issue_id,"/attachments"),e)},claimAttachments:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:e,requireParameters:["issue_id","attach_id","attach_name"],url:{base:a,hash:"get-claims-issue-string-issue-id-attachment-string-attach-id-path-attach-name"}}))return this.get("".concat(a,"/issue/").concat(e.issue_id,"/attachment/").concat(e.attach_id,"/").concat(e.attach_name))},addAttachment:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:e,requireParameters:["attachment","issue_id"],url:{base:a,hash:"get-claims-issue-string-issue-id-attachments"}})&&e.attachment instanceof FormData)return this.post("/claims/issue/".concat(e.issue_id,"/attachment"),e);!e.attachment instanceof FormData&&o("attachment","get-claims-issue-string-issue-id-attachments")},getIssueComments:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:e,requireParameters:["issue_id"],url:{base:a,hash:"get-claims-issue-string-issue-id-comments"}}))return this.get("/claims/issue/".concat(e.issue_id,"/comments"),e)},setIssueComment:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i({inputOptions:e,requireParameters:["issue_id","comment"],url:{base:a,hash:"post-claims-issue-string-issue-id-comment"}}))return this.post("/claims/issue/".concat(e.issue_id,"/comment/"),e)}},e.exports=s},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(0).BmApiError;function s(e){this.get=e.get}var a="/product";s.prototype={inWaiting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:e,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-in-waiting"}}))return this.get("".concat(a,"/").concat(e.product_uuid,"/in_waiting"))},inStocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:e,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-in-stocks"}}))return this.get("".concat(a,"/").concat(e.product_uuid,"/in_stocks"))},prices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:e,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-prices"}}))return this.get("".concat(a,"/").concat(e.product_uuid,"/prices"))},curPrice:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:e,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-product-uuid-price"}}))return this.get("".concat(a,"/").concat(e.product_uuid,"/price"),e)},details:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o({inputOptions:e,requireParameters:["product_uuid"],url:{base:a,hash:"get-product-string-product-uuid"}}))return this.get("".concat(a,"/").concat(e.product_uuid),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},{products_as:"obj"},{},e))}},e.exports=s},function(e,t,r){"use strict";var n=r(0).BmApiError,i="/catalog";function o(e){this.get=e.get}o.prototype={newArrivals:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("".concat(i,"/new_arrivals"))},brands:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(i,"/brands"),e)},enginesByModel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:e,requireParameters:["car_brand","car_model"],url:{base:i,hash:"get-catalog-cars-brand-string-car-brand-model-string-car-model-engines"}}))return this.get("".concat(i,"/cars/brand/").concat(e.car_brand,"/model/").concat(e.car_model,"/engines/"))},carNodesPath:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:e,requireParameters:[],url:{base:i,hash:"get-catalog-nodes-path"}}))return this.get("".concat(i,"/nodes/path").concat(e.parent_path?"/"+e.parent_path:""))},carNodes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:e,requireParameters:[],url:{base:i,hash:"get-catalog-nodes"}}))return this.get("".concat(i,"/nodes").concat(e.parent_uuid?"/"+e.parent_uuid:""))}},e.exports=o},function(e,t,r){"use strict";var n=r(0).BmApiError,i="/documents";function o(e){this.get=e.get}o.prototype={filterGroups:function(){return this.get("".concat(i,"/filters/groups"))},filterTypes:function(){return this.get("".concat(i,"/filters/types"))},filterDates:function(){return this.get("".concat(i,"/filters/dates"))},filterGrouped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/documents/grouped",e)},listDocuments:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("/documents/list",e)},reclamationStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:e,requireParameters:["act_uuid"],url:{base:i,hash:"get-trainings-list"}}))return this.get("".concat(i,"/reclamation/").concat(e.act_uuid))},downloadDocument:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:e,requireParameters:["type","uuid","file_type"],url:{base:i,hash:"get-documents-download-string-type-string-uuid-string-file-type"}}))return this.get("".concat(i,"/download/").concat(e.type,"/").concat(e.uuid,"/").concat(e.file_type))},getDocument:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:e,requireParameters:["type","uuid"],url:{base:i,hash:"get-documents-string-type-string-uuid"}}))return this.get("".concat(i,"/").concat(e.type).concat(e.uuid,"/"))}},e.exports=o},function(e,t,r){"use strict";var n=r(0).BmApiError;function i(e){this.get=e.get}var o="/finance";i.prototype={historyRates:function(){return this.get("".concat(o,"/currencies/rates/history"))},currenciesRates:function(){return this.get("".concat(o,"/currencies/rates"))},currenciesList:function(){return this.get("".concat(o,"/currencies/list"))},contractsList:function(){return this.get("".concat(o,"/contracts/list"))},contracts:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n({inputOptions:e,requireParameters:["contract_uuid"],url:{base:o,hash:"get-finance-contracts-list"}}))return this.get("".concat(o,"/contract/").concat(e.contract_uuid))}},e.exports=i},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(0).BmApiError;function a(e){for(var t=0,r=["get","post","put","delete"];t<r.length;t++){var n=r[t];this[n]=e[n]}}var c="/delivery";a.prototype={carriersWarehouses:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["city","carrier"],url:{base:c,hash:"get-delivery-carriers-warehouses"}}))return this.get("".concat(c,"/carriers/warehouses"))},carriersCities:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["region","carrier"],url:{base:c,hash:"get-delivery-carrier-cities"}}))return this.get("".concat(c,"/carrier/cities"),i({is_address:!1},e))},configConfirm:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["code"],url:{base:c,hash:"post-delivery-config-confirm"}}))return this.post("".concat(c,"/config/confirm"),i({},e))},configDefault:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["config_uuid"],url:{base:c,hash:"post-delivery-config-default"}}))return this.post("".concat(c,"/config/default"),i({},e))},cityStreets:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["city"],url:{base:c,hash:"get-delivery-city-streets"}}))return this.get("".concat(c,"/city/streets"),i({},e))},deliveryDepartures:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["warehouse","city"],url:{base:c,hash:"get-delivery-departures"}}))return this.get("".concat(c,"/departures"),i({},e))},deliveryReceivers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.get("".concat(c,"/receivers"),i({},e))},deliveryReceiversAdd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["surname","name","middle_name","phone"],url:{base:c,hash:"post-delivery-receivers"}}))return this.post("".concat(c,"/receivers"),i({},e))},deliveryCarriers:function(){return this.get("".concat(c,"/carriers"))},deliveryRegions:function(){return this.get("".concat(c,"/regions"))},deliveryConfigs:function(){return this.get("".concat(c,"/configs"))},deliveryCreateConfigs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s({inputOptions:e,requireParameters:["receiver","city","carrier","carrier_warehouse","is_default","address"],url:{base:c,hash:"post-delivery-configs"}}))return this.post("".concat(c,"/configs"),i({full_insurance:!1},e))}