@aws-amplify/api-rest 2.0.38 → 2.0.39-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,3 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core")):"function"==typeof define&&define.amd?define("aws_amplify_api-rest",["aws_amplify_core"],t):"object"==typeof exports?exports["aws_amplify_api-rest"]=t(require("aws_amplify_core")):e["aws_amplify_api-rest"]=t(e.aws_amplify_core)}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=39)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(5),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function h(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},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,isPlainObject:c,isUndefined:s,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:u,isStream:function(e){return a(e)&&u(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:h,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)h(arguments[r],n);return t},extend:function(e,t,n){return h(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){e.exports=n(13)},function(e,t,n){"use strict";(function(t){var r=n(1),o=n(19),i=n(7),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(c=n(8)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(s)})),e.exports=u}).call(this,n(18))},function(e,t,n){"use strict";var r=n(32),o=n(35);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(u),l=["%","/","?",";","#"].concat(h),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(36);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i<e.indexOf("#")?"?":"#",u=e.split(a);u[0]=u[0].replace(/\\/g,"/");var b=e=u.join(a);if(b=b.trim(),!n&&1===e.split("#").length){var w=c.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var x=s.exec(b);if(x){var j=(x=x[0]).toLowerCase();this.protocol=j,b=b.substr(x.length)}if(n||x||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var O="//"===b.substr(0,2);!O||x&&y[x]||(b=b.substr(2),this.slashes=!0)}if(!y[x]&&(O||x&&!g[x])){for(var _,T,C=-1,k=0;k<f.length;k++){-1!==(A=b.indexOf(f[k]))&&(-1===C||A<C)&&(C=A)}-1!==(T=-1===C?b.lastIndexOf("@"):b.lastIndexOf("@",C))&&(_=b.slice(0,T),b=b.slice(T+1),this.auth=decodeURIComponent(_)),C=-1;for(k=0;k<l.length;k++){var A;-1!==(A=b.indexOf(l[k]))&&(-1===C||A<C)&&(C=A)}-1===C&&(C=b.length),this.host=b.slice(0,C),b=b.slice(C),this.parseHost(),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E)for(var S=this.hostname.split(/\./),P=(k=0,S.length);k<P;k++){var R=S[k];if(R&&!R.match(p)){for(var I="",q=0,U=R.length;q<U;q++)R.charCodeAt(q)>127?I+="x":I+=R[q];if(!I.match(p)){var N=S.slice(0,k),B=S.slice(k+1),L=R.match(d);L&&(N.push(L[1]),B.unshift(L[2])),B.length&&(b="/"+B.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),E||(this.hostname=r.toASCII(this.hostname));var D=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+D,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[j])for(k=0,P=h.length;k<P;k++){var M=h[k];if(-1!==b.indexOf(M)){var H=encodeURIComponent(M);H===M&&(H=escape(M)),b=b.split(M).join(H)}}var J=b.indexOf("#");-1!==J&&(this.hash=b.substr(J),b=b.slice(0,J));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=v.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),g[j]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var $=this.search||"";this.path=D+$}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,s="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var h=c[u];"protocol"!==h&&(n[h]=e[h])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!g[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var p=l[f];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||y[e.protocol])n.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=w||b||n.host&&e.pathname,j=x,O=n.pathname&&n.pathname.split("/")||[],_=(d=e.pathname&&e.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(_&&(n.hostname="",n.port=null,n.host&&(""===O[0]?O[0]=n.host:O.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),x=x&&(""===d[0]||""===O[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,O=d;else if(d.length)O||(O=[]),O.pop(),O=O.concat(d),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(_)n.hostname=n.host=O.shift(),(E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=E.shift(),n.host=n.hostname=E.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!O.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=O.slice(-1)[0],C=(n.host||e.host||O.length>1)&&("."===T||".."===T)||""===T,k=0,A=O.length;A>=0;A--)"."===(T=O[A])?O.splice(A,1):".."===T?(O.splice(A,1),k++):k&&(O.splice(A,1),k--);if(!x&&!j)for(;k--;k)O.unshift("..");!x||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),C&&"/"!==O.join("/").substr(-1)&&O.push("");var E,S=""===O[0]||O[0]&&"/"===O[0].charAt(0);_&&(n.hostname=n.host=S?"":O.length?O.shift():"",(E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=E.shift(),n.host=n.hostname=E.shift()));return(x=x||n.host&&O.length)&&!S&&O.unshift(""),O.length?n.pathname=O.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(1);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,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,n){"use strict";var r=n(1),o=n(20),i=n(21),s=n(6),a=n(22),c=n(25),u=n(26),h=n(9);e.exports=function(e){return new Promise((function(t,n){var l=e.data,f=e.headers,p=e.responseType;r.isFormData(l)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+y)}var g=a(e.baseURL,e.url);function v(){if(d){var r="getAllResponseHeaders"in d?c(d.getAllResponseHeaders()):null,i={data:p&&"text"!==p&&"json"!==p?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d};o(t,n,i),d=null}}if(d.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(v)},d.onabort=function(){d&&(n(h("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){n(h("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(h(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var b=(e.withCredentials||u(g))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;b&&(f[e.xsrfHeaderName]=b)}"setRequestHeader"in d&&r.forEach(f,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete f[t]:d.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),p&&"json"!==p&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),n(e),d=null)})),l||(l=null),d.send(l)}))}},function(e,t,n){"use strict";var r=n(7);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function u(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(i,u),r.forEach(s,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(void 0,t[o])})),r.forEach(a,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var h=o.concat(i).concat(s).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===h.indexOf(e)}));return r.forEach(l,u),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=n(1),o=n(5),i=n(14),s=n(11);function a(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var c=a(n(3));c.Axios=i,c.create=function(e){return a(s(c.defaults,e))},c.Cancel=n(12),c.CancelToken=n(29),c.isCancel=n(10),c.all=function(e){return Promise.all(e)},c.spread=n(30),c.isAxiosError=n(31),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";var r=n(1),o=n(6),i=n(15),s=n(16),a=n(11),c=n(27),u=c.validators;function h(e){this.defaults=e,this.interceptors={request:new i,response:new i}}h.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():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var h=[s,void 0];for(Array.prototype.unshift.apply(h,n),h=h.concat(i),o=Promise.resolve(e);h.length;)o=o.then(h.shift(),h.shift());return o}for(var l=e;n.length;){var f=n.shift(),p=n.shift();try{l=f(l)}catch(e){p(e);break}}try{o=s(l)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},h.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){h.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){h.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=h},function(e,t,n){"use strict";var r=n(1);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(1),o=n(17),i=n(10),s=n(3);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(1),o=n(3);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],h=!1,l=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):l=-1,u.length&&p())}function p(){if(!h){var e=a(f);h=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||h||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(9);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(1);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!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,n){"use strict";var r=n(23),o=n(24);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(1),o=["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,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(1);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(28),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=r.version.split(".");function a(e,t){for(var n=t?t.split("."):s,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}o.transitional=function(e,t,n){var o=t&&a(t);function s(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(s(r," has been removed in "+t));return o&&!i[r]&&(i[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var a=e[i],c=void 0===a||s(a,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},function(e){e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","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://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},function(e,t,n){"use strict";var r=n(12);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=/^xn--/,h=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function m(e){throw new RangeError(f[e])}function y(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function g(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+y((e=e.replace(l,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function b(e){return y(e,(function(e){var t="";return e>65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=d(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function j(e){var t,n,r,o,i,s,a,u,h,l,f,d=[],y=e.length,g=0,v=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&m("not-basic"),d.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<y;){for(i=g,s=1,a=36;o>=y&&m("invalid-input"),((u=(f=e.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>p((c-g)/s))&&m("overflow"),g+=u*s,!(u<(h=a<=w?1:a>=w+26?26:a-w));a+=36)s>p(c/(l=36-h))&&m("overflow"),s*=l;w=x(g-i,t=d.length+1,0==i),p(g/t)>c-v&&m("overflow"),v+=p(g/t),g%=t,d.splice(g++,0,v)}return b(d)}function O(e){var t,n,r,o,i,s,a,u,h,l,f,y,g,b,j,O=[];for(y=(e=v(e)).length,t=128,n=0,i=72,s=0;s<y;++s)(f=e[s])<128&&O.push(d(f));for(r=o=O.length,o&&O.push("-");r<y;){for(a=c,s=0;s<y;++s)(f=e[s])>=t&&f<a&&(a=f);for(a-t>p((c-n)/(g=r+1))&&m("overflow"),n+=(a-t)*g,t=a,s=0;s<y;++s)if((f=e[s])<t&&++n>c&&m("overflow"),f==t){for(u=n,h=36;!(u<(l=h<=i?1:h>=i+26?26:h-i));h+=36)j=u-l,b=36-l,O.push(d(w(l+j%b,0))),u=p(j/b);O.push(d(w(u,0))),i=x(n,g,r==o),n=0,++r}++n,++t}return O.join("")}a={version:"1.4.1",ucs2:{decode:v,encode:b},decode:j,encode:O,toASCII:function(e){return g(e,(function(e){return h.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return g(e,(function(e){return u.test(e)?j(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(33)(e),n(34))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(37),t.encode=t.stringify=n(38)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var h=0;h<u;++h){var l,f,p,d,m=e[h].replace(a,"%20"),y=m.indexOf(n);y>=0?(l=m.substr(0,y),f=m.substr(y+1)):(l=m,f=""),p=decodeURIComponent(l),d=decodeURIComponent(f),r(s,p)?o(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),(function(s){var a=encodeURIComponent(r(s))+n;return o(e[s])?i(e[s],(function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[s]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";n.r(t),n.d(t,"RestAPI",(function(){return b})),n.d(t,"RestAPIClass",(function(){return v})),n.d(t,"RestClient",(function(){return f}));var r=n(0),o=n(2),i=n.n(o),s=n(4),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},u=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},l=new r.ConsoleLogger("RestClient"),f=function(){function e(e){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0,this._cancelTokenMap=null,this.Credentials=r.Credentials,this._options=e,l.debug("API Options",this._options),null==this._cancelTokenMap&&(this._cancelTokenMap=new WeakMap)}return e.prototype.ajax=function(e,t,n){return c(this,void 0,void 0,(function(){var o,i,c,f,p,d,m,y,g,v,b,w,x,j,O=this;return u(this,(function(u){switch(u.label){case 0:return l.debug(t,e),c="us-east-1",f="execute-api",p=void 0,"string"==typeof e?(o=this._parseUrl(e),i=e):(i=e.endpoint,p=e.custom_header,c=e.region,f=e.service,o=this._parseUrl(e.endpoint)),d={method:t,url:i,host:o.host,path:o.path,headers:{},data:null,responseType:"json",timeout:0,cancelToken:null},m={},r.Platform.isReactNative&&(y=r.Platform.userAgent||"aws-amplify/0.1.x",m={"User-Agent":y}),g=Object.assign({},n),v=g.response,g.body&&("function"==typeof FormData&&g.body instanceof FormData?(m["Content-Type"]="multipart/form-data",d.data=g.body):(m["Content-Type"]="application/json; charset=UTF-8",d.data=JSON.stringify(g.body))),g.responseType&&(d.responseType=g.responseType),g.withCredentials&&(d.withCredentials=g.withCredentials),g.timeout&&(d.timeout=g.timeout),g.cancellableToken&&(d.cancelToken=g.cancellableToken.token),d.signerServiceInfo=g.signerServiceInfo,"function"!=typeof p?[3,2]:[4,p()];case 1:return w=u.sent(),[3,3];case 2:w=void 0,u.label=3;case 3:return b=w,d.headers=a(a(a({},m),b),g.headers),x=Object(s.parse)(i,!0,!0),x.search,j=h(x,["search"]),d.url=Object(s.format)(a(a({},j),{query:a(a({},j.query),g.queryStringParameters||{})})),void 0!==d.headers.Authorization?(d.headers=Object.keys(d.headers).reduce((function(e,t){return d.headers[t]&&(e[t]=d.headers[t]),e}),{}),[2,this._request(d,v)]):[2,this.Credentials.get().then((function(o){return O._signed(a({},d),o,v,{region:c,service:f}).catch((function(o){if(r.DateUtils.isClockSkewError(o)){var i=o.response.headers,s=i&&(i.date||i.Date),a=new Date(s),c=r.DateUtils.getDateFromHeaderString(d.headers["x-amz-date"]);if(r.DateUtils.isClockSkewed(a))return r.DateUtils.setClockOffset(a.getTime()-c.getTime()),O.ajax(e,t,n)}throw o}))}),(function(e){return l.debug("No credentials available, the request will be unsigned"),O._request(d,v)}))]}}))}))},e.prototype.get=function(e,t){return this.ajax(e,"GET",t)},e.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},e.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},e.prototype.post=function(e,t){return this.ajax(e,"POST",t)},e.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},e.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},e.prototype.cancel=function(e,t){var n=this._cancelTokenMap.get(e);return n&&n.cancel(t),!0},e.prototype.isCancel=function(e){return i.a.isCancel(e)},e.prototype.getCancellableToken=function(){return i.a.CancelToken.source()},e.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenMap.set(e,t)},e.prototype.endpoint=function(e){var t=this,n=this._options.endpoints,r="";return Array.isArray(n)?(n.forEach((function(n){n.name===e&&(r=n.endpoint,"string"==typeof n.region?t._region=n.region:"string"==typeof t._options.region&&(t._region=t._options.region),"string"==typeof n.service?t._service=n.service||"execute-api":t._service="execute-api","function"==typeof n.custom_header?t._custom_header=n.custom_header:t._custom_header=void 0)})),r):r},e.prototype._signed=function(e,t,n,o){var s=o.service,a=o.region,c=e.signerServiceInfo,u=h(e,["signerServiceInfo"]),f=a||this._region||this._options.region,p=s||this._service||this._options.service,d={secret_key:t.secretAccessKey,access_key:t.accessKeyId,session_token:t.sessionToken},m={region:f,service:p},y=Object.assign(m,c),g=r.Signer.sign(u,d,y);return g.data&&(g.body=g.data),l.debug("Signed Request: ",g),delete g.headers.host,i()(g).then((function(e){return n?e:e.data})).catch((function(e){throw l.debug(e),e}))},e.prototype._request=function(e,t){return void 0===t&&(t=!1),i()(e).then((function(e){return t?e:e.data})).catch((function(e){throw l.debug(e),e}))},e.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},e}(),p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},m=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},g=new r.ConsoleLogger("RestAPI"),v=function(){function e(e){this._api=null,this.Credentials=r.Credentials,this._options=e,g.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"RestAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,o=y(t,["API"]),i=p(p({},o),r);if(g.debug("configure Rest API",{opt:i}),i.aws_project_region){if(i.aws_cloud_logic_custom){var s=i.aws_cloud_logic_custom;i.endpoints="string"==typeof s?JSON.parse(s):s}i=Object.assign({},i,{region:i.aws_project_region,header:{}})}return Array.isArray(i.endpoints)?i.endpoints.forEach((function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(g.warn("Rest API "+e.name+", custom_header should be a function"),e.custom_header=void 0)})):this._options&&Array.isArray(this._options.endpoints)?i.endpoints=this._options.endpoints:i.endpoints=[],this._options=Object.assign({},this._options,i),this.createInstance(),this._options},e.prototype.createInstance=function(){return g.debug("create Rest API instance"),this._api=new f(this._options),this._api.Credentials=this.Credentials,!0},e.prototype.get=function(e,t,n){try{var r=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),i=Object.assign({},n);i.cancellableToken=o;var s=this._api.get(r,i);return this._api.updateRequestToBeCancellable(s,o),s}catch(e){return Promise.reject(e.message)}},e.prototype.post=function(e,t,n){try{var r=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),i=Object.assign({},n);i.cancellableToken=o;var s=this._api.post(r,i);return this._api.updateRequestToBeCancellable(s,o),s}catch(e){return Promise.reject(e.message)}},e.prototype.put=function(e,t,n){try{var r=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),i=Object.assign({},n);i.cancellableToken=o;var s=this._api.put(r,i);return this._api.updateRequestToBeCancellable(s,o),s}catch(e){return Promise.reject(e.message)}},e.prototype.patch=function(e,t,n){try{var r=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),i=Object.assign({},n);i.cancellableToken=o;var s=this._api.patch(r,i);return this._api.updateRequestToBeCancellable(s,o),s}catch(e){return Promise.reject(e.message)}},e.prototype.del=function(e,t,n){try{var r=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),i=Object.assign({},n);i.cancellableToken=o;var s=this._api.del(r,i);return this._api.updateRequestToBeCancellable(s,o),s}catch(e){return Promise.reject(e.message)}},e.prototype.head=function(e,t,n){try{var r=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),i=Object.assign({},n);i.cancellableToken=o;var s=this._api.head(r,i);return this._api.updateRequestToBeCancellable(s,o),s}catch(e){return Promise.reject(e.message)}},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.endpoint=function(e){return d(this,void 0,void 0,(function(){return m(this,(function(t){return[2,this._api.endpoint(e)]}))}))},e.prototype.getEndpointInfo=function(e,t){var n=this._options.endpoints;if(!Array.isArray(n))throw new Error("API category not configured");var r=n.find((function(t){return t.name===e}));if(!r)throw new Error("API "+e+" does not exist");var o={endpoint:r.endpoint+t};return"string"==typeof r.region?o.region=r.region:"string"==typeof this._options.region&&(o.region=this._options.region),"string"==typeof r.service?o.service=r.service||"execute-api":o.service="execute-api","function"==typeof r.custom_header?o.custom_header=r.custom_header:o.custom_header=void 0,o},e}(),b=new v(null);r.Amplify.register(b);t.default=b}])}));
1
+ /*! For license information please see aws-amplify-api-rest.min.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core")):"function"==typeof define&&define.amd?define("aws_amplify_api-rest",["aws_amplify_core"],t):"object"==typeof exports?exports["aws_amplify_api-rest"]=t(require("aws_amplify_core")):e["aws_amplify_api-rest"]=t(e.aws_amplify_core)}(self,e=>(()=>{var t={644:(e,t,r)=>{e.exports=r(308)},353:(e,t,r)=>{"use strict";var n=r(44),o=r(955),s=r(233),i=r(30),a=r(948),c=r(875),u=r(842),h=r(618);e.exports=function(e){return new Promise((function(t,r){var p=e.data,l=e.headers,f=e.responseType;n.isFormData(p)&&delete l["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";l.Authorization="Basic "+btoa(m+":"+g)}var y=a(e.baseURL,e.url);function v(){if(d){var n="getAllResponseHeaders"in d?c(d.getAllResponseHeaders()):null,s={data:f&&"text"!==f&&"json"!==f?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,r,s),d=null}}if(d.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(v)},d.onabort=function(){d&&(r(h("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){r(h("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(h(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||u(y))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;b&&(l[e.xsrfHeaderName]=b)}"setRequestHeader"in d&&n.forEach(l,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete l[t]:d.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),f&&"json"!==f&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),r(e),d=null)})),p||(p=null),d.send(p)}))}},308:(e,t,r)=>{"use strict";var n=r(44),o=r(95),s=r(215),i=r(937);function a(e){var t=new s(e),r=o(s.prototype.request,t);return n.extend(r,s.prototype,t),n.extend(r,t),r}var c=a(r(439));c.Axios=s,c.create=function(e){return a(i(c.defaults,e))},c.Cancel=r(714),c.CancelToken=r(89),c.isCancel=r(41),c.all=function(e){return Promise.all(e)},c.spread=r(783),c.isAxiosError=r(587),e.exports=c,e.exports.default=c},714:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},89:(e,t,r)=>{"use strict";var n=r(714);function o(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))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},41:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},215:(e,t,r)=>{"use strict";var n=r(44),o=r(30),s=r(946),i=r(895),a=r(937),c=r(525),u=c.validators;function h(e){this.defaults=e,this.interceptors={request:new s,response:new s}}h.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():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!n){var h=[i,void 0];for(Array.prototype.unshift.apply(h,r),h=h.concat(s),o=Promise.resolve(e);h.length;)o=o.then(h.shift(),h.shift());return o}for(var p=e;r.length;){var l=r.shift(),f=r.shift();try{p=l(p)}catch(e){f(e);break}}try{o=i(p)}catch(e){return Promise.reject(e)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},h.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){h.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){h.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=h},946:(e,t,r)=>{"use strict";var n=r(44);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},948:(e,t,r)=>{"use strict";var n=r(192),o=r(762);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},618:(e,t,r)=>{"use strict";var n=r(935);e.exports=function(e,t,r,o,s){var i=new Error(e);return n(i,t,r,o,s)}},895:(e,t,r)=>{"use strict";var n=r(44),o=r(556),s=r(41),i=r(439);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,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||i.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},935:e=>{"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,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}},937:(e,t,r)=>{"use strict";var n=r(44);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],s=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function u(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=c(void 0,t[e]))})),n.forEach(s,u),n.forEach(i,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=c(e[n],t[n]):n in e&&(r[n]=c(void 0,e[n]))}));var h=o.concat(s).concat(i).concat(a),p=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===h.indexOf(e)}));return n.forEach(p,u),r}},955:(e,t,r)=>{"use strict";var n=r(618);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},556:(e,t,r)=>{"use strict";var n=r(44),o=r(439);e.exports=function(e,t,r){var s=this||o;return n.forEach(r,(function(r){e=r.call(s,e,t)})),e}},439:(e,t,r)=>{"use strict";var n=r(44),o=r(868),s=r(935),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=r(353)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(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)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(i)})),e.exports=u},95:e=>{"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)}}},30:(e,t,r)=>{"use strict";var n=r(44);function o(e){return encodeURIComponent(e).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 s;if(r)s=r(t);else if(n.isURLSearchParams(t))s=t.toString();else{var i=[];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)),i.push(o(t)+"="+o(e))})))})),s=i.join("&")}if(s){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},762:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},233:(e,t,r)=>{"use strict";var n=r(44);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(s)&&a.push("domain="+s),!0===i&&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(){}}},192:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},587:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},842:(e,t,r)=>{"use strict";var n=r(44);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(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=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},868:(e,t,r)=>{"use strict";var n=r(44);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},875:(e,t,r)=>{"use strict";var n=r(44),o=["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,s,i={};return e?(n.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=n.trim(e.substr(0,s)).toLowerCase(),r=n.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i}},783:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},525:(e,t,r)=>{"use strict";var n=r(521),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={},i=n.version.split(".");function a(e,t){for(var r=t?t.split("."):i,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);function i(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(i(n," has been removed in "+t));return o&&!s[n]&&(s[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var s=n[o],i=t[s];if(i){var a=e[s],c=void 0===a||i(a,s,e);if(!0!==c)throw new TypeError("option "+s+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+s)}},validators:o}},44:(e,t,r)=>{"use strict";var n=r(95),o=Object.prototype.toString;function s(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function h(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 o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},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,isPlainObject:c,isUndefined:i,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:u,isStream:function(e){return a(e)&&u(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:h,merge:function e(){var t={};function r(r,n){c(t[n])&&c(r)?t[n]=e(t[n],r):c(r)?t[n]=e({},r):s(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)h(arguments[n],r);return t},extend:function(e,t,r){return h(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},639:function(e,t,r){var n;e=r.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r.g&&r.g;s.global!==s&&s.window!==s&&s.self;var i,a=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,f=String.fromCharCode;function d(e){throw RangeError(p[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(h,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],o=0,s=e.length;o<s;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<s?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function v(e){return m(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+f(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;n+=36)e=l(e/35);return l(n+36*e/(e+38))}function x(e){var t,r,n,o,s,i,c,u,h,p,f,m=[],g=e.length,y=0,b=128,x=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&d("not-basic"),m.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<g;){for(s=y,i=1,c=36;o>=g&&d("invalid-input"),((u=(f=e.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>l((a-y)/i))&&d("overflow"),y+=u*i,!(u<(h=c<=x?1:c>=x+26?26:c-x));c+=36)i>l(a/(p=36-h))&&d("overflow"),i*=p;x=w(y-s,t=m.length+1,0==s),l(y/t)>a-b&&d("overflow"),b+=l(y/t),y%=t,m.splice(y++,0,b)}return v(m)}function j(e){var t,r,n,o,s,i,c,u,h,p,m,g,v,x,j,O=[];for(g=(e=y(e)).length,t=128,r=0,s=72,i=0;i<g;++i)(m=e[i])<128&&O.push(f(m));for(n=o=O.length,o&&O.push("-");n<g;){for(c=a,i=0;i<g;++i)(m=e[i])>=t&&m<c&&(c=m);for(c-t>l((a-r)/(v=n+1))&&d("overflow"),r+=(c-t)*v,t=c,i=0;i<g;++i)if((m=e[i])<t&&++r>a&&d("overflow"),m==t){for(u=r,h=36;!(u<(p=h<=s?1:h>=s+26?26:h-s));h+=36)j=u-p,x=36-p,O.push(f(b(p+j%x,0))),u=l(j/x);O.push(f(b(u,0))),s=w(r,v,n==o),r=0,++n}++r,++t}return O.join("")}i={version:"1.3.2",ucs2:{decode:y,encode:v},decode:x,encode:j,toASCII:function(e){return g(e,(function(e){return u.test(e)?"xn--"+j(e):e}))},toUnicode:function(e){return g(e,(function(e){return c.test(e)?x(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},126:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,o){r=r||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var i=/\+/g;e=e.split(r);var a=1e3;o&&"number"==typeof o.maxKeys&&(a=o.maxKeys);var c=e.length;a>0&&c>a&&(c=a);for(var u=0;u<c;++u){var h,p,l,f,d=e[u].replace(i,"%20"),m=d.indexOf(n);m>=0?(h=d.substr(0,m),p=d.substr(m+1)):(h=d,p=""),l=decodeURIComponent(h),f=decodeURIComponent(p),t(s,l)?Array.isArray(s[l])?s[l].push(f):s[l]=[s[l],f]:s[l]=f}return s}},145:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,o){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var s=encodeURIComponent(t(o))+n;return Array.isArray(e[o])?e[o].map((function(e){return s+encodeURIComponent(t(e))})).join(r):s+encodeURIComponent(t(e[o]))})).join(r):o?encodeURIComponent(t(o))+n+encodeURIComponent(t(e)):""}},486:(e,t,r)=>{"use strict";t.decode=t.parse=r(126),t.encode=t.stringify=r(145)},883:(e,t,r)=>{"use strict";var n=r(639),o=r(225);function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.Qc=b,t.WU=function(e){return o.isString(e)&&(e=b(e)),e instanceof s?e.format():s.prototype.format.call(e)};var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(u),p=["%","/","?",";","#"].concat(h),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(486);function b(e,t,r){if(e&&o.isObject(e)&&e instanceof s)return e;var n=new s;return n.parse(e,t,r),n}s.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var s=e.indexOf("?"),a=-1!==s&&s<e.indexOf("#")?"?":"#",u=e.split(a);u[0]=u[0].replace(/\\/g,"/");var b=e=u.join(a);if(b=b.trim(),!r&&1===e.split("#").length){var w=c.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var x=i.exec(b);if(x){var j=(x=x[0]).toLowerCase();this.protocol=j,b=b.substr(x.length)}if(r||x||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var O="//"===b.substr(0,2);!O||x&&g[x]||(b=b.substr(2),this.slashes=!0)}if(!g[x]&&(O||x&&!y[x])){for(var _,C,k=-1,T=0;T<l.length;T++)-1!==(A=b.indexOf(l[T]))&&(-1===k||A<k)&&(k=A);for(-1!==(C=-1===k?b.lastIndexOf("@"):b.lastIndexOf("@",k))&&(_=b.slice(0,C),b=b.slice(C+1),this.auth=decodeURIComponent(_)),k=-1,T=0;T<p.length;T++){var A;-1!==(A=b.indexOf(p[T]))&&(-1===k||A<k)&&(k=A)}-1===k&&(k=b.length),this.host=b.slice(0,k),b=b.slice(k),this.parseHost(),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E)for(var S=this.hostname.split(/\./),P=(T=0,S.length);T<P;T++){var R=S[T];if(R&&!R.match(f)){for(var I="",U=0,q=R.length;U<q;U++)R.charCodeAt(U)>127?I+="x":I+=R[U];if(!I.match(f)){var N=S.slice(0,T),B=S.slice(T+1),D=R.match(d);D&&(N.push(D[1]),B.unshift(D[2])),B.length&&(b="/"+B.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),E||(this.hostname=n.toASCII(this.hostname));var L=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+L,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[j])for(T=0,P=h.length;T<P;T++){var M=h[T];if(-1!==b.indexOf(M)){var H=encodeURIComponent(M);H===M&&(H=escape(M)),b=b.split(M).join(H)}}var J=b.indexOf("#");-1!==J&&(this.hash=b.substr(J),b=b.slice(0,J));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=v.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[j]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){L=this.pathname||"";var $=this.search||"";this.path=L+$}return this.href=this.format(),this},s.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",s=!1,i="";this.host?s=e+this.host:this.hostname&&(s=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(i=v.stringify(this.query));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==s?(s="//"+(s||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):s||(s=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+s+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},s.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},s.prototype.resolveObject=function(e){if(o.isString(e)){var t=new s;t.parse(e,!1,!0),e=t}for(var r=new s,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var h=c[u];"protocol"!==h&&(r[h]=e[h])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var p=Object.keys(e),l=0;l<p.length;l++){var f=p[l];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",v=r.search||"";r.path=m+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=w||b||r.host&&e.pathname,j=x,O=r.pathname&&r.pathname.split("/")||[],_=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(_&&(r.hostname="",r.port=null,r.host&&(""===O[0]?O[0]=r.host:O.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),x=x&&(""===d[0]||""===O[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,O=d;else if(d.length)O||(O=[]),O.pop(),O=O.concat(d),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search))return _&&(r.hostname=r.host=O.shift(),(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!O.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var C=O.slice(-1)[0],k=(r.host||e.host||O.length>1)&&("."===C||".."===C)||""===C,T=0,A=O.length;A>=0;A--)"."===(C=O[A])?O.splice(A,1):".."===C?(O.splice(A,1),T++):T&&(O.splice(A,1),T--);if(!x&&!j)for(;T--;T)O.unshift("..");!x||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),k&&"/"!==O.join("/").substr(-1)&&O.push("");var E,S=""===O[0]||O[0]&&"/"===O[0].charAt(0);return _&&(r.hostname=r.host=S?"":O.length?O.shift():"",(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),(x=x||r.host&&O.length)&&!S&&O.unshift(""),O.length?r.pathname=O.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},s.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},225:e=>{"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},346:t=>{"use strict";t.exports=e},521:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","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://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var s=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var o={};return(()=>{"use strict";n.r(o),n.d(o,{RestAPI:()=>f,RestAPIClass:()=>l,RestClient:()=>u,default:()=>d});var e=n(346),t=n(644),r=n.n(t),s=n(883),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},c=new e.ConsoleLogger("RestClient"),u=function(){function t(t){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0,this._cancelTokenMap=null,this.Credentials=e.Credentials,this._options=t,c.debug("API Options",this._options),null==this._cancelTokenMap&&(this._cancelTokenMap=new WeakMap)}return t.prototype.ajax=function(t,r,n){return o=this,u=void 0,p=function(){var o,u,h,p,l,f,d,m,g,y,v,b,w,x,j=this;return function(e,t){var r,n,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}(this,(function(O){switch(O.label){case 0:return c.debug(r,t),h="us-east-1",p="execute-api",l=void 0,"string"==typeof t?(o=this._parseUrl(t),u=t):(u=t.endpoint,l=t.custom_header,h=t.region,p=t.service,o=this._parseUrl(t.endpoint)),f={method:r,url:u,host:o.host,path:o.path,headers:{},data:null,responseType:"json",timeout:0,cancelToken:null},d={},e.Platform.isReactNative&&(m=e.Platform.userAgent||"aws-amplify/0.1.x",d={"User-Agent":m}),g=Object.assign({},n),y=g.response,g.body&&("function"==typeof FormData&&g.body instanceof FormData?(d["Content-Type"]="multipart/form-data",f.data=g.body):(d["Content-Type"]="application/json; charset=UTF-8",f.data=JSON.stringify(g.body))),g.responseType&&(f.responseType=g.responseType),g.withCredentials&&(f.withCredentials=g.withCredentials),g.timeout&&(f.timeout=g.timeout),g.cancellableToken&&(f.cancelToken=g.cancellableToken.token),f.signerServiceInfo=g.signerServiceInfo,"function"!=typeof l?[3,2]:[4,l()];case 1:return b=O.sent(),[3,3];case 2:b=void 0,O.label=3;case 3:return v=b,f.headers=i(i(i({},d),v),g.headers),(w=(0,s.Qc)(u,!0,!0)).search,x=a(w,["search"]),f.url=(0,s.WU)(i(i({},x),{query:i(i({},x.query),g.queryStringParameters||{})})),void 0!==f.headers.Authorization?(f.headers=Object.keys(f.headers).reduce((function(e,t){return f.headers[t]&&(e[t]=f.headers[t]),e}),{}),[2,this._request(f,y)]):[2,this.Credentials.get().then((function(o){return j._signed(i({},f),o,y,{region:h,service:p}).catch((function(o){if(e.DateUtils.isClockSkewError(o)){var s=o.response.headers,i=s&&(s.date||s.Date),a=new Date(i),c=e.DateUtils.getDateFromHeaderString(f.headers["x-amz-date"]);if(e.DateUtils.isClockSkewed(a))return e.DateUtils.setClockOffset(a.getTime()-c.getTime()),j.ajax(t,r,n)}throw o}))}),(function(e){return c.debug("No credentials available, the request will be unsigned"),j._request(f,y)}))]}}))},new((h=void 0)||(h=Promise))((function(e,t){function r(e){try{s(p.next(e))}catch(e){t(e)}}function n(e){try{s(p.throw(e))}catch(e){t(e)}}function s(t){var o;t.done?e(t.value):(o=t.value,o instanceof h?o:new h((function(e){e(o)}))).then(r,n)}s((p=p.apply(o,u||[])).next())}));var o,u,h,p},t.prototype.get=function(e,t){return this.ajax(e,"GET",t)},t.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},t.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},t.prototype.post=function(e,t){return this.ajax(e,"POST",t)},t.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},t.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},t.prototype.cancel=function(e,t){var r=this._cancelTokenMap.get(e);return r&&r.cancel(t),!0},t.prototype.isCancel=function(e){return r().isCancel(e)},t.prototype.getCancellableToken=function(){return r().CancelToken.source()},t.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenMap.set(e,t)},t.prototype.endpoint=function(e){var t=this,r=this._options.endpoints,n="";return Array.isArray(r)?(r.forEach((function(r){r.name===e&&(n=r.endpoint,"string"==typeof r.region?t._region=r.region:"string"==typeof t._options.region&&(t._region=t._options.region),"string"==typeof r.service?t._service=r.service||"execute-api":t._service="execute-api","function"==typeof r.custom_header?t._custom_header=r.custom_header:t._custom_header=void 0)})),n):n},t.prototype._signed=function(t,n,o,s){var i=s.service,u=s.region,h=t.signerServiceInfo,p=a(t,["signerServiceInfo"]),l=u||this._region||this._options.region,f=i||this._service||this._options.service,d={secret_key:n.secretAccessKey,access_key:n.accessKeyId,session_token:n.sessionToken},m={region:l,service:f},g=Object.assign(m,h),y=e.Signer.sign(p,d,g);return y.data&&(y.body=y.data),c.debug("Signed Request: ",y),delete y.headers.host,r()(y).then((function(e){return o?e:e.data})).catch((function(e){throw c.debug(e),e}))},t.prototype._request=function(e,t){return void 0===t&&(t=!1),r()(e).then((function(e){return t?e:e.data})).catch((function(e){throw c.debug(e),e}))},t.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},t}(),h=function(){return(h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=new e.ConsoleLogger("RestAPI"),l=function(){function t(t){this._api=null,this.Credentials=e.Credentials,this._options=t,p.debug("API Options",this._options)}return t.prototype.getModuleName=function(){return"RestAPI"},t.prototype.configure=function(e){var t=e||{},r=t.API,n=void 0===r?{}:r,o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["API"]),s=h(h({},o),n);if(p.debug("configure Rest API",{opt:s}),s.aws_project_region){if(s.aws_cloud_logic_custom){var i=s.aws_cloud_logic_custom;s.endpoints="string"==typeof i?JSON.parse(i):i}s=Object.assign({},s,{region:s.aws_project_region,header:{}})}return Array.isArray(s.endpoints)?s.endpoints.forEach((function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(p.warn("Rest API "+e.name+", custom_header should be a function"),e.custom_header=void 0)})):this._options&&Array.isArray(this._options.endpoints)?s.endpoints=this._options.endpoints:s.endpoints=[],this._options=Object.assign({},this._options,s),this.createInstance(),this._options},t.prototype.createInstance=function(){return p.debug("create Rest API instance"),this._api=new u(this._options),this._api.Credentials=this.Credentials,!0},t.prototype.get=function(e,t,r){try{var n=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),s=Object.assign({},r);s.cancellableToken=o;var i=this._api.get(n,s);return this._api.updateRequestToBeCancellable(i,o),i}catch(e){return Promise.reject(e.message)}},t.prototype.post=function(e,t,r){try{var n=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),s=Object.assign({},r);s.cancellableToken=o;var i=this._api.post(n,s);return this._api.updateRequestToBeCancellable(i,o),i}catch(e){return Promise.reject(e.message)}},t.prototype.put=function(e,t,r){try{var n=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),s=Object.assign({},r);s.cancellableToken=o;var i=this._api.put(n,s);return this._api.updateRequestToBeCancellable(i,o),i}catch(e){return Promise.reject(e.message)}},t.prototype.patch=function(e,t,r){try{var n=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),s=Object.assign({},r);s.cancellableToken=o;var i=this._api.patch(n,s);return this._api.updateRequestToBeCancellable(i,o),i}catch(e){return Promise.reject(e.message)}},t.prototype.del=function(e,t,r){try{var n=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),s=Object.assign({},r);s.cancellableToken=o;var i=this._api.del(n,s);return this._api.updateRequestToBeCancellable(i,o),i}catch(e){return Promise.reject(e.message)}},t.prototype.head=function(e,t,r){try{var n=this.getEndpointInfo(e,t),o=this._api.getCancellableToken(),s=Object.assign({},r);s.cancellableToken=o;var i=this._api.head(n,s);return this._api.updateRequestToBeCancellable(i,o),i}catch(e){return Promise.reject(e.message)}},t.prototype.isCancel=function(e){return this._api.isCancel(e)},t.prototype.cancel=function(e,t){return this._api.cancel(e,t)},t.prototype.endpoint=function(e){return t=this,r=void 0,o=function(){return function(e,t){var r,n,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}(this,(function(t){return[2,this._api.endpoint(e)]}))},new((n=void 0)||(n=Promise))((function(e,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,a)}c((o=o.apply(t,r||[])).next())}));var t,r,n,o},t.prototype.getEndpointInfo=function(e,t){var r=this._options.endpoints;if(!Array.isArray(r))throw new Error("API category not configured");var n=r.find((function(t){return t.name===e}));if(!n)throw new Error("API "+e+" does not exist");var o={endpoint:n.endpoint+t};return"string"==typeof n.region?o.region=n.region:"string"==typeof this._options.region&&(o.region=this._options.region),"string"==typeof n.service?o.service=n.service||"execute-api":o.service="execute-api","function"==typeof n.custom_header?o.custom_header=n.custom_header:o.custom_header=void 0,o},t}(),f=new l(null);e.Amplify.register(f);const d=f})(),o})());
2
3
  //# sourceMappingURL=aws-amplify-api-rest.min.js.map
@@ -0,0 +1 @@
1
+ /*! https://mths.be/punycode v1.3.2 by @mathias */