@myinterview/widget-react 1.1.66 → 1.1.68-development-a33be59
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.
- package/dist/cjs/index.js +1615 -993
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1615 -993
- package/dist/esm/index.js.map +1 -1
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -1273,7 +1273,7 @@ function c(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r
|
|
|
1273
1273
|
*
|
|
1274
1274
|
* This source code is licensed under the MIT license found in the
|
|
1275
1275
|
* LICENSE file in the root directory of this source tree.
|
|
1276
|
-
*/!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(R)return I;R=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case d:case s:return e;default:switch(e=e&&e.$$typeof){case i:case u:case y:case p:case a:return e;default:return f}}case n:return f}}}function b(e){return v(e)===c}return I.AsyncMode=l,I.ConcurrentMode=c,I.ContextConsumer=i,I.ContextProvider=a,I.Element=t,I.ForwardRef=u,I.Fragment=r,I.Lazy=y,I.Memo=p,I.Portal=n,I.Profiler=o,I.StrictMode=d,I.Suspense=s,I.isAsyncMode=function(e){return b(e)||v(e)===l},I.isConcurrentMode=b,I.isContextConsumer=function(e){return v(e)===i},I.isContextProvider=function(e){return v(e)===a},I.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},I.isForwardRef=function(e){return v(e)===u},I.isFragment=function(e){return v(e)===r},I.isLazy=function(e){return v(e)===y},I.isMemo=function(e){return v(e)===p},I.isPortal=function(e){return v(e)===n},I.isProfiler=function(e){return v(e)===o},I.isStrictMode=function(e){return v(e)===d},I.isSuspense=function(e){return v(e)===s},I.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},I.typeOf=v,I}():e.exports=(B||(B=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var $=e.type;switch($){case l:case c:case r:case o:case d:case s:return $;default:var h=$&&$.$$typeof;switch(h){case i:case u:case y:case p:case a:return h;default:return f}}case n:return f}}}var b=l,w=c,C=i,P=a,E=t,S=u,O=r,A=y,k=p,M=n,j=o,_=d,x=s,T=!1;function R(e){return v(e)===c}V.AsyncMode=b,V.ConcurrentMode=w,V.ContextConsumer=C,V.ContextProvider=P,V.Element=E,V.ForwardRef=S,V.Fragment=O,V.Lazy=A,V.Memo=k,V.Portal=M,V.Profiler=j,V.StrictMode=_,V.Suspense=x,V.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(e)||v(e)===l},V.isConcurrentMode=R,V.isContextConsumer=function(e){return v(e)===i},V.isContextProvider=function(e){return v(e)===a},V.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},V.isForwardRef=function(e){return v(e)===u},V.isFragment=function(e){return v(e)===r},V.isLazy=function(e){return v(e)===y},V.isMemo=function(e){return v(e)===p},V.isPortal=function(e){return v(e)===n},V.isProfiler=function(e){return v(e)===o},V.isStrictMode=function(e){return v(e)===d},V.isSuspense=function(e){return v(e)===s},V.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},V.typeOf=v;}()),V);}(N);var H=N.exports,U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},G={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F={};function Z(e){return H.isMemo(e)?G:F[e.$$typeof]||U}F[H.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F[H.Memo]=G;var Q=Object.defineProperty,K=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,J=Object.getPrototypeOf,q=Object.prototype;var X=function e(t,n,r){if("string"!=typeof n){if(q){var d=J(n);d&&d!==q&&e(t,d,r);}var o=K(n);W&&(o=o.concat(W(n)));for(var a=Z(t),i=Z(n),l=0;l<o.length;++l){var c=o[l];if(!(z[c]||r&&r[c]||i&&i[c]||a&&a[c])){var u=Y(n,c);try{Q(t,c,u);}catch(e){}}}}return t};function ee(){return (ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var te=function(e,t){for(var n=[e[0]],r=0,d=t.length;r<d;r+=1)n.push(t[r],e[r+1]);return n},ne=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!A.exports.typeOf(e)},re=Object.freeze([]),de=Object.freeze({});function oe(e){return "function"==typeof e}function ae(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function ie(e){return e&&"string"==typeof e.styledComponentId}var le="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ce="undefined"!=typeof window&&"HTMLElement"in window,ue=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),se="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function fe(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t);})),e}function pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw "production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(fe.apply(void 0,[se[e]].concat(n)).trim())}var ye=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,d=r;e>=d;)(d<<=1)<0&&pe(16,""+e);this.groupSizes=new Uint32Array(d),this.groupSizes.set(n),this.length=d;for(var o=r;o<d;o++)this.groupSizes[o]=0;}for(var a=this.indexOfGroup(e+1),i=0,l=t.length;i<l;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++);},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var d=n;d<r;d++)this.tag.deleteRule(n);}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),d=r+n,o=r;o<d;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),$e=new Map,he=new Map,me=1,ge=function(e){if($e.has(e))return $e.get(e);for(;he.has(me);)me++;var t=me++;return "production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&pe(16,""+t),$e.set(e,t),he.set(t,e),t},ve=function(e){return he.get(e)},be=function(e,t){t>=me&&(me=t+1),$e.set(e,t),he.set(t,e);},we="style["+le+'][data-styled-version="5.3.6"]',Ce=new RegExp("^"+le+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Pe=function(e,t,n){for(var r,d=n.split(","),o=0,a=d.length;o<a;o++)(r=d[o])&&e.registerName(t,r);},Ee=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],d=0,o=n.length;d<o;d++){var a=n[d].trim();if(a){var i=a.match(Ce);if(i){var l=0|parseInt(i[1],10),c=i[2];0!==l&&(be(c,l),Pe(e,c,i[3]),e.getTag().insertRules(l,r)),r.length=0;}else r.push(a);}}},Se=function(e){var t=document.head,n=e||t,r=document.createElement("style"),d=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(le))return r}}(n),o=void 0!==d?d.nextSibling:null;r.setAttribute(le,"active"),r.setAttribute("data-styled-version","5.3.6");var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},Oe=function(){function e(e){var t=this.element=Se(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var d=t[n];if(d.ownerNode===e)return d}pe(17);}(t),this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Ae=function(){function e(e){var t=this.element=Se(e);this.nodes=t.childNodes,this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ke=function(){function e(e){this.rules=[],this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--;},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Me=ce,je={isServer:!ce,useCSSOMInjection:!ue},_e$1=function(){function e(e,t,n){void 0===e&&(e=de),void 0===t&&(t={}),this.options=ee({},je,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&ce&&Me&&(Me=!1,function(e){for(var t=document.querySelectorAll(we),n=0,r=t.length;n<r;n++){var d=t[n];d&&"active"!==d.getAttribute(le)&&(Ee(e,d),d.parentNode&&d.parentNode.removeChild(d));}}(this));}e.registerId=function(e){return ge(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(ee({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,d=t.target,e=n?new ke(d):r?new Oe(d):new Ae(d),new ye(e)));var e,t,n,r,d;},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(ge(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ge(e),n);},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},t.clearRules=function(e){this.getTag().clearGroup(ge(e)),this.clearNames(e);},t.clearTag=function(){this.tag=void 0;},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",d=0;d<n;d++){var o=ve(d);if(void 0!==o){var a=e.names.get(o),i=t.getGroup(d);if(a&&i&&a.size){var l=le+".g"+d+'[id="'+o+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",");})),r+=""+i+l+'{content:"'+c+'"}/*!sc*/\n';}}}return r}(this)},e}(),xe=/(a)(d)/gi,Te=function(e){return String.fromCharCode(e+(e>25?39:97))};function Re(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Te(t%52)+n;return (Te(t%52)+n).replace(xe,"$1-$2")}var Le=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},De=function(e){return Le(5381,e)};var Ne=De("5.3.6"),Ie=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!ie(n))return !1}return !0}(e),this.componentId=t,this.baseHash=Le(Ne,t),this.baseStyle=n,_e$1.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,d=[];if(this.baseStyle&&d.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))d.push(this.staticRulesId);else {var o=qe(this.rules,e,t,n).join(""),a=Re(Le(this.baseHash,o)>>>0);if(!t.hasNameForId(r,a)){var i=n(o,"."+a,void 0,r);t.insertRules(r,a,i);}d.push(a),this.staticRulesId=a;}else {for(var l=this.rules.length,c=Le(this.baseHash,n.hash),u="",s=0;s<l;s++){var f=this.rules[s];if("string"==typeof f)u+=f,"production"!==process.env.NODE_ENV&&(c=Le(c,f+s));else if(f){var p=qe(f,e,t,n),y=Array.isArray(p)?p.join(""):p;c=Le(c,y+s),u+=y;}}if(u){var $=Re(c>>>0);if(!t.hasNameForId(r,$)){var h=n(u,"."+$,void 0,r);t.insertRules(r,$,h);}d.push($);}}return d.join(" ")},e}(),Be=/^\s*\/\/.*$/gm,Ve=[":","[",".","#"];var He=React__default.createContext();He.Consumer;var Ue=React__default.createContext(),ze=(Ue.Consumer,new _e$1),Ge=function(e){var t,n,r,d,o=void 0===e?de:e,a=o.options,i=void 0===a?de:a,l=o.plugins,c=void 0===l?re:l,u=new _(i),s=[],f=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,d,o,a,i,l,c,u,s){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(d[0]+r),"";default:return r+(0===s?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){s.push(e);})),p=function(e,r,o){return 0===r&&-1!==Ve.indexOf(o[n.length])||o.match(d)?e:"."+t};function y(e,o,a,i){void 0===i&&(i="&");var l=e.replace(Be,""),c=o&&a?a+" "+o+" { "+l+" }":l;return t=i,n=o,r=new RegExp("\\"+n+"\\b","g"),d=new RegExp("(\\"+n+"\\b){2,}"),u(a||!o?"":o,c)}return u.use([].concat(c,[function(e,t,d){2===e&&d.length&&d[0].lastIndexOf(n)>0&&(d[0]=d[0].replace(r,p));},f,function(e){if(-2===e){var t=s;return s=[],t}}])),y.hash=c.length?c.reduce((function(e,t){return t.name||pe(15),Le(e,t.name)}),5381).toString():"",y}();var Fe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ge);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return pe(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=Ge),this.name+e.hash},e}(),Ze=/([A-Z])/,Qe=/([A-Z])/g,Ke=/^ms-/,We=function(e){return "-"+e.toLowerCase()};function Ye(e){return Ze.test(e)?e.replace(Qe,We).replace(Ke,"-ms-"):e}var Je=function(e){return null==e||!1===e||""===e};function qe(e,t,n,r){if(Array.isArray(e)){for(var d,o=[],a=0,i=e.length;a<i;a+=1)""!==(d=qe(e[a],t,n,r))&&(Array.isArray(d)?o.push.apply(o,d):o.push(d));return o}if(Je(e))return "";if(ie(e))return "."+e.styledComponentId;if(oe(e)){if("function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return "production"!==process.env.NODE_ENV&&A.exports.isElement(l)&&console.warn(ae(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),qe(l,t,n,r)}var c;return e instanceof Fe?n?(e.inject(n,r),e.getName(r)):e:ne(e)?function e(t,n){var r,d,o=[];for(var a in t)t.hasOwnProperty(a)&&!Je(t[a])&&(Array.isArray(t[a])&&t[a].isCss||oe(t[a])?o.push(Ye(a)+":",t[a],";"):ne(t[a])?o.push.apply(o,e(t[a],a)):o.push(Ye(a)+": "+(r=a,(null==(d=t[a])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||r in x?String(d).trim():d+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString()}var Xe=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function et(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return oe(e)||ne(e)?Xe(qe(te(re,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Xe(qe(te(e,n)))}var tt=/invalid hook call/i,nt=new Set,rt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,dt=/(^-|-$)/g;function ot(e){return e.replace(rt,"-").replace(dt,"")}function at(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var it=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},lt=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ct(e,t,n){var r=e[n];it(t)&&it(r)?ut(r,t):e[n]=t;}function ut(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var d=0,o=n;d<o.length;d++){var a=o[d];if(it(a))for(var i in a)lt(i)&&ct(e,a[i],i);}return e}var st=React__default.createContext();st.Consumer;var ft={};function pt(o,a,i){var l=ie(o),c=!at(o),u=a.attrs,s=void 0===u?re:u,f=a.componentId,p=void 0===f?function(e,t){var n="string"!=typeof e?"sc":ot(e);ft[n]=(ft[n]||0)+1;var r=n+"-"+function(e){return Re(De(e)>>>0)}("5.3.6"+n+ft[n]);return t?t+"-"+r:r}(a.displayName,a.parentComponentId):f,y=a.displayName,$=void 0===y?function(e){return at(e)?"styled."+e:"Styled("+ae(e)+")"}(o):y,h=a.displayName&&a.componentId?ot(a.displayName)+"-"+a.componentId:a.componentId||p,m=l&&o.attrs?Array.prototype.concat(o.attrs,s).filter(Boolean):s,g=a.shouldForwardProp;l&&o.shouldForwardProp&&(g=a.shouldForwardProp?function(e,t,n){return o.shouldForwardProp(e,t,n)&&a.shouldForwardProp(e,t,n)}:o.shouldForwardProp);var v,b=new Ie(i,h,l?o.componentStyle:void 0),w=b.isStatic&&0===s.length,C=function(e,t){return function(e,t,o,a){var i=e.attrs,l=e.componentStyle,c=e.defaultProps,u=e.foldedComponentIds,s=e.shouldForwardProp,f=e.styledComponentId,p=e.target;"production"!==process.env.NODE_ENV&&useDebugValue(f);var y=function(e,t,n){void 0===e&&(e=de);var r=ee({},t,{theme:e}),d={};return n.forEach((function(e){var t,n,o,a=e;for(t in oe(a)&&(a=a(r)),a)r[t]=d[t]="className"===t?(n=d[t],o=a[t],n&&o?n+" "+o:n||o):a[t];})),[r,d]}(function(e,t,n){return void 0===n&&(n=de),e.theme!==n.theme&&e.theme||t||n.theme}(t,useContext(st),c)||de,t,i),$=y[0],h=y[1],m=function(e,t,d,o){var a=useContext(He)||ze,i=useContext(Ue)||Ge,l=t?e.generateAndInjectStyles(de,a,i):e.generateAndInjectStyles(d,a,i);return "production"!==process.env.NODE_ENV&&useDebugValue(l),"production"!==process.env.NODE_ENV&&!t&&o&&o(l),l}(l,a,$,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),g=o,v=h.$as||t.$as||h.as||t.as||p,b=at(v),w=h!==t?ee({},t,{},h):t,C={};for(var P in w)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?C.as=w[P]:(s?s(P,D,v):!b||D(P))&&(C[P]=w[P]));return t.style&&h.style!==t.style&&(C.style=ee({},t.style,{},h.style)),C.className=Array.prototype.concat(u,f,m!==f?m:null,t.className,h.className).filter(Boolean).join(" "),C.ref=g,createElement(v,C)}(v,e,t,w)};return C.displayName=$,(v=React__default.forwardRef(C)).attrs=m,v.componentStyle=b,v.displayName=$,v.shouldForwardProp=g,v.foldedComponentIds=l?Array.prototype.concat(o.foldedComponentIds,o.styledComponentId):re,v.styledComponentId=h,v.target=l?o.target:o,v.withComponent=function(e){var t=a.componentId,n=function(e,t){if(null==e)return {};var n,r,d={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(d[n]=e[n]);return d}(a,["componentId"]),r=t&&t+"-"+(at(e)?e:ot(ae(e)));return pt(e,ee({},n,{attrs:m,componentId:r}),i)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=l?ut({},o.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(function(e,n){if("production"!==process.env.NODE_ENV){var r="The component "+e+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",d=console.error;try{var o=!0;console.error=function(e){if(tt.test(e))o=!1,nt.delete(r);else {for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];d.apply(void 0,[e].concat(n));}},useRef(),o&&!nt.has(r)&&(console.warn(r),nt.add(r));}catch(e){tt.test(e.message)&&nt.delete(r);}finally{console.error=d;}}}($,h),v.warnTooManyClasses=function(e,t){var n={},r=!1;return function(d){if(!r&&(n[d]=!0,Object.keys(n).length>=200)){var o=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+o+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={};}}}($,h)),v.toString=function(){return "."+v.styledComponentId},c&&X(v,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var yt=function(e){return function e(t,n,r){if(void 0===r&&(r=de),!A.exports.isValidElementType(n))return pe(1,String(n));var d=function(){return t(n,r,et.apply(void 0,arguments))};return d.withConfig=function(d){return e(t,n,ee({},r,{},d))},d.attrs=function(d){return e(t,n,ee({},r,{attrs:Array.prototype.concat(r.attrs,d).filter(Boolean)}))},d}(pt,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){yt[e]=yt(e);})),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);const $t=yt.div`
|
|
1276
|
+
*/!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(R)return I;R=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case d:case s:return e;default:switch(e=e&&e.$$typeof){case i:case u:case y:case p:case a:return e;default:return f}}case n:return f}}}function b(e){return v(e)===c}return I.AsyncMode=l,I.ConcurrentMode=c,I.ContextConsumer=i,I.ContextProvider=a,I.Element=t,I.ForwardRef=u,I.Fragment=r,I.Lazy=y,I.Memo=p,I.Portal=n,I.Profiler=o,I.StrictMode=d,I.Suspense=s,I.isAsyncMode=function(e){return b(e)||v(e)===l},I.isConcurrentMode=b,I.isContextConsumer=function(e){return v(e)===i},I.isContextProvider=function(e){return v(e)===a},I.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},I.isForwardRef=function(e){return v(e)===u},I.isFragment=function(e){return v(e)===r},I.isLazy=function(e){return v(e)===y},I.isMemo=function(e){return v(e)===p},I.isPortal=function(e){return v(e)===n},I.isProfiler=function(e){return v(e)===o},I.isStrictMode=function(e){return v(e)===d},I.isSuspense=function(e){return v(e)===s},I.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},I.typeOf=v,I}():e.exports=(B||(B=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var $=e.type;switch($){case l:case c:case r:case o:case d:case s:return $;default:var h=$&&$.$$typeof;switch(h){case i:case u:case y:case p:case a:return h;default:return f}}case n:return f}}}var b=l,w=c,C=i,P=a,E=t,S=u,O=r,A=y,k=p,M=n,j=o,_=d,x=s,T=!1;function R(e){return v(e)===c}V.AsyncMode=b,V.ConcurrentMode=w,V.ContextConsumer=C,V.ContextProvider=P,V.Element=E,V.ForwardRef=S,V.Fragment=O,V.Lazy=A,V.Memo=k,V.Portal=M,V.Profiler=j,V.StrictMode=_,V.Suspense=x,V.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(e)||v(e)===l},V.isConcurrentMode=R,V.isContextConsumer=function(e){return v(e)===i},V.isContextProvider=function(e){return v(e)===a},V.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},V.isForwardRef=function(e){return v(e)===u},V.isFragment=function(e){return v(e)===r},V.isLazy=function(e){return v(e)===y},V.isMemo=function(e){return v(e)===p},V.isPortal=function(e){return v(e)===n},V.isProfiler=function(e){return v(e)===o},V.isStrictMode=function(e){return v(e)===d},V.isSuspense=function(e){return v(e)===s},V.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},V.typeOf=v;}()),V);}(N);var H=N.exports,U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},G$1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F={};function Z(e){return H.isMemo(e)?G$1:F[e.$$typeof]||U}F[H.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F[H.Memo]=G$1;var Q=Object.defineProperty,K=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,J=Object.getPrototypeOf,q=Object.prototype;var X=function e(t,n,r){if("string"!=typeof n){if(q){var d=J(n);d&&d!==q&&e(t,d,r);}var o=K(n);W&&(o=o.concat(W(n)));for(var a=Z(t),i=Z(n),l=0;l<o.length;++l){var c=o[l];if(!(z[c]||r&&r[c]||i&&i[c]||a&&a[c])){var u=Y(n,c);try{Q(t,c,u);}catch(e){}}}}return t};function ee(){return (ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var te=function(e,t){for(var n=[e[0]],r=0,d=t.length;r<d;r+=1)n.push(t[r],e[r+1]);return n},ne=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!A.exports.typeOf(e)},re=Object.freeze([]),de=Object.freeze({});function oe(e){return "function"==typeof e}function ae(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function ie(e){return e&&"string"==typeof e.styledComponentId}var le="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ce="undefined"!=typeof window&&"HTMLElement"in window,ue=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),se="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function fe(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t);})),e}function pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw "production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(fe.apply(void 0,[se[e]].concat(n)).trim())}var ye=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,d=r;e>=d;)(d<<=1)<0&&pe(16,""+e);this.groupSizes=new Uint32Array(d),this.groupSizes.set(n),this.length=d;for(var o=r;o<d;o++)this.groupSizes[o]=0;}for(var a=this.indexOfGroup(e+1),i=0,l=t.length;i<l;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++);},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var d=n;d<r;d++)this.tag.deleteRule(n);}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),d=r+n,o=r;o<d;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),$e=new Map,he=new Map,me=1,ge=function(e){if($e.has(e))return $e.get(e);for(;he.has(me);)me++;var t=me++;return "production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&pe(16,""+t),$e.set(e,t),he.set(t,e),t},ve=function(e){return he.get(e)},be=function(e,t){t>=me&&(me=t+1),$e.set(e,t),he.set(t,e);},we="style["+le+'][data-styled-version="5.3.6"]',Ce=new RegExp("^"+le+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Pe=function(e,t,n){for(var r,d=n.split(","),o=0,a=d.length;o<a;o++)(r=d[o])&&e.registerName(t,r);},Ee=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],d=0,o=n.length;d<o;d++){var a=n[d].trim();if(a){var i=a.match(Ce);if(i){var l=0|parseInt(i[1],10),c=i[2];0!==l&&(be(c,l),Pe(e,c,i[3]),e.getTag().insertRules(l,r)),r.length=0;}else r.push(a);}}},Se=function(e){var t=document.head,n=e||t,r=document.createElement("style"),d=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(le))return r}}(n),o=void 0!==d?d.nextSibling:null;r.setAttribute(le,"active"),r.setAttribute("data-styled-version","5.3.6");var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},Oe=function(){function e(e){var t=this.element=Se(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var d=t[n];if(d.ownerNode===e)return d}pe(17);}(t),this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Ae=function(){function e(e){var t=this.element=Se(e);this.nodes=t.childNodes,this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ke=function(){function e(e){this.rules=[],this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--;},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Me=ce,je={isServer:!ce,useCSSOMInjection:!ue},_e$1=function(){function e(e,t,n){void 0===e&&(e=de),void 0===t&&(t={}),this.options=ee({},je,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&ce&&Me&&(Me=!1,function(e){for(var t=document.querySelectorAll(we),n=0,r=t.length;n<r;n++){var d=t[n];d&&"active"!==d.getAttribute(le)&&(Ee(e,d),d.parentNode&&d.parentNode.removeChild(d));}}(this));}e.registerId=function(e){return ge(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(ee({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,d=t.target,e=n?new ke(d):r?new Oe(d):new Ae(d),new ye(e)));var e,t,n,r,d;},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(ge(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ge(e),n);},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},t.clearRules=function(e){this.getTag().clearGroup(ge(e)),this.clearNames(e);},t.clearTag=function(){this.tag=void 0;},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",d=0;d<n;d++){var o=ve(d);if(void 0!==o){var a=e.names.get(o),i=t.getGroup(d);if(a&&i&&a.size){var l=le+".g"+d+'[id="'+o+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",");})),r+=""+i+l+'{content:"'+c+'"}/*!sc*/\n';}}}return r}(this)},e}(),xe=/(a)(d)/gi,Te=function(e){return String.fromCharCode(e+(e>25?39:97))};function Re(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Te(t%52)+n;return (Te(t%52)+n).replace(xe,"$1-$2")}var Le=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},De=function(e){return Le(5381,e)};var Ne=De("5.3.6"),Ie=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!ie(n))return !1}return !0}(e),this.componentId=t,this.baseHash=Le(Ne,t),this.baseStyle=n,_e$1.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,d=[];if(this.baseStyle&&d.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))d.push(this.staticRulesId);else {var o=qe(this.rules,e,t,n).join(""),a=Re(Le(this.baseHash,o)>>>0);if(!t.hasNameForId(r,a)){var i=n(o,"."+a,void 0,r);t.insertRules(r,a,i);}d.push(a),this.staticRulesId=a;}else {for(var l=this.rules.length,c=Le(this.baseHash,n.hash),u="",s=0;s<l;s++){var f=this.rules[s];if("string"==typeof f)u+=f,"production"!==process.env.NODE_ENV&&(c=Le(c,f+s));else if(f){var p=qe(f,e,t,n),y=Array.isArray(p)?p.join(""):p;c=Le(c,y+s),u+=y;}}if(u){var $=Re(c>>>0);if(!t.hasNameForId(r,$)){var h=n(u,"."+$,void 0,r);t.insertRules(r,$,h);}d.push($);}}return d.join(" ")},e}(),Be=/^\s*\/\/.*$/gm,Ve=[":","[",".","#"];var He=React__default.createContext();He.Consumer;var Ue=React__default.createContext(),ze=(Ue.Consumer,new _e$1),Ge=function(e){var t,n,r,d,o=void 0===e?de:e,a=o.options,i=void 0===a?de:a,l=o.plugins,c=void 0===l?re:l,u=new _(i),s=[],f=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,d,o,a,i,l,c,u,s){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(d[0]+r),"";default:return r+(0===s?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){s.push(e);})),p=function(e,r,o){return 0===r&&-1!==Ve.indexOf(o[n.length])||o.match(d)?e:"."+t};function y(e,o,a,i){void 0===i&&(i="&");var l=e.replace(Be,""),c=o&&a?a+" "+o+" { "+l+" }":l;return t=i,n=o,r=new RegExp("\\"+n+"\\b","g"),d=new RegExp("(\\"+n+"\\b){2,}"),u(a||!o?"":o,c)}return u.use([].concat(c,[function(e,t,d){2===e&&d.length&&d[0].lastIndexOf(n)>0&&(d[0]=d[0].replace(r,p));},f,function(e){if(-2===e){var t=s;return s=[],t}}])),y.hash=c.length?c.reduce((function(e,t){return t.name||pe(15),Le(e,t.name)}),5381).toString():"",y}();var Fe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ge);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return pe(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=Ge),this.name+e.hash},e}(),Ze=/([A-Z])/,Qe=/([A-Z])/g,Ke=/^ms-/,We=function(e){return "-"+e.toLowerCase()};function Ye(e){return Ze.test(e)?e.replace(Qe,We).replace(Ke,"-ms-"):e}var Je=function(e){return null==e||!1===e||""===e};function qe(e,t,n,r){if(Array.isArray(e)){for(var d,o=[],a=0,i=e.length;a<i;a+=1)""!==(d=qe(e[a],t,n,r))&&(Array.isArray(d)?o.push.apply(o,d):o.push(d));return o}if(Je(e))return "";if(ie(e))return "."+e.styledComponentId;if(oe(e)){if("function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return "production"!==process.env.NODE_ENV&&A.exports.isElement(l)&&console.warn(ae(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),qe(l,t,n,r)}var c;return e instanceof Fe?n?(e.inject(n,r),e.getName(r)):e:ne(e)?function e(t,n){var r,d,o=[];for(var a in t)t.hasOwnProperty(a)&&!Je(t[a])&&(Array.isArray(t[a])&&t[a].isCss||oe(t[a])?o.push(Ye(a)+":",t[a],";"):ne(t[a])?o.push.apply(o,e(t[a],a)):o.push(Ye(a)+": "+(r=a,(null==(d=t[a])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||r in x?String(d).trim():d+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString()}var Xe=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function et(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return oe(e)||ne(e)?Xe(qe(te(re,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Xe(qe(te(e,n)))}var tt=/invalid hook call/i,nt=new Set,rt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,dt=/(^-|-$)/g;function ot(e){return e.replace(rt,"-").replace(dt,"")}function at(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var it=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},lt=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ct(e,t,n){var r=e[n];it(t)&&it(r)?ut(r,t):e[n]=t;}function ut(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var d=0,o=n;d<o.length;d++){var a=o[d];if(it(a))for(var i in a)lt(i)&&ct(e,a[i],i);}return e}var st=React__default.createContext();st.Consumer;var ft={};function pt(o,a,i){var l=ie(o),c=!at(o),u=a.attrs,s=void 0===u?re:u,f=a.componentId,p=void 0===f?function(e,t){var n="string"!=typeof e?"sc":ot(e);ft[n]=(ft[n]||0)+1;var r=n+"-"+function(e){return Re(De(e)>>>0)}("5.3.6"+n+ft[n]);return t?t+"-"+r:r}(a.displayName,a.parentComponentId):f,y=a.displayName,$=void 0===y?function(e){return at(e)?"styled."+e:"Styled("+ae(e)+")"}(o):y,h=a.displayName&&a.componentId?ot(a.displayName)+"-"+a.componentId:a.componentId||p,m=l&&o.attrs?Array.prototype.concat(o.attrs,s).filter(Boolean):s,g=a.shouldForwardProp;l&&o.shouldForwardProp&&(g=a.shouldForwardProp?function(e,t,n){return o.shouldForwardProp(e,t,n)&&a.shouldForwardProp(e,t,n)}:o.shouldForwardProp);var v,b=new Ie(i,h,l?o.componentStyle:void 0),w=b.isStatic&&0===s.length,C=function(e,t){return function(e,t,o,a){var i=e.attrs,l=e.componentStyle,c=e.defaultProps,u=e.foldedComponentIds,s=e.shouldForwardProp,f=e.styledComponentId,p=e.target;"production"!==process.env.NODE_ENV&&useDebugValue(f);var y=function(e,t,n){void 0===e&&(e=de);var r=ee({},t,{theme:e}),d={};return n.forEach((function(e){var t,n,o,a=e;for(t in oe(a)&&(a=a(r)),a)r[t]=d[t]="className"===t?(n=d[t],o=a[t],n&&o?n+" "+o:n||o):a[t];})),[r,d]}(function(e,t,n){return void 0===n&&(n=de),e.theme!==n.theme&&e.theme||t||n.theme}(t,useContext(st),c)||de,t,i),$=y[0],h=y[1],m=function(e,t,d,o){var a=useContext(He)||ze,i=useContext(Ue)||Ge,l=t?e.generateAndInjectStyles(de,a,i):e.generateAndInjectStyles(d,a,i);return "production"!==process.env.NODE_ENV&&useDebugValue(l),"production"!==process.env.NODE_ENV&&!t&&o&&o(l),l}(l,a,$,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),g=o,v=h.$as||t.$as||h.as||t.as||p,b=at(v),w=h!==t?ee({},t,{},h):t,C={};for(var P in w)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?C.as=w[P]:(s?s(P,D,v):!b||D(P))&&(C[P]=w[P]));return t.style&&h.style!==t.style&&(C.style=ee({},t.style,{},h.style)),C.className=Array.prototype.concat(u,f,m!==f?m:null,t.className,h.className).filter(Boolean).join(" "),C.ref=g,createElement(v,C)}(v,e,t,w)};return C.displayName=$,(v=React__default.forwardRef(C)).attrs=m,v.componentStyle=b,v.displayName=$,v.shouldForwardProp=g,v.foldedComponentIds=l?Array.prototype.concat(o.foldedComponentIds,o.styledComponentId):re,v.styledComponentId=h,v.target=l?o.target:o,v.withComponent=function(e){var t=a.componentId,n=function(e,t){if(null==e)return {};var n,r,d={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(d[n]=e[n]);return d}(a,["componentId"]),r=t&&t+"-"+(at(e)?e:ot(ae(e)));return pt(e,ee({},n,{attrs:m,componentId:r}),i)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=l?ut({},o.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(function(e,n){if("production"!==process.env.NODE_ENV){var r="The component "+e+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",d=console.error;try{var o=!0;console.error=function(e){if(tt.test(e))o=!1,nt.delete(r);else {for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];d.apply(void 0,[e].concat(n));}},useRef(),o&&!nt.has(r)&&(console.warn(r),nt.add(r));}catch(e){tt.test(e.message)&&nt.delete(r);}finally{console.error=d;}}}($,h),v.warnTooManyClasses=function(e,t){var n={},r=!1;return function(d){if(!r&&(n[d]=!0,Object.keys(n).length>=200)){var o=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+o+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={};}}}($,h)),v.toString=function(){return "."+v.styledComponentId},c&&X(v,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var yt=function(e){return function e(t,n,r){if(void 0===r&&(r=de),!A.exports.isValidElementType(n))return pe(1,String(n));var d=function(){return t(n,r,et.apply(void 0,arguments))};return d.withConfig=function(d){return e(t,n,ee({},r,{},d))},d.attrs=function(d){return e(t,n,ee({},r,{attrs:Array.prototype.concat(r.attrs,d).filter(Boolean)}))},d}(pt,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){yt[e]=yt(e);})),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);const $t=yt.div`
|
|
1277
1277
|
height: ${e=>e.size};
|
|
1278
1278
|
width: ${e=>e.size};
|
|
1279
1279
|
svg {
|
|
@@ -2411,7 +2411,7 @@ function toArray$1(value) {
|
|
|
2411
2411
|
function mapContext(mapper, context, _event) {
|
|
2412
2412
|
var e_5, _a;
|
|
2413
2413
|
|
|
2414
|
-
if (isFunction$
|
|
2414
|
+
if (isFunction$3(mapper)) {
|
|
2415
2415
|
return mapper(context, _event.data);
|
|
2416
2416
|
}
|
|
2417
2417
|
|
|
@@ -2422,7 +2422,7 @@ function mapContext(mapper, context, _event) {
|
|
|
2422
2422
|
var key = _c.value;
|
|
2423
2423
|
var subMapper = mapper[key];
|
|
2424
2424
|
|
|
2425
|
-
if (isFunction$
|
|
2425
|
+
if (isFunction$3(subMapper)) {
|
|
2426
2426
|
result[key] = subMapper(context, _event.data);
|
|
2427
2427
|
} else {
|
|
2428
2428
|
result[key] = subMapper;
|
|
@@ -2451,7 +2451,7 @@ function isPromiseLike(value) {
|
|
|
2451
2451
|
} // Check if shape matches the Promise/A+ specification for a "thenable".
|
|
2452
2452
|
|
|
2453
2453
|
|
|
2454
|
-
if (value !== null && (isFunction$
|
|
2454
|
+
if (value !== null && (isFunction$3(value) || typeof value === 'object') && isFunction$3(value.then)) {
|
|
2455
2455
|
return true;
|
|
2456
2456
|
}
|
|
2457
2457
|
|
|
@@ -2531,14 +2531,14 @@ function updateContext(context, _event, assignActions, state) {
|
|
|
2531
2531
|
};
|
|
2532
2532
|
var partialUpdate = {};
|
|
2533
2533
|
|
|
2534
|
-
if (isFunction$
|
|
2534
|
+
if (isFunction$3(assignment)) {
|
|
2535
2535
|
partialUpdate = assignment(acc, _event.data, meta);
|
|
2536
2536
|
} else {
|
|
2537
2537
|
try {
|
|
2538
2538
|
for (var _b = __values$1(Object.keys(assignment)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2539
2539
|
var key = _c.value;
|
|
2540
2540
|
var propAssignment = assignment[key];
|
|
2541
|
-
partialUpdate[key] = isFunction$
|
|
2541
|
+
partialUpdate[key] = isFunction$3(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
|
|
2542
2542
|
}
|
|
2543
2543
|
} catch (e_7_1) {
|
|
2544
2544
|
e_7 = {
|
|
@@ -2584,7 +2584,7 @@ function isArray$1(value) {
|
|
|
2584
2584
|
return Array.isArray(value);
|
|
2585
2585
|
} // tslint:disable-next-line:ban-types
|
|
2586
2586
|
|
|
2587
|
-
function isFunction$
|
|
2587
|
+
function isFunction$3(value) {
|
|
2588
2588
|
return typeof value === 'function';
|
|
2589
2589
|
}
|
|
2590
2590
|
function isString$2(value) {
|
|
@@ -2603,7 +2603,7 @@ function toGuard(condition, guardMap) {
|
|
|
2603
2603
|
};
|
|
2604
2604
|
}
|
|
2605
2605
|
|
|
2606
|
-
if (isFunction$
|
|
2606
|
+
if (isFunction$3(condition)) {
|
|
2607
2607
|
return {
|
|
2608
2608
|
type: DEFAULT_GUARD_TYPE$1,
|
|
2609
2609
|
name: condition.name,
|
|
@@ -2615,7 +2615,7 @@ function toGuard(condition, guardMap) {
|
|
|
2615
2615
|
}
|
|
2616
2616
|
function isObservable(value) {
|
|
2617
2617
|
try {
|
|
2618
|
-
return 'subscribe' in value && isFunction$
|
|
2618
|
+
return 'subscribe' in value && isFunction$3(value.subscribe);
|
|
2619
2619
|
} catch (e) {
|
|
2620
2620
|
return false;
|
|
2621
2621
|
}
|
|
@@ -2760,7 +2760,7 @@ function toActionObject$1(action, actionFunctionMap) {
|
|
|
2760
2760
|
if (isString$2(action) || typeof action === 'number') {
|
|
2761
2761
|
var exec = getActionFunction$1(action, actionFunctionMap);
|
|
2762
2762
|
|
|
2763
|
-
if (isFunction$
|
|
2763
|
+
if (isFunction$3(exec)) {
|
|
2764
2764
|
actionObject = {
|
|
2765
2765
|
type: action,
|
|
2766
2766
|
exec: exec
|
|
@@ -2773,7 +2773,7 @@ function toActionObject$1(action, actionFunctionMap) {
|
|
|
2773
2773
|
exec: undefined
|
|
2774
2774
|
};
|
|
2775
2775
|
}
|
|
2776
|
-
} else if (isFunction$
|
|
2776
|
+
} else if (isFunction$3(action)) {
|
|
2777
2777
|
actionObject = {
|
|
2778
2778
|
// Convert action to string if unnamed
|
|
2779
2779
|
type: action.name || action.toString(),
|
|
@@ -2782,7 +2782,7 @@ function toActionObject$1(action, actionFunctionMap) {
|
|
|
2782
2782
|
} else {
|
|
2783
2783
|
var exec = getActionFunction$1(action.type, actionFunctionMap);
|
|
2784
2784
|
|
|
2785
|
-
if (isFunction$
|
|
2785
|
+
if (isFunction$3(exec)) {
|
|
2786
2786
|
actionObject = __assign$2(__assign$2({}, action), {
|
|
2787
2787
|
exec: exec
|
|
2788
2788
|
});
|
|
@@ -2835,14 +2835,14 @@ function resolveRaise$1(action, ctx, _event, delaysMap) {
|
|
|
2835
2835
|
var meta = {
|
|
2836
2836
|
_event: _event
|
|
2837
2837
|
};
|
|
2838
|
-
var resolvedEvent = toSCXMLEvent(isFunction$
|
|
2838
|
+
var resolvedEvent = toSCXMLEvent(isFunction$3(action.event) ? action.event(ctx, _event.data, meta) : action.event);
|
|
2839
2839
|
var resolvedDelay;
|
|
2840
2840
|
|
|
2841
2841
|
if (isString$2(action.delay)) {
|
|
2842
2842
|
var configDelay = delaysMap && delaysMap[action.delay];
|
|
2843
|
-
resolvedDelay = isFunction$
|
|
2843
|
+
resolvedDelay = isFunction$3(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
|
|
2844
2844
|
} else {
|
|
2845
|
-
resolvedDelay = isFunction$
|
|
2845
|
+
resolvedDelay = isFunction$3(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
|
|
2846
2846
|
}
|
|
2847
2847
|
|
|
2848
2848
|
return __assign$2(__assign$2({}, action), {
|
|
@@ -2868,11 +2868,11 @@ function send$3(event, options) {
|
|
|
2868
2868
|
return {
|
|
2869
2869
|
to: options ? options.to : undefined,
|
|
2870
2870
|
type: send$4,
|
|
2871
|
-
event: isFunction$
|
|
2871
|
+
event: isFunction$3(event) ? event : toEventObject(event),
|
|
2872
2872
|
delay: options ? options.delay : undefined,
|
|
2873
2873
|
// TODO: don't auto-generate IDs here like that
|
|
2874
2874
|
// there is too big chance of the ID collision
|
|
2875
|
-
id: options && options.id !== undefined ? options.id : isFunction$
|
|
2875
|
+
id: options && options.id !== undefined ? options.id : isFunction$3(event) ? event.name : getEventType(event)
|
|
2876
2876
|
};
|
|
2877
2877
|
}
|
|
2878
2878
|
function resolveSend$1(action, ctx, _event, delaysMap) {
|
|
@@ -2880,17 +2880,17 @@ function resolveSend$1(action, ctx, _event, delaysMap) {
|
|
|
2880
2880
|
_event: _event
|
|
2881
2881
|
}; // TODO: helper function for resolving Expr
|
|
2882
2882
|
|
|
2883
|
-
var resolvedEvent = toSCXMLEvent(isFunction$
|
|
2883
|
+
var resolvedEvent = toSCXMLEvent(isFunction$3(action.event) ? action.event(ctx, _event.data, meta) : action.event);
|
|
2884
2884
|
var resolvedDelay;
|
|
2885
2885
|
|
|
2886
2886
|
if (isString$2(action.delay)) {
|
|
2887
2887
|
var configDelay = delaysMap && delaysMap[action.delay];
|
|
2888
|
-
resolvedDelay = isFunction$
|
|
2888
|
+
resolvedDelay = isFunction$3(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
|
|
2889
2889
|
} else {
|
|
2890
|
-
resolvedDelay = isFunction$
|
|
2890
|
+
resolvedDelay = isFunction$3(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
|
|
2891
2891
|
}
|
|
2892
2892
|
|
|
2893
|
-
var resolvedTarget = isFunction$
|
|
2893
|
+
var resolvedTarget = isFunction$3(action.to) ? action.to(ctx, _event.data, meta) : action.to;
|
|
2894
2894
|
return __assign$2(__assign$2({}, action), {
|
|
2895
2895
|
to: resolvedTarget,
|
|
2896
2896
|
_event: resolvedEvent,
|
|
@@ -2952,7 +2952,7 @@ function start$2(activity) {
|
|
|
2952
2952
|
*/
|
|
2953
2953
|
|
|
2954
2954
|
function stop$2(actorRef) {
|
|
2955
|
-
var activity = isFunction$
|
|
2955
|
+
var activity = isFunction$3(actorRef) ? actorRef : toActivityDefinition$1(actorRef);
|
|
2956
2956
|
return {
|
|
2957
2957
|
type: ActionTypes.Stop,
|
|
2958
2958
|
activity: activity,
|
|
@@ -2960,7 +2960,7 @@ function stop$2(actorRef) {
|
|
|
2960
2960
|
};
|
|
2961
2961
|
}
|
|
2962
2962
|
function resolveStop$1(action, context, _event) {
|
|
2963
|
-
var actorRefOrString = isFunction$
|
|
2963
|
+
var actorRefOrString = isFunction$3(action.activity) ? action.activity(context, _event.data) : action.activity;
|
|
2964
2964
|
var resolvedActorRef = typeof actorRefOrString === 'string' ? {
|
|
2965
2965
|
id: actorRefOrString
|
|
2966
2966
|
} : actorRefOrString;
|
|
@@ -3984,7 +3984,7 @@ var registry = {
|
|
|
3984
3984
|
}
|
|
3985
3985
|
};
|
|
3986
3986
|
|
|
3987
|
-
function getGlobal$
|
|
3987
|
+
function getGlobal$2() {
|
|
3988
3988
|
if (typeof globalThis !== 'undefined') {
|
|
3989
3989
|
return globalThis;
|
|
3990
3990
|
}
|
|
@@ -4007,7 +4007,7 @@ function getGlobal$1() {
|
|
|
4007
4007
|
}
|
|
4008
4008
|
|
|
4009
4009
|
function getDevTools() {
|
|
4010
|
-
var global = getGlobal$
|
|
4010
|
+
var global = getGlobal$2();
|
|
4011
4011
|
|
|
4012
4012
|
if (global && '__xstate__' in global) {
|
|
4013
4013
|
return global.__xstate__;
|
|
@@ -4017,7 +4017,7 @@ function getDevTools() {
|
|
|
4017
4017
|
}
|
|
4018
4018
|
|
|
4019
4019
|
function registerService(service) {
|
|
4020
|
-
if (!getGlobal$
|
|
4020
|
+
if (!getGlobal$2()) {
|
|
4021
4021
|
return;
|
|
4022
4022
|
}
|
|
4023
4023
|
|
|
@@ -4234,7 +4234,7 @@ function () {
|
|
|
4234
4234
|
}
|
|
4235
4235
|
|
|
4236
4236
|
var actionOrExec = action.exec || getActionFunction$1(action.type, actionFunctionMap);
|
|
4237
|
-
var exec = isFunction$
|
|
4237
|
+
var exec = isFunction$3(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
|
|
4238
4238
|
|
|
4239
4239
|
if (exec) {
|
|
4240
4240
|
try {
|
|
@@ -4336,7 +4336,7 @@ function () {
|
|
|
4336
4336
|
return;
|
|
4337
4337
|
}
|
|
4338
4338
|
|
|
4339
|
-
var source = isFunction$
|
|
4339
|
+
var source = isFunction$3(serviceCreator) ? serviceCreator(context, _event.data, {
|
|
4340
4340
|
data: resolvedData,
|
|
4341
4341
|
src: invokeSource,
|
|
4342
4342
|
meta: activity.meta
|
|
@@ -4750,7 +4750,7 @@ function () {
|
|
|
4750
4750
|
Interpreter.prototype._stopChildren = function () {
|
|
4751
4751
|
// TODO: think about converting those to actions
|
|
4752
4752
|
this.children.forEach(function (child) {
|
|
4753
|
-
if (isFunction$
|
|
4753
|
+
if (isFunction$3(child.stop)) {
|
|
4754
4754
|
child.stop();
|
|
4755
4755
|
}
|
|
4756
4756
|
});
|
|
@@ -5115,7 +5115,7 @@ function () {
|
|
|
5115
5115
|
|
|
5116
5116
|
this.removeChild(childId);
|
|
5117
5117
|
|
|
5118
|
-
if (isFunction$
|
|
5118
|
+
if (isFunction$3(child.stop)) {
|
|
5119
5119
|
child.stop();
|
|
5120
5120
|
}
|
|
5121
5121
|
};
|
|
@@ -5127,7 +5127,7 @@ function () {
|
|
|
5127
5127
|
|
|
5128
5128
|
if (isPromiseLike(entity)) {
|
|
5129
5129
|
return this.spawnPromise(Promise.resolve(entity), name);
|
|
5130
|
-
} else if (isFunction$
|
|
5130
|
+
} else if (isFunction$3(entity)) {
|
|
5131
5131
|
return this.spawnCallback(entity, name);
|
|
5132
5132
|
} else if (isSpawnedActor(entity)) {
|
|
5133
5133
|
return this.spawnActor(entity, name);
|
|
@@ -5349,7 +5349,7 @@ function () {
|
|
|
5349
5349
|
stop: function () {
|
|
5350
5350
|
canceled = true;
|
|
5351
5351
|
|
|
5352
|
-
if (isFunction$
|
|
5352
|
+
if (isFunction$3(callbackStop)) {
|
|
5353
5353
|
callbackStop();
|
|
5354
5354
|
}
|
|
5355
5355
|
},
|
|
@@ -5471,7 +5471,7 @@ function () {
|
|
|
5471
5471
|
};
|
|
5472
5472
|
|
|
5473
5473
|
Interpreter.prototype.attachDev = function () {
|
|
5474
|
-
var global = getGlobal$
|
|
5474
|
+
var global = getGlobal$2();
|
|
5475
5475
|
|
|
5476
5476
|
if (this.options.devTools && global) {
|
|
5477
5477
|
if (global.__REDUX_DEVTOOLS_EXTENSION__) {
|
|
@@ -5559,7 +5559,7 @@ function spawn(entity, nameOrOptions) {
|
|
|
5559
5559
|
var resolvedOptions = resolveSpawnOptions(nameOrOptions);
|
|
5560
5560
|
return consume(function (service) {
|
|
5561
5561
|
if (!IS_PRODUCTION$1) {
|
|
5562
|
-
var isLazyEntity = isMachine(entity) || isFunction$
|
|
5562
|
+
var isLazyEntity = isMachine(entity) || isFunction$3(entity);
|
|
5563
5563
|
warn$1(!!service || isLazyEntity, "Attempted to spawn an Actor (ID: \"".concat(isMachine(entity) ? entity.id : 'undefined', "\") outside of a service. This will have no effect."));
|
|
5564
5564
|
}
|
|
5565
5565
|
|
|
@@ -5772,7 +5772,7 @@ function () {
|
|
|
5772
5772
|
id: invokeId,
|
|
5773
5773
|
src: invokeConfig.src
|
|
5774
5774
|
}));
|
|
5775
|
-
} else if (isMachine(invokeConfig.src) || isFunction$
|
|
5775
|
+
} else if (isMachine(invokeConfig.src) || isFunction$3(invokeConfig.src)) {
|
|
5776
5776
|
var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
|
|
5777
5777
|
_this.machine.options.services = __assign$2((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
|
|
5778
5778
|
return toInvokeDefinition(__assign$2(__assign$2({
|
|
@@ -5845,7 +5845,7 @@ function () {
|
|
|
5845
5845
|
|
|
5846
5846
|
Object.defineProperty(StateNode.prototype, "context", {
|
|
5847
5847
|
get: function () {
|
|
5848
|
-
return isFunction$
|
|
5848
|
+
return isFunction$3(this._context) ? this._context() : this._context;
|
|
5849
5849
|
},
|
|
5850
5850
|
enumerable: false,
|
|
5851
5851
|
configurable: true
|
|
@@ -5953,7 +5953,7 @@ function () {
|
|
|
5953
5953
|
}
|
|
5954
5954
|
|
|
5955
5955
|
var mutateEntryExit = function (delay, i) {
|
|
5956
|
-
var delayRef = isFunction$
|
|
5956
|
+
var delayRef = isFunction$3(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
|
|
5957
5957
|
var eventType = after$2(delayRef, _this.id);
|
|
5958
5958
|
|
|
5959
5959
|
_this.onEntry.push(send$3(eventType, {
|
|
@@ -35011,7 +35011,7 @@ const prod_config = {
|
|
|
35011
35011
|
const config$1 = (configEnv) => {
|
|
35012
35012
|
let env = configEnv;
|
|
35013
35013
|
try {
|
|
35014
|
-
env !== null && env !== void 0 ? env : (env = "
|
|
35014
|
+
env !== null && env !== void 0 ? env : (env = "staging");
|
|
35015
35015
|
}
|
|
35016
35016
|
catch (_a) { }
|
|
35017
35017
|
switch (env) {
|
|
@@ -35030,8 +35030,8 @@ const configGenerator = () => {
|
|
|
35030
35030
|
let environment;
|
|
35031
35031
|
let release;
|
|
35032
35032
|
try {
|
|
35033
|
-
environment !== null && environment !== void 0 ? environment : (environment = "
|
|
35034
|
-
release !== null && release !== void 0 ? release : (release = "1.1.
|
|
35033
|
+
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
35034
|
+
release !== null && release !== void 0 ? release : (release = "1.1.68");
|
|
35035
35035
|
}
|
|
35036
35036
|
catch (_a) {
|
|
35037
35037
|
console.error('sentry configGenerator error');
|
|
@@ -35978,7 +35978,7 @@ function queryString(object) {
|
|
|
35978
35978
|
}).join('&');
|
|
35979
35979
|
}
|
|
35980
35980
|
|
|
35981
|
-
function getGlobal(key) {
|
|
35981
|
+
function getGlobal$1(key) {
|
|
35982
35982
|
if (window[key]) {
|
|
35983
35983
|
return window[key];
|
|
35984
35984
|
}
|
|
@@ -36004,7 +36004,7 @@ function getSDK(url, sdkGlobal) {
|
|
|
36004
36004
|
return true;
|
|
36005
36005
|
};
|
|
36006
36006
|
var fetchScript = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : _loadScript["default"];
|
|
36007
|
-
var existingGlobal = getGlobal(sdkGlobal);
|
|
36007
|
+
var existingGlobal = getGlobal$1(sdkGlobal);
|
|
36008
36008
|
|
|
36009
36009
|
if (existingGlobal && isLoaded(existingGlobal)) {
|
|
36010
36010
|
return Promise.resolve(existingGlobal);
|
|
@@ -36038,7 +36038,7 @@ function getSDK(url, sdkGlobal) {
|
|
|
36038
36038
|
|
|
36039
36039
|
window[sdkReady] = function () {
|
|
36040
36040
|
if (previousOnReady) previousOnReady();
|
|
36041
|
-
onLoaded(getGlobal(sdkGlobal));
|
|
36041
|
+
onLoaded(getGlobal$1(sdkGlobal));
|
|
36042
36042
|
};
|
|
36043
36043
|
}
|
|
36044
36044
|
|
|
@@ -36051,7 +36051,7 @@ function getSDK(url, sdkGlobal) {
|
|
|
36051
36051
|
});
|
|
36052
36052
|
requests[url] = null;
|
|
36053
36053
|
} else if (!sdkReady) {
|
|
36054
|
-
onLoaded(getGlobal(sdkGlobal));
|
|
36054
|
+
onLoaded(getGlobal$1(sdkGlobal));
|
|
36055
36055
|
}
|
|
36056
36056
|
});
|
|
36057
36057
|
});
|
|
@@ -41339,6 +41339,13 @@ const VideoTimeBar = ({ duration, currentTime, isThinkingTime, onChangeTime, })
|
|
|
41339
41339
|
`, style: { width: `${isTimeChangeable ? indicatorPosition : progress}%` } })));
|
|
41340
41340
|
};
|
|
41341
41341
|
|
|
41342
|
+
/**
|
|
41343
|
+
* Create a bound version of a function with a specified `this` context
|
|
41344
|
+
*
|
|
41345
|
+
* @param {Function} fn - The function to bind
|
|
41346
|
+
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
41347
|
+
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
41348
|
+
*/
|
|
41342
41349
|
function bind$1(fn, thisArg) {
|
|
41343
41350
|
return function wrap() {
|
|
41344
41351
|
return fn.apply(thisArg, arguments);
|
|
@@ -41347,30 +41354,30 @@ function bind$1(fn, thisArg) {
|
|
|
41347
41354
|
|
|
41348
41355
|
// utils is a library of generic helper functions non-specific to axios
|
|
41349
41356
|
|
|
41350
|
-
const {toString} = Object.prototype;
|
|
41351
|
-
const {getPrototypeOf} = Object;
|
|
41352
|
-
const {iterator, toStringTag} = Symbol;
|
|
41357
|
+
const { toString } = Object.prototype;
|
|
41358
|
+
const { getPrototypeOf } = Object;
|
|
41359
|
+
const { iterator, toStringTag } = Symbol;
|
|
41353
41360
|
|
|
41354
|
-
const kindOf = (cache => thing => {
|
|
41355
|
-
|
|
41356
|
-
|
|
41361
|
+
const kindOf = ((cache) => (thing) => {
|
|
41362
|
+
const str = toString.call(thing);
|
|
41363
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
41357
41364
|
})(Object.create(null));
|
|
41358
41365
|
|
|
41359
41366
|
const kindOfTest = (type) => {
|
|
41360
41367
|
type = type.toLowerCase();
|
|
41361
|
-
return (thing) => kindOf(thing) === type
|
|
41368
|
+
return (thing) => kindOf(thing) === type;
|
|
41362
41369
|
};
|
|
41363
41370
|
|
|
41364
|
-
const typeOfTest = type => thing => typeof thing === type;
|
|
41371
|
+
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
41365
41372
|
|
|
41366
41373
|
/**
|
|
41367
|
-
* Determine if a value is
|
|
41374
|
+
* Determine if a value is a non-null object
|
|
41368
41375
|
*
|
|
41369
41376
|
* @param {Object} val The value to test
|
|
41370
41377
|
*
|
|
41371
41378
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
41372
41379
|
*/
|
|
41373
|
-
const {isArray} = Array;
|
|
41380
|
+
const { isArray } = Array;
|
|
41374
41381
|
|
|
41375
41382
|
/**
|
|
41376
41383
|
* Determine if a value is undefined
|
|
@@ -41389,8 +41396,14 @@ const isUndefined = typeOfTest('undefined');
|
|
|
41389
41396
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
41390
41397
|
*/
|
|
41391
41398
|
function isBuffer(val) {
|
|
41392
|
-
return
|
|
41393
|
-
|
|
41399
|
+
return (
|
|
41400
|
+
val !== null &&
|
|
41401
|
+
!isUndefined(val) &&
|
|
41402
|
+
val.constructor !== null &&
|
|
41403
|
+
!isUndefined(val.constructor) &&
|
|
41404
|
+
isFunction$2(val.constructor.isBuffer) &&
|
|
41405
|
+
val.constructor.isBuffer(val)
|
|
41406
|
+
);
|
|
41394
41407
|
}
|
|
41395
41408
|
|
|
41396
41409
|
/**
|
|
@@ -41402,7 +41415,6 @@ function isBuffer(val) {
|
|
|
41402
41415
|
*/
|
|
41403
41416
|
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
41404
41417
|
|
|
41405
|
-
|
|
41406
41418
|
/**
|
|
41407
41419
|
* Determine if a value is a view on an ArrayBuffer
|
|
41408
41420
|
*
|
|
@@ -41412,10 +41424,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
|
41412
41424
|
*/
|
|
41413
41425
|
function isArrayBufferView(val) {
|
|
41414
41426
|
let result;
|
|
41415
|
-
if (
|
|
41427
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
41416
41428
|
result = ArrayBuffer.isView(val);
|
|
41417
41429
|
} else {
|
|
41418
|
-
result =
|
|
41430
|
+
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
41419
41431
|
}
|
|
41420
41432
|
return result;
|
|
41421
41433
|
}
|
|
@@ -41435,7 +41447,7 @@ const isString = typeOfTest('string');
|
|
|
41435
41447
|
* @param {*} val The value to test
|
|
41436
41448
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
41437
41449
|
*/
|
|
41438
|
-
const isFunction$
|
|
41450
|
+
const isFunction$2 = typeOfTest('function');
|
|
41439
41451
|
|
|
41440
41452
|
/**
|
|
41441
41453
|
* Determine if a value is a Number
|
|
@@ -41461,7 +41473,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
|
41461
41473
|
* @param {*} thing The value to test
|
|
41462
41474
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
41463
41475
|
*/
|
|
41464
|
-
const isBoolean = thing => thing === true || thing === false;
|
|
41476
|
+
const isBoolean = (thing) => thing === true || thing === false;
|
|
41465
41477
|
|
|
41466
41478
|
/**
|
|
41467
41479
|
* Determine if a value is a plain Object
|
|
@@ -41476,7 +41488,34 @@ const isPlainObject = (val) => {
|
|
|
41476
41488
|
}
|
|
41477
41489
|
|
|
41478
41490
|
const prototype = getPrototypeOf(val);
|
|
41479
|
-
return (
|
|
41491
|
+
return (
|
|
41492
|
+
(prototype === null ||
|
|
41493
|
+
prototype === Object.prototype ||
|
|
41494
|
+
Object.getPrototypeOf(prototype) === null) &&
|
|
41495
|
+
!(toStringTag in val) &&
|
|
41496
|
+
!(iterator in val)
|
|
41497
|
+
);
|
|
41498
|
+
};
|
|
41499
|
+
|
|
41500
|
+
/**
|
|
41501
|
+
* Determine if a value is an empty object (safely handles Buffers)
|
|
41502
|
+
*
|
|
41503
|
+
* @param {*} val The value to test
|
|
41504
|
+
*
|
|
41505
|
+
* @returns {boolean} True if value is an empty object, otherwise false
|
|
41506
|
+
*/
|
|
41507
|
+
const isEmptyObject = (val) => {
|
|
41508
|
+
// Early return for non-objects or Buffers to prevent RangeError
|
|
41509
|
+
if (!isObject(val) || isBuffer(val)) {
|
|
41510
|
+
return false;
|
|
41511
|
+
}
|
|
41512
|
+
|
|
41513
|
+
try {
|
|
41514
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
41515
|
+
} catch (e) {
|
|
41516
|
+
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
41517
|
+
return false;
|
|
41518
|
+
}
|
|
41480
41519
|
};
|
|
41481
41520
|
|
|
41482
41521
|
/**
|
|
@@ -41497,6 +41536,31 @@ const isDate = kindOfTest('Date');
|
|
|
41497
41536
|
*/
|
|
41498
41537
|
const isFile = kindOfTest('File');
|
|
41499
41538
|
|
|
41539
|
+
/**
|
|
41540
|
+
* Determine if a value is a React Native Blob
|
|
41541
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
41542
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
41543
|
+
*
|
|
41544
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
41545
|
+
*
|
|
41546
|
+
* @param {*} value The value to test
|
|
41547
|
+
*
|
|
41548
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
41549
|
+
*/
|
|
41550
|
+
const isReactNativeBlob = (value) => {
|
|
41551
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
41552
|
+
};
|
|
41553
|
+
|
|
41554
|
+
/**
|
|
41555
|
+
* Determine if environment is React Native
|
|
41556
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
41557
|
+
*
|
|
41558
|
+
* @param {*} formData The formData to test
|
|
41559
|
+
*
|
|
41560
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
41561
|
+
*/
|
|
41562
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
41563
|
+
|
|
41500
41564
|
/**
|
|
41501
41565
|
* Determine if a value is a Blob
|
|
41502
41566
|
*
|
|
@@ -41522,7 +41586,7 @@ const isFileList = kindOfTest('FileList');
|
|
|
41522
41586
|
*
|
|
41523
41587
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
41524
41588
|
*/
|
|
41525
|
-
const isStream = (val) => isObject(val) && isFunction$
|
|
41589
|
+
const isStream = (val) => isObject(val) && isFunction$2(val.pipe);
|
|
41526
41590
|
|
|
41527
41591
|
/**
|
|
41528
41592
|
* Determine if a value is a FormData
|
|
@@ -41531,17 +41595,28 @@ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
|
41531
41595
|
*
|
|
41532
41596
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
41533
41597
|
*/
|
|
41598
|
+
function getGlobal() {
|
|
41599
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
41600
|
+
if (typeof self !== 'undefined') return self;
|
|
41601
|
+
if (typeof window !== 'undefined') return window;
|
|
41602
|
+
if (typeof global !== 'undefined') return global;
|
|
41603
|
+
return {};
|
|
41604
|
+
}
|
|
41605
|
+
|
|
41606
|
+
const G = getGlobal();
|
|
41607
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
41608
|
+
|
|
41534
41609
|
const isFormData = (thing) => {
|
|
41535
|
-
|
|
41536
|
-
|
|
41537
|
-
|
|
41538
|
-
|
|
41539
|
-
|
|
41540
|
-
|
|
41541
|
-
|
|
41542
|
-
|
|
41543
|
-
|
|
41544
|
-
|
|
41610
|
+
if (!thing) return false;
|
|
41611
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
41612
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9).
|
|
41613
|
+
const proto = getPrototypeOf(thing);
|
|
41614
|
+
if (!proto || proto === Object.prototype) return false;
|
|
41615
|
+
if (!isFunction$2(thing.append)) return false;
|
|
41616
|
+
const kind = kindOf(thing);
|
|
41617
|
+
return kind === 'formdata' ||
|
|
41618
|
+
// detect form-data instance
|
|
41619
|
+
(kind === 'object' && isFunction$2(thing.toString) && thing.toString() === '[object FormData]');
|
|
41545
41620
|
};
|
|
41546
41621
|
|
|
41547
41622
|
/**
|
|
@@ -41553,7 +41628,12 @@ const isFormData = (thing) => {
|
|
|
41553
41628
|
*/
|
|
41554
41629
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
41555
41630
|
|
|
41556
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
41631
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
41632
|
+
'ReadableStream',
|
|
41633
|
+
'Request',
|
|
41634
|
+
'Response',
|
|
41635
|
+
'Headers',
|
|
41636
|
+
].map(kindOfTest);
|
|
41557
41637
|
|
|
41558
41638
|
/**
|
|
41559
41639
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -41562,9 +41642,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
|
|
|
41562
41642
|
*
|
|
41563
41643
|
* @returns {String} The String freed of excess whitespace
|
|
41564
41644
|
*/
|
|
41565
|
-
const trim = (str) =>
|
|
41566
|
-
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
41567
|
-
|
|
41645
|
+
const trim = (str) => {
|
|
41646
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
41647
|
+
};
|
|
41568
41648
|
/**
|
|
41569
41649
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
41570
41650
|
*
|
|
@@ -41574,13 +41654,14 @@ const trim = (str) => str.trim ?
|
|
|
41574
41654
|
* If 'obj' is an Object callback will be called passing
|
|
41575
41655
|
* the value, key, and complete object for each property.
|
|
41576
41656
|
*
|
|
41577
|
-
* @param {Object|Array} obj The object to iterate
|
|
41657
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
41578
41658
|
* @param {Function} fn The callback to invoke for each item
|
|
41579
41659
|
*
|
|
41580
|
-
* @param {
|
|
41660
|
+
* @param {Object} [options]
|
|
41661
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
41581
41662
|
* @returns {any}
|
|
41582
41663
|
*/
|
|
41583
|
-
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
41664
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
41584
41665
|
// Don't bother if no value provided
|
|
41585
41666
|
if (obj === null || typeof obj === 'undefined') {
|
|
41586
41667
|
return;
|
|
@@ -41601,6 +41682,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
41601
41682
|
fn.call(null, obj[i], i, obj);
|
|
41602
41683
|
}
|
|
41603
41684
|
} else {
|
|
41685
|
+
// Buffer check
|
|
41686
|
+
if (isBuffer(obj)) {
|
|
41687
|
+
return;
|
|
41688
|
+
}
|
|
41689
|
+
|
|
41604
41690
|
// Iterate over object keys
|
|
41605
41691
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
41606
41692
|
const len = keys.length;
|
|
@@ -41613,7 +41699,19 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
41613
41699
|
}
|
|
41614
41700
|
}
|
|
41615
41701
|
|
|
41702
|
+
/**
|
|
41703
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
41704
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
41705
|
+
*
|
|
41706
|
+
* @param {Object} obj - The object to search.
|
|
41707
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
41708
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
41709
|
+
*/
|
|
41616
41710
|
function findKey(obj, key) {
|
|
41711
|
+
if (isBuffer(obj)) {
|
|
41712
|
+
return null;
|
|
41713
|
+
}
|
|
41714
|
+
|
|
41617
41715
|
key = key.toLowerCase();
|
|
41618
41716
|
const keys = Object.keys(obj);
|
|
41619
41717
|
let i = keys.length;
|
|
@@ -41629,8 +41727,8 @@ function findKey(obj, key) {
|
|
|
41629
41727
|
|
|
41630
41728
|
const _global = (() => {
|
|
41631
41729
|
/*eslint no-undef:0*/
|
|
41632
|
-
if (typeof globalThis !==
|
|
41633
|
-
return typeof self !==
|
|
41730
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
41731
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
|
|
41634
41732
|
})();
|
|
41635
41733
|
|
|
41636
41734
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
@@ -41645,7 +41743,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
41645
41743
|
* Example:
|
|
41646
41744
|
*
|
|
41647
41745
|
* ```js
|
|
41648
|
-
*
|
|
41746
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
41649
41747
|
* console.log(result.foo); // outputs 456
|
|
41650
41748
|
* ```
|
|
41651
41749
|
*
|
|
@@ -41654,17 +41752,22 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
41654
41752
|
* @returns {Object} Result of all merge properties
|
|
41655
41753
|
*/
|
|
41656
41754
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
41657
|
-
const {caseless} = isContextDefined(this) && this || {};
|
|
41755
|
+
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
41658
41756
|
const result = {};
|
|
41659
41757
|
const assignValue = (val, key) => {
|
|
41660
|
-
|
|
41758
|
+
// Skip dangerous property names to prevent prototype pollution
|
|
41759
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
41760
|
+
return;
|
|
41761
|
+
}
|
|
41762
|
+
|
|
41763
|
+
const targetKey = (caseless && findKey(result, key)) || key;
|
|
41661
41764
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
41662
41765
|
result[targetKey] = merge(result[targetKey], val);
|
|
41663
41766
|
} else if (isPlainObject(val)) {
|
|
41664
41767
|
result[targetKey] = merge({}, val);
|
|
41665
41768
|
} else if (isArray(val)) {
|
|
41666
41769
|
result[targetKey] = val.slice();
|
|
41667
|
-
} else {
|
|
41770
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
41668
41771
|
result[targetKey] = val;
|
|
41669
41772
|
}
|
|
41670
41773
|
};
|
|
@@ -41682,17 +41785,32 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
41682
41785
|
* @param {Object} b The object to copy properties from
|
|
41683
41786
|
* @param {Object} thisArg The object to bind function to
|
|
41684
41787
|
*
|
|
41685
|
-
* @param {
|
|
41788
|
+
* @param {Object} [options]
|
|
41789
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
41686
41790
|
* @returns {Object} The resulting value of object a
|
|
41687
41791
|
*/
|
|
41688
|
-
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
41689
|
-
forEach(
|
|
41690
|
-
|
|
41691
|
-
|
|
41692
|
-
|
|
41693
|
-
|
|
41694
|
-
|
|
41695
|
-
|
|
41792
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
41793
|
+
forEach(
|
|
41794
|
+
b,
|
|
41795
|
+
(val, key) => {
|
|
41796
|
+
if (thisArg && isFunction$2(val)) {
|
|
41797
|
+
Object.defineProperty(a, key, {
|
|
41798
|
+
value: bind$1(val, thisArg),
|
|
41799
|
+
writable: true,
|
|
41800
|
+
enumerable: true,
|
|
41801
|
+
configurable: true,
|
|
41802
|
+
});
|
|
41803
|
+
} else {
|
|
41804
|
+
Object.defineProperty(a, key, {
|
|
41805
|
+
value: val,
|
|
41806
|
+
writable: true,
|
|
41807
|
+
enumerable: true,
|
|
41808
|
+
configurable: true,
|
|
41809
|
+
});
|
|
41810
|
+
}
|
|
41811
|
+
},
|
|
41812
|
+
{ allOwnKeys }
|
|
41813
|
+
);
|
|
41696
41814
|
return a;
|
|
41697
41815
|
};
|
|
41698
41816
|
|
|
@@ -41704,7 +41822,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
|
41704
41822
|
* @returns {string} content value without BOM
|
|
41705
41823
|
*/
|
|
41706
41824
|
const stripBOM = (content) => {
|
|
41707
|
-
if (content.charCodeAt(0) ===
|
|
41825
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
41708
41826
|
content = content.slice(1);
|
|
41709
41827
|
}
|
|
41710
41828
|
return content;
|
|
@@ -41721,9 +41839,14 @@ const stripBOM = (content) => {
|
|
|
41721
41839
|
*/
|
|
41722
41840
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
41723
41841
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
41724
|
-
constructor.prototype
|
|
41842
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
41843
|
+
value: constructor,
|
|
41844
|
+
writable: true,
|
|
41845
|
+
enumerable: false,
|
|
41846
|
+
configurable: true,
|
|
41847
|
+
});
|
|
41725
41848
|
Object.defineProperty(constructor, 'super', {
|
|
41726
|
-
value: superConstructor.prototype
|
|
41849
|
+
value: superConstructor.prototype,
|
|
41727
41850
|
});
|
|
41728
41851
|
props && Object.assign(constructor.prototype, props);
|
|
41729
41852
|
};
|
|
@@ -41782,7 +41905,6 @@ const endsWith = (str, searchString, position) => {
|
|
|
41782
41905
|
return lastIndex !== -1 && lastIndex === position;
|
|
41783
41906
|
};
|
|
41784
41907
|
|
|
41785
|
-
|
|
41786
41908
|
/**
|
|
41787
41909
|
* Returns new array from array like object or null if failed
|
|
41788
41910
|
*
|
|
@@ -41811,9 +41933,9 @@ const toArray = (thing) => {
|
|
|
41811
41933
|
* @returns {Array}
|
|
41812
41934
|
*/
|
|
41813
41935
|
// eslint-disable-next-line func-names
|
|
41814
|
-
const isTypedArray = (TypedArray => {
|
|
41936
|
+
const isTypedArray = ((TypedArray) => {
|
|
41815
41937
|
// eslint-disable-next-line func-names
|
|
41816
|
-
return thing => {
|
|
41938
|
+
return (thing) => {
|
|
41817
41939
|
return TypedArray && thing instanceof TypedArray;
|
|
41818
41940
|
};
|
|
41819
41941
|
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
@@ -41861,16 +41983,18 @@ const matchAll = (regExp, str) => {
|
|
|
41861
41983
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
41862
41984
|
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
41863
41985
|
|
|
41864
|
-
const toCamelCase = str => {
|
|
41865
|
-
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
41866
|
-
|
|
41867
|
-
|
|
41868
|
-
}
|
|
41869
|
-
);
|
|
41986
|
+
const toCamelCase = (str) => {
|
|
41987
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
41988
|
+
return p1.toUpperCase() + p2;
|
|
41989
|
+
});
|
|
41870
41990
|
};
|
|
41871
41991
|
|
|
41872
41992
|
/* Creating a function that will check if an object has a property. */
|
|
41873
|
-
const hasOwnProperty = (
|
|
41993
|
+
const hasOwnProperty = (
|
|
41994
|
+
({ hasOwnProperty }) =>
|
|
41995
|
+
(obj, prop) =>
|
|
41996
|
+
hasOwnProperty.call(obj, prop)
|
|
41997
|
+
)(Object.prototype);
|
|
41874
41998
|
|
|
41875
41999
|
/**
|
|
41876
42000
|
* Determine if a value is a RegExp object
|
|
@@ -41903,13 +42027,13 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
41903
42027
|
const freezeMethods = (obj) => {
|
|
41904
42028
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
41905
42029
|
// skip restricted props in strict mode
|
|
41906
|
-
if (isFunction$
|
|
42030
|
+
if (isFunction$2(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
41907
42031
|
return false;
|
|
41908
42032
|
}
|
|
41909
42033
|
|
|
41910
42034
|
const value = obj[name];
|
|
41911
42035
|
|
|
41912
|
-
if (!isFunction$
|
|
42036
|
+
if (!isFunction$2(value)) return;
|
|
41913
42037
|
|
|
41914
42038
|
descriptor.enumerable = false;
|
|
41915
42039
|
|
|
@@ -41920,17 +42044,25 @@ const freezeMethods = (obj) => {
|
|
|
41920
42044
|
|
|
41921
42045
|
if (!descriptor.set) {
|
|
41922
42046
|
descriptor.set = () => {
|
|
41923
|
-
throw Error(
|
|
42047
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
41924
42048
|
};
|
|
41925
42049
|
}
|
|
41926
42050
|
});
|
|
41927
42051
|
};
|
|
41928
42052
|
|
|
42053
|
+
/**
|
|
42054
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
42055
|
+
* Useful for fast membership checks.
|
|
42056
|
+
*
|
|
42057
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
42058
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
42059
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
42060
|
+
*/
|
|
41929
42061
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
41930
42062
|
const obj = {};
|
|
41931
42063
|
|
|
41932
42064
|
const define = (arr) => {
|
|
41933
|
-
arr.forEach(value => {
|
|
42065
|
+
arr.forEach((value) => {
|
|
41934
42066
|
obj[value] = true;
|
|
41935
42067
|
});
|
|
41936
42068
|
};
|
|
@@ -41943,7 +42075,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
41943
42075
|
const noop$1 = () => {};
|
|
41944
42076
|
|
|
41945
42077
|
const toFiniteNumber = (value, defaultValue) => {
|
|
41946
|
-
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
42078
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
41947
42079
|
};
|
|
41948
42080
|
|
|
41949
42081
|
/**
|
|
@@ -41954,20 +42086,35 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
41954
42086
|
* @returns {boolean}
|
|
41955
42087
|
*/
|
|
41956
42088
|
function isSpecCompliantForm(thing) {
|
|
41957
|
-
return !!(
|
|
42089
|
+
return !!(
|
|
42090
|
+
thing &&
|
|
42091
|
+
isFunction$2(thing.append) &&
|
|
42092
|
+
thing[toStringTag] === 'FormData' &&
|
|
42093
|
+
thing[iterator]
|
|
42094
|
+
);
|
|
41958
42095
|
}
|
|
41959
42096
|
|
|
42097
|
+
/**
|
|
42098
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
42099
|
+
*
|
|
42100
|
+
* @param {Object} obj - The object to convert.
|
|
42101
|
+
* @returns {Object} The JSON-compatible object.
|
|
42102
|
+
*/
|
|
41960
42103
|
const toJSONObject = (obj) => {
|
|
41961
42104
|
const stack = new Array(10);
|
|
41962
42105
|
|
|
41963
42106
|
const visit = (source, i) => {
|
|
41964
|
-
|
|
41965
42107
|
if (isObject(source)) {
|
|
41966
42108
|
if (stack.indexOf(source) >= 0) {
|
|
41967
42109
|
return;
|
|
41968
42110
|
}
|
|
41969
42111
|
|
|
41970
|
-
|
|
42112
|
+
//Buffer check
|
|
42113
|
+
if (isBuffer(source)) {
|
|
42114
|
+
return source;
|
|
42115
|
+
}
|
|
42116
|
+
|
|
42117
|
+
if (!('toJSON' in source)) {
|
|
41971
42118
|
stack[i] = source;
|
|
41972
42119
|
const target = isArray(source) ? [] : {};
|
|
41973
42120
|
|
|
@@ -41988,44 +42135,76 @@ const toJSONObject = (obj) => {
|
|
|
41988
42135
|
return visit(obj, 0);
|
|
41989
42136
|
};
|
|
41990
42137
|
|
|
42138
|
+
/**
|
|
42139
|
+
* Determines if a value is an async function.
|
|
42140
|
+
*
|
|
42141
|
+
* @param {*} thing - The value to test.
|
|
42142
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
42143
|
+
*/
|
|
41991
42144
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
41992
42145
|
|
|
42146
|
+
/**
|
|
42147
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
42148
|
+
*
|
|
42149
|
+
* @param {*} thing - The value to test.
|
|
42150
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
42151
|
+
*/
|
|
41993
42152
|
const isThenable = (thing) =>
|
|
41994
|
-
thing &&
|
|
42153
|
+
thing &&
|
|
42154
|
+
(isObject(thing) || isFunction$2(thing)) &&
|
|
42155
|
+
isFunction$2(thing.then) &&
|
|
42156
|
+
isFunction$2(thing.catch);
|
|
41995
42157
|
|
|
41996
42158
|
// original code
|
|
41997
42159
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
41998
42160
|
|
|
42161
|
+
/**
|
|
42162
|
+
* Provides a cross-platform setImmediate implementation.
|
|
42163
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
42164
|
+
*
|
|
42165
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
42166
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
42167
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
42168
|
+
*/
|
|
41999
42169
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
42000
42170
|
if (setImmediateSupported) {
|
|
42001
42171
|
return setImmediate;
|
|
42002
42172
|
}
|
|
42003
42173
|
|
|
42004
|
-
return postMessageSupported
|
|
42005
|
-
|
|
42006
|
-
|
|
42007
|
-
|
|
42008
|
-
|
|
42009
|
-
|
|
42174
|
+
return postMessageSupported
|
|
42175
|
+
? ((token, callbacks) => {
|
|
42176
|
+
_global.addEventListener(
|
|
42177
|
+
'message',
|
|
42178
|
+
({ source, data }) => {
|
|
42179
|
+
if (source === _global && data === token) {
|
|
42180
|
+
callbacks.length && callbacks.shift()();
|
|
42181
|
+
}
|
|
42182
|
+
},
|
|
42183
|
+
false
|
|
42184
|
+
);
|
|
42010
42185
|
|
|
42011
|
-
|
|
42012
|
-
|
|
42013
|
-
|
|
42014
|
-
|
|
42015
|
-
|
|
42016
|
-
|
|
42017
|
-
|
|
42018
|
-
isFunction$1(_global.postMessage)
|
|
42019
|
-
);
|
|
42186
|
+
return (cb) => {
|
|
42187
|
+
callbacks.push(cb);
|
|
42188
|
+
_global.postMessage(token, '*');
|
|
42189
|
+
};
|
|
42190
|
+
})(`axios@${Math.random()}`, [])
|
|
42191
|
+
: (cb) => setTimeout(cb);
|
|
42192
|
+
})(typeof setImmediate === 'function', isFunction$2(_global.postMessage));
|
|
42020
42193
|
|
|
42021
|
-
|
|
42022
|
-
|
|
42194
|
+
/**
|
|
42195
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
42196
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
42197
|
+
*
|
|
42198
|
+
* @type {Function}
|
|
42199
|
+
*/
|
|
42200
|
+
const asap =
|
|
42201
|
+
typeof queueMicrotask !== 'undefined'
|
|
42202
|
+
? queueMicrotask.bind(_global)
|
|
42203
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
42023
42204
|
|
|
42024
42205
|
// *********************
|
|
42025
42206
|
|
|
42026
|
-
|
|
42027
|
-
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
42028
|
-
|
|
42207
|
+
const isIterable = (thing) => thing != null && isFunction$2(thing[iterator]);
|
|
42029
42208
|
|
|
42030
42209
|
var utils$3 = {
|
|
42031
42210
|
isArray,
|
|
@@ -42038,6 +42217,7 @@ var utils$3 = {
|
|
|
42038
42217
|
isBoolean,
|
|
42039
42218
|
isObject,
|
|
42040
42219
|
isPlainObject,
|
|
42220
|
+
isEmptyObject,
|
|
42041
42221
|
isReadableStream,
|
|
42042
42222
|
isRequest,
|
|
42043
42223
|
isResponse,
|
|
@@ -42045,9 +42225,11 @@ var utils$3 = {
|
|
|
42045
42225
|
isUndefined,
|
|
42046
42226
|
isDate,
|
|
42047
42227
|
isFile,
|
|
42228
|
+
isReactNativeBlob,
|
|
42229
|
+
isReactNative,
|
|
42048
42230
|
isBlob,
|
|
42049
42231
|
isRegExp,
|
|
42050
|
-
isFunction: isFunction$
|
|
42232
|
+
isFunction: isFunction$2,
|
|
42051
42233
|
isStream,
|
|
42052
42234
|
isURLSearchParams,
|
|
42053
42235
|
isTypedArray,
|
|
@@ -42083,42 +42265,60 @@ var utils$3 = {
|
|
|
42083
42265
|
isThenable,
|
|
42084
42266
|
setImmediate: _setImmediate,
|
|
42085
42267
|
asap,
|
|
42086
|
-
isIterable
|
|
42268
|
+
isIterable,
|
|
42087
42269
|
};
|
|
42088
42270
|
|
|
42089
|
-
|
|
42090
|
-
|
|
42091
|
-
|
|
42092
|
-
|
|
42093
|
-
|
|
42094
|
-
* @param {Object} [config] The config.
|
|
42095
|
-
* @param {Object} [request] The request.
|
|
42096
|
-
* @param {Object} [response] The response.
|
|
42097
|
-
*
|
|
42098
|
-
* @returns {Error} The created error.
|
|
42099
|
-
*/
|
|
42100
|
-
function AxiosError(message, code, config, request, response) {
|
|
42101
|
-
Error.call(this);
|
|
42271
|
+
class AxiosError extends Error {
|
|
42272
|
+
static from(error, code, config, request, response, customProps) {
|
|
42273
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
42274
|
+
axiosError.cause = error;
|
|
42275
|
+
axiosError.name = error.name;
|
|
42102
42276
|
|
|
42103
|
-
|
|
42104
|
-
|
|
42105
|
-
|
|
42106
|
-
|
|
42277
|
+
// Preserve status from the original error if not already set from response
|
|
42278
|
+
if (error.status != null && axiosError.status == null) {
|
|
42279
|
+
axiosError.status = error.status;
|
|
42280
|
+
}
|
|
42281
|
+
|
|
42282
|
+
customProps && Object.assign(axiosError, customProps);
|
|
42283
|
+
return axiosError;
|
|
42107
42284
|
}
|
|
42108
42285
|
|
|
42109
|
-
|
|
42110
|
-
|
|
42111
|
-
|
|
42112
|
-
|
|
42113
|
-
|
|
42114
|
-
|
|
42115
|
-
|
|
42116
|
-
|
|
42286
|
+
/**
|
|
42287
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
42288
|
+
*
|
|
42289
|
+
* @param {string} message The error message.
|
|
42290
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
42291
|
+
* @param {Object} [config] The config.
|
|
42292
|
+
* @param {Object} [request] The request.
|
|
42293
|
+
* @param {Object} [response] The response.
|
|
42294
|
+
*
|
|
42295
|
+
* @returns {Error} The created error.
|
|
42296
|
+
*/
|
|
42297
|
+
constructor(message, code, config, request, response) {
|
|
42298
|
+
super(message);
|
|
42299
|
+
|
|
42300
|
+
// Make message enumerable to maintain backward compatibility
|
|
42301
|
+
// The native Error constructor sets message as non-enumerable,
|
|
42302
|
+
// but axios < v1.13.3 had it as enumerable
|
|
42303
|
+
Object.defineProperty(this, 'message', {
|
|
42304
|
+
value: message,
|
|
42305
|
+
enumerable: true,
|
|
42306
|
+
writable: true,
|
|
42307
|
+
configurable: true,
|
|
42308
|
+
});
|
|
42309
|
+
|
|
42310
|
+
this.name = 'AxiosError';
|
|
42311
|
+
this.isAxiosError = true;
|
|
42312
|
+
code && (this.code = code);
|
|
42313
|
+
config && (this.config = config);
|
|
42314
|
+
request && (this.request = request);
|
|
42315
|
+
if (response) {
|
|
42316
|
+
this.response = response;
|
|
42317
|
+
this.status = response.status;
|
|
42318
|
+
}
|
|
42117
42319
|
}
|
|
42118
|
-
}
|
|
42119
42320
|
|
|
42120
|
-
|
|
42121
|
-
toJSON: function toJSON() {
|
|
42321
|
+
toJSON() {
|
|
42122
42322
|
return {
|
|
42123
42323
|
// Standard
|
|
42124
42324
|
message: this.message,
|
|
@@ -42134,55 +42334,25 @@ utils$3.inherits(AxiosError, Error, {
|
|
|
42134
42334
|
// Axios
|
|
42135
42335
|
config: utils$3.toJSONObject(this.config),
|
|
42136
42336
|
code: this.code,
|
|
42137
|
-
status: this.status
|
|
42337
|
+
status: this.status,
|
|
42138
42338
|
};
|
|
42139
42339
|
}
|
|
42140
|
-
}
|
|
42141
|
-
|
|
42142
|
-
const prototype$1 = AxiosError.prototype;
|
|
42143
|
-
const descriptors = {};
|
|
42144
|
-
|
|
42145
|
-
[
|
|
42146
|
-
'ERR_BAD_OPTION_VALUE',
|
|
42147
|
-
'ERR_BAD_OPTION',
|
|
42148
|
-
'ECONNABORTED',
|
|
42149
|
-
'ETIMEDOUT',
|
|
42150
|
-
'ERR_NETWORK',
|
|
42151
|
-
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
42152
|
-
'ERR_DEPRECATED',
|
|
42153
|
-
'ERR_BAD_RESPONSE',
|
|
42154
|
-
'ERR_BAD_REQUEST',
|
|
42155
|
-
'ERR_CANCELED',
|
|
42156
|
-
'ERR_NOT_SUPPORT',
|
|
42157
|
-
'ERR_INVALID_URL'
|
|
42158
|
-
// eslint-disable-next-line func-names
|
|
42159
|
-
].forEach(code => {
|
|
42160
|
-
descriptors[code] = {value: code};
|
|
42161
|
-
});
|
|
42162
|
-
|
|
42163
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
42164
|
-
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
42165
|
-
|
|
42166
|
-
// eslint-disable-next-line func-names
|
|
42167
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
42168
|
-
const axiosError = Object.create(prototype$1);
|
|
42169
|
-
|
|
42170
|
-
utils$3.toFlatObject(error, axiosError, function filter(obj) {
|
|
42171
|
-
return obj !== Error.prototype;
|
|
42172
|
-
}, prop => {
|
|
42173
|
-
return prop !== 'isAxiosError';
|
|
42174
|
-
});
|
|
42175
|
-
|
|
42176
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
42177
|
-
|
|
42178
|
-
axiosError.cause = error;
|
|
42179
|
-
|
|
42180
|
-
axiosError.name = error.name;
|
|
42181
|
-
|
|
42182
|
-
customProps && Object.assign(axiosError, customProps);
|
|
42340
|
+
}
|
|
42183
42341
|
|
|
42184
|
-
|
|
42185
|
-
|
|
42342
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
42343
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
42344
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
42345
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
42346
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
42347
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
42348
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
42349
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
42350
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
42351
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
42352
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
42353
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
42354
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
42355
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
42186
42356
|
|
|
42187
42357
|
// eslint-disable-next-line strict
|
|
42188
42358
|
var httpAdapter = null;
|
|
@@ -42220,11 +42390,14 @@ function removeBrackets(key) {
|
|
|
42220
42390
|
*/
|
|
42221
42391
|
function renderKey(path, key, dots) {
|
|
42222
42392
|
if (!path) return key;
|
|
42223
|
-
return path
|
|
42224
|
-
|
|
42225
|
-
|
|
42226
|
-
|
|
42227
|
-
|
|
42393
|
+
return path
|
|
42394
|
+
.concat(key)
|
|
42395
|
+
.map(function each(token, i) {
|
|
42396
|
+
// eslint-disable-next-line no-param-reassign
|
|
42397
|
+
token = removeBrackets(token);
|
|
42398
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
42399
|
+
})
|
|
42400
|
+
.join(dots ? '.' : '');
|
|
42228
42401
|
}
|
|
42229
42402
|
|
|
42230
42403
|
/**
|
|
@@ -42274,21 +42447,27 @@ function toFormData(obj, formData, options) {
|
|
|
42274
42447
|
formData = formData || new (FormData)();
|
|
42275
42448
|
|
|
42276
42449
|
// eslint-disable-next-line no-param-reassign
|
|
42277
|
-
options = utils$3.toFlatObject(
|
|
42278
|
-
|
|
42279
|
-
|
|
42280
|
-
|
|
42281
|
-
|
|
42282
|
-
|
|
42283
|
-
|
|
42284
|
-
|
|
42450
|
+
options = utils$3.toFlatObject(
|
|
42451
|
+
options,
|
|
42452
|
+
{
|
|
42453
|
+
metaTokens: true,
|
|
42454
|
+
dots: false,
|
|
42455
|
+
indexes: false,
|
|
42456
|
+
},
|
|
42457
|
+
false,
|
|
42458
|
+
function defined(option, source) {
|
|
42459
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
42460
|
+
return !utils$3.isUndefined(source[option]);
|
|
42461
|
+
}
|
|
42462
|
+
);
|
|
42285
42463
|
|
|
42286
42464
|
const metaTokens = options.metaTokens;
|
|
42287
42465
|
// eslint-disable-next-line no-use-before-define
|
|
42288
42466
|
const visitor = options.visitor || defaultVisitor;
|
|
42289
42467
|
const dots = options.dots;
|
|
42290
42468
|
const indexes = options.indexes;
|
|
42291
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
42469
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
42470
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
42292
42471
|
const useBlob = _Blob && utils$3.isSpecCompliantForm(formData);
|
|
42293
42472
|
|
|
42294
42473
|
if (!utils$3.isFunction(visitor)) {
|
|
@@ -42330,6 +42509,11 @@ function toFormData(obj, formData, options) {
|
|
|
42330
42509
|
function defaultVisitor(value, key, path) {
|
|
42331
42510
|
let arr = value;
|
|
42332
42511
|
|
|
42512
|
+
if (utils$3.isReactNative(formData) && utils$3.isReactNativeBlob(value)) {
|
|
42513
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
42514
|
+
return false;
|
|
42515
|
+
}
|
|
42516
|
+
|
|
42333
42517
|
if (value && !path && typeof value === 'object') {
|
|
42334
42518
|
if (utils$3.endsWith(key, '{}')) {
|
|
42335
42519
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -42338,17 +42522,22 @@ function toFormData(obj, formData, options) {
|
|
|
42338
42522
|
value = JSON.stringify(value);
|
|
42339
42523
|
} else if (
|
|
42340
42524
|
(utils$3.isArray(value) && isFlatArray(value)) ||
|
|
42341
|
-
((utils$3.isFileList(value) || utils$3.endsWith(key, '[]')) && (arr = utils$3.toArray(value))
|
|
42342
|
-
|
|
42525
|
+
((utils$3.isFileList(value) || utils$3.endsWith(key, '[]')) && (arr = utils$3.toArray(value)))
|
|
42526
|
+
) {
|
|
42343
42527
|
// eslint-disable-next-line no-param-reassign
|
|
42344
42528
|
key = removeBrackets(key);
|
|
42345
42529
|
|
|
42346
42530
|
arr.forEach(function each(el, index) {
|
|
42347
|
-
!(utils$3.isUndefined(el) || el === null) &&
|
|
42348
|
-
|
|
42349
|
-
|
|
42350
|
-
|
|
42351
|
-
|
|
42531
|
+
!(utils$3.isUndefined(el) || el === null) &&
|
|
42532
|
+
formData.append(
|
|
42533
|
+
// eslint-disable-next-line no-nested-ternary
|
|
42534
|
+
indexes === true
|
|
42535
|
+
? renderKey([key], index, dots)
|
|
42536
|
+
: indexes === null
|
|
42537
|
+
? key
|
|
42538
|
+
: key + '[]',
|
|
42539
|
+
convertValue(el)
|
|
42540
|
+
);
|
|
42352
42541
|
});
|
|
42353
42542
|
return false;
|
|
42354
42543
|
}
|
|
@@ -42368,12 +42557,19 @@ function toFormData(obj, formData, options) {
|
|
|
42368
42557
|
const exposedHelpers = Object.assign(predicates, {
|
|
42369
42558
|
defaultVisitor,
|
|
42370
42559
|
convertValue,
|
|
42371
|
-
isVisitable
|
|
42560
|
+
isVisitable,
|
|
42372
42561
|
});
|
|
42373
42562
|
|
|
42374
|
-
function build(value, path) {
|
|
42563
|
+
function build(value, path, depth = 0) {
|
|
42375
42564
|
if (utils$3.isUndefined(value)) return;
|
|
42376
42565
|
|
|
42566
|
+
if (depth > maxDepth) {
|
|
42567
|
+
throw new AxiosError(
|
|
42568
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
42569
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
42570
|
+
);
|
|
42571
|
+
}
|
|
42572
|
+
|
|
42377
42573
|
if (stack.indexOf(value) !== -1) {
|
|
42378
42574
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
42379
42575
|
}
|
|
@@ -42381,12 +42577,12 @@ function toFormData(obj, formData, options) {
|
|
|
42381
42577
|
stack.push(value);
|
|
42382
42578
|
|
|
42383
42579
|
utils$3.forEach(value, function each(el, key) {
|
|
42384
|
-
const result =
|
|
42385
|
-
|
|
42386
|
-
|
|
42580
|
+
const result =
|
|
42581
|
+
!(utils$3.isUndefined(el) || el === null) &&
|
|
42582
|
+
visitor.call(formData, el, utils$3.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
42387
42583
|
|
|
42388
42584
|
if (result === true) {
|
|
42389
|
-
build(el, path ? path.concat(key) : [key]);
|
|
42585
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
42390
42586
|
}
|
|
42391
42587
|
});
|
|
42392
42588
|
|
|
@@ -42418,9 +42614,8 @@ function encode$1(str) {
|
|
|
42418
42614
|
')': '%29',
|
|
42419
42615
|
'~': '%7E',
|
|
42420
42616
|
'%20': '+',
|
|
42421
|
-
'%00': '\x00'
|
|
42422
42617
|
};
|
|
42423
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
42618
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
42424
42619
|
return charMap[match];
|
|
42425
42620
|
});
|
|
42426
42621
|
}
|
|
@@ -42446,31 +42641,33 @@ prototype.append = function append(name, value) {
|
|
|
42446
42641
|
};
|
|
42447
42642
|
|
|
42448
42643
|
prototype.toString = function toString(encoder) {
|
|
42449
|
-
const _encode = encoder
|
|
42450
|
-
|
|
42451
|
-
|
|
42644
|
+
const _encode = encoder
|
|
42645
|
+
? function (value) {
|
|
42646
|
+
return encoder.call(this, value, encode$1);
|
|
42647
|
+
}
|
|
42648
|
+
: encode$1;
|
|
42452
42649
|
|
|
42453
|
-
return this._pairs
|
|
42454
|
-
|
|
42455
|
-
|
|
42650
|
+
return this._pairs
|
|
42651
|
+
.map(function each(pair) {
|
|
42652
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
42653
|
+
}, '')
|
|
42654
|
+
.join('&');
|
|
42456
42655
|
};
|
|
42457
42656
|
|
|
42458
42657
|
/**
|
|
42459
|
-
* It replaces
|
|
42460
|
-
*
|
|
42658
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
42659
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
42461
42660
|
*
|
|
42462
42661
|
* @param {string} val The value to be encoded.
|
|
42463
42662
|
*
|
|
42464
42663
|
* @returns {string} The encoded value.
|
|
42465
42664
|
*/
|
|
42466
42665
|
function encode(val) {
|
|
42467
|
-
return encodeURIComponent(val)
|
|
42468
|
-
replace(/%3A/gi, ':')
|
|
42469
|
-
replace(/%24/g, '$')
|
|
42470
|
-
replace(/%2C/gi, ',')
|
|
42471
|
-
replace(/%20/g, '+')
|
|
42472
|
-
replace(/%5B/gi, '[').
|
|
42473
|
-
replace(/%5D/gi, ']');
|
|
42666
|
+
return encodeURIComponent(val)
|
|
42667
|
+
.replace(/%3A/gi, ':')
|
|
42668
|
+
.replace(/%24/g, '$')
|
|
42669
|
+
.replace(/%2C/gi, ',')
|
|
42670
|
+
.replace(/%20/g, '+');
|
|
42474
42671
|
}
|
|
42475
42672
|
|
|
42476
42673
|
/**
|
|
@@ -42483,33 +42680,32 @@ function encode(val) {
|
|
|
42483
42680
|
* @returns {string} The formatted url
|
|
42484
42681
|
*/
|
|
42485
42682
|
function buildURL(url, params, options) {
|
|
42486
|
-
/*eslint no-param-reassign:0*/
|
|
42487
42683
|
if (!params) {
|
|
42488
42684
|
return url;
|
|
42489
42685
|
}
|
|
42490
|
-
|
|
42491
|
-
const _encode = options && options.encode || encode;
|
|
42492
42686
|
|
|
42493
|
-
|
|
42494
|
-
|
|
42495
|
-
|
|
42496
|
-
|
|
42497
|
-
|
|
42687
|
+
const _encode = (options && options.encode) || encode;
|
|
42688
|
+
|
|
42689
|
+
const _options = utils$3.isFunction(options)
|
|
42690
|
+
? {
|
|
42691
|
+
serialize: options,
|
|
42692
|
+
}
|
|
42693
|
+
: options;
|
|
42498
42694
|
|
|
42499
|
-
const serializeFn =
|
|
42695
|
+
const serializeFn = _options && _options.serialize;
|
|
42500
42696
|
|
|
42501
42697
|
let serializedParams;
|
|
42502
42698
|
|
|
42503
42699
|
if (serializeFn) {
|
|
42504
|
-
serializedParams = serializeFn(params,
|
|
42700
|
+
serializedParams = serializeFn(params, _options);
|
|
42505
42701
|
} else {
|
|
42506
|
-
serializedParams = utils$3.isURLSearchParams(params)
|
|
42507
|
-
params.toString()
|
|
42508
|
-
new AxiosURLSearchParams(params,
|
|
42702
|
+
serializedParams = utils$3.isURLSearchParams(params)
|
|
42703
|
+
? params.toString()
|
|
42704
|
+
: new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
42509
42705
|
}
|
|
42510
42706
|
|
|
42511
42707
|
if (serializedParams) {
|
|
42512
|
-
const hashmarkIndex = url.indexOf(
|
|
42708
|
+
const hashmarkIndex = url.indexOf('#');
|
|
42513
42709
|
|
|
42514
42710
|
if (hashmarkIndex !== -1) {
|
|
42515
42711
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -42530,6 +42726,7 @@ class InterceptorManager {
|
|
|
42530
42726
|
*
|
|
42531
42727
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
42532
42728
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
42729
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
42533
42730
|
*
|
|
42534
42731
|
* @return {Number} An ID used to remove interceptor later
|
|
42535
42732
|
*/
|
|
@@ -42538,7 +42735,7 @@ class InterceptorManager {
|
|
|
42538
42735
|
fulfilled,
|
|
42539
42736
|
rejected,
|
|
42540
42737
|
synchronous: options ? options.synchronous : false,
|
|
42541
|
-
runWhen: options ? options.runWhen : null
|
|
42738
|
+
runWhen: options ? options.runWhen : null,
|
|
42542
42739
|
});
|
|
42543
42740
|
return this.handlers.length - 1;
|
|
42544
42741
|
}
|
|
@@ -42548,7 +42745,7 @@ class InterceptorManager {
|
|
|
42548
42745
|
*
|
|
42549
42746
|
* @param {Number} id The ID that was returned by `use`
|
|
42550
42747
|
*
|
|
42551
|
-
* @returns {
|
|
42748
|
+
* @returns {void}
|
|
42552
42749
|
*/
|
|
42553
42750
|
eject(id) {
|
|
42554
42751
|
if (this.handlers[id]) {
|
|
@@ -42589,7 +42786,8 @@ class InterceptorManager {
|
|
|
42589
42786
|
var transitionalDefaults = {
|
|
42590
42787
|
silentJSONParsing: true,
|
|
42591
42788
|
forcedJSONParsing: true,
|
|
42592
|
-
clarifyTimeoutError: false
|
|
42789
|
+
clarifyTimeoutError: false,
|
|
42790
|
+
legacyInterceptorReqResOrdering: true,
|
|
42593
42791
|
};
|
|
42594
42792
|
|
|
42595
42793
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -42603,14 +42801,14 @@ var platform$1 = {
|
|
|
42603
42801
|
classes: {
|
|
42604
42802
|
URLSearchParams: URLSearchParams$1,
|
|
42605
42803
|
FormData: FormData$1,
|
|
42606
|
-
Blob: Blob$1
|
|
42804
|
+
Blob: Blob$1,
|
|
42607
42805
|
},
|
|
42608
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
42806
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
42609
42807
|
};
|
|
42610
42808
|
|
|
42611
42809
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
42612
42810
|
|
|
42613
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
42811
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
42614
42812
|
|
|
42615
42813
|
/**
|
|
42616
42814
|
* Determine if we're running in a standard browser environment
|
|
@@ -42629,7 +42827,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
|
42629
42827
|
*
|
|
42630
42828
|
* @returns {boolean}
|
|
42631
42829
|
*/
|
|
42632
|
-
const hasStandardBrowserEnv =
|
|
42830
|
+
const hasStandardBrowserEnv =
|
|
42831
|
+
hasBrowserEnv &&
|
|
42633
42832
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
42634
42833
|
|
|
42635
42834
|
/**
|
|
@@ -42650,7 +42849,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
42650
42849
|
);
|
|
42651
42850
|
})();
|
|
42652
42851
|
|
|
42653
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
42852
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
42654
42853
|
|
|
42655
42854
|
var utils$2 = /*#__PURE__*/Object.freeze({
|
|
42656
42855
|
__proto__: null,
|
|
@@ -42663,20 +42862,21 @@ var utils$2 = /*#__PURE__*/Object.freeze({
|
|
|
42663
42862
|
|
|
42664
42863
|
var platform = {
|
|
42665
42864
|
...utils$2,
|
|
42666
|
-
...platform$1
|
|
42865
|
+
...platform$1,
|
|
42667
42866
|
};
|
|
42668
42867
|
|
|
42669
42868
|
function toURLEncodedForm(data, options) {
|
|
42670
|
-
return toFormData(data, new platform.classes.URLSearchParams(),
|
|
42671
|
-
visitor: function(value, key, path, helpers) {
|
|
42869
|
+
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
42870
|
+
visitor: function (value, key, path, helpers) {
|
|
42672
42871
|
if (platform.isNode && utils$3.isBuffer(value)) {
|
|
42673
42872
|
this.append(key, value.toString('base64'));
|
|
42674
42873
|
return false;
|
|
42675
42874
|
}
|
|
42676
42875
|
|
|
42677
42876
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
42678
|
-
}
|
|
42679
|
-
|
|
42877
|
+
},
|
|
42878
|
+
...options,
|
|
42879
|
+
});
|
|
42680
42880
|
}
|
|
42681
42881
|
|
|
42682
42882
|
/**
|
|
@@ -42691,7 +42891,7 @@ function parsePropPath(name) {
|
|
|
42691
42891
|
// foo.x.y.z
|
|
42692
42892
|
// foo-x-y-z
|
|
42693
42893
|
// foo x y z
|
|
42694
|
-
return utils$3.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
42894
|
+
return utils$3.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
42695
42895
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
42696
42896
|
});
|
|
42697
42897
|
}
|
|
@@ -42735,7 +42935,9 @@ function formDataToJSON(formData) {
|
|
|
42735
42935
|
|
|
42736
42936
|
if (isLast) {
|
|
42737
42937
|
if (utils$3.hasOwnProp(target, name)) {
|
|
42738
|
-
target[name] =
|
|
42938
|
+
target[name] = utils$3.isArray(target[name])
|
|
42939
|
+
? target[name].concat(value)
|
|
42940
|
+
: [target[name], value];
|
|
42739
42941
|
} else {
|
|
42740
42942
|
target[name] = value;
|
|
42741
42943
|
}
|
|
@@ -42769,6 +42971,8 @@ function formDataToJSON(formData) {
|
|
|
42769
42971
|
return null;
|
|
42770
42972
|
}
|
|
42771
42973
|
|
|
42974
|
+
const own = (obj, key) => (obj != null && utils$3.hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
42975
|
+
|
|
42772
42976
|
/**
|
|
42773
42977
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
42774
42978
|
* of the input
|
|
@@ -42795,96 +42999,110 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
42795
42999
|
}
|
|
42796
43000
|
|
|
42797
43001
|
const defaults = {
|
|
42798
|
-
|
|
42799
43002
|
transitional: transitionalDefaults,
|
|
42800
43003
|
|
|
42801
43004
|
adapter: ['xhr', 'http', 'fetch'],
|
|
42802
43005
|
|
|
42803
|
-
transformRequest: [
|
|
42804
|
-
|
|
42805
|
-
|
|
42806
|
-
|
|
43006
|
+
transformRequest: [
|
|
43007
|
+
function transformRequest(data, headers) {
|
|
43008
|
+
const contentType = headers.getContentType() || '';
|
|
43009
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
43010
|
+
const isObjectPayload = utils$3.isObject(data);
|
|
42807
43011
|
|
|
42808
|
-
|
|
42809
|
-
|
|
42810
|
-
|
|
43012
|
+
if (isObjectPayload && utils$3.isHTMLForm(data)) {
|
|
43013
|
+
data = new FormData(data);
|
|
43014
|
+
}
|
|
42811
43015
|
|
|
42812
|
-
|
|
43016
|
+
const isFormData = utils$3.isFormData(data);
|
|
42813
43017
|
|
|
42814
|
-
|
|
42815
|
-
|
|
42816
|
-
|
|
43018
|
+
if (isFormData) {
|
|
43019
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
43020
|
+
}
|
|
42817
43021
|
|
|
42818
|
-
|
|
42819
|
-
|
|
42820
|
-
|
|
42821
|
-
|
|
42822
|
-
|
|
42823
|
-
|
|
42824
|
-
|
|
42825
|
-
|
|
42826
|
-
|
|
42827
|
-
|
|
42828
|
-
|
|
42829
|
-
|
|
42830
|
-
|
|
42831
|
-
|
|
42832
|
-
|
|
42833
|
-
|
|
43022
|
+
if (
|
|
43023
|
+
utils$3.isArrayBuffer(data) ||
|
|
43024
|
+
utils$3.isBuffer(data) ||
|
|
43025
|
+
utils$3.isStream(data) ||
|
|
43026
|
+
utils$3.isFile(data) ||
|
|
43027
|
+
utils$3.isBlob(data) ||
|
|
43028
|
+
utils$3.isReadableStream(data)
|
|
43029
|
+
) {
|
|
43030
|
+
return data;
|
|
43031
|
+
}
|
|
43032
|
+
if (utils$3.isArrayBufferView(data)) {
|
|
43033
|
+
return data.buffer;
|
|
43034
|
+
}
|
|
43035
|
+
if (utils$3.isURLSearchParams(data)) {
|
|
43036
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
43037
|
+
return data.toString();
|
|
43038
|
+
}
|
|
42834
43039
|
|
|
42835
|
-
|
|
43040
|
+
let isFileList;
|
|
42836
43041
|
|
|
42837
|
-
|
|
42838
|
-
|
|
42839
|
-
|
|
42840
|
-
|
|
43042
|
+
if (isObjectPayload) {
|
|
43043
|
+
const formSerializer = own(this, 'formSerializer');
|
|
43044
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
43045
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
43046
|
+
}
|
|
42841
43047
|
|
|
42842
|
-
|
|
42843
|
-
|
|
43048
|
+
if (
|
|
43049
|
+
(isFileList = utils$3.isFileList(data)) ||
|
|
43050
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
43051
|
+
) {
|
|
43052
|
+
const env = own(this, 'env');
|
|
43053
|
+
const _FormData = env && env.FormData;
|
|
42844
43054
|
|
|
42845
|
-
|
|
42846
|
-
|
|
42847
|
-
|
|
42848
|
-
|
|
42849
|
-
|
|
43055
|
+
return toFormData(
|
|
43056
|
+
isFileList ? { 'files[]': data } : data,
|
|
43057
|
+
_FormData && new _FormData(),
|
|
43058
|
+
formSerializer
|
|
43059
|
+
);
|
|
43060
|
+
}
|
|
42850
43061
|
}
|
|
42851
|
-
}
|
|
42852
43062
|
|
|
42853
|
-
|
|
42854
|
-
|
|
42855
|
-
|
|
42856
|
-
|
|
43063
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
43064
|
+
headers.setContentType('application/json', false);
|
|
43065
|
+
return stringifySafely(data);
|
|
43066
|
+
}
|
|
42857
43067
|
|
|
42858
|
-
|
|
42859
|
-
|
|
43068
|
+
return data;
|
|
43069
|
+
},
|
|
43070
|
+
],
|
|
42860
43071
|
|
|
42861
|
-
transformResponse: [
|
|
42862
|
-
|
|
42863
|
-
|
|
42864
|
-
|
|
43072
|
+
transformResponse: [
|
|
43073
|
+
function transformResponse(data) {
|
|
43074
|
+
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
43075
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
43076
|
+
const responseType = own(this, 'responseType');
|
|
43077
|
+
const JSONRequested = responseType === 'json';
|
|
42865
43078
|
|
|
42866
|
-
|
|
42867
|
-
|
|
42868
|
-
|
|
43079
|
+
if (utils$3.isResponse(data) || utils$3.isReadableStream(data)) {
|
|
43080
|
+
return data;
|
|
43081
|
+
}
|
|
42869
43082
|
|
|
42870
|
-
|
|
42871
|
-
|
|
42872
|
-
|
|
43083
|
+
if (
|
|
43084
|
+
data &&
|
|
43085
|
+
utils$3.isString(data) &&
|
|
43086
|
+
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
43087
|
+
) {
|
|
43088
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
43089
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
42873
43090
|
|
|
42874
|
-
|
|
42875
|
-
|
|
42876
|
-
|
|
42877
|
-
|
|
42878
|
-
|
|
42879
|
-
|
|
43091
|
+
try {
|
|
43092
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
43093
|
+
} catch (e) {
|
|
43094
|
+
if (strictJSONParsing) {
|
|
43095
|
+
if (e.name === 'SyntaxError') {
|
|
43096
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
43097
|
+
}
|
|
43098
|
+
throw e;
|
|
42880
43099
|
}
|
|
42881
|
-
throw e;
|
|
42882
43100
|
}
|
|
42883
43101
|
}
|
|
42884
|
-
}
|
|
42885
43102
|
|
|
42886
|
-
|
|
42887
|
-
|
|
43103
|
+
return data;
|
|
43104
|
+
},
|
|
43105
|
+
],
|
|
42888
43106
|
|
|
42889
43107
|
/**
|
|
42890
43108
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -42900,7 +43118,7 @@ const defaults = {
|
|
|
42900
43118
|
|
|
42901
43119
|
env: {
|
|
42902
43120
|
FormData: platform.classes.FormData,
|
|
42903
|
-
Blob: platform.classes.Blob
|
|
43121
|
+
Blob: platform.classes.Blob,
|
|
42904
43122
|
},
|
|
42905
43123
|
|
|
42906
43124
|
validateStatus: function validateStatus(status) {
|
|
@@ -42909,10 +43127,10 @@ const defaults = {
|
|
|
42909
43127
|
|
|
42910
43128
|
headers: {
|
|
42911
43129
|
common: {
|
|
42912
|
-
|
|
42913
|
-
'Content-Type': undefined
|
|
42914
|
-
}
|
|
42915
|
-
}
|
|
43130
|
+
Accept: 'application/json, text/plain, */*',
|
|
43131
|
+
'Content-Type': undefined,
|
|
43132
|
+
},
|
|
43133
|
+
},
|
|
42916
43134
|
};
|
|
42917
43135
|
|
|
42918
43136
|
utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
@@ -42922,10 +43140,23 @@ utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
|
42922
43140
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
42923
43141
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
42924
43142
|
const ignoreDuplicateOf = utils$3.toObjectSet([
|
|
42925
|
-
'age',
|
|
42926
|
-
'
|
|
42927
|
-
'
|
|
42928
|
-
'
|
|
43143
|
+
'age',
|
|
43144
|
+
'authorization',
|
|
43145
|
+
'content-length',
|
|
43146
|
+
'content-type',
|
|
43147
|
+
'etag',
|
|
43148
|
+
'expires',
|
|
43149
|
+
'from',
|
|
43150
|
+
'host',
|
|
43151
|
+
'if-modified-since',
|
|
43152
|
+
'if-unmodified-since',
|
|
43153
|
+
'last-modified',
|
|
43154
|
+
'location',
|
|
43155
|
+
'max-forwards',
|
|
43156
|
+
'proxy-authorization',
|
|
43157
|
+
'referer',
|
|
43158
|
+
'retry-after',
|
|
43159
|
+
'user-agent',
|
|
42929
43160
|
]);
|
|
42930
43161
|
|
|
42931
43162
|
/**
|
|
@@ -42942,47 +43173,81 @@ const ignoreDuplicateOf = utils$3.toObjectSet([
|
|
|
42942
43173
|
*
|
|
42943
43174
|
* @returns {Object} Headers parsed into an object
|
|
42944
43175
|
*/
|
|
42945
|
-
var parseHeaders = rawHeaders => {
|
|
43176
|
+
var parseHeaders = (rawHeaders) => {
|
|
42946
43177
|
const parsed = {};
|
|
42947
43178
|
let key;
|
|
42948
43179
|
let val;
|
|
42949
43180
|
let i;
|
|
42950
43181
|
|
|
42951
|
-
rawHeaders &&
|
|
42952
|
-
|
|
42953
|
-
|
|
42954
|
-
|
|
43182
|
+
rawHeaders &&
|
|
43183
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
43184
|
+
i = line.indexOf(':');
|
|
43185
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
43186
|
+
val = line.substring(i + 1).trim();
|
|
42955
43187
|
|
|
42956
|
-
|
|
42957
|
-
|
|
42958
|
-
|
|
43188
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
43189
|
+
return;
|
|
43190
|
+
}
|
|
42959
43191
|
|
|
42960
|
-
|
|
42961
|
-
|
|
42962
|
-
|
|
43192
|
+
if (key === 'set-cookie') {
|
|
43193
|
+
if (parsed[key]) {
|
|
43194
|
+
parsed[key].push(val);
|
|
43195
|
+
} else {
|
|
43196
|
+
parsed[key] = [val];
|
|
43197
|
+
}
|
|
42963
43198
|
} else {
|
|
42964
|
-
parsed[key] = [val
|
|
43199
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
42965
43200
|
}
|
|
42966
|
-
}
|
|
42967
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
42968
|
-
}
|
|
42969
|
-
});
|
|
43201
|
+
});
|
|
42970
43202
|
|
|
42971
43203
|
return parsed;
|
|
42972
43204
|
};
|
|
42973
43205
|
|
|
42974
43206
|
const $internals = Symbol('internals');
|
|
42975
43207
|
|
|
43208
|
+
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
43209
|
+
|
|
43210
|
+
function trimSPorHTAB(str) {
|
|
43211
|
+
let start = 0;
|
|
43212
|
+
let end = str.length;
|
|
43213
|
+
|
|
43214
|
+
while (start < end) {
|
|
43215
|
+
const code = str.charCodeAt(start);
|
|
43216
|
+
|
|
43217
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
43218
|
+
break;
|
|
43219
|
+
}
|
|
43220
|
+
|
|
43221
|
+
start += 1;
|
|
43222
|
+
}
|
|
43223
|
+
|
|
43224
|
+
while (end > start) {
|
|
43225
|
+
const code = str.charCodeAt(end - 1);
|
|
43226
|
+
|
|
43227
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
43228
|
+
break;
|
|
43229
|
+
}
|
|
43230
|
+
|
|
43231
|
+
end -= 1;
|
|
43232
|
+
}
|
|
43233
|
+
|
|
43234
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
43235
|
+
}
|
|
43236
|
+
|
|
42976
43237
|
function normalizeHeader(header) {
|
|
42977
43238
|
return header && String(header).trim().toLowerCase();
|
|
42978
43239
|
}
|
|
42979
43240
|
|
|
43241
|
+
function sanitizeHeaderValue(str) {
|
|
43242
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
43243
|
+
}
|
|
43244
|
+
|
|
42980
43245
|
function normalizeValue(value) {
|
|
42981
43246
|
if (value === false || value == null) {
|
|
42982
43247
|
return value;
|
|
42983
43248
|
}
|
|
42984
43249
|
|
|
42985
|
-
return utils$3.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
43250
|
+
return utils$3.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
42986
43251
|
}
|
|
42987
43252
|
|
|
42988
43253
|
function parseTokens(str) {
|
|
@@ -43020,8 +43285,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
43020
43285
|
}
|
|
43021
43286
|
|
|
43022
43287
|
function formatHeader(header) {
|
|
43023
|
-
return header
|
|
43024
|
-
.
|
|
43288
|
+
return header
|
|
43289
|
+
.trim()
|
|
43290
|
+
.toLowerCase()
|
|
43291
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
43025
43292
|
return char.toUpperCase() + str;
|
|
43026
43293
|
});
|
|
43027
43294
|
}
|
|
@@ -43029,12 +43296,12 @@ function formatHeader(header) {
|
|
|
43029
43296
|
function buildAccessors(obj, header) {
|
|
43030
43297
|
const accessorName = utils$3.toCamelCase(' ' + header);
|
|
43031
43298
|
|
|
43032
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
43299
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
43033
43300
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
43034
|
-
value: function(arg1, arg2, arg3) {
|
|
43301
|
+
value: function (arg1, arg2, arg3) {
|
|
43035
43302
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
43036
43303
|
},
|
|
43037
|
-
configurable: true
|
|
43304
|
+
configurable: true,
|
|
43038
43305
|
});
|
|
43039
43306
|
});
|
|
43040
43307
|
}
|
|
@@ -43056,7 +43323,12 @@ class AxiosHeaders {
|
|
|
43056
43323
|
|
|
43057
43324
|
const key = utils$3.findKey(self, lHeader);
|
|
43058
43325
|
|
|
43059
|
-
if
|
|
43326
|
+
if (
|
|
43327
|
+
!key ||
|
|
43328
|
+
self[key] === undefined ||
|
|
43329
|
+
_rewrite === true ||
|
|
43330
|
+
(_rewrite === undefined && self[key] !== false)
|
|
43331
|
+
) {
|
|
43060
43332
|
self[key || _header] = normalizeValue(_value);
|
|
43061
43333
|
}
|
|
43062
43334
|
}
|
|
@@ -43066,17 +43338,22 @@ class AxiosHeaders {
|
|
|
43066
43338
|
|
|
43067
43339
|
if (utils$3.isPlainObject(header) || header instanceof this.constructor) {
|
|
43068
43340
|
setHeaders(header, valueOrRewrite);
|
|
43069
|
-
} else if(utils$3.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
43341
|
+
} else if (utils$3.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
43070
43342
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
43071
43343
|
} else if (utils$3.isObject(header) && utils$3.isIterable(header)) {
|
|
43072
|
-
let obj = {},
|
|
43344
|
+
let obj = {},
|
|
43345
|
+
dest,
|
|
43346
|
+
key;
|
|
43073
43347
|
for (const entry of header) {
|
|
43074
43348
|
if (!utils$3.isArray(entry)) {
|
|
43075
43349
|
throw TypeError('Object iterator must return a key-value pair');
|
|
43076
43350
|
}
|
|
43077
43351
|
|
|
43078
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
43079
|
-
|
|
43352
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
43353
|
+
? utils$3.isArray(dest)
|
|
43354
|
+
? [...dest, entry[1]]
|
|
43355
|
+
: [dest, entry[1]]
|
|
43356
|
+
: entry[1];
|
|
43080
43357
|
}
|
|
43081
43358
|
|
|
43082
43359
|
setHeaders(obj, valueOrRewrite);
|
|
@@ -43123,7 +43400,11 @@ class AxiosHeaders {
|
|
|
43123
43400
|
if (header) {
|
|
43124
43401
|
const key = utils$3.findKey(this, header);
|
|
43125
43402
|
|
|
43126
|
-
return !!(
|
|
43403
|
+
return !!(
|
|
43404
|
+
key &&
|
|
43405
|
+
this[key] !== undefined &&
|
|
43406
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
43407
|
+
);
|
|
43127
43408
|
}
|
|
43128
43409
|
|
|
43129
43410
|
return false;
|
|
@@ -43163,7 +43444,7 @@ class AxiosHeaders {
|
|
|
43163
43444
|
|
|
43164
43445
|
while (i--) {
|
|
43165
43446
|
const key = keys[i];
|
|
43166
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
43447
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
43167
43448
|
delete this[key];
|
|
43168
43449
|
deleted = true;
|
|
43169
43450
|
}
|
|
@@ -43207,7 +43488,9 @@ class AxiosHeaders {
|
|
|
43207
43488
|
const obj = Object.create(null);
|
|
43208
43489
|
|
|
43209
43490
|
utils$3.forEach(this, (value, header) => {
|
|
43210
|
-
value != null &&
|
|
43491
|
+
value != null &&
|
|
43492
|
+
value !== false &&
|
|
43493
|
+
(obj[header] = asStrings && utils$3.isArray(value) ? value.join(', ') : value);
|
|
43211
43494
|
});
|
|
43212
43495
|
|
|
43213
43496
|
return obj;
|
|
@@ -43218,11 +43501,13 @@ class AxiosHeaders {
|
|
|
43218
43501
|
}
|
|
43219
43502
|
|
|
43220
43503
|
toString() {
|
|
43221
|
-
return Object.entries(this.toJSON())
|
|
43504
|
+
return Object.entries(this.toJSON())
|
|
43505
|
+
.map(([header, value]) => header + ': ' + value)
|
|
43506
|
+
.join('\n');
|
|
43222
43507
|
}
|
|
43223
43508
|
|
|
43224
43509
|
getSetCookie() {
|
|
43225
|
-
return this.get(
|
|
43510
|
+
return this.get('set-cookie') || [];
|
|
43226
43511
|
}
|
|
43227
43512
|
|
|
43228
43513
|
get [Symbol.toStringTag]() {
|
|
@@ -43242,9 +43527,12 @@ class AxiosHeaders {
|
|
|
43242
43527
|
}
|
|
43243
43528
|
|
|
43244
43529
|
static accessor(header) {
|
|
43245
|
-
const internals =
|
|
43246
|
-
|
|
43247
|
-
|
|
43530
|
+
const internals =
|
|
43531
|
+
(this[$internals] =
|
|
43532
|
+
this[$internals] =
|
|
43533
|
+
{
|
|
43534
|
+
accessors: {},
|
|
43535
|
+
});
|
|
43248
43536
|
|
|
43249
43537
|
const accessors = internals.accessors;
|
|
43250
43538
|
const prototype = this.prototype;
|
|
@@ -43264,17 +43552,24 @@ class AxiosHeaders {
|
|
|
43264
43552
|
}
|
|
43265
43553
|
}
|
|
43266
43554
|
|
|
43267
|
-
AxiosHeaders.accessor([
|
|
43555
|
+
AxiosHeaders.accessor([
|
|
43556
|
+
'Content-Type',
|
|
43557
|
+
'Content-Length',
|
|
43558
|
+
'Accept',
|
|
43559
|
+
'Accept-Encoding',
|
|
43560
|
+
'User-Agent',
|
|
43561
|
+
'Authorization',
|
|
43562
|
+
]);
|
|
43268
43563
|
|
|
43269
43564
|
// reserved names hotfix
|
|
43270
|
-
utils$3.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
43565
|
+
utils$3.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
43271
43566
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
43272
43567
|
return {
|
|
43273
43568
|
get: () => value,
|
|
43274
43569
|
set(headerValue) {
|
|
43275
43570
|
this[mapped] = headerValue;
|
|
43276
|
-
}
|
|
43277
|
-
}
|
|
43571
|
+
},
|
|
43572
|
+
};
|
|
43278
43573
|
});
|
|
43279
43574
|
|
|
43280
43575
|
utils$3.freezeMethods(AxiosHeaders);
|
|
@@ -43306,25 +43601,23 @@ function isCancel(value) {
|
|
|
43306
43601
|
return !!(value && value.__CANCEL__);
|
|
43307
43602
|
}
|
|
43308
43603
|
|
|
43309
|
-
|
|
43310
|
-
|
|
43311
|
-
|
|
43312
|
-
|
|
43313
|
-
|
|
43314
|
-
|
|
43315
|
-
|
|
43316
|
-
|
|
43317
|
-
|
|
43318
|
-
|
|
43319
|
-
|
|
43320
|
-
|
|
43321
|
-
|
|
43604
|
+
class CanceledError extends AxiosError {
|
|
43605
|
+
/**
|
|
43606
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
43607
|
+
*
|
|
43608
|
+
* @param {string=} message The message.
|
|
43609
|
+
* @param {Object=} config The config.
|
|
43610
|
+
* @param {Object=} request The request.
|
|
43611
|
+
*
|
|
43612
|
+
* @returns {CanceledError} The created error.
|
|
43613
|
+
*/
|
|
43614
|
+
constructor(message, config, request) {
|
|
43615
|
+
super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
43616
|
+
this.name = 'CanceledError';
|
|
43617
|
+
this.__CANCEL__ = true;
|
|
43618
|
+
}
|
|
43322
43619
|
}
|
|
43323
43620
|
|
|
43324
|
-
utils$3.inherits(CanceledError, AxiosError, {
|
|
43325
|
-
__CANCEL__: true
|
|
43326
|
-
});
|
|
43327
|
-
|
|
43328
43621
|
/**
|
|
43329
43622
|
* Resolve or reject a Promise based on response status.
|
|
43330
43623
|
*
|
|
@@ -43339,19 +43632,23 @@ function settle(resolve, reject, response) {
|
|
|
43339
43632
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
43340
43633
|
resolve(response);
|
|
43341
43634
|
} else {
|
|
43342
|
-
reject(
|
|
43343
|
-
|
|
43344
|
-
|
|
43345
|
-
|
|
43346
|
-
|
|
43347
|
-
|
|
43348
|
-
|
|
43635
|
+
reject(
|
|
43636
|
+
new AxiosError(
|
|
43637
|
+
'Request failed with status code ' + response.status,
|
|
43638
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][
|
|
43639
|
+
Math.floor(response.status / 100) - 4
|
|
43640
|
+
],
|
|
43641
|
+
response.config,
|
|
43642
|
+
response.request,
|
|
43643
|
+
response
|
|
43644
|
+
)
|
|
43645
|
+
);
|
|
43349
43646
|
}
|
|
43350
43647
|
}
|
|
43351
43648
|
|
|
43352
43649
|
function parseProtocol(url) {
|
|
43353
43650
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
43354
|
-
return match && match[1] || '';
|
|
43651
|
+
return (match && match[1]) || '';
|
|
43355
43652
|
}
|
|
43356
43653
|
|
|
43357
43654
|
/**
|
|
@@ -43402,7 +43699,7 @@ function speedometer(samplesCount, min) {
|
|
|
43402
43699
|
|
|
43403
43700
|
const passed = startedAt && now - startedAt;
|
|
43404
43701
|
|
|
43405
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
43702
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
43406
43703
|
};
|
|
43407
43704
|
}
|
|
43408
43705
|
|
|
@@ -43425,13 +43722,13 @@ function throttle(fn, freq) {
|
|
|
43425
43722
|
clearTimeout(timer);
|
|
43426
43723
|
timer = null;
|
|
43427
43724
|
}
|
|
43428
|
-
fn
|
|
43725
|
+
fn(...args);
|
|
43429
43726
|
};
|
|
43430
43727
|
|
|
43431
43728
|
const throttled = (...args) => {
|
|
43432
43729
|
const now = Date.now();
|
|
43433
43730
|
const passed = now - timestamp;
|
|
43434
|
-
if (
|
|
43731
|
+
if (passed >= threshold) {
|
|
43435
43732
|
invoke(args, now);
|
|
43436
43733
|
} else {
|
|
43437
43734
|
lastArgs = args;
|
|
@@ -43453,25 +43750,25 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
43453
43750
|
let bytesNotified = 0;
|
|
43454
43751
|
const _speedometer = speedometer(50, 250);
|
|
43455
43752
|
|
|
43456
|
-
return throttle(e => {
|
|
43457
|
-
const
|
|
43753
|
+
return throttle((e) => {
|
|
43754
|
+
const rawLoaded = e.loaded;
|
|
43458
43755
|
const total = e.lengthComputable ? e.total : undefined;
|
|
43459
|
-
const
|
|
43756
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
43757
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
43460
43758
|
const rate = _speedometer(progressBytes);
|
|
43461
|
-
const inRange = loaded <= total;
|
|
43462
43759
|
|
|
43463
|
-
bytesNotified = loaded;
|
|
43760
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
43464
43761
|
|
|
43465
43762
|
const data = {
|
|
43466
43763
|
loaded,
|
|
43467
43764
|
total,
|
|
43468
|
-
progress: total ?
|
|
43765
|
+
progress: total ? loaded / total : undefined,
|
|
43469
43766
|
bytes: progressBytes,
|
|
43470
43767
|
rate: rate ? rate : undefined,
|
|
43471
|
-
estimated: rate && total
|
|
43768
|
+
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
43472
43769
|
event: e,
|
|
43473
43770
|
lengthComputable: total != null,
|
|
43474
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
43771
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
43475
43772
|
};
|
|
43476
43773
|
|
|
43477
43774
|
listener(data);
|
|
@@ -43481,66 +43778,82 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
43481
43778
|
const progressEventDecorator = (total, throttled) => {
|
|
43482
43779
|
const lengthComputable = total != null;
|
|
43483
43780
|
|
|
43484
|
-
return [
|
|
43485
|
-
|
|
43486
|
-
|
|
43487
|
-
|
|
43488
|
-
|
|
43781
|
+
return [
|
|
43782
|
+
(loaded) =>
|
|
43783
|
+
throttled[0]({
|
|
43784
|
+
lengthComputable,
|
|
43785
|
+
total,
|
|
43786
|
+
loaded,
|
|
43787
|
+
}),
|
|
43788
|
+
throttled[1],
|
|
43789
|
+
];
|
|
43489
43790
|
};
|
|
43490
43791
|
|
|
43491
|
-
const asyncDecorator =
|
|
43792
|
+
const asyncDecorator =
|
|
43793
|
+
(fn) =>
|
|
43794
|
+
(...args) =>
|
|
43795
|
+
utils$3.asap(() => fn(...args));
|
|
43492
43796
|
|
|
43493
|
-
var isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
43494
|
-
|
|
43495
|
-
|
|
43496
|
-
return (
|
|
43497
|
-
origin.protocol === url.protocol &&
|
|
43498
|
-
origin.host === url.host &&
|
|
43499
|
-
(isMSIE || origin.port === url.port)
|
|
43500
|
-
);
|
|
43501
|
-
})(
|
|
43502
|
-
new URL(platform.origin),
|
|
43503
|
-
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
43504
|
-
) : () => true;
|
|
43505
|
-
|
|
43506
|
-
var cookies = platform.hasStandardBrowserEnv ?
|
|
43507
|
-
|
|
43508
|
-
// Standard browser envs support document.cookie
|
|
43509
|
-
{
|
|
43510
|
-
write(name, value, expires, path, domain, secure) {
|
|
43511
|
-
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
43797
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
43798
|
+
? ((origin, isMSIE) => (url) => {
|
|
43799
|
+
url = new URL(url, platform.origin);
|
|
43512
43800
|
|
|
43513
|
-
|
|
43801
|
+
return (
|
|
43802
|
+
origin.protocol === url.protocol &&
|
|
43803
|
+
origin.host === url.host &&
|
|
43804
|
+
(isMSIE || origin.port === url.port)
|
|
43805
|
+
);
|
|
43806
|
+
})(
|
|
43807
|
+
new URL(platform.origin),
|
|
43808
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
43809
|
+
)
|
|
43810
|
+
: () => true;
|
|
43514
43811
|
|
|
43515
|
-
|
|
43812
|
+
var cookies = platform.hasStandardBrowserEnv
|
|
43813
|
+
? // Standard browser envs support document.cookie
|
|
43814
|
+
{
|
|
43815
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
43816
|
+
if (typeof document === 'undefined') return;
|
|
43516
43817
|
|
|
43517
|
-
|
|
43818
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
43518
43819
|
|
|
43519
|
-
|
|
43820
|
+
if (utils$3.isNumber(expires)) {
|
|
43821
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
43822
|
+
}
|
|
43823
|
+
if (utils$3.isString(path)) {
|
|
43824
|
+
cookie.push(`path=${path}`);
|
|
43825
|
+
}
|
|
43826
|
+
if (utils$3.isString(domain)) {
|
|
43827
|
+
cookie.push(`domain=${domain}`);
|
|
43828
|
+
}
|
|
43829
|
+
if (secure === true) {
|
|
43830
|
+
cookie.push('secure');
|
|
43831
|
+
}
|
|
43832
|
+
if (utils$3.isString(sameSite)) {
|
|
43833
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
43834
|
+
}
|
|
43520
43835
|
|
|
43521
|
-
|
|
43522
|
-
|
|
43836
|
+
document.cookie = cookie.join('; ');
|
|
43837
|
+
},
|
|
43523
43838
|
|
|
43524
|
-
|
|
43525
|
-
|
|
43526
|
-
|
|
43527
|
-
|
|
43839
|
+
read(name) {
|
|
43840
|
+
if (typeof document === 'undefined') return null;
|
|
43841
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
43842
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
43843
|
+
},
|
|
43528
43844
|
|
|
43529
|
-
|
|
43530
|
-
|
|
43845
|
+
remove(name) {
|
|
43846
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
43847
|
+
},
|
|
43531
43848
|
}
|
|
43532
|
-
|
|
43533
|
-
|
|
43534
|
-
|
|
43535
|
-
|
|
43536
|
-
|
|
43537
|
-
|
|
43538
|
-
|
|
43539
|
-
|
|
43540
|
-
return null;
|
|
43541
|
-
},
|
|
43542
|
-
remove() {}
|
|
43543
|
-
};
|
|
43849
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
43850
|
+
{
|
|
43851
|
+
write() {},
|
|
43852
|
+
read() {
|
|
43853
|
+
return null;
|
|
43854
|
+
},
|
|
43855
|
+
remove() {},
|
|
43856
|
+
};
|
|
43544
43857
|
|
|
43545
43858
|
/**
|
|
43546
43859
|
* Determines whether the specified URL is absolute
|
|
@@ -43553,6 +43866,10 @@ function isAbsoluteURL(url) {
|
|
|
43553
43866
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
43554
43867
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
43555
43868
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
43869
|
+
if (typeof url !== 'string') {
|
|
43870
|
+
return false;
|
|
43871
|
+
}
|
|
43872
|
+
|
|
43556
43873
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
43557
43874
|
}
|
|
43558
43875
|
|
|
@@ -43582,13 +43899,13 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
43582
43899
|
*/
|
|
43583
43900
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
43584
43901
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
43585
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
43902
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
43586
43903
|
return combineURLs(baseURL, requestedURL);
|
|
43587
43904
|
}
|
|
43588
43905
|
return requestedURL;
|
|
43589
43906
|
}
|
|
43590
43907
|
|
|
43591
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
|
43908
|
+
const headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);
|
|
43592
43909
|
|
|
43593
43910
|
/**
|
|
43594
43911
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -43602,11 +43919,22 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing }
|
|
|
43602
43919
|
function mergeConfig(config1, config2) {
|
|
43603
43920
|
// eslint-disable-next-line no-param-reassign
|
|
43604
43921
|
config2 = config2 || {};
|
|
43605
|
-
|
|
43922
|
+
|
|
43923
|
+
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
43924
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype
|
|
43925
|
+
// (see GHSA-q8qp-cvcw-x6jj). `hasOwnProperty` is restored as a non-enumerable
|
|
43926
|
+
// own slot to preserve ergonomics for user code that relies on it.
|
|
43927
|
+
const config = Object.create(null);
|
|
43928
|
+
Object.defineProperty(config, 'hasOwnProperty', {
|
|
43929
|
+
value: Object.prototype.hasOwnProperty,
|
|
43930
|
+
enumerable: false,
|
|
43931
|
+
writable: true,
|
|
43932
|
+
configurable: true,
|
|
43933
|
+
});
|
|
43606
43934
|
|
|
43607
43935
|
function getMergedValue(target, source, prop, caseless) {
|
|
43608
43936
|
if (utils$3.isPlainObject(target) && utils$3.isPlainObject(source)) {
|
|
43609
|
-
return utils$3.merge.call({caseless}, target, source);
|
|
43937
|
+
return utils$3.merge.call({ caseless }, target, source);
|
|
43610
43938
|
} else if (utils$3.isPlainObject(source)) {
|
|
43611
43939
|
return utils$3.merge({}, source);
|
|
43612
43940
|
} else if (utils$3.isArray(source)) {
|
|
@@ -43615,12 +43943,11 @@ function mergeConfig(config1, config2) {
|
|
|
43615
43943
|
return source;
|
|
43616
43944
|
}
|
|
43617
43945
|
|
|
43618
|
-
|
|
43619
|
-
function mergeDeepProperties(a, b, prop , caseless) {
|
|
43946
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
43620
43947
|
if (!utils$3.isUndefined(b)) {
|
|
43621
|
-
return getMergedValue(a, b, prop
|
|
43948
|
+
return getMergedValue(a, b, prop, caseless);
|
|
43622
43949
|
} else if (!utils$3.isUndefined(a)) {
|
|
43623
|
-
return getMergedValue(undefined, a, prop
|
|
43950
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
43624
43951
|
}
|
|
43625
43952
|
}
|
|
43626
43953
|
|
|
@@ -43642,9 +43969,9 @@ function mergeConfig(config1, config2) {
|
|
|
43642
43969
|
|
|
43643
43970
|
// eslint-disable-next-line consistent-return
|
|
43644
43971
|
function mergeDirectKeys(a, b, prop) {
|
|
43645
|
-
if (prop
|
|
43972
|
+
if (utils$3.hasOwnProp(config2, prop)) {
|
|
43646
43973
|
return getMergedValue(a, b);
|
|
43647
|
-
} else if (prop
|
|
43974
|
+
} else if (utils$3.hasOwnProp(config1, prop)) {
|
|
43648
43975
|
return getMergedValue(undefined, a);
|
|
43649
43976
|
}
|
|
43650
43977
|
}
|
|
@@ -43676,14 +44003,19 @@ function mergeConfig(config1, config2) {
|
|
|
43676
44003
|
httpsAgent: defaultToConfig2,
|
|
43677
44004
|
cancelToken: defaultToConfig2,
|
|
43678
44005
|
socketPath: defaultToConfig2,
|
|
44006
|
+
allowedSocketPaths: defaultToConfig2,
|
|
43679
44007
|
responseEncoding: defaultToConfig2,
|
|
43680
44008
|
validateStatus: mergeDirectKeys,
|
|
43681
|
-
headers: (a, b
|
|
44009
|
+
headers: (a, b, prop) =>
|
|
44010
|
+
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
43682
44011
|
};
|
|
43683
44012
|
|
|
43684
|
-
utils$3.forEach(Object.keys(
|
|
43685
|
-
|
|
43686
|
-
const
|
|
44013
|
+
utils$3.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
44014
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
44015
|
+
const merge = utils$3.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
44016
|
+
const a = utils$3.hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
44017
|
+
const b = utils$3.hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
44018
|
+
const configValue = merge(a, b, prop);
|
|
43687
44019
|
(utils$3.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
43688
44020
|
});
|
|
43689
44021
|
|
|
@@ -43693,28 +44025,54 @@ function mergeConfig(config1, config2) {
|
|
|
43693
44025
|
var resolveConfig = (config) => {
|
|
43694
44026
|
const newConfig = mergeConfig({}, config);
|
|
43695
44027
|
|
|
43696
|
-
|
|
44028
|
+
// Read only own properties to prevent prototype pollution gadgets
|
|
44029
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com'). See GHSA-q8qp-cvcw-x6jj.
|
|
44030
|
+
const own = (key) => (utils$3.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
44031
|
+
|
|
44032
|
+
const data = own('data');
|
|
44033
|
+
let withXSRFToken = own('withXSRFToken');
|
|
44034
|
+
const xsrfHeaderName = own('xsrfHeaderName');
|
|
44035
|
+
const xsrfCookieName = own('xsrfCookieName');
|
|
44036
|
+
let headers = own('headers');
|
|
44037
|
+
const auth = own('auth');
|
|
44038
|
+
const baseURL = own('baseURL');
|
|
44039
|
+
const allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
44040
|
+
const url = own('url');
|
|
43697
44041
|
|
|
43698
44042
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
43699
44043
|
|
|
43700
|
-
newConfig.url = buildURL(
|
|
44044
|
+
newConfig.url = buildURL(
|
|
44045
|
+
buildFullPath(baseURL, url, allowAbsoluteUrls),
|
|
44046
|
+
config.params,
|
|
44047
|
+
config.paramsSerializer
|
|
44048
|
+
);
|
|
43701
44049
|
|
|
43702
44050
|
// HTTP basic authentication
|
|
43703
44051
|
if (auth) {
|
|
43704
|
-
headers.set(
|
|
43705
|
-
|
|
44052
|
+
headers.set(
|
|
44053
|
+
'Authorization',
|
|
44054
|
+
'Basic ' +
|
|
44055
|
+
btoa(
|
|
44056
|
+
(auth.username || '') +
|
|
44057
|
+
':' +
|
|
44058
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
44059
|
+
)
|
|
43706
44060
|
);
|
|
43707
44061
|
}
|
|
43708
44062
|
|
|
43709
|
-
let contentType;
|
|
43710
|
-
|
|
43711
44063
|
if (utils$3.isFormData(data)) {
|
|
43712
44064
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
43713
|
-
headers.setContentType(undefined); //
|
|
43714
|
-
} else if ((
|
|
43715
|
-
//
|
|
43716
|
-
const
|
|
43717
|
-
headers
|
|
44065
|
+
headers.setContentType(undefined); // browser handles it
|
|
44066
|
+
} else if (utils$3.isFunction(data.getHeaders)) {
|
|
44067
|
+
// Node.js FormData (like form-data package)
|
|
44068
|
+
const formHeaders = data.getHeaders();
|
|
44069
|
+
// Only set safe headers to avoid overwriting security headers
|
|
44070
|
+
const allowedHeaders = ['content-type', 'content-length'];
|
|
44071
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
44072
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
44073
|
+
headers.set(key, val);
|
|
44074
|
+
}
|
|
44075
|
+
});
|
|
43718
44076
|
}
|
|
43719
44077
|
}
|
|
43720
44078
|
|
|
@@ -43723,10 +44081,18 @@ var resolveConfig = (config) => {
|
|
|
43723
44081
|
// Specifically not if we're in a web worker, or react-native.
|
|
43724
44082
|
|
|
43725
44083
|
if (platform.hasStandardBrowserEnv) {
|
|
43726
|
-
|
|
44084
|
+
if (utils$3.isFunction(withXSRFToken)) {
|
|
44085
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
44086
|
+
}
|
|
43727
44087
|
|
|
43728
|
-
|
|
43729
|
-
|
|
44088
|
+
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
44089
|
+
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
44090
|
+
// the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
|
|
44091
|
+
const shouldSendXSRF =
|
|
44092
|
+
withXSRFToken === true ||
|
|
44093
|
+
(withXSRFToken == null && isURLSameOrigin(newConfig.url));
|
|
44094
|
+
|
|
44095
|
+
if (shouldSendXSRF) {
|
|
43730
44096
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
43731
44097
|
|
|
43732
44098
|
if (xsrfValue) {
|
|
@@ -43740,193 +44106,218 @@ var resolveConfig = (config) => {
|
|
|
43740
44106
|
|
|
43741
44107
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
43742
44108
|
|
|
43743
|
-
var xhrAdapter = isXHRAdapterSupported &&
|
|
43744
|
-
|
|
43745
|
-
|
|
43746
|
-
|
|
43747
|
-
|
|
43748
|
-
|
|
43749
|
-
|
|
43750
|
-
|
|
43751
|
-
|
|
44109
|
+
var xhrAdapter = isXHRAdapterSupported &&
|
|
44110
|
+
function (config) {
|
|
44111
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
44112
|
+
const _config = resolveConfig(config);
|
|
44113
|
+
let requestData = _config.data;
|
|
44114
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
44115
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
44116
|
+
let onCanceled;
|
|
44117
|
+
let uploadThrottled, downloadThrottled;
|
|
44118
|
+
let flushUpload, flushDownload;
|
|
43752
44119
|
|
|
43753
|
-
|
|
43754
|
-
|
|
43755
|
-
|
|
44120
|
+
function done() {
|
|
44121
|
+
flushUpload && flushUpload(); // flush events
|
|
44122
|
+
flushDownload && flushDownload(); // flush events
|
|
43756
44123
|
|
|
43757
|
-
|
|
44124
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
43758
44125
|
|
|
43759
|
-
|
|
43760
|
-
|
|
44126
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
44127
|
+
}
|
|
43761
44128
|
|
|
43762
|
-
|
|
44129
|
+
let request = new XMLHttpRequest();
|
|
43763
44130
|
|
|
43764
|
-
|
|
44131
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
43765
44132
|
|
|
43766
|
-
|
|
43767
|
-
|
|
44133
|
+
// Set the request timeout in MS
|
|
44134
|
+
request.timeout = _config.timeout;
|
|
43768
44135
|
|
|
43769
|
-
|
|
43770
|
-
|
|
43771
|
-
|
|
44136
|
+
function onloadend() {
|
|
44137
|
+
if (!request) {
|
|
44138
|
+
return;
|
|
44139
|
+
}
|
|
44140
|
+
// Prepare the response
|
|
44141
|
+
const responseHeaders = AxiosHeaders.from(
|
|
44142
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
44143
|
+
);
|
|
44144
|
+
const responseData =
|
|
44145
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
44146
|
+
? request.responseText
|
|
44147
|
+
: request.response;
|
|
44148
|
+
const response = {
|
|
44149
|
+
data: responseData,
|
|
44150
|
+
status: request.status,
|
|
44151
|
+
statusText: request.statusText,
|
|
44152
|
+
headers: responseHeaders,
|
|
44153
|
+
config,
|
|
44154
|
+
request,
|
|
44155
|
+
};
|
|
44156
|
+
|
|
44157
|
+
settle(
|
|
44158
|
+
function _resolve(value) {
|
|
44159
|
+
resolve(value);
|
|
44160
|
+
done();
|
|
44161
|
+
},
|
|
44162
|
+
function _reject(err) {
|
|
44163
|
+
reject(err);
|
|
44164
|
+
done();
|
|
44165
|
+
},
|
|
44166
|
+
response
|
|
44167
|
+
);
|
|
44168
|
+
|
|
44169
|
+
// Clean up request
|
|
44170
|
+
request = null;
|
|
43772
44171
|
}
|
|
43773
|
-
// Prepare the response
|
|
43774
|
-
const responseHeaders = AxiosHeaders.from(
|
|
43775
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
43776
|
-
);
|
|
43777
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
43778
|
-
request.responseText : request.response;
|
|
43779
|
-
const response = {
|
|
43780
|
-
data: responseData,
|
|
43781
|
-
status: request.status,
|
|
43782
|
-
statusText: request.statusText,
|
|
43783
|
-
headers: responseHeaders,
|
|
43784
|
-
config,
|
|
43785
|
-
request
|
|
43786
|
-
};
|
|
43787
44172
|
|
|
43788
|
-
|
|
43789
|
-
|
|
43790
|
-
|
|
43791
|
-
}
|
|
43792
|
-
|
|
43793
|
-
|
|
43794
|
-
|
|
44173
|
+
if ('onloadend' in request) {
|
|
44174
|
+
// Use onloadend if available
|
|
44175
|
+
request.onloadend = onloadend;
|
|
44176
|
+
} else {
|
|
44177
|
+
// Listen for ready state to emulate onloadend
|
|
44178
|
+
request.onreadystatechange = function handleLoad() {
|
|
44179
|
+
if (!request || request.readyState !== 4) {
|
|
44180
|
+
return;
|
|
44181
|
+
}
|
|
43795
44182
|
|
|
43796
|
-
|
|
43797
|
-
|
|
43798
|
-
|
|
44183
|
+
// The request errored out and we didn't get a response, this will be
|
|
44184
|
+
// handled by onerror instead
|
|
44185
|
+
// With one exception: request that using file: protocol, most browsers
|
|
44186
|
+
// will return status as 0 even though it's a successful request
|
|
44187
|
+
if (
|
|
44188
|
+
request.status === 0 &&
|
|
44189
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
44190
|
+
) {
|
|
44191
|
+
return;
|
|
44192
|
+
}
|
|
44193
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
44194
|
+
// so we should call onloadend on the next 'tick'
|
|
44195
|
+
setTimeout(onloadend);
|
|
44196
|
+
};
|
|
44197
|
+
}
|
|
43799
44198
|
|
|
43800
|
-
|
|
43801
|
-
|
|
43802
|
-
|
|
43803
|
-
} else {
|
|
43804
|
-
// Listen for ready state to emulate onloadend
|
|
43805
|
-
request.onreadystatechange = function handleLoad() {
|
|
43806
|
-
if (!request || request.readyState !== 4) {
|
|
44199
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
44200
|
+
request.onabort = function handleAbort() {
|
|
44201
|
+
if (!request) {
|
|
43807
44202
|
return;
|
|
43808
44203
|
}
|
|
43809
44204
|
|
|
43810
|
-
|
|
43811
|
-
// handled by onerror instead
|
|
43812
|
-
// With one exception: request that using file: protocol, most browsers
|
|
43813
|
-
// will return status as 0 even though it's a successful request
|
|
43814
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
43815
|
-
return;
|
|
43816
|
-
}
|
|
43817
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
43818
|
-
// so we should call onloadend on the next 'tick'
|
|
43819
|
-
setTimeout(onloadend);
|
|
43820
|
-
};
|
|
43821
|
-
}
|
|
44205
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
43822
44206
|
|
|
43823
|
-
|
|
43824
|
-
|
|
43825
|
-
|
|
43826
|
-
return;
|
|
43827
|
-
}
|
|
44207
|
+
// Clean up request
|
|
44208
|
+
request = null;
|
|
44209
|
+
};
|
|
43828
44210
|
|
|
43829
|
-
|
|
44211
|
+
// Handle low level network errors
|
|
44212
|
+
request.onerror = function handleError(event) {
|
|
44213
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
44214
|
+
// (message may be empty; when present, surface it)
|
|
44215
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
44216
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
44217
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
44218
|
+
// attach the underlying event for consumers who want details
|
|
44219
|
+
err.event = event || null;
|
|
44220
|
+
reject(err);
|
|
44221
|
+
request = null;
|
|
44222
|
+
};
|
|
43830
44223
|
|
|
43831
|
-
//
|
|
43832
|
-
request =
|
|
43833
|
-
|
|
44224
|
+
// Handle timeout
|
|
44225
|
+
request.ontimeout = function handleTimeout() {
|
|
44226
|
+
let timeoutErrorMessage = _config.timeout
|
|
44227
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
44228
|
+
: 'timeout exceeded';
|
|
44229
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
44230
|
+
if (_config.timeoutErrorMessage) {
|
|
44231
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
44232
|
+
}
|
|
44233
|
+
reject(
|
|
44234
|
+
new AxiosError(
|
|
44235
|
+
timeoutErrorMessage,
|
|
44236
|
+
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
44237
|
+
config,
|
|
44238
|
+
request
|
|
44239
|
+
)
|
|
44240
|
+
);
|
|
43834
44241
|
|
|
43835
|
-
|
|
43836
|
-
|
|
43837
|
-
|
|
43838
|
-
// onerror should only fire if it's a network error
|
|
43839
|
-
reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
|
|
44242
|
+
// Clean up request
|
|
44243
|
+
request = null;
|
|
44244
|
+
};
|
|
43840
44245
|
|
|
43841
|
-
//
|
|
43842
|
-
|
|
43843
|
-
};
|
|
44246
|
+
// Remove Content-Type if data is undefined
|
|
44247
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
43844
44248
|
|
|
43845
|
-
|
|
43846
|
-
|
|
43847
|
-
|
|
43848
|
-
|
|
43849
|
-
|
|
43850
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
44249
|
+
// Add headers to the request
|
|
44250
|
+
if ('setRequestHeader' in request) {
|
|
44251
|
+
utils$3.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
44252
|
+
request.setRequestHeader(key, val);
|
|
44253
|
+
});
|
|
43851
44254
|
}
|
|
43852
|
-
reject(new AxiosError(
|
|
43853
|
-
timeoutErrorMessage,
|
|
43854
|
-
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
43855
|
-
config,
|
|
43856
|
-
request));
|
|
43857
44255
|
|
|
43858
|
-
//
|
|
43859
|
-
|
|
43860
|
-
|
|
43861
|
-
|
|
43862
|
-
// Remove Content-Type if data is undefined
|
|
43863
|
-
requestData === undefined && requestHeaders.setContentType(null);
|
|
43864
|
-
|
|
43865
|
-
// Add headers to the request
|
|
43866
|
-
if ('setRequestHeader' in request) {
|
|
43867
|
-
utils$3.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
43868
|
-
request.setRequestHeader(key, val);
|
|
43869
|
-
});
|
|
43870
|
-
}
|
|
44256
|
+
// Add withCredentials to request if needed
|
|
44257
|
+
if (!utils$3.isUndefined(_config.withCredentials)) {
|
|
44258
|
+
request.withCredentials = !!_config.withCredentials;
|
|
44259
|
+
}
|
|
43871
44260
|
|
|
43872
|
-
|
|
43873
|
-
|
|
43874
|
-
|
|
43875
|
-
|
|
44261
|
+
// Add responseType to request if needed
|
|
44262
|
+
if (responseType && responseType !== 'json') {
|
|
44263
|
+
request.responseType = _config.responseType;
|
|
44264
|
+
}
|
|
43876
44265
|
|
|
43877
|
-
|
|
43878
|
-
|
|
43879
|
-
|
|
43880
|
-
|
|
44266
|
+
// Handle progress if needed
|
|
44267
|
+
if (onDownloadProgress) {
|
|
44268
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
44269
|
+
request.addEventListener('progress', downloadThrottled);
|
|
44270
|
+
}
|
|
43881
44271
|
|
|
43882
|
-
|
|
43883
|
-
|
|
43884
|
-
|
|
43885
|
-
request.addEventListener('progress', downloadThrottled);
|
|
43886
|
-
}
|
|
44272
|
+
// Not all browsers support upload events
|
|
44273
|
+
if (onUploadProgress && request.upload) {
|
|
44274
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
43887
44275
|
|
|
43888
|
-
|
|
43889
|
-
if (onUploadProgress && request.upload) {
|
|
43890
|
-
([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
|
|
44276
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
43891
44277
|
|
|
43892
|
-
|
|
44278
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
44279
|
+
}
|
|
43893
44280
|
|
|
43894
|
-
|
|
43895
|
-
|
|
44281
|
+
if (_config.cancelToken || _config.signal) {
|
|
44282
|
+
// Handle cancellation
|
|
44283
|
+
// eslint-disable-next-line func-names
|
|
44284
|
+
onCanceled = (cancel) => {
|
|
44285
|
+
if (!request) {
|
|
44286
|
+
return;
|
|
44287
|
+
}
|
|
44288
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
44289
|
+
request.abort();
|
|
44290
|
+
request = null;
|
|
44291
|
+
};
|
|
43896
44292
|
|
|
43897
|
-
|
|
43898
|
-
|
|
43899
|
-
|
|
43900
|
-
|
|
43901
|
-
|
|
43902
|
-
return;
|
|
44293
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
44294
|
+
if (_config.signal) {
|
|
44295
|
+
_config.signal.aborted
|
|
44296
|
+
? onCanceled()
|
|
44297
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
43903
44298
|
}
|
|
43904
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
43905
|
-
request.abort();
|
|
43906
|
-
request = null;
|
|
43907
|
-
};
|
|
43908
|
-
|
|
43909
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
43910
|
-
if (_config.signal) {
|
|
43911
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
43912
44299
|
}
|
|
43913
|
-
}
|
|
43914
|
-
|
|
43915
|
-
const protocol = parseProtocol(_config.url);
|
|
43916
44300
|
|
|
43917
|
-
|
|
43918
|
-
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
43919
|
-
return;
|
|
43920
|
-
}
|
|
44301
|
+
const protocol = parseProtocol(_config.url);
|
|
43921
44302
|
|
|
44303
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
44304
|
+
reject(
|
|
44305
|
+
new AxiosError(
|
|
44306
|
+
'Unsupported protocol ' + protocol + ':',
|
|
44307
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
44308
|
+
config
|
|
44309
|
+
)
|
|
44310
|
+
);
|
|
44311
|
+
return;
|
|
44312
|
+
}
|
|
43922
44313
|
|
|
43923
|
-
|
|
43924
|
-
|
|
43925
|
-
|
|
43926
|
-
};
|
|
44314
|
+
// Send the request
|
|
44315
|
+
request.send(requestData || null);
|
|
44316
|
+
});
|
|
44317
|
+
};
|
|
43927
44318
|
|
|
43928
44319
|
const composeSignals = (signals, timeout) => {
|
|
43929
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
44320
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
43930
44321
|
|
|
43931
44322
|
if (timeout || length) {
|
|
43932
44323
|
let controller = new AbortController();
|
|
@@ -43938,21 +44329,29 @@ const composeSignals = (signals, timeout) => {
|
|
|
43938
44329
|
aborted = true;
|
|
43939
44330
|
unsubscribe();
|
|
43940
44331
|
const err = reason instanceof Error ? reason : this.reason;
|
|
43941
|
-
controller.abort(
|
|
44332
|
+
controller.abort(
|
|
44333
|
+
err instanceof AxiosError
|
|
44334
|
+
? err
|
|
44335
|
+
: new CanceledError(err instanceof Error ? err.message : err)
|
|
44336
|
+
);
|
|
43942
44337
|
}
|
|
43943
44338
|
};
|
|
43944
44339
|
|
|
43945
|
-
let timer =
|
|
43946
|
-
|
|
43947
|
-
|
|
43948
|
-
|
|
44340
|
+
let timer =
|
|
44341
|
+
timeout &&
|
|
44342
|
+
setTimeout(() => {
|
|
44343
|
+
timer = null;
|
|
44344
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
44345
|
+
}, timeout);
|
|
43949
44346
|
|
|
43950
44347
|
const unsubscribe = () => {
|
|
43951
44348
|
if (signals) {
|
|
43952
44349
|
timer && clearTimeout(timer);
|
|
43953
44350
|
timer = null;
|
|
43954
|
-
signals.forEach(signal => {
|
|
43955
|
-
signal.unsubscribe
|
|
44351
|
+
signals.forEach((signal) => {
|
|
44352
|
+
signal.unsubscribe
|
|
44353
|
+
? signal.unsubscribe(onabort)
|
|
44354
|
+
: signal.removeEventListener('abort', onabort);
|
|
43956
44355
|
});
|
|
43957
44356
|
signals = null;
|
|
43958
44357
|
}
|
|
@@ -43960,7 +44359,7 @@ const composeSignals = (signals, timeout) => {
|
|
|
43960
44359
|
|
|
43961
44360
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
43962
44361
|
|
|
43963
|
-
const {signal} = controller;
|
|
44362
|
+
const { signal } = controller;
|
|
43964
44363
|
|
|
43965
44364
|
signal.unsubscribe = () => utils$3.asap(unsubscribe);
|
|
43966
44365
|
|
|
@@ -44001,7 +44400,7 @@ const readStream = async function* (stream) {
|
|
|
44001
44400
|
const reader = stream.getReader();
|
|
44002
44401
|
try {
|
|
44003
44402
|
for (;;) {
|
|
44004
|
-
const {done, value} = await reader.read();
|
|
44403
|
+
const { done, value } = await reader.read();
|
|
44005
44404
|
if (done) {
|
|
44006
44405
|
break;
|
|
44007
44406
|
}
|
|
@@ -44024,327 +44423,501 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
44024
44423
|
}
|
|
44025
44424
|
};
|
|
44026
44425
|
|
|
44027
|
-
return new ReadableStream(
|
|
44028
|
-
|
|
44029
|
-
|
|
44030
|
-
|
|
44426
|
+
return new ReadableStream(
|
|
44427
|
+
{
|
|
44428
|
+
async pull(controller) {
|
|
44429
|
+
try {
|
|
44430
|
+
const { done, value } = await iterator.next();
|
|
44031
44431
|
|
|
44032
|
-
|
|
44033
|
-
|
|
44034
|
-
|
|
44035
|
-
|
|
44036
|
-
|
|
44432
|
+
if (done) {
|
|
44433
|
+
_onFinish();
|
|
44434
|
+
controller.close();
|
|
44435
|
+
return;
|
|
44436
|
+
}
|
|
44037
44437
|
|
|
44038
|
-
|
|
44039
|
-
|
|
44040
|
-
|
|
44041
|
-
|
|
44438
|
+
let len = value.byteLength;
|
|
44439
|
+
if (onProgress) {
|
|
44440
|
+
let loadedBytes = (bytes += len);
|
|
44441
|
+
onProgress(loadedBytes);
|
|
44442
|
+
}
|
|
44443
|
+
controller.enqueue(new Uint8Array(value));
|
|
44444
|
+
} catch (err) {
|
|
44445
|
+
_onFinish(err);
|
|
44446
|
+
throw err;
|
|
44042
44447
|
}
|
|
44043
|
-
|
|
44044
|
-
|
|
44045
|
-
_onFinish(
|
|
44046
|
-
|
|
44047
|
-
}
|
|
44448
|
+
},
|
|
44449
|
+
cancel(reason) {
|
|
44450
|
+
_onFinish(reason);
|
|
44451
|
+
return iterator.return();
|
|
44452
|
+
},
|
|
44048
44453
|
},
|
|
44049
|
-
|
|
44050
|
-
|
|
44051
|
-
return iterator.return();
|
|
44454
|
+
{
|
|
44455
|
+
highWaterMark: 2,
|
|
44052
44456
|
}
|
|
44053
|
-
|
|
44054
|
-
highWaterMark: 2
|
|
44055
|
-
})
|
|
44457
|
+
);
|
|
44056
44458
|
};
|
|
44057
44459
|
|
|
44058
|
-
const
|
|
44059
|
-
|
|
44460
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
44461
|
+
|
|
44462
|
+
const { isFunction: isFunction$1 } = utils$3;
|
|
44060
44463
|
|
|
44061
|
-
|
|
44062
|
-
|
|
44063
|
-
|
|
44064
|
-
|
|
44065
|
-
|
|
44464
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
44465
|
+
Request,
|
|
44466
|
+
Response,
|
|
44467
|
+
}))(utils$3.global);
|
|
44468
|
+
|
|
44469
|
+
const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils$3.global;
|
|
44066
44470
|
|
|
44067
44471
|
const test = (fn, ...args) => {
|
|
44068
44472
|
try {
|
|
44069
44473
|
return !!fn(...args);
|
|
44070
44474
|
} catch (e) {
|
|
44071
|
-
return false
|
|
44475
|
+
return false;
|
|
44072
44476
|
}
|
|
44073
44477
|
};
|
|
44074
44478
|
|
|
44075
|
-
const
|
|
44076
|
-
|
|
44077
|
-
|
|
44078
|
-
|
|
44079
|
-
body: new ReadableStream(),
|
|
44080
|
-
method: 'POST',
|
|
44081
|
-
get duplex() {
|
|
44082
|
-
duplexAccessed = true;
|
|
44083
|
-
return 'half';
|
|
44479
|
+
const factory = (env) => {
|
|
44480
|
+
env = utils$3.merge.call(
|
|
44481
|
+
{
|
|
44482
|
+
skipUndefined: true,
|
|
44084
44483
|
},
|
|
44085
|
-
|
|
44484
|
+
globalFetchAPI,
|
|
44485
|
+
env
|
|
44486
|
+
);
|
|
44086
44487
|
|
|
44087
|
-
|
|
44088
|
-
|
|
44488
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
44489
|
+
const isFetchSupported = envFetch ? isFunction$1(envFetch) : typeof fetch === 'function';
|
|
44490
|
+
const isRequestSupported = isFunction$1(Request);
|
|
44491
|
+
const isResponseSupported = isFunction$1(Response);
|
|
44089
44492
|
|
|
44090
|
-
|
|
44493
|
+
if (!isFetchSupported) {
|
|
44494
|
+
return false;
|
|
44495
|
+
}
|
|
44091
44496
|
|
|
44092
|
-
const
|
|
44093
|
-
test(() => utils$3.isReadableStream(new Response('').body));
|
|
44497
|
+
const isReadableStreamSupported = isFetchSupported && isFunction$1(ReadableStream$1);
|
|
44094
44498
|
|
|
44499
|
+
const encodeText =
|
|
44500
|
+
isFetchSupported &&
|
|
44501
|
+
(typeof TextEncoder$1 === 'function'
|
|
44502
|
+
? (
|
|
44503
|
+
(encoder) => (str) =>
|
|
44504
|
+
encoder.encode(str)
|
|
44505
|
+
)(new TextEncoder$1())
|
|
44506
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
44095
44507
|
|
|
44096
|
-
const
|
|
44097
|
-
|
|
44098
|
-
|
|
44508
|
+
const supportsRequestStream =
|
|
44509
|
+
isRequestSupported &&
|
|
44510
|
+
isReadableStreamSupported &&
|
|
44511
|
+
test(() => {
|
|
44512
|
+
let duplexAccessed = false;
|
|
44099
44513
|
|
|
44100
|
-
|
|
44101
|
-
|
|
44102
|
-
|
|
44103
|
-
|
|
44104
|
-
|
|
44514
|
+
const request = new Request(platform.origin, {
|
|
44515
|
+
body: new ReadableStream$1(),
|
|
44516
|
+
method: 'POST',
|
|
44517
|
+
get duplex() {
|
|
44518
|
+
duplexAccessed = true;
|
|
44519
|
+
return 'half';
|
|
44520
|
+
},
|
|
44105
44521
|
});
|
|
44106
|
-
});
|
|
44107
|
-
})(new Response));
|
|
44108
44522
|
|
|
44109
|
-
const
|
|
44110
|
-
if (body == null) {
|
|
44111
|
-
return 0;
|
|
44112
|
-
}
|
|
44523
|
+
const hasContentType = request.headers.has('Content-Type');
|
|
44113
44524
|
|
|
44114
|
-
|
|
44115
|
-
|
|
44116
|
-
|
|
44525
|
+
if (request.body != null) {
|
|
44526
|
+
request.body.cancel();
|
|
44527
|
+
}
|
|
44117
44528
|
|
|
44118
|
-
|
|
44119
|
-
const _request = new Request(platform.origin, {
|
|
44120
|
-
method: 'POST',
|
|
44121
|
-
body,
|
|
44529
|
+
return duplexAccessed && !hasContentType;
|
|
44122
44530
|
});
|
|
44123
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
44124
|
-
}
|
|
44125
44531
|
|
|
44126
|
-
|
|
44127
|
-
|
|
44128
|
-
|
|
44532
|
+
const supportsResponseStream =
|
|
44533
|
+
isResponseSupported &&
|
|
44534
|
+
isReadableStreamSupported &&
|
|
44535
|
+
test(() => utils$3.isReadableStream(new Response('').body));
|
|
44129
44536
|
|
|
44130
|
-
|
|
44131
|
-
|
|
44132
|
-
}
|
|
44537
|
+
const resolvers = {
|
|
44538
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
44539
|
+
};
|
|
44133
44540
|
|
|
44134
|
-
|
|
44135
|
-
|
|
44136
|
-
|
|
44137
|
-
|
|
44541
|
+
isFetchSupported &&
|
|
44542
|
+
(() => {
|
|
44543
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
44544
|
+
!resolvers[type] &&
|
|
44545
|
+
(resolvers[type] = (res, config) => {
|
|
44546
|
+
let method = res && res[type];
|
|
44138
44547
|
|
|
44139
|
-
|
|
44140
|
-
|
|
44548
|
+
if (method) {
|
|
44549
|
+
return method.call(res);
|
|
44550
|
+
}
|
|
44141
44551
|
|
|
44142
|
-
|
|
44143
|
-
}
|
|
44552
|
+
throw new AxiosError(
|
|
44553
|
+
`Response type '${type}' is not supported`,
|
|
44554
|
+
AxiosError.ERR_NOT_SUPPORT,
|
|
44555
|
+
config
|
|
44556
|
+
);
|
|
44557
|
+
});
|
|
44558
|
+
});
|
|
44559
|
+
})();
|
|
44144
44560
|
|
|
44145
|
-
|
|
44146
|
-
|
|
44147
|
-
|
|
44148
|
-
|
|
44149
|
-
data,
|
|
44150
|
-
signal,
|
|
44151
|
-
cancelToken,
|
|
44152
|
-
timeout,
|
|
44153
|
-
onDownloadProgress,
|
|
44154
|
-
onUploadProgress,
|
|
44155
|
-
responseType,
|
|
44156
|
-
headers,
|
|
44157
|
-
withCredentials = 'same-origin',
|
|
44158
|
-
fetchOptions
|
|
44159
|
-
} = resolveConfig(config);
|
|
44561
|
+
const getBodyLength = async (body) => {
|
|
44562
|
+
if (body == null) {
|
|
44563
|
+
return 0;
|
|
44564
|
+
}
|
|
44160
44565
|
|
|
44161
|
-
|
|
44566
|
+
if (utils$3.isBlob(body)) {
|
|
44567
|
+
return body.size;
|
|
44568
|
+
}
|
|
44162
44569
|
|
|
44163
|
-
|
|
44570
|
+
if (utils$3.isSpecCompliantForm(body)) {
|
|
44571
|
+
const _request = new Request(platform.origin, {
|
|
44572
|
+
method: 'POST',
|
|
44573
|
+
body,
|
|
44574
|
+
});
|
|
44575
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
44576
|
+
}
|
|
44164
44577
|
|
|
44165
|
-
|
|
44578
|
+
if (utils$3.isArrayBufferView(body) || utils$3.isArrayBuffer(body)) {
|
|
44579
|
+
return body.byteLength;
|
|
44580
|
+
}
|
|
44166
44581
|
|
|
44167
|
-
|
|
44168
|
-
|
|
44169
|
-
|
|
44582
|
+
if (utils$3.isURLSearchParams(body)) {
|
|
44583
|
+
body = body + '';
|
|
44584
|
+
}
|
|
44170
44585
|
|
|
44171
|
-
|
|
44586
|
+
if (utils$3.isString(body)) {
|
|
44587
|
+
return (await encodeText(body)).byteLength;
|
|
44588
|
+
}
|
|
44589
|
+
};
|
|
44172
44590
|
|
|
44173
|
-
|
|
44174
|
-
|
|
44175
|
-
|
|
44176
|
-
|
|
44177
|
-
|
|
44178
|
-
|
|
44179
|
-
|
|
44180
|
-
|
|
44181
|
-
|
|
44591
|
+
const resolveBodyLength = async (headers, body) => {
|
|
44592
|
+
const length = utils$3.toFiniteNumber(headers.getContentLength());
|
|
44593
|
+
|
|
44594
|
+
return length == null ? getBodyLength(body) : length;
|
|
44595
|
+
};
|
|
44596
|
+
|
|
44597
|
+
return async (config) => {
|
|
44598
|
+
let {
|
|
44599
|
+
url,
|
|
44600
|
+
method,
|
|
44601
|
+
data,
|
|
44602
|
+
signal,
|
|
44603
|
+
cancelToken,
|
|
44604
|
+
timeout,
|
|
44605
|
+
onDownloadProgress,
|
|
44606
|
+
onUploadProgress,
|
|
44607
|
+
responseType,
|
|
44608
|
+
headers,
|
|
44609
|
+
withCredentials = 'same-origin',
|
|
44610
|
+
fetchOptions,
|
|
44611
|
+
} = resolveConfig(config);
|
|
44612
|
+
|
|
44613
|
+
let _fetch = envFetch || fetch;
|
|
44614
|
+
|
|
44615
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
44616
|
+
|
|
44617
|
+
let composedSignal = composeSignals(
|
|
44618
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
44619
|
+
timeout
|
|
44620
|
+
);
|
|
44621
|
+
|
|
44622
|
+
let request = null;
|
|
44623
|
+
|
|
44624
|
+
const unsubscribe =
|
|
44625
|
+
composedSignal &&
|
|
44626
|
+
composedSignal.unsubscribe &&
|
|
44627
|
+
(() => {
|
|
44628
|
+
composedSignal.unsubscribe();
|
|
44182
44629
|
});
|
|
44183
44630
|
|
|
44184
|
-
|
|
44631
|
+
let requestContentLength;
|
|
44185
44632
|
|
|
44186
|
-
|
|
44187
|
-
|
|
44633
|
+
try {
|
|
44634
|
+
if (
|
|
44635
|
+
onUploadProgress &&
|
|
44636
|
+
supportsRequestStream &&
|
|
44637
|
+
method !== 'get' &&
|
|
44638
|
+
method !== 'head' &&
|
|
44639
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
44640
|
+
) {
|
|
44641
|
+
let _request = new Request(url, {
|
|
44642
|
+
method: 'POST',
|
|
44643
|
+
body: data,
|
|
44644
|
+
duplex: 'half',
|
|
44645
|
+
});
|
|
44646
|
+
|
|
44647
|
+
let contentTypeHeader;
|
|
44648
|
+
|
|
44649
|
+
if (utils$3.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
44650
|
+
headers.setContentType(contentTypeHeader);
|
|
44651
|
+
}
|
|
44652
|
+
|
|
44653
|
+
if (_request.body) {
|
|
44654
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
44655
|
+
requestContentLength,
|
|
44656
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
44657
|
+
);
|
|
44658
|
+
|
|
44659
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
44660
|
+
}
|
|
44188
44661
|
}
|
|
44189
44662
|
|
|
44190
|
-
if (
|
|
44191
|
-
|
|
44192
|
-
|
|
44193
|
-
|
|
44194
|
-
|
|
44663
|
+
if (!utils$3.isString(withCredentials)) {
|
|
44664
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
44665
|
+
}
|
|
44666
|
+
|
|
44667
|
+
// Cloudflare Workers throws when credentials are defined
|
|
44668
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
44669
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
44195
44670
|
|
|
44196
|
-
|
|
44671
|
+
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
44672
|
+
// delete it so fetch can set it correctly with the boundary
|
|
44673
|
+
if (utils$3.isFormData(data)) {
|
|
44674
|
+
const contentType = headers.getContentType();
|
|
44675
|
+
if (
|
|
44676
|
+
contentType &&
|
|
44677
|
+
/^multipart\/form-data/i.test(contentType) &&
|
|
44678
|
+
!/boundary=/i.test(contentType)
|
|
44679
|
+
) {
|
|
44680
|
+
headers.delete('content-type');
|
|
44681
|
+
}
|
|
44197
44682
|
}
|
|
44198
|
-
}
|
|
44199
44683
|
|
|
44200
|
-
|
|
44201
|
-
|
|
44202
|
-
|
|
44684
|
+
const resolvedOptions = {
|
|
44685
|
+
...fetchOptions,
|
|
44686
|
+
signal: composedSignal,
|
|
44687
|
+
method: method.toUpperCase(),
|
|
44688
|
+
headers: headers.normalize().toJSON(),
|
|
44689
|
+
body: data,
|
|
44690
|
+
duplex: 'half',
|
|
44691
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
44692
|
+
};
|
|
44203
44693
|
|
|
44204
|
-
|
|
44205
|
-
// see https://github.com/cloudflare/workerd/issues/902
|
|
44206
|
-
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
44207
|
-
request = new Request(url, {
|
|
44208
|
-
...fetchOptions,
|
|
44209
|
-
signal: composedSignal,
|
|
44210
|
-
method: method.toUpperCase(),
|
|
44211
|
-
headers: headers.normalize().toJSON(),
|
|
44212
|
-
body: data,
|
|
44213
|
-
duplex: "half",
|
|
44214
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
44215
|
-
});
|
|
44694
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
44216
44695
|
|
|
44217
|
-
|
|
44696
|
+
let response = await (isRequestSupported
|
|
44697
|
+
? _fetch(request, fetchOptions)
|
|
44698
|
+
: _fetch(url, resolvedOptions));
|
|
44218
44699
|
|
|
44219
|
-
|
|
44700
|
+
const isStreamResponse =
|
|
44701
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
44220
44702
|
|
|
44221
|
-
|
|
44222
|
-
|
|
44703
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
44704
|
+
const options = {};
|
|
44223
44705
|
|
|
44224
|
-
|
|
44225
|
-
|
|
44226
|
-
|
|
44706
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
44707
|
+
options[prop] = response[prop];
|
|
44708
|
+
});
|
|
44227
44709
|
|
|
44228
|
-
|
|
44710
|
+
const responseContentLength = utils$3.toFiniteNumber(response.headers.get('content-length'));
|
|
44229
44711
|
|
|
44230
|
-
|
|
44231
|
-
|
|
44232
|
-
|
|
44233
|
-
|
|
44712
|
+
const [onProgress, flush] =
|
|
44713
|
+
(onDownloadProgress &&
|
|
44714
|
+
progressEventDecorator(
|
|
44715
|
+
responseContentLength,
|
|
44716
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
44717
|
+
)) ||
|
|
44718
|
+
[];
|
|
44234
44719
|
|
|
44235
|
-
|
|
44236
|
-
|
|
44237
|
-
|
|
44238
|
-
|
|
44239
|
-
|
|
44240
|
-
|
|
44241
|
-
|
|
44242
|
-
|
|
44720
|
+
response = new Response(
|
|
44721
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
44722
|
+
flush && flush();
|
|
44723
|
+
unsubscribe && unsubscribe();
|
|
44724
|
+
}),
|
|
44725
|
+
options
|
|
44726
|
+
);
|
|
44727
|
+
}
|
|
44243
44728
|
|
|
44244
|
-
|
|
44729
|
+
responseType = responseType || 'text';
|
|
44245
44730
|
|
|
44246
|
-
|
|
44731
|
+
let responseData = await resolvers[utils$3.findKey(resolvers, responseType) || 'text'](
|
|
44732
|
+
response,
|
|
44733
|
+
config
|
|
44734
|
+
);
|
|
44247
44735
|
|
|
44248
|
-
|
|
44736
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
44249
44737
|
|
|
44250
|
-
|
|
44251
|
-
|
|
44252
|
-
|
|
44253
|
-
|
|
44254
|
-
|
|
44255
|
-
|
|
44256
|
-
|
|
44257
|
-
|
|
44738
|
+
return await new Promise((resolve, reject) => {
|
|
44739
|
+
settle(resolve, reject, {
|
|
44740
|
+
data: responseData,
|
|
44741
|
+
headers: AxiosHeaders.from(response.headers),
|
|
44742
|
+
status: response.status,
|
|
44743
|
+
statusText: response.statusText,
|
|
44744
|
+
config,
|
|
44745
|
+
request,
|
|
44746
|
+
});
|
|
44258
44747
|
});
|
|
44259
|
-
})
|
|
44260
|
-
|
|
44261
|
-
|
|
44748
|
+
} catch (err) {
|
|
44749
|
+
unsubscribe && unsubscribe();
|
|
44750
|
+
|
|
44751
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
44752
|
+
throw Object.assign(
|
|
44753
|
+
new AxiosError(
|
|
44754
|
+
'Network Error',
|
|
44755
|
+
AxiosError.ERR_NETWORK,
|
|
44756
|
+
config,
|
|
44757
|
+
request,
|
|
44758
|
+
err && err.response
|
|
44759
|
+
),
|
|
44760
|
+
{
|
|
44761
|
+
cause: err.cause || err,
|
|
44762
|
+
}
|
|
44763
|
+
);
|
|
44764
|
+
}
|
|
44262
44765
|
|
|
44263
|
-
|
|
44264
|
-
throw Object.assign(
|
|
44265
|
-
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
|
44266
|
-
{
|
|
44267
|
-
cause: err.cause || err
|
|
44268
|
-
}
|
|
44269
|
-
)
|
|
44766
|
+
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
44270
44767
|
}
|
|
44768
|
+
};
|
|
44769
|
+
};
|
|
44271
44770
|
|
|
44272
|
-
|
|
44771
|
+
const seedCache = new Map();
|
|
44772
|
+
|
|
44773
|
+
const getFetch = (config) => {
|
|
44774
|
+
let env = (config && config.env) || {};
|
|
44775
|
+
const { fetch, Request, Response } = env;
|
|
44776
|
+
const seeds = [Request, Response, fetch];
|
|
44777
|
+
|
|
44778
|
+
let len = seeds.length,
|
|
44779
|
+
i = len,
|
|
44780
|
+
seed,
|
|
44781
|
+
target,
|
|
44782
|
+
map = seedCache;
|
|
44783
|
+
|
|
44784
|
+
while (i--) {
|
|
44785
|
+
seed = seeds[i];
|
|
44786
|
+
target = map.get(seed);
|
|
44787
|
+
|
|
44788
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
44789
|
+
|
|
44790
|
+
map = target;
|
|
44273
44791
|
}
|
|
44274
|
-
});
|
|
44275
44792
|
|
|
44793
|
+
return target;
|
|
44794
|
+
};
|
|
44795
|
+
|
|
44796
|
+
getFetch();
|
|
44797
|
+
|
|
44798
|
+
/**
|
|
44799
|
+
* Known adapters mapping.
|
|
44800
|
+
* Provides environment-specific adapters for Axios:
|
|
44801
|
+
* - `http` for Node.js
|
|
44802
|
+
* - `xhr` for browsers
|
|
44803
|
+
* - `fetch` for fetch API-based requests
|
|
44804
|
+
*
|
|
44805
|
+
* @type {Object<string, Function|Object>}
|
|
44806
|
+
*/
|
|
44276
44807
|
const knownAdapters = {
|
|
44277
44808
|
http: httpAdapter,
|
|
44278
44809
|
xhr: xhrAdapter,
|
|
44279
|
-
fetch:
|
|
44810
|
+
fetch: {
|
|
44811
|
+
get: getFetch,
|
|
44812
|
+
},
|
|
44280
44813
|
};
|
|
44281
44814
|
|
|
44815
|
+
// Assign adapter names for easier debugging and identification
|
|
44282
44816
|
utils$3.forEach(knownAdapters, (fn, value) => {
|
|
44283
44817
|
if (fn) {
|
|
44284
44818
|
try {
|
|
44285
|
-
Object.defineProperty(fn, 'name', {value});
|
|
44819
|
+
Object.defineProperty(fn, 'name', { value });
|
|
44286
44820
|
} catch (e) {
|
|
44287
44821
|
// eslint-disable-next-line no-empty
|
|
44288
44822
|
}
|
|
44289
|
-
Object.defineProperty(fn, 'adapterName', {value});
|
|
44823
|
+
Object.defineProperty(fn, 'adapterName', { value });
|
|
44290
44824
|
}
|
|
44291
44825
|
});
|
|
44292
44826
|
|
|
44827
|
+
/**
|
|
44828
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
44829
|
+
*
|
|
44830
|
+
* @param {string} reason
|
|
44831
|
+
* @returns {string}
|
|
44832
|
+
*/
|
|
44293
44833
|
const renderReason = (reason) => `- ${reason}`;
|
|
44294
44834
|
|
|
44295
|
-
|
|
44296
|
-
|
|
44297
|
-
|
|
44298
|
-
|
|
44299
|
-
|
|
44835
|
+
/**
|
|
44836
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
44837
|
+
*
|
|
44838
|
+
* @param {Function|null|false} adapter
|
|
44839
|
+
* @returns {boolean}
|
|
44840
|
+
*/
|
|
44841
|
+
const isResolvedHandle = (adapter) =>
|
|
44842
|
+
utils$3.isFunction(adapter) || adapter === null || adapter === false;
|
|
44300
44843
|
|
|
44301
|
-
|
|
44302
|
-
|
|
44303
|
-
|
|
44844
|
+
/**
|
|
44845
|
+
* Get the first suitable adapter from the provided list.
|
|
44846
|
+
* Tries each adapter in order until a supported one is found.
|
|
44847
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
44848
|
+
*
|
|
44849
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
44850
|
+
* @param {Object} config - Axios request configuration
|
|
44851
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
44852
|
+
* @returns {Function} The resolved adapter function
|
|
44853
|
+
*/
|
|
44854
|
+
function getAdapter(adapters, config) {
|
|
44855
|
+
adapters = utils$3.isArray(adapters) ? adapters : [adapters];
|
|
44304
44856
|
|
|
44305
|
-
|
|
44857
|
+
const { length } = adapters;
|
|
44858
|
+
let nameOrAdapter;
|
|
44859
|
+
let adapter;
|
|
44306
44860
|
|
|
44307
|
-
|
|
44308
|
-
nameOrAdapter = adapters[i];
|
|
44309
|
-
let id;
|
|
44861
|
+
const rejectedReasons = {};
|
|
44310
44862
|
|
|
44311
|
-
|
|
44863
|
+
for (let i = 0; i < length; i++) {
|
|
44864
|
+
nameOrAdapter = adapters[i];
|
|
44865
|
+
let id;
|
|
44312
44866
|
|
|
44313
|
-
|
|
44314
|
-
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
44867
|
+
adapter = nameOrAdapter;
|
|
44315
44868
|
|
|
44316
|
-
|
|
44317
|
-
|
|
44318
|
-
}
|
|
44319
|
-
}
|
|
44869
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
44870
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
44320
44871
|
|
|
44321
|
-
if (adapter) {
|
|
44322
|
-
|
|
44872
|
+
if (adapter === undefined) {
|
|
44873
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
44323
44874
|
}
|
|
44875
|
+
}
|
|
44324
44876
|
|
|
44325
|
-
|
|
44877
|
+
if (adapter && (utils$3.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
44878
|
+
break;
|
|
44326
44879
|
}
|
|
44327
44880
|
|
|
44328
|
-
|
|
44881
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
44882
|
+
}
|
|
44329
44883
|
|
|
44330
|
-
|
|
44331
|
-
|
|
44332
|
-
|
|
44333
|
-
|
|
44884
|
+
if (!adapter) {
|
|
44885
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
44886
|
+
([id, state]) =>
|
|
44887
|
+
`adapter ${id} ` +
|
|
44888
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
44889
|
+
);
|
|
44334
44890
|
|
|
44335
|
-
|
|
44336
|
-
|
|
44337
|
-
'
|
|
44891
|
+
let s = length
|
|
44892
|
+
? reasons.length > 1
|
|
44893
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
44894
|
+
: ' ' + renderReason(reasons[0])
|
|
44895
|
+
: 'as no adapter specified';
|
|
44338
44896
|
|
|
44339
|
-
|
|
44340
|
-
|
|
44341
|
-
|
|
44342
|
-
|
|
44343
|
-
|
|
44897
|
+
throw new AxiosError(
|
|
44898
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
44899
|
+
'ERR_NOT_SUPPORT'
|
|
44900
|
+
);
|
|
44901
|
+
}
|
|
44344
44902
|
|
|
44345
|
-
|
|
44346
|
-
|
|
44347
|
-
|
|
44903
|
+
return adapter;
|
|
44904
|
+
}
|
|
44905
|
+
|
|
44906
|
+
/**
|
|
44907
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
44908
|
+
*/
|
|
44909
|
+
var adapters = {
|
|
44910
|
+
/**
|
|
44911
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
44912
|
+
* @type {Function}
|
|
44913
|
+
*/
|
|
44914
|
+
getAdapter,
|
|
44915
|
+
|
|
44916
|
+
/**
|
|
44917
|
+
* Exposes all known adapters
|
|
44918
|
+
* @type {Object<string, Function|Object>}
|
|
44919
|
+
*/
|
|
44920
|
+
adapters: knownAdapters,
|
|
44348
44921
|
};
|
|
44349
44922
|
|
|
44350
44923
|
/**
|
|
@@ -44377,50 +44950,46 @@ function dispatchRequest(config) {
|
|
|
44377
44950
|
config.headers = AxiosHeaders.from(config.headers);
|
|
44378
44951
|
|
|
44379
44952
|
// Transform request data
|
|
44380
|
-
config.data = transformData.call(
|
|
44381
|
-
config,
|
|
44382
|
-
config.transformRequest
|
|
44383
|
-
);
|
|
44953
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
44384
44954
|
|
|
44385
44955
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
44386
44956
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
44387
44957
|
}
|
|
44388
44958
|
|
|
44389
|
-
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
|
44959
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
44390
44960
|
|
|
44391
|
-
return adapter(config).then(
|
|
44392
|
-
|
|
44393
|
-
|
|
44394
|
-
// Transform response data
|
|
44395
|
-
response.data = transformData.call(
|
|
44396
|
-
config,
|
|
44397
|
-
config.transformResponse,
|
|
44398
|
-
response
|
|
44399
|
-
);
|
|
44400
|
-
|
|
44401
|
-
response.headers = AxiosHeaders.from(response.headers);
|
|
44402
|
-
|
|
44403
|
-
return response;
|
|
44404
|
-
}, function onAdapterRejection(reason) {
|
|
44405
|
-
if (!isCancel(reason)) {
|
|
44961
|
+
return adapter(config).then(
|
|
44962
|
+
function onAdapterResolution(response) {
|
|
44406
44963
|
throwIfCancellationRequested(config);
|
|
44407
44964
|
|
|
44408
44965
|
// Transform response data
|
|
44409
|
-
|
|
44410
|
-
|
|
44411
|
-
|
|
44412
|
-
|
|
44413
|
-
|
|
44414
|
-
|
|
44415
|
-
|
|
44966
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
44967
|
+
|
|
44968
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
44969
|
+
|
|
44970
|
+
return response;
|
|
44971
|
+
},
|
|
44972
|
+
function onAdapterRejection(reason) {
|
|
44973
|
+
if (!isCancel(reason)) {
|
|
44974
|
+
throwIfCancellationRequested(config);
|
|
44975
|
+
|
|
44976
|
+
// Transform response data
|
|
44977
|
+
if (reason && reason.response) {
|
|
44978
|
+
reason.response.data = transformData.call(
|
|
44979
|
+
config,
|
|
44980
|
+
config.transformResponse,
|
|
44981
|
+
reason.response
|
|
44982
|
+
);
|
|
44983
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
44984
|
+
}
|
|
44416
44985
|
}
|
|
44417
|
-
}
|
|
44418
44986
|
|
|
44419
|
-
|
|
44420
|
-
|
|
44987
|
+
return Promise.reject(reason);
|
|
44988
|
+
}
|
|
44989
|
+
);
|
|
44421
44990
|
}
|
|
44422
44991
|
|
|
44423
|
-
const VERSION = "1.
|
|
44992
|
+
const VERSION = "1.15.2";
|
|
44424
44993
|
|
|
44425
44994
|
const validators$1 = {};
|
|
44426
44995
|
|
|
@@ -44444,7 +45013,15 @@ const deprecatedWarnings = {};
|
|
|
44444
45013
|
*/
|
|
44445
45014
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
44446
45015
|
function formatMessage(opt, desc) {
|
|
44447
|
-
return
|
|
45016
|
+
return (
|
|
45017
|
+
'[Axios v' +
|
|
45018
|
+
VERSION +
|
|
45019
|
+
"] Transitional option '" +
|
|
45020
|
+
opt +
|
|
45021
|
+
"'" +
|
|
45022
|
+
desc +
|
|
45023
|
+
(message ? '. ' + message : '')
|
|
45024
|
+
);
|
|
44448
45025
|
}
|
|
44449
45026
|
|
|
44450
45027
|
// eslint-disable-next-line func-names
|
|
@@ -44476,7 +45053,7 @@ validators$1.spelling = function spelling(correctSpelling) {
|
|
|
44476
45053
|
// eslint-disable-next-line no-console
|
|
44477
45054
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
44478
45055
|
return true;
|
|
44479
|
-
}
|
|
45056
|
+
};
|
|
44480
45057
|
};
|
|
44481
45058
|
|
|
44482
45059
|
/**
|
|
@@ -44497,12 +45074,17 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
44497
45074
|
let i = keys.length;
|
|
44498
45075
|
while (i-- > 0) {
|
|
44499
45076
|
const opt = keys[i];
|
|
44500
|
-
|
|
45077
|
+
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
45078
|
+
// a non-function validator and cause a TypeError. See GHSA-q8qp-cvcw-x6jj.
|
|
45079
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
44501
45080
|
if (validator) {
|
|
44502
45081
|
const value = options[opt];
|
|
44503
45082
|
const result = value === undefined || validator(value, opt, options);
|
|
44504
45083
|
if (result !== true) {
|
|
44505
|
-
throw new AxiosError(
|
|
45084
|
+
throw new AxiosError(
|
|
45085
|
+
'option ' + opt + ' must be ' + result,
|
|
45086
|
+
AxiosError.ERR_BAD_OPTION_VALUE
|
|
45087
|
+
);
|
|
44506
45088
|
}
|
|
44507
45089
|
continue;
|
|
44508
45090
|
}
|
|
@@ -44514,7 +45096,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
44514
45096
|
|
|
44515
45097
|
var validator = {
|
|
44516
45098
|
assertOptions,
|
|
44517
|
-
validators: validators$1
|
|
45099
|
+
validators: validators$1,
|
|
44518
45100
|
};
|
|
44519
45101
|
|
|
44520
45102
|
const validators = validator.validators;
|
|
@@ -44531,7 +45113,7 @@ class Axios {
|
|
|
44531
45113
|
this.defaults = instanceConfig || {};
|
|
44532
45114
|
this.interceptors = {
|
|
44533
45115
|
request: new InterceptorManager(),
|
|
44534
|
-
response: new InterceptorManager()
|
|
45116
|
+
response: new InterceptorManager(),
|
|
44535
45117
|
};
|
|
44536
45118
|
}
|
|
44537
45119
|
|
|
@@ -44553,13 +45135,29 @@ class Axios {
|
|
|
44553
45135
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
44554
45136
|
|
|
44555
45137
|
// slice off the Error: ... line
|
|
44556
|
-
const stack =
|
|
45138
|
+
const stack = (() => {
|
|
45139
|
+
if (!dummy.stack) {
|
|
45140
|
+
return '';
|
|
45141
|
+
}
|
|
45142
|
+
|
|
45143
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
45144
|
+
|
|
45145
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
45146
|
+
})();
|
|
44557
45147
|
try {
|
|
44558
45148
|
if (!err.stack) {
|
|
44559
45149
|
err.stack = stack;
|
|
44560
45150
|
// match without the 2 top stack lines
|
|
44561
|
-
} else if (stack
|
|
44562
|
-
|
|
45151
|
+
} else if (stack) {
|
|
45152
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
45153
|
+
const secondNewlineIndex =
|
|
45154
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
45155
|
+
const stackWithoutTwoTopLines =
|
|
45156
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
45157
|
+
|
|
45158
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
45159
|
+
err.stack += '\n' + stack;
|
|
45160
|
+
}
|
|
44563
45161
|
}
|
|
44564
45162
|
} catch (e) {
|
|
44565
45163
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -44582,26 +45180,35 @@ class Axios {
|
|
|
44582
45180
|
|
|
44583
45181
|
config = mergeConfig(this.defaults, config);
|
|
44584
45182
|
|
|
44585
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
45183
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
44586
45184
|
|
|
44587
45185
|
if (transitional !== undefined) {
|
|
44588
|
-
validator.assertOptions(
|
|
44589
|
-
|
|
44590
|
-
|
|
44591
|
-
|
|
44592
|
-
|
|
45186
|
+
validator.assertOptions(
|
|
45187
|
+
transitional,
|
|
45188
|
+
{
|
|
45189
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
45190
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
45191
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
45192
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
45193
|
+
},
|
|
45194
|
+
false
|
|
45195
|
+
);
|
|
44593
45196
|
}
|
|
44594
45197
|
|
|
44595
45198
|
if (paramsSerializer != null) {
|
|
44596
45199
|
if (utils$3.isFunction(paramsSerializer)) {
|
|
44597
45200
|
config.paramsSerializer = {
|
|
44598
|
-
serialize: paramsSerializer
|
|
45201
|
+
serialize: paramsSerializer,
|
|
44599
45202
|
};
|
|
44600
45203
|
} else {
|
|
44601
|
-
validator.assertOptions(
|
|
44602
|
-
|
|
44603
|
-
|
|
44604
|
-
|
|
45204
|
+
validator.assertOptions(
|
|
45205
|
+
paramsSerializer,
|
|
45206
|
+
{
|
|
45207
|
+
encode: validators.function,
|
|
45208
|
+
serialize: validators.function,
|
|
45209
|
+
},
|
|
45210
|
+
true
|
|
45211
|
+
);
|
|
44605
45212
|
}
|
|
44606
45213
|
}
|
|
44607
45214
|
|
|
@@ -44612,26 +45219,25 @@ class Axios {
|
|
|
44612
45219
|
config.allowAbsoluteUrls = true;
|
|
44613
45220
|
}
|
|
44614
45221
|
|
|
44615
|
-
validator.assertOptions(
|
|
44616
|
-
|
|
44617
|
-
|
|
44618
|
-
|
|
45222
|
+
validator.assertOptions(
|
|
45223
|
+
config,
|
|
45224
|
+
{
|
|
45225
|
+
baseUrl: validators.spelling('baseURL'),
|
|
45226
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
45227
|
+
},
|
|
45228
|
+
true
|
|
45229
|
+
);
|
|
44619
45230
|
|
|
44620
45231
|
// Set config.method
|
|
44621
45232
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
44622
45233
|
|
|
44623
45234
|
// Flatten headers
|
|
44624
|
-
let contextHeaders = headers && utils$3.merge(
|
|
44625
|
-
headers.common,
|
|
44626
|
-
headers[config.method]
|
|
44627
|
-
);
|
|
45235
|
+
let contextHeaders = headers && utils$3.merge(headers.common, headers[config.method]);
|
|
44628
45236
|
|
|
44629
|
-
headers &&
|
|
44630
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
44631
|
-
(method) => {
|
|
45237
|
+
headers &&
|
|
45238
|
+
utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
44632
45239
|
delete headers[method];
|
|
44633
|
-
}
|
|
44634
|
-
);
|
|
45240
|
+
});
|
|
44635
45241
|
|
|
44636
45242
|
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
44637
45243
|
|
|
@@ -44645,7 +45251,15 @@ class Axios {
|
|
|
44645
45251
|
|
|
44646
45252
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
44647
45253
|
|
|
44648
|
-
|
|
45254
|
+
const transitional = config.transitional || transitionalDefaults;
|
|
45255
|
+
const legacyInterceptorReqResOrdering =
|
|
45256
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
45257
|
+
|
|
45258
|
+
if (legacyInterceptorReqResOrdering) {
|
|
45259
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
45260
|
+
} else {
|
|
45261
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
45262
|
+
}
|
|
44649
45263
|
});
|
|
44650
45264
|
|
|
44651
45265
|
const responseInterceptorChain = [];
|
|
@@ -44659,8 +45273,8 @@ class Axios {
|
|
|
44659
45273
|
|
|
44660
45274
|
if (!synchronousRequestInterceptors) {
|
|
44661
45275
|
const chain = [dispatchRequest.bind(this), undefined];
|
|
44662
|
-
chain.unshift
|
|
44663
|
-
chain.push
|
|
45276
|
+
chain.unshift(...requestInterceptorChain);
|
|
45277
|
+
chain.push(...responseInterceptorChain);
|
|
44664
45278
|
len = chain.length;
|
|
44665
45279
|
|
|
44666
45280
|
promise = Promise.resolve(config);
|
|
@@ -44676,8 +45290,6 @@ class Axios {
|
|
|
44676
45290
|
|
|
44677
45291
|
let newConfig = config;
|
|
44678
45292
|
|
|
44679
|
-
i = 0;
|
|
44680
|
-
|
|
44681
45293
|
while (i < len) {
|
|
44682
45294
|
const onFulfilled = requestInterceptorChain[i++];
|
|
44683
45295
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -44715,28 +45327,32 @@ class Axios {
|
|
|
44715
45327
|
// Provide aliases for supported request methods
|
|
44716
45328
|
utils$3.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
44717
45329
|
/*eslint func-names:0*/
|
|
44718
|
-
Axios.prototype[method] = function(url, config) {
|
|
44719
|
-
return this.request(
|
|
44720
|
-
|
|
44721
|
-
|
|
44722
|
-
|
|
44723
|
-
|
|
45330
|
+
Axios.prototype[method] = function (url, config) {
|
|
45331
|
+
return this.request(
|
|
45332
|
+
mergeConfig(config || {}, {
|
|
45333
|
+
method,
|
|
45334
|
+
url,
|
|
45335
|
+
data: (config || {}).data,
|
|
45336
|
+
})
|
|
45337
|
+
);
|
|
44724
45338
|
};
|
|
44725
45339
|
});
|
|
44726
45340
|
|
|
44727
45341
|
utils$3.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
44728
|
-
/*eslint func-names:0*/
|
|
44729
|
-
|
|
44730
45342
|
function generateHTTPMethod(isForm) {
|
|
44731
45343
|
return function httpMethod(url, data, config) {
|
|
44732
|
-
return this.request(
|
|
44733
|
-
|
|
44734
|
-
|
|
44735
|
-
|
|
44736
|
-
|
|
44737
|
-
|
|
44738
|
-
|
|
44739
|
-
|
|
45344
|
+
return this.request(
|
|
45345
|
+
mergeConfig(config || {}, {
|
|
45346
|
+
method,
|
|
45347
|
+
headers: isForm
|
|
45348
|
+
? {
|
|
45349
|
+
'Content-Type': 'multipart/form-data',
|
|
45350
|
+
}
|
|
45351
|
+
: {},
|
|
45352
|
+
url,
|
|
45353
|
+
data,
|
|
45354
|
+
})
|
|
45355
|
+
);
|
|
44740
45356
|
};
|
|
44741
45357
|
}
|
|
44742
45358
|
|
|
@@ -44767,7 +45383,7 @@ class CancelToken {
|
|
|
44767
45383
|
const token = this;
|
|
44768
45384
|
|
|
44769
45385
|
// eslint-disable-next-line func-names
|
|
44770
|
-
this.promise.then(cancel => {
|
|
45386
|
+
this.promise.then((cancel) => {
|
|
44771
45387
|
if (!token._listeners) return;
|
|
44772
45388
|
|
|
44773
45389
|
let i = token._listeners.length;
|
|
@@ -44779,10 +45395,10 @@ class CancelToken {
|
|
|
44779
45395
|
});
|
|
44780
45396
|
|
|
44781
45397
|
// eslint-disable-next-line func-names
|
|
44782
|
-
this.promise.then = onfulfilled => {
|
|
45398
|
+
this.promise.then = (onfulfilled) => {
|
|
44783
45399
|
let _resolve;
|
|
44784
45400
|
// eslint-disable-next-line func-names
|
|
44785
|
-
const promise = new Promise(resolve => {
|
|
45401
|
+
const promise = new Promise((resolve) => {
|
|
44786
45402
|
token.subscribe(resolve);
|
|
44787
45403
|
_resolve = resolve;
|
|
44788
45404
|
}).then(onfulfilled);
|
|
@@ -44870,7 +45486,7 @@ class CancelToken {
|
|
|
44870
45486
|
});
|
|
44871
45487
|
return {
|
|
44872
45488
|
token,
|
|
44873
|
-
cancel
|
|
45489
|
+
cancel,
|
|
44874
45490
|
};
|
|
44875
45491
|
}
|
|
44876
45492
|
}
|
|
@@ -44882,7 +45498,7 @@ class CancelToken {
|
|
|
44882
45498
|
*
|
|
44883
45499
|
* ```js
|
|
44884
45500
|
* function f(x, y, z) {}
|
|
44885
|
-
*
|
|
45501
|
+
* const args = [1, 2, 3];
|
|
44886
45502
|
* f.apply(null, args);
|
|
44887
45503
|
* ```
|
|
44888
45504
|
*
|
|
@@ -44910,7 +45526,7 @@ function spread(callback) {
|
|
|
44910
45526
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
44911
45527
|
*/
|
|
44912
45528
|
function isAxiosError(payload) {
|
|
44913
|
-
return utils$3.isObject(payload) &&
|
|
45529
|
+
return utils$3.isObject(payload) && payload.isAxiosError === true;
|
|
44914
45530
|
}
|
|
44915
45531
|
|
|
44916
45532
|
const HttpStatusCode = {
|
|
@@ -44977,6 +45593,12 @@ const HttpStatusCode = {
|
|
|
44977
45593
|
LoopDetected: 508,
|
|
44978
45594
|
NotExtended: 510,
|
|
44979
45595
|
NetworkAuthenticationRequired: 511,
|
|
45596
|
+
WebServerIsDown: 521,
|
|
45597
|
+
ConnectionTimedOut: 522,
|
|
45598
|
+
OriginIsUnreachable: 523,
|
|
45599
|
+
TimeoutOccurred: 524,
|
|
45600
|
+
SslHandshakeFailed: 525,
|
|
45601
|
+
InvalidSslCertificate: 526,
|
|
44980
45602
|
};
|
|
44981
45603
|
|
|
44982
45604
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
@@ -44995,10 +45617,10 @@ function createInstance(defaultConfig) {
|
|
|
44995
45617
|
const instance = bind$1(Axios.prototype.request, context);
|
|
44996
45618
|
|
|
44997
45619
|
// Copy axios.prototype to instance
|
|
44998
|
-
utils$3.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
|
45620
|
+
utils$3.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
44999
45621
|
|
|
45000
45622
|
// Copy context to instance
|
|
45001
|
-
utils$3.extend(instance, context, null, {allOwnKeys: true});
|
|
45623
|
+
utils$3.extend(instance, context, null, { allOwnKeys: true });
|
|
45002
45624
|
|
|
45003
45625
|
// Factory for creating new instances
|
|
45004
45626
|
instance.create = function create(instanceConfig) {
|
|
@@ -45042,7 +45664,7 @@ axios.mergeConfig = mergeConfig;
|
|
|
45042
45664
|
|
|
45043
45665
|
axios.AxiosHeaders = AxiosHeaders;
|
|
45044
45666
|
|
|
45045
|
-
axios.formToJSON = thing => formDataToJSON(utils$3.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
45667
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$3.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
45046
45668
|
|
|
45047
45669
|
axios.getAdapter = adapters.getAdapter;
|
|
45048
45670
|
|
|
@@ -55491,7 +56113,7 @@ const FOCUSABLE_SELECTORS = Object.freeze([
|
|
|
55491
56113
|
'a[href]', 'button:not([disabled]):not([tabindex="-1"])', 'textarea', 'input', 'select', '[tabindex]:not([tabindex="-1"])',
|
|
55492
56114
|
]);
|
|
55493
56115
|
const Widget = forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
|
|
55494
|
-
const widget_version = "1.1.
|
|
56116
|
+
const widget_version = "1.1.68";
|
|
55495
56117
|
const [isWidgetOpen, setIsWidgetOpen] = useState(false);
|
|
55496
56118
|
const [isWidgetMinimized, setIsWidgetMinimized] = useState(false);
|
|
55497
56119
|
const [isIncognitoMode, setIsIncognitoMode] = useState(false);
|