forked from cosmicjs/cosmicjs-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cosmicjs.browser.min.js
7 lines (7 loc) · 21.9 KB
/
cosmicjs.browser.min.js
1
2
3
4
5
6
7
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=8)}([function(t,e,n){"use strict";function r(t){return"[object Array]"===j.call(t)}function o(t){return"[object ArrayBuffer]"===j.call(t)}function i(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function u(t){return"string"==typeof t}function s(t){return"number"==typeof t}function c(t){return void 0===t}function f(t){return null!==t&&"object"==typeof t}function d(t){return"[object Date]"===j.call(t)}function l(t){return"[object File]"===j.call(t)}function p(t){return"[object Blob]"===j.call(t)}function h(t){return"[object Function]"===j.call(t)}function m(t){return f(t)&&h(t.pipe)}function y(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function w(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function b(){function t(t,n){"object"==typeof e[n]&&"object"==typeof t?e[n]=b(e[n],t):e[n]=t}for(var e={},n=0,r=arguments.length;n<r;n++)v(arguments[n],t);return e}function k(t,e,n){return v(e,function(e,r){t[r]=n&&"function"==typeof e?_(e,n):e}),t}var _=n(3),x=n(12),j=Object.prototype.toString;t.exports={isArray:r,isArrayBuffer:o,isBuffer:x,isFormData:i,isArrayBufferView:a,isString:u,isNumber:s,isObject:f,isUndefined:c,isDate:d,isFile:l,isBlob:p,isFunction:h,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:g,forEach:v,merge:b,extend:k,trim:w}},function(t,e,n){"use strict";(function(e){function r(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var o=n(0),i=n(14),a={"Content-Type":"application/x-www-form-urlencoded"},u={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(4):void 0!==e&&(t=n(4)),t}(),transformRequest:[function(t,e){return i(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t)?t:o.isArrayBufferView(t)?t.buffer:o.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)?(r(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){u.headers[t]={}}),o.forEach(["post","put","patch"],function(t){u.headers[t]=o.merge(a)}),t.exports=u}).call(e,n(2))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(d===clearTimeout)return clearTimeout(t);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){m&&p&&(m=!1,p.length?h=p.concat(h):y=-1,h.length&&u())}function u(){if(!m){var t=o(a);m=!0;for(var e=h.length;e;){for(p=h,h=[];++y<e;)p&&p[y].run();y=-1,e=h.length}p=null,m=!1,i(t)}}function s(t,e){this.fun=t,this.array=e}function c(){}var f,d,l=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(t){f=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(t){d=r}}();var p,h=[],m=!1,y=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new s(t,e)),1!==h.length||m||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.prependListener=c,l.prependOnceListener=c,l.listeners=function(t){return[]},l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(0),o=n(15),i=n(17),a=n(18),u=n(19),s=n(5),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(20);t.exports=function(t){return new Promise(function(e,f){var d=t.data,l=t.headers;r.isFormData(d)&&delete l["Content-Type"];var p=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||u(t.url)||(p=new window.XDomainRequest,h="onload",m=!0,p.onprogress=function(){},p.ontimeout=function(){}),t.auth){var y=t.auth.username||"",w=t.auth.password||"";l.Authorization="Basic "+c(y+":"+w)}if(p.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p[h]=function(){if(p&&(4===p.readyState||m)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?p.response:p.responseText,i={data:r,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:n,config:t,request:p};o(e,f,i),p=null}},p.onerror=function(){f(s("Network Error",t,null,p)),p=null},p.ontimeout=function(){f(s("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var g=n(21),v=(t.withCredentials||u(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;v&&(l[t.xsrfHeaderName]=v)}if("setRequestHeader"in p&&r.forEach(l,function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete l[e]:p.setRequestHeader(e,t)}),t.withCredentials&&(p.withCredentials=!0),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){p&&(p.abort(),f(t),p=null)}),void 0===d&&(d=null),p.send(d)})}},function(t,e,n){"use strict";var r=n(16);t.exports=function(t,e,n,o,i){var a=new Error(t);return r(a,e,n,o,i)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";var r=n(9),o=function(t){return t&&t.__esModule?t:{default:t}}(r);window.Cosmic=o.default},function(t,e,n){"use strict";(function(e){var r=n(10),o=n(29),i=e.env.COSMIC_API_URL||"https://api.cosmicjs.com",a=e.env.COSMIC_API_VERSION||"v1",u=i+"/"+a,s=function(t){t&&t.token&&(r.defaults.headers.common.Authorization=t.token);var e={authenticate:function(t){var e=u+"/authenticate";return r.post(e,t).then(function(t){return t.data}).catch(function(t){throw t.response.data})},getBuckets:function(){var t=u+"/buckets";return r.get(t).then(function(t){return t.data}).catch(function(t){throw t.response.data})},addBucket:function(t){var e=u+"/buckets";return r.post(e,t).then(function(t){return t.data}).catch(function(t){throw t.response.data})},deleteBucket:function(t){var e=u+"/buckets/"+t.id;return r.delete(e,t).then(function(t){return t.data}).catch(function(t){throw t.response.data})},importBucket:function(t){var e=u+"/buckets/"+t.id+"/import";return r.post(e,t).then(function(t){return t.data}).catch(function(t){throw t.response.data})},deployApp:function(t){var e=u+"/buckets/"+t.id+"/deploy";return r.post(e,t).then(function(t){return t.data}).catch(function(t){throw t.response.data})}},n=function(t){return{getBucket:function(e){var n=u+"/"+t.slug+"/?read_key="+t.read_key;return e&&e.show_options&&(n+="&show_options="+e.show_options),r.get(n).then(function(t){return t.data}).catch(function(t){throw t.response.data})},getObjects:function(e){var n=u+"/"+t.slug+"/objects?read_key="+t.read_key;return e&&e.limit&&(n+="&limit="+e.limit),e&&e.skip&&(n+="&skip="+e.skip),e&&e.locale&&(n+="&locale="+e.locale),e&&e.status&&(n+="&status="+e.status),e&&e.sort&&(n+="&sort="+e.sort),e&&e.type&&(n+="&type="+e.type),e&&e.q&&(n+="&q="+e.q),e&&e.metafield_key&&(n+="&metafield_key="+e.metafield_key),e&&e.metafield_value&&(n+="&metafield_value="+e.metafield_value),e&&e.metafield_object_id&&(n+="&metafield_object_id="+e.metafield_object_id),e&&e.hide_metafields&&(n+="&hide_metafields="+e.hide_metafields),e&&e.pretty&&(n+="&pretty="+e.pretty),e&&e.filters&&Object.keys(e.filters).forEach(function(t){n+="&filters["+t+"]="+e.filters[t]}),r.get(n).then(function(t){return t.data}).catch(function(t){throw t.response.data})},getObject:function(e){if(!e)throw new Error("Must supply params object with object slug");var n=u+"/"+t.slug+"/object/"+e.slug+"?read_key="+t.read_key;return e&&e.locale&&(n+="&locale="+e.locale),e&&e.status&&(n+="&status="+e.status),e&&e.revision&&(n+="&revision="+e.revision),r.get(n).then(function(t){return t.data}).catch(function(t){throw t.response.data})},getObjectTypes:function(e){var n=u+"/"+t.slug+"/object-types?read_key="+t.read_key;return e&&e.limit&&(n+="&limit="+e.limit),e&&e.skip&&(n+="&skip="+e.skip),e&&e.locale&&(n+="&locale="+e.locale),e&&e.status&&(n+="&status="+e.status),r.get(n).then(function(t){return t.data}).catch(function(t){throw t.response.data})},getObjectsByType:function(e){var n=u+"/"+t.slug+"/object-type/"+e.type_slug+"?read_key="+t.read_key;return e&&e.limit&&(n+="&limit="+e.limit),e&&e.skip&&(n+="&skip="+e.skip),e&&e.locale&&(n+="&locale="+e.locale),e&&e.status&&(n+="&status="+e.status),r.get(n).then(function(t){return t.data}).catch(function(t){throw t.response.data})},searchObjectType:function(e){var n="/search?metafield_key="+e.metafield_key;e.metafield_value?n+="&metafield_value="+e.metafield_value:e.metafield_object_slug?n+="&metafield_object_slug="+e.metafield_object_slug:n+="&metafield_value_has="+e.metafield_value_has;var o=i+"/"+a+"/"+t.slug+"/object-type/"+e.type_slug+n+"&read_key="+t.read_key;return e&&e.limit&&(o+="&limit="+e.limit),e&&e.skip&&(o+="&skip="+e.skip),e&&e.sort&&(o+="&sort="+e.sort),e&&e.locale&&(o+="&locale="+e.locale),e&&e.status&&(o+="&status="+e.status),r.get(o).then(function(t){return t.data}).catch(function(t){throw t.response.data})},addObjectType:function(e){var n=i+"/"+a+"/"+t.slug+"/add-object-type";return t.write_key&&(e.write_key=t.write_key),r.post(n,e).then(function(t){return t.data}).catch(function(t){throw t.response.data})},editObjectType:function(e){var n=i+"/"+a+"/"+t.slug+"/edit-object-type";return t.write_key&&(e.write_key=t.write_key),r.put(n,e).then(function(t){return t.data}).catch(function(t){throw t.response.data})},deleteObjectType:function(e){var n=i+"/"+a+"/"+t.slug+"/object-types/"+e.slug;return r.delete(n,{data:t}).then(function(t){return t.data}).catch(function(t){throw t.response.data})},addObject:function(e){var n=i+"/"+a+"/"+t.slug+"/add-object";return t.write_key&&(e.write_key=t.write_key),r.post(n,e).then(function(t){return t.data}).catch(function(t){throw t.response.data})},editObject:function(e){var n=i+"/"+a+"/"+t.slug+"/edit-object";return t.write_key&&(e.write_key=t.write_key),r.put(n,e).then(function(t){return t.data}).catch(function(t){throw t.response.data})},deleteObject:function(e){var n=i+"/"+a+"/"+t.slug+"/objects/"+e.slug,o=Object.assign({},t),u=Object.assign(o,e);return r.delete(n,{data:u}).then(function(t){return t.data}).catch(function(t){throw t.response.data})},addMedia:function(e){var n=i+"/"+a+"/"+t.slug+"/media",u=new o;e.media.buffer?u.append("media",e.media.buffer,e.media.originalname):u.append("media",e.media,e.media.name),t.write_key&&u.append("write_key",t.write_key),e.folder&&u.append("folder",e.folder);return function(t){return new Promise(function(n,r){e.media.buffer?t.getLength(function(e,o){e&&r(e);var i=Object.assign({"Content-Length":o},t.getHeaders());n(i)}):n({"Content-Type":"multipart/form-data"})})}(u).then(function(t){return r.post(n,u,{headers:t}).then(function(t){return t.data}).catch(function(t){throw t.response.data})})},getMedia:function(e){var n=i+"/"+a+"/"+t.slug+"/media?read_key="+t.read_key;return e&&e.limit&&(n+="&limit="+e.limit),e&&e.skip&&(n+="&skip="+e.skip),e&&e.locale&&(n+="&locale="+e.locale),e&&e.status&&(n+="&status="+e.status),e&&e.folder&&(n+="&folder="+e.folder),r.get(n).then(function(t){return t.data}).catch(function(t){throw t.response.data})},deleteMedia:function(e){var n=i+"/"+a+"/"+t.slug+"/media/"+e.id;return r.delete(n,{data:t}).then(function(t){return t.data}).catch(function(t){throw t.response.data})},addWebhook:function(e){var n=i+"/"+a+"/"+t.slug+"/webhooks";return t.write_key&&(e.write_key=t.write_key),r.post(n,e).then(function(t){return t.data}).catch(function(t){throw t.response.data})},deleteWebhook:function(e){var n=i+"/"+a+"/"+t.slug+"/webhooks/"+e.id;return r.delete(n,{data:t}).then(function(t){return t.data}).catch(function(t){throw t.response.data})},addExtension:function(e){var n=i+"/"+a+"/"+t.slug+"/extensions",u=new o;e.zip.buffer?u.append("zip",e.zip.buffer,e.zip.originalname):u.append("zip",e.zip,e.zip.name),t.write_key&&u.append("write_key",t.write_key);return function(t){return new Promise(function(n,r){e.zip.buffer?t.getLength(function(e,o){e&&r(e);var i=Object.assign({"Content-Length":o},t.getHeaders());n(i)}):n({"Content-Type":"multipart/form-data"})})}(u).then(function(t){return r.post(n,u,{headers:t}).then(function(t){return t.data}).catch(function(t){throw t.response.data})})},deleteExtension:function(e){var n=i+"/"+a+"/"+t.slug+"/extensions/"+e.id;return r.delete(n,{data:t}).then(function(t){return t.data}).catch(function(t){throw t.response.data})},addUser:function(e){var n=i+"/"+a+"/"+t.slug+"/users";return t.write_key&&(e.write_key=t.write_key),r.post(n,e).then(function(t){return t.data}).catch(function(t){throw t.response.data})},getUsers:function(){var e=i+"/"+a+"/"+t.slug+"/users";return r.get(e).then(function(t){return t.data}).catch(function(t){throw t.response.data})},getUser:function(e){var n=i+"/"+a+"/"+t.slug+"/users/"+e.id;return r.get(n).then(function(t){return t.data}).catch(function(t){throw t.response.data})}}},s={bucket:n};return s=Object.assign(e,s)};t.exports=s}).call(e,n(2))},function(t,e,n){t.exports=n(11)},function(t,e,n){"use strict";function r(t){var e=new a(t),n=i(a.prototype.request,e);return o.extend(n,a.prototype,e),o.extend(n,e),n}var o=n(0),i=n(3),a=n(13),u=n(1),s=r(u);s.Axios=a,s.create=function(t){return r(o.merge(u,t))},s.Cancel=n(7),s.CancelToken=n(27),s.isCancel=n(6),s.all=function(t){return Promise.all(t)},s.spread=n(28),t.exports=s,t.exports.default=s},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function r(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},function(t,e,n){"use strict";function r(t){this.defaults=t,this.interceptors={request:new a,response:new a}}var o=n(1),i=n(0),a=n(22),u=n(23);r.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),t=i.merge(o,this.defaults,{method:"get"},t),t.method=t.method.toLowerCase();var e=[u,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){r.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(0);t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(o.isURLSearchParams(e))i=e.toString();else{var a=[];o.forEach(e,function(t,e){null!==t&&void 0!==t&&(o.isArray(t)&&(e+="[]"),o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),i=a.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,n){"use strict";var r=n(0),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"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(o.setAttribute("href",e),e=o.href),o.setAttribute("href",e),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return e=t(window.location.href),function(n){var o=r.isString(n)?t(n):n;return o.protocol===e.protocol&&o.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";function r(){this.message="String contains an invalid character"}function o(t){for(var e,n,o=String(t),a="",u=0,s=i;o.charAt(0|u)||(s="=",u%1);a+=s.charAt(63&e>>8-u%1*8)){if((n=o.charCodeAt(u+=.75))>255)throw new r;e=e<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=o},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,o,i,a){var u=[];u.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){"use strict";function r(){this.handlers=[]}var o=n(0);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){o.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var o=n(0),i=n(24),a=n(6),u=n(1),s=n(25),c=n(26);t.exports=function(t){return r(t),t.baseURL&&!s(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=o.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||u.adapter)(t).then(function(e){return r(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new o(t),e(n.reason))})}var o=n(7);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData}]);