/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/react-use-cancel-token@1.0.3/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var react=require("react"),bind=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)}},toString=Object.prototype.toString,kindOf=function(e){return function(t){var r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function kindOfTest(e){return e=e.toLowerCase(),function(t){return kindOf(t)===e}}function isArray(e){return Array.isArray(e)}function isUndefined(e){return void 0===e}function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer)}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return null!==e&&"object"==typeof e}function isPlainObject(e){if("object"!==kindOf(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList");function isFunction(e){return"[object Function]"===toString.call(e)}function isStream(e){return isObject(e)&&isFunction(e.pipe)}function isFormData(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||toString.call(e)===t||isFunction(e.toString)&&e.toString()===t)}var isURLSearchParams=kindOfTest("URLSearchParams");function trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function isStandardBrowserEnv(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function forEach(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),isArray(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function merge(){var e={};function t(t,r){isPlainObject(e[r])&&isPlainObject(t)?e[r]=merge(e[r],t):isPlainObject(t)?e[r]=merge({},t):isArray(t)?e[r]=t.slice():e[r]=t}for(var r=0,n=arguments.length;r<n;r++)forEach(arguments[r],t);return e}function extend(e,t,r){return forEach(t,(function(t,n){e[n]=r&&"function"==typeof t?bind(t,r):t})),e}function stripBOM(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}function inherits(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)}function toFlatObject(e,t,r){var n,i,o,s={};t=t||{};do{for(i=(n=Object.getOwnPropertyNames(e)).length;i-- >0;)s[o=n[i]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t}function endsWith(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r}function toArray(e){if(!e)return null;var t=e.length;if(isUndefined(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r}var isTypedArray=function(e){return function(t){return e&&t instanceof e}}("undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array)),utils={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,isTypedArray:isTypedArray,isFileList:isFileList};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var buildURL=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(utils.isURLSearchParams(t))n=t.toString();else{var i=[];utils.forEach(t,(function(e,t){null!=e&&(utils.isArray(e)?t+="[]":e=[e],utils.forEach(e,(function(e){utils.isDate(e)?e=e.toISOString():utils.isObject(e)&&(e=JSON.stringify(e)),i.push(encode(t)+"="+encode(e))})))})),n=i.join("&")}if(n){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e};function InterceptorManager(){this.handlers=[]}InterceptorManager.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},InterceptorManager.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function(e){utils.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var InterceptorManager_1=InterceptorManager,normalizeHeaderName=function(e,t){utils.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))};function AxiosError(e,t,r,n,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}utils.inherits(AxiosError,Error,{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,status:this.response&&this.response.status?this.response.status:null}}});var prototype=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){descriptors[e]={value:e}})),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype,"isAxiosError",{value:!0}),AxiosError.from=function(e,t,r,n,i,o){var s=Object.create(prototype);return utils.toFlatObject(e,s,(function(e){return e!==Error.prototype})),AxiosError.call(s,e.message,t,r,n,i),s.name=e.name,o&&Object.assign(s,o),s};var AxiosError_1=AxiosError,transitional={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};function toFormData(e,t){t=t||new FormData;var r=[];function n(e){return null===e?"":utils.isDate(e)?e.toISOString():utils.isArrayBuffer(e)||utils.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,o){if(utils.isPlainObject(i)||utils.isArray(i)){if(-1!==r.indexOf(i))throw Error("Circular reference detected in "+o);r.push(i),utils.forEach(i,(function(r,i){if(!utils.isUndefined(r)){var s,a=o?o+"."+i:i;if(r&&!o&&"object"==typeof r)if(utils.endsWith(i,"{}"))r=JSON.stringify(r);else if(utils.endsWith(i,"[]")&&(s=utils.toArray(r)))return void s.forEach((function(e){!utils.isUndefined(e)&&t.append(a,n(e))}));e(r,a)}})),r.pop()}else t.append(o,n(i))}(e),t}var toFormData_1=toFormData,settle=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError_1("Request failed with status code "+r.status,[AxiosError_1.ERR_BAD_REQUEST,AxiosError_1.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)},cookies=utils.isStandardBrowserEnv()?{write:function(e,t,r,n,i,o){var s=[];s.push(e+"="+encodeURIComponent(t)),utils.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),utils.isString(n)&&s.push("path="+n),utils.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.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(){}},isAbsoluteURL=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},combineURLs=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},buildFullPath=function(e,t){return e&&!isAbsoluteURL(t)?combineURLs(e,t):t},ignoreDuplicateOf=["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"],parseHeaders=function(e){var t,r,n,i={};return e?(utils.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=utils.trim(e.substr(0,n)).toLowerCase(),r=utils.trim(e.substr(n+1)),t){if(i[t]&&ignoreDuplicateOf.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i},isURLSameOrigin=utils.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(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=n(window.location.href),function(t){var r=utils.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function CanceledError(e){AxiosError_1.call(this,null==e?"canceled":e,AxiosError_1.ERR_CANCELED),this.name="CanceledError"}utils.inherits(CanceledError,AxiosError_1,{__CANCEL__:!0});var CanceledError_1=CanceledError,parseProtocol=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""},xhr=function(e){return new Promise((function(t,r){var n,i=e.data,o=e.headers,s=e.responseType;function a(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}utils.isFormData(i)&&utils.isStandardBrowserEnv()&&delete o["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(c+":"+l)}var f=buildFullPath(e.baseURL,e.url);function d(){if(u){var n="getAllResponseHeaders"in u?parseHeaders(u.getAllResponseHeaders()):null,i={data:s&&"text"!==s&&"json"!==s?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u};settle((function(e){t(e),a()}),(function(e){r(e),a()}),i),u=null}}if(u.open(e.method.toUpperCase(),buildURL(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(r(new AxiosError_1("Request aborted",AxiosError_1.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new AxiosError_1("Network Error",AxiosError_1.ERR_NETWORK,e,u,u)),u=null},u.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError_1(t,n.clarifyTimeoutError?AxiosError_1.ETIMEDOUT:AxiosError_1.ECONNABORTED,e,u)),u=null},utils.isStandardBrowserEnv()){var p=(e.withCredentials||isURLSameOrigin(f))&&e.xsrfCookieName?cookies.read(e.xsrfCookieName):void 0;p&&(o[e.xsrfHeaderName]=p)}"setRequestHeader"in u&&utils.forEach(o,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete o[t]:u.setRequestHeader(t,e)})),utils.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&"json"!==s&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){u&&(r(!e||e&&e.type?new CanceledError_1:e),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),i||(i=null);var h=parseProtocol(f);h&&-1===["http","https","file"].indexOf(h)?r(new AxiosError_1("Unsupported protocol "+h+":",AxiosError_1.ERR_BAD_REQUEST,e)):u.send(i)}))},_null=null,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!utils.isUndefined(e)&&utils.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function getDefaultAdapter(){var e;return("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=xhr),e}function stringifySafely(e,t,r){if(utils.isString(e))try{return(t||JSON.parse)(e),utils.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}var defaults={transitional:transitional,adapter:getDefaultAdapter(),transformRequest:[function(e,t){if(normalizeHeaderName(t,"Accept"),normalizeHeaderName(t,"Content-Type"),utils.isFormData(e)||utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e))return e;if(utils.isArrayBufferView(e))return e.buffer;if(utils.isURLSearchParams(e))return setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=utils.isObject(e),i=t&&t["Content-Type"];if((r=utils.isFileList(e))||n&&"multipart/form-data"===i){var o=this.env&&this.env.FormData;return toFormData_1(r?{"files[]":e}:e,o&&new o)}return n||"application/json"===i?(setContentTypeIfUnset(t,"application/json"),stringifySafely(e)):e}],transformResponse:[function(e){var t=this.transitional||defaults.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&utils.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw AxiosError_1.from(e,AxiosError_1.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],(function(e){defaults.headers[e]={}})),utils.forEach(["post","put","patch"],(function(e){defaults.headers[e]=utils.merge(DEFAULT_CONTENT_TYPE)}));var defaults_1=defaults,transformData=function(e,t,r){var n=this||defaults_1;return utils.forEach(r,(function(r){e=r.call(n,e,t)})),e},isCancel=function(e){return!(!e||!e.__CANCEL__)};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError_1}var dispatchRequest=function(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=transformData.call(e,e.data,e.headers,e.transformRequest),e.headers=utils.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),utils.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||defaults_1.adapter)(e).then((function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},mergeConfig=function(e,t){t=t||{};var r={};function n(e,t){return utils.isPlainObject(e)&&utils.isPlainObject(t)?utils.merge(e,t):utils.isPlainObject(t)?utils.merge({},t):utils.isArray(t)?t.slice():t}function i(r){return utils.isUndefined(t[r])?utils.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function o(e){if(!utils.isUndefined(t[e]))return n(void 0,t[e])}function s(r){return utils.isUndefined(t[r])?utils.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function a(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return utils.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,n=t(e);utils.isUndefined(n)&&t!==a||(r[e]=n)})),r},data={version:"0.27.2"},VERSION=data.version,validators$1={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var deprecatedWarnings={};function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError_1("options must be an object",AxiosError_1.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],s=t[o];if(s){var a=e[o],u=void 0===a||s(a,o,e);if(!0!==u)throw new AxiosError_1("option "+o+" must be "+u,AxiosError_1.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError_1("Unknown option "+o,AxiosError_1.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,r){function n(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,o){if(!1===e)throw new AxiosError_1(n(i," has been removed"+(t?" in "+t:"")),AxiosError_1.ERR_DEPRECATED);return t&&!deprecatedWarnings[i]&&(deprecatedWarnings[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var validator={assertOptions:assertOptions,validators:validators$1},validators=validator.validators;function Axios(e){this.defaults=e,this.interceptors={request:new InterceptorManager_1,response:new InterceptorManager_1}}Axios.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=mergeConfig(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!i){var a=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(s),o=Promise.resolve(t);a.length;)o=o.then(a.shift(),a.shift());return o}for(var u=t;n.length;){var c=n.shift(),l=n.shift();try{u=c(u)}catch(e){l(e);break}}try{o=dispatchRequest(u)}catch(e){return Promise.reject(e)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},Axios.prototype.getUri=function(e){e=mergeConfig(this.defaults,e);var t=buildFullPath(e.baseURL,e.url);return buildURL(t,e.params,e.paramsSerializer)},utils.forEach(["delete","get","head","options"],(function(e){Axios.prototype[e]=function(t,r){return this.request(mergeConfig(r||{},{method:e,url:t,data:(r||{}).data}))}})),utils.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(mergeConfig(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios.prototype[e]=t(),Axios.prototype[e+"Form"]=t(!0)}));var Axios_1=Axios;function CancelToken(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;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new CanceledError_1(e),t(r.reason))}))}CancelToken.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},CancelToken.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},CancelToken.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},CancelToken.source=function(){var e;return{token:new CancelToken((function(t){e=t})),cancel:e}};var CancelToken_1=CancelToken,spread=function(e){return function(t){return e.apply(null,t)}},isAxiosError=function(e){return utils.isObject(e)&&!0===e.isAxiosError};function createInstance(e){var t=new Axios_1(e),r=bind(Axios_1.prototype.request,t);return utils.extend(r,Axios_1.prototype,t),utils.extend(r,t),r.create=function(t){return createInstance(mergeConfig(e,t))},r}var axios$1=createInstance(defaults_1);axios$1.Axios=Axios_1,axios$1.CanceledError=CanceledError_1,axios$1.CancelToken=CancelToken_1,axios$1.isCancel=isCancel,axios$1.VERSION=data.version,axios$1.toFormData=toFormData_1,axios$1.AxiosError=AxiosError_1,axios$1.Cancel=axios$1.CanceledError,axios$1.all=function(e){return Promise.all(e)},axios$1.spread=spread,axios$1.isAxiosError=isAxiosError;var axios_1=axios$1,_default=axios$1;axios_1.default=_default;var axios=axios_1,useAbortController=function(){var e=react.useRef(null),t=axios.isCancel,r=function(){e.current&&e.current.abort()};return react.useEffect((function(){return r}),[]),{controller:e,newAbortSignal:function(){return e.current=new AbortController,e.current.signal},cancelPreviousRequest:r,isCancel:t}},useCancelToken=function(){var e=react.useRef(null),t=axios.CancelToken,r=axios.isCancel,n=function(t){e.current&&e.current.cancel(t)};return react.useEffect((function(){return n}),[]),{source:e,newCancelToken:function(){return e.current=t.source(),e.current.token},cancelPreviousRequest:n,isCancel:r}};exports.default=useAbortController,exports.useCancelToken=useCancelToken;
//# sourceMappingURL=/sm/abd1c7e78751cb45bb1c5deeb65e72ae35ad4ddf95e7d48c826dca22b63bc852.map