@indfnd/utils 0.1.8 → 0.1.9

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.9](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.8...v0.1.9) (2024-04-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 修改permission的key ([46aa0a4](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/46aa0a499e968ee73cb53dd556c64d0b67584954))
11
+
5
12
  ### [0.1.8](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.7...v0.1.8) (2024-04-28)
6
13
 
7
14
 
@@ -102,7 +102,7 @@ function setIndexDescCache(data) {
102
102
  function clearIndexDescCache() {
103
103
  removeLocalStorage(INDEX_DESC_KEY);
104
104
  }
105
- const PERMISSION_KEY = "ibp-permission";
105
+ const PERMISSION_KEY = "ibp-sc-permission";
106
106
  function getPermissionCache() {
107
107
  return getSessionStorage(PERMISSION_KEY);
108
108
  }
@@ -1,4 +1,4 @@
1
- (function(C,_e){typeof exports=="object"&&typeof module!="undefined"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(C=typeof globalThis!="undefined"?globalThis:C||self,_e(C.IndUtils={}))})(this,function(C){"use strict";var PA=Object.defineProperty,MA=Object.defineProperties;var RA=Object.getOwnPropertyDescriptors;var ru=Object.getOwnPropertySymbols;var ep=Object.prototype.hasOwnProperty,tp=Object.prototype.propertyIsEnumerable;var jc=(C,_e,be)=>_e in C?PA(C,_e,{enumerable:!0,configurable:!0,writable:!0,value:be}):C[_e]=be,pt=(C,_e)=>{for(var be in _e||(_e={}))ep.call(_e,be)&&jc(C,be,_e[be]);if(ru)for(var be of ru(_e))tp.call(_e,be)&&jc(C,be,_e[be]);return C},Pt=(C,_e)=>MA(C,RA(_e));var np=(C,_e)=>{var be={};for(var Ze in C)ep.call(C,Ze)&&_e.indexOf(Ze)<0&&(be[Ze]=C[Ze]);if(C!=null&&ru)for(var Ze of ru(C))_e.indexOf(Ze)<0&&tp.call(C,Ze)&&(be[Ze]=C[Ze]);return be};var iu=(C,_e,be)=>new Promise((Ze,qr)=>{var Rn=St=>{try{mn(be.next(St))}catch(cr){qr(cr)}},Ln=St=>{try{mn(be.throw(St))}catch(cr){qr(cr)}},mn=St=>St.done?Ze(St.value):Promise.resolve(St.value).then(Rn,Ln);mn((be=be.apply(C,_e)).next())});const _e=n=>{const r=sessionStorage.getItem(n);if(r)try{return JSON.parse(r)}catch(u){return r}return r},be=(n,r)=>{typeof r!="string"&&(r=JSON.stringify(r)),sessionStorage.setItem(n,r)},Ze=n=>sessionStorage.removeItem(n);function qr(){sessionStorage.clear()}const Rn=n=>{const r=localStorage.getItem(n);if(r)try{return JSON.parse(r)}catch(u){return r}return r},Ln=(n,r)=>{typeof r!="string"&&(r=JSON.stringify(r)),localStorage.setItem(n,r)},mn=n=>localStorage.removeItem(n),St="indexDesc";function cr(){return Rn(St)}function rp(n){Ln(St,n)}function ip(){mn(St)}const uu="ibp-permission";function up(){return _e(uu)}function op(n){be(uu,n)}function ap(){Ze(uu)}const ou="userInfo";function fp(){return Rn(ou)}function sp(n){Ln(ou,n)}function lp(){mn(ou)}var _n=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function cp(n){if(n.__esModule)return n;var r=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(u){var a=Object.getOwnPropertyDescriptor(n,u);Object.defineProperty(r,u,a.get?a:{enumerable:!0,get:function(){return n[u]}})}),r}var au={exports:{}},Ca=function(r,u){return function(){for(var s=new Array(arguments.length),l=0;l<s.length;l++)s[l]=arguments[l];return r.apply(u,s)}},pp=Ca,wn=Object.prototype.toString;function fu(n){return wn.call(n)==="[object Array]"}function su(n){return typeof n=="undefined"}function hp(n){return n!==null&&!su(n)&&n.constructor!==null&&!su(n.constructor)&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function gp(n){return wn.call(n)==="[object ArrayBuffer]"}function dp(n){return typeof FormData!="undefined"&&n instanceof FormData}function vp(n){var r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&n.buffer instanceof ArrayBuffer,r}function yp(n){return typeof n=="string"}function mp(n){return typeof n=="number"}function Oa(n){return n!==null&&typeof n=="object"}function zr(n){if(wn.call(n)!=="[object Object]")return!1;var r=Object.getPrototypeOf(n);return r===null||r===Object.prototype}function _p(n){return wn.call(n)==="[object Date]"}function wp(n){return wn.call(n)==="[object File]"}function Ep(n){return wn.call(n)==="[object Blob]"}function xa(n){return wn.call(n)==="[object Function]"}function Sp(n){return Oa(n)&&xa(n.pipe)}function Ap(n){return typeof URLSearchParams!="undefined"&&n instanceof URLSearchParams}function bp(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function Cp(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function lu(n,r){if(!(n===null||typeof n=="undefined"))if(typeof n!="object"&&(n=[n]),fu(n))for(var u=0,a=n.length;u<a;u++)r.call(null,n[u],u,n);else for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&r.call(null,n[s],s,n)}function cu(){var n={};function r(s,l){zr(n[l])&&zr(s)?n[l]=cu(n[l],s):zr(s)?n[l]=cu({},s):fu(s)?n[l]=s.slice():n[l]=s}for(var u=0,a=arguments.length;u<a;u++)lu(arguments[u],r);return n}function Op(n,r,u){return lu(r,function(s,l){u&&typeof s=="function"?n[l]=pp(s,u):n[l]=s}),n}function xp(n){return n.charCodeAt(0)===65279&&(n=n.slice(1)),n}var rt={isArray:fu,isArrayBuffer:gp,isBuffer:hp,isFormData:dp,isArrayBufferView:vp,isString:yp,isNumber:mp,isObject:Oa,isPlainObject:zr,isUndefined:su,isDate:_p,isFile:wp,isBlob:Ep,isFunction:xa,isStream:Sp,isURLSearchParams:Ap,isStandardBrowserEnv:Cp,forEach:lu,merge:cu,extend:Op,trim:bp,stripBOM:xp},Nn=rt;function Ta(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Ia=function(r,u,a){if(!u)return r;var s;if(a)s=a(u);else if(Nn.isURLSearchParams(u))s=u.toString();else{var l=[];Nn.forEach(u,function(d,y){d===null||typeof d=="undefined"||(Nn.isArray(d)?y=y+"[]":d=[d],Nn.forEach(d,function(_){Nn.isDate(_)?_=_.toISOString():Nn.isObject(_)&&(_=JSON.stringify(_)),l.push(Ta(y)+"="+Ta(_))}))}),s=l.join("&")}if(s){var g=r.indexOf("#");g!==-1&&(r=r.slice(0,g)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r},Tp=rt;function Kr(){this.handlers=[]}Kr.prototype.use=function(r,u,a){return this.handlers.push({fulfilled:r,rejected:u,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1},Kr.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},Kr.prototype.forEach=function(r){Tp.forEach(this.handlers,function(a){a!==null&&r(a)})};var Ip=Kr,$p=rt,Dp=function(r,u){$p.forEach(r,function(s,l){l!==u&&l.toUpperCase()===u.toUpperCase()&&(r[u]=s,delete r[l])})},$a=function(r,u,a,s,l){return r.config=u,a&&(r.code=a),r.request=s,r.response=l,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r},Fp=$a,Da=function(r,u,a,s,l){var g=new Error(r);return Fp(g,u,a,s,l)},Pp=Da,Mp=function(r,u,a){var s=a.config.validateStatus;!a.status||!s||s(a.status)?r(a):u(Pp("Request failed with status code "+a.status,a.config,null,a.request,a))},Jr=rt,Rp=Jr.isStandardBrowserEnv()?function(){return{write:function(u,a,s,l,g,h){var d=[];d.push(u+"="+encodeURIComponent(a)),Jr.isNumber(s)&&d.push("expires="+new Date(s).toGMTString()),Jr.isString(l)&&d.push("path="+l),Jr.isString(g)&&d.push("domain="+g),h===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(u){var a=document.cookie.match(new RegExp("(^|;\\s*)("+u+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(u){this.write(u,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Lp=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)},Np=function(r,u){return u?r.replace(/\/+$/,"")+"/"+u.replace(/^\/+/,""):r},Bp=Lp,Up=Np,Wp=function(r,u){return r&&!Bp(u)?Up(r,u):u},pu=rt,Hp=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Yp=function(r){var u={},a,s,l;return r&&pu.forEach(r.split(`
1
+ (function(C,_e){typeof exports=="object"&&typeof module!="undefined"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(C=typeof globalThis!="undefined"?globalThis:C||self,_e(C.IndUtils={}))})(this,function(C){"use strict";var PA=Object.defineProperty,MA=Object.defineProperties;var RA=Object.getOwnPropertyDescriptors;var ru=Object.getOwnPropertySymbols;var ep=Object.prototype.hasOwnProperty,tp=Object.prototype.propertyIsEnumerable;var jc=(C,_e,be)=>_e in C?PA(C,_e,{enumerable:!0,configurable:!0,writable:!0,value:be}):C[_e]=be,pt=(C,_e)=>{for(var be in _e||(_e={}))ep.call(_e,be)&&jc(C,be,_e[be]);if(ru)for(var be of ru(_e))tp.call(_e,be)&&jc(C,be,_e[be]);return C},Pt=(C,_e)=>MA(C,RA(_e));var np=(C,_e)=>{var be={};for(var Ze in C)ep.call(C,Ze)&&_e.indexOf(Ze)<0&&(be[Ze]=C[Ze]);if(C!=null&&ru)for(var Ze of ru(C))_e.indexOf(Ze)<0&&tp.call(C,Ze)&&(be[Ze]=C[Ze]);return be};var iu=(C,_e,be)=>new Promise((Ze,qr)=>{var Rn=St=>{try{mn(be.next(St))}catch(cr){qr(cr)}},Ln=St=>{try{mn(be.throw(St))}catch(cr){qr(cr)}},mn=St=>St.done?Ze(St.value):Promise.resolve(St.value).then(Rn,Ln);mn((be=be.apply(C,_e)).next())});const _e=n=>{const r=sessionStorage.getItem(n);if(r)try{return JSON.parse(r)}catch(u){return r}return r},be=(n,r)=>{typeof r!="string"&&(r=JSON.stringify(r)),sessionStorage.setItem(n,r)},Ze=n=>sessionStorage.removeItem(n);function qr(){sessionStorage.clear()}const Rn=n=>{const r=localStorage.getItem(n);if(r)try{return JSON.parse(r)}catch(u){return r}return r},Ln=(n,r)=>{typeof r!="string"&&(r=JSON.stringify(r)),localStorage.setItem(n,r)},mn=n=>localStorage.removeItem(n),St="indexDesc";function cr(){return Rn(St)}function rp(n){Ln(St,n)}function ip(){mn(St)}const uu="ibp-sc-permission";function up(){return _e(uu)}function op(n){be(uu,n)}function ap(){Ze(uu)}const ou="userInfo";function fp(){return Rn(ou)}function sp(n){Ln(ou,n)}function lp(){mn(ou)}var _n=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function cp(n){if(n.__esModule)return n;var r=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(u){var a=Object.getOwnPropertyDescriptor(n,u);Object.defineProperty(r,u,a.get?a:{enumerable:!0,get:function(){return n[u]}})}),r}var au={exports:{}},Ca=function(r,u){return function(){for(var s=new Array(arguments.length),l=0;l<s.length;l++)s[l]=arguments[l];return r.apply(u,s)}},pp=Ca,wn=Object.prototype.toString;function fu(n){return wn.call(n)==="[object Array]"}function su(n){return typeof n=="undefined"}function hp(n){return n!==null&&!su(n)&&n.constructor!==null&&!su(n.constructor)&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function gp(n){return wn.call(n)==="[object ArrayBuffer]"}function dp(n){return typeof FormData!="undefined"&&n instanceof FormData}function vp(n){var r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&n.buffer instanceof ArrayBuffer,r}function yp(n){return typeof n=="string"}function mp(n){return typeof n=="number"}function Oa(n){return n!==null&&typeof n=="object"}function zr(n){if(wn.call(n)!=="[object Object]")return!1;var r=Object.getPrototypeOf(n);return r===null||r===Object.prototype}function _p(n){return wn.call(n)==="[object Date]"}function wp(n){return wn.call(n)==="[object File]"}function Ep(n){return wn.call(n)==="[object Blob]"}function xa(n){return wn.call(n)==="[object Function]"}function Sp(n){return Oa(n)&&xa(n.pipe)}function Ap(n){return typeof URLSearchParams!="undefined"&&n instanceof URLSearchParams}function bp(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function Cp(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function lu(n,r){if(!(n===null||typeof n=="undefined"))if(typeof n!="object"&&(n=[n]),fu(n))for(var u=0,a=n.length;u<a;u++)r.call(null,n[u],u,n);else for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&r.call(null,n[s],s,n)}function cu(){var n={};function r(s,l){zr(n[l])&&zr(s)?n[l]=cu(n[l],s):zr(s)?n[l]=cu({},s):fu(s)?n[l]=s.slice():n[l]=s}for(var u=0,a=arguments.length;u<a;u++)lu(arguments[u],r);return n}function Op(n,r,u){return lu(r,function(s,l){u&&typeof s=="function"?n[l]=pp(s,u):n[l]=s}),n}function xp(n){return n.charCodeAt(0)===65279&&(n=n.slice(1)),n}var rt={isArray:fu,isArrayBuffer:gp,isBuffer:hp,isFormData:dp,isArrayBufferView:vp,isString:yp,isNumber:mp,isObject:Oa,isPlainObject:zr,isUndefined:su,isDate:_p,isFile:wp,isBlob:Ep,isFunction:xa,isStream:Sp,isURLSearchParams:Ap,isStandardBrowserEnv:Cp,forEach:lu,merge:cu,extend:Op,trim:bp,stripBOM:xp},Nn=rt;function Ta(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Ia=function(r,u,a){if(!u)return r;var s;if(a)s=a(u);else if(Nn.isURLSearchParams(u))s=u.toString();else{var l=[];Nn.forEach(u,function(d,y){d===null||typeof d=="undefined"||(Nn.isArray(d)?y=y+"[]":d=[d],Nn.forEach(d,function(_){Nn.isDate(_)?_=_.toISOString():Nn.isObject(_)&&(_=JSON.stringify(_)),l.push(Ta(y)+"="+Ta(_))}))}),s=l.join("&")}if(s){var g=r.indexOf("#");g!==-1&&(r=r.slice(0,g)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r},Tp=rt;function Kr(){this.handlers=[]}Kr.prototype.use=function(r,u,a){return this.handlers.push({fulfilled:r,rejected:u,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1},Kr.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},Kr.prototype.forEach=function(r){Tp.forEach(this.handlers,function(a){a!==null&&r(a)})};var Ip=Kr,$p=rt,Dp=function(r,u){$p.forEach(r,function(s,l){l!==u&&l.toUpperCase()===u.toUpperCase()&&(r[u]=s,delete r[l])})},$a=function(r,u,a,s,l){return r.config=u,a&&(r.code=a),r.request=s,r.response=l,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r},Fp=$a,Da=function(r,u,a,s,l){var g=new Error(r);return Fp(g,u,a,s,l)},Pp=Da,Mp=function(r,u,a){var s=a.config.validateStatus;!a.status||!s||s(a.status)?r(a):u(Pp("Request failed with status code "+a.status,a.config,null,a.request,a))},Jr=rt,Rp=Jr.isStandardBrowserEnv()?function(){return{write:function(u,a,s,l,g,h){var d=[];d.push(u+"="+encodeURIComponent(a)),Jr.isNumber(s)&&d.push("expires="+new Date(s).toGMTString()),Jr.isString(l)&&d.push("path="+l),Jr.isString(g)&&d.push("domain="+g),h===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(u){var a=document.cookie.match(new RegExp("(^|;\\s*)("+u+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(u){this.write(u,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Lp=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)},Np=function(r,u){return u?r.replace(/\/+$/,"")+"/"+u.replace(/^\/+/,""):r},Bp=Lp,Up=Np,Wp=function(r,u){return r&&!Bp(u)?Up(r,u):u},pu=rt,Hp=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Yp=function(r){var u={},a,s,l;return r&&pu.forEach(r.split(`
2
2
  `),function(h){if(l=h.indexOf(":"),a=pu.trim(h.substr(0,l)).toLowerCase(),s=pu.trim(h.substr(l+1)),a){if(u[a]&&Hp.indexOf(a)>=0)return;a==="set-cookie"?u[a]=(u[a]?u[a]:[]).concat([s]):u[a]=u[a]?u[a]+", "+s:s}}),u},Fa=rt,kp=Fa.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),u=document.createElement("a"),a;function s(l){var g=l;return r&&(u.setAttribute("href",g),g=u.href),u.setAttribute("href",g),{href:u.href,protocol:u.protocol?u.protocol.replace(/:$/,""):"",host:u.host,search:u.search?u.search.replace(/^\?/,""):"",hash:u.hash?u.hash.replace(/^#/,""):"",hostname:u.hostname,port:u.port,pathname:u.pathname.charAt(0)==="/"?u.pathname:"/"+u.pathname}}return a=s(window.location.href),function(g){var h=Fa.isString(g)?s(g):g;return h.protocol===a.protocol&&h.host===a.host}}():function(){return function(){return!0}}(),Vr=rt,Gp=Mp,qp=Rp,zp=Ia,Kp=Wp,Jp=Yp,Vp=kp,hu=Da,Pa=function(r){return new Promise(function(a,s){var l=r.data,g=r.headers,h=r.responseType;Vr.isFormData(l)&&delete g["Content-Type"];var d=new XMLHttpRequest;if(r.auth){var y=r.auth.username||"",E=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";g.Authorization="Basic "+btoa(y+":"+E)}var _=Kp(r.baseURL,r.url);d.open(r.method.toUpperCase(),zp(_,r.params,r.paramsSerializer),!0),d.timeout=r.timeout;function w(){if(!!d){var $="getAllResponseHeaders"in d?Jp(d.getAllResponseHeaders()):null,M=!h||h==="text"||h==="json"?d.responseText:d.response,B={data:M,status:d.status,statusText:d.statusText,headers:$,config:r,request:d};Gp(a,s,B),d=null}}if("onloadend"in d?d.onloadend=w:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(w)},d.onabort=function(){!d||(s(hu("Request aborted",r,"ECONNABORTED",d)),d=null)},d.onerror=function(){s(hu("Network Error",r,null,d)),d=null},d.ontimeout=function(){var M="timeout of "+r.timeout+"ms exceeded";r.timeoutErrorMessage&&(M=r.timeoutErrorMessage),s(hu(M,r,r.transitional&&r.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",d)),d=null},Vr.isStandardBrowserEnv()){var S=(r.withCredentials||Vp(_))&&r.xsrfCookieName?qp.read(r.xsrfCookieName):void 0;S&&(g[r.xsrfHeaderName]=S)}"setRequestHeader"in d&&Vr.forEach(g,function(M,B){typeof l=="undefined"&&B.toLowerCase()==="content-type"?delete g[B]:d.setRequestHeader(B,M)}),Vr.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),h&&h!=="json"&&(d.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&d.addEventListener("progress",r.onDownloadProgress),typeof r.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",r.onUploadProgress),r.cancelToken&&r.cancelToken.promise.then(function(M){!d||(d.abort(),s(M),d=null)}),l||(l=null),d.send(l)})},Ue=rt,Ma=Dp,Qp=$a,Xp={"Content-Type":"application/x-www-form-urlencoded"};function Ra(n,r){!Ue.isUndefined(n)&&Ue.isUndefined(n["Content-Type"])&&(n["Content-Type"]=r)}function Zp(){var n;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(n=Pa),n}function jp(n,r,u){if(Ue.isString(n))try{return(r||JSON.parse)(n),Ue.trim(n)}catch(a){if(a.name!=="SyntaxError")throw a}return(u||JSON.stringify)(n)}var Qr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Zp(),transformRequest:[function(r,u){return Ma(u,"Accept"),Ma(u,"Content-Type"),Ue.isFormData(r)||Ue.isArrayBuffer(r)||Ue.isBuffer(r)||Ue.isStream(r)||Ue.isFile(r)||Ue.isBlob(r)?r:Ue.isArrayBufferView(r)?r.buffer:Ue.isURLSearchParams(r)?(Ra(u,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):Ue.isObject(r)||u&&u["Content-Type"]==="application/json"?(Ra(u,"application/json"),jp(r)):r}],transformResponse:[function(r){var u=this.transitional,a=u&&u.silentJSONParsing,s=u&&u.forcedJSONParsing,l=!a&&this.responseType==="json";if(l||s&&Ue.isString(r)&&r.length)try{return JSON.parse(r)}catch(g){if(l)throw g.name==="SyntaxError"?Qp(g,this,"E_JSON_PARSE"):g}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};Qr.headers={common:{Accept:"application/json, text/plain, */*"}},Ue.forEach(["delete","get","head"],function(r){Qr.headers[r]={}}),Ue.forEach(["post","put","patch"],function(r){Qr.headers[r]=Ue.merge(Xp)});var gu=Qr,eh=rt,th=gu,nh=function(r,u,a){var s=this||th;return eh.forEach(a,function(g){r=g.call(s,r,u)}),r},La=function(r){return!!(r&&r.__CANCEL__)},Na=rt,du=nh,rh=La,ih=gu;function vu(n){n.cancelToken&&n.cancelToken.throwIfRequested()}var uh=function(r){vu(r),r.headers=r.headers||{},r.data=du.call(r,r.data,r.headers,r.transformRequest),r.headers=Na.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),Na.forEach(["delete","get","head","post","put","patch","common"],function(s){delete r.headers[s]});var u=r.adapter||ih.adapter;return u(r).then(function(s){return vu(r),s.data=du.call(r,s.data,s.headers,r.transformResponse),s},function(s){return rh(s)||(vu(r),s&&s.response&&(s.response.data=du.call(r,s.response.data,s.response.headers,r.transformResponse))),Promise.reject(s)})},Ye=rt,Ba=function(r,u){u=u||{};var a={},s=["url","method","data"],l=["headers","auth","proxy","params"],g=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],h=["validateStatus"];function d(w,S){return Ye.isPlainObject(w)&&Ye.isPlainObject(S)?Ye.merge(w,S):Ye.isPlainObject(S)?Ye.merge({},S):Ye.isArray(S)?S.slice():S}function y(w){Ye.isUndefined(u[w])?Ye.isUndefined(r[w])||(a[w]=d(void 0,r[w])):a[w]=d(r[w],u[w])}Ye.forEach(s,function(S){Ye.isUndefined(u[S])||(a[S]=d(void 0,u[S]))}),Ye.forEach(l,y),Ye.forEach(g,function(S){Ye.isUndefined(u[S])?Ye.isUndefined(r[S])||(a[S]=d(void 0,r[S])):a[S]=d(void 0,u[S])}),Ye.forEach(h,function(S){S in u?a[S]=d(r[S],u[S]):S in r&&(a[S]=d(void 0,r[S]))});var E=s.concat(l).concat(g).concat(h),_=Object.keys(r).concat(Object.keys(u)).filter(function(S){return E.indexOf(S)===-1});return Ye.forEach(_,y),a},oh={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]},Ua=oh,yu={};["object","boolean","number","function","string","symbol"].forEach(function(n,r){yu[n]=function(a){return typeof a===n||"a"+(r<1?"n ":" ")+n}});var Wa={},ah=Ua.version.split(".");function Ha(n,r){for(var u=r?r.split("."):ah,a=n.split("."),s=0;s<3;s++){if(u[s]>a[s])return!0;if(u[s]<a[s])return!1}return!1}yu.transitional=function(r,u,a){var s=u&&Ha(u);function l(g,h){return"[Axios v"+Ua.version+"] Transitional option '"+g+"'"+h+(a?". "+a:"")}return function(g,h,d){if(r===!1)throw new Error(l(h," has been removed in "+u));return s&&!Wa[h]&&(Wa[h]=!0,console.warn(l(h," has been deprecated since v"+u+" and will be removed in the near future"))),r?r(g,h,d):!0}};function fh(n,r,u){if(typeof n!="object")throw new TypeError("options must be an object");for(var a=Object.keys(n),s=a.length;s-- >0;){var l=a[s],g=r[l];if(g){var h=n[l],d=h===void 0||g(h,l,n);if(d!==!0)throw new TypeError("option "+l+" must be "+d);continue}if(u!==!0)throw Error("Unknown option "+l)}}var sh={isOlderVersion:Ha,assertOptions:fh,validators:yu},Ya=rt,lh=Ia,ka=Ip,Ga=uh,Xr=Ba,qa=sh,Bn=qa.validators;function pr(n){this.defaults=n,this.interceptors={request:new ka,response:new ka}}pr.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=Xr(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var u=r.transitional;u!==void 0&&qa.assertOptions(u,{silentJSONParsing:Bn.transitional(Bn.boolean,"1.0.0"),forcedJSONParsing:Bn.transitional(Bn.boolean,"1.0.0"),clarifyTimeoutError:Bn.transitional(Bn.boolean,"1.0.0")},!1);var a=[],s=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(s=s&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});var l=[];this.interceptors.response.forEach(function(w){l.push(w.fulfilled,w.rejected)});var g;if(!s){var h=[Ga,void 0];for(Array.prototype.unshift.apply(h,a),h=h.concat(l),g=Promise.resolve(r);h.length;)g=g.then(h.shift(),h.shift());return g}for(var d=r;a.length;){var y=a.shift(),E=a.shift();try{d=y(d)}catch(_){E(_);break}}try{g=Ga(d)}catch(_){return Promise.reject(_)}for(;l.length;)g=g.then(l.shift(),l.shift());return g},pr.prototype.getUri=function(r){return r=Xr(this.defaults,r),lh(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")},Ya.forEach(["delete","get","head","options"],function(r){pr.prototype[r]=function(u,a){return this.request(Xr(a||{},{method:r,url:u,data:(a||{}).data}))}}),Ya.forEach(["post","put","patch"],function(r){pr.prototype[r]=function(u,a,s){return this.request(Xr(s||{},{method:r,url:u,data:a}))}});var ch=pr;function mu(n){this.message=n}mu.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},mu.prototype.__CANCEL__=!0;var za=mu,ph=za;function Zr(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var u=this;n(function(s){u.reason||(u.reason=new ph(s),r(u.reason))})}Zr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Zr.source=function(){var r,u=new Zr(function(s){r=s});return{token:u,cancel:r}};var hh=Zr,gh=function(r){return function(a){return r.apply(null,a)}},dh=function(r){return typeof r=="object"&&r.isAxiosError===!0},Ka=rt,vh=Ca,jr=ch,yh=Ba,mh=gu;function Ja(n){var r=new jr(n),u=vh(jr.prototype.request,r);return Ka.extend(u,jr.prototype,r),Ka.extend(u,r),u}var At=Ja(mh);At.Axios=jr,At.create=function(r){return Ja(yh(At.defaults,r))},At.Cancel=za,At.CancelToken=hh,At.isCancel=La,At.all=function(r){return Promise.all(r)},At.spread=gh,At.isAxiosError=dh,au.exports=At,au.exports.default=At;var _h=au.exports,wh=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},u=Symbol("test"),a=Object(u);if(typeof u=="string"||Object.prototype.toString.call(u)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var s=42;r[u]=s;for(u in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var l=Object.getOwnPropertySymbols(r);if(l.length!==1||l[0]!==u||!Object.prototype.propertyIsEnumerable.call(r,u))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var g=Object.getOwnPropertyDescriptor(r,u);if(g.value!==s||g.enumerable!==!0)return!1}return!0},Va=typeof Symbol!="undefined"&&Symbol,Eh=wh,Sh=function(){return typeof Va!="function"||typeof Symbol!="function"||typeof Va("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Eh()},Qa={foo:{}},Ah=Object,bh=function(){return{__proto__:Qa}.foo===Qa.foo&&!({__proto__:null}instanceof Ah)},Ch="Function.prototype.bind called on incompatible ",Oh=Object.prototype.toString,xh=Math.max,Th="[object Function]",Xa=function(r,u){for(var a=[],s=0;s<r.length;s+=1)a[s]=r[s];for(var l=0;l<u.length;l+=1)a[l+r.length]=u[l];return a},Ih=function(r,u){for(var a=[],s=u||0,l=0;s<r.length;s+=1,l+=1)a[l]=r[s];return a},$h=function(n,r){for(var u="",a=0;a<n.length;a+=1)u+=n[a],a+1<n.length&&(u+=r);return u},Dh=function(r){var u=this;if(typeof u!="function"||Oh.apply(u)!==Th)throw new TypeError(Ch+u);for(var a=Ih(arguments,1),s,l=function(){if(this instanceof s){var E=u.apply(this,Xa(a,arguments));return Object(E)===E?E:this}return u.apply(r,Xa(a,arguments))},g=xh(0,u.length-a.length),h=[],d=0;d<g;d++)h[d]="$"+d;if(s=Function("binder","return function ("+$h(h,",")+"){ return binder.apply(this,arguments); }")(l),u.prototype){var y=function(){};y.prototype=u.prototype,s.prototype=new y,y.prototype=null}return s},Fh=Dh,_u=Function.prototype.bind||Fh,Ph=Function.prototype.call,Mh=Object.prototype.hasOwnProperty,Rh=_u,Lh=Rh.call(Ph,Mh),se,Un=SyntaxError,Za=Function,Wn=TypeError,wu=function(n){try{return Za('"use strict"; return ('+n+").constructor;")()}catch(r){}},En=Object.getOwnPropertyDescriptor;if(En)try{En({},"")}catch(n){En=null}var Eu=function(){throw new Wn},Nh=En?function(){try{return arguments.callee,Eu}catch(n){try{return En(arguments,"callee").get}catch(r){return Eu}}}():Eu,Hn=Sh(),Bh=bh(),Re=Object.getPrototypeOf||(Bh?function(n){return n.__proto__}:null),Yn={},Uh=typeof Uint8Array=="undefined"||!Re?se:Re(Uint8Array),Sn={"%AggregateError%":typeof AggregateError=="undefined"?se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?se:ArrayBuffer,"%ArrayIteratorPrototype%":Hn&&Re?Re([][Symbol.iterator]()):se,"%AsyncFromSyncIteratorPrototype%":se,"%AsyncFunction%":Yn,"%AsyncGenerator%":Yn,"%AsyncGeneratorFunction%":Yn,"%AsyncIteratorPrototype%":Yn,"%Atomics%":typeof Atomics=="undefined"?se:Atomics,"%BigInt%":typeof BigInt=="undefined"?se:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?se:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?se:FinalizationRegistry,"%Function%":Za,"%GeneratorFunction%":Yn,"%Int8Array%":typeof Int8Array=="undefined"?se:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?se:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Hn&&Re?Re(Re([][Symbol.iterator]())):se,"%JSON%":typeof JSON=="object"?JSON:se,"%Map%":typeof Map=="undefined"?se:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Hn||!Re?se:Re(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?se:Promise,"%Proxy%":typeof Proxy=="undefined"?se:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?se:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Hn||!Re?se:Re(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Hn&&Re?Re(""[Symbol.iterator]()):se,"%Symbol%":Hn?Symbol:se,"%SyntaxError%":Un,"%ThrowTypeError%":Nh,"%TypedArray%":Uh,"%TypeError%":Wn,"%Uint8Array%":typeof Uint8Array=="undefined"?se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?se:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?se:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?se:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?se:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?se:WeakSet};if(Re)try{null.error}catch(n){var Wh=Re(Re(n));Sn["%Error.prototype%"]=Wh}var Hh=function n(r){var u;if(r==="%AsyncFunction%")u=wu("async function () {}");else if(r==="%GeneratorFunction%")u=wu("function* () {}");else if(r==="%AsyncGeneratorFunction%")u=wu("async function* () {}");else if(r==="%AsyncGenerator%"){var a=n("%AsyncGeneratorFunction%");a&&(u=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&Re&&(u=Re(s.prototype))}return Sn[r]=u,u},ja={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hr=_u,ei=Lh,Yh=hr.call(Function.call,Array.prototype.concat),kh=hr.call(Function.apply,Array.prototype.splice),ef=hr.call(Function.call,String.prototype.replace),ti=hr.call(Function.call,String.prototype.slice),Gh=hr.call(Function.call,RegExp.prototype.exec),qh=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zh=/\\(\\)?/g,Kh=function(r){var u=ti(r,0,1),a=ti(r,-1);if(u==="%"&&a!=="%")throw new Un("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&u!=="%")throw new Un("invalid intrinsic syntax, expected opening `%`");var s=[];return ef(r,qh,function(l,g,h,d){s[s.length]=h?ef(d,zh,"$1"):g||l}),s},Jh=function(r,u){var a=r,s;if(ei(ja,a)&&(s=ja[a],a="%"+s[0]+"%"),ei(Sn,a)){var l=Sn[a];if(l===Yn&&(l=Hh(a)),typeof l=="undefined"&&!u)throw new Wn("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:s,name:a,value:l}}throw new Un("intrinsic "+r+" does not exist!")},An=function(r,u){if(typeof r!="string"||r.length===0)throw new Wn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof u!="boolean")throw new Wn('"allowMissing" argument must be a boolean');if(Gh(/^%?[^%]*%?$/,r)===null)throw new Un("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Kh(r),s=a.length>0?a[0]:"",l=Jh("%"+s+"%",u),g=l.name,h=l.value,d=!1,y=l.alias;y&&(s=y[0],kh(a,Yh([0,1],y)));for(var E=1,_=!0;E<a.length;E+=1){var w=a[E],S=ti(w,0,1),$=ti(w,-1);if((S==='"'||S==="'"||S==="`"||$==='"'||$==="'"||$==="`")&&S!==$)throw new Un("property names with quotes must have matching quotes");if((w==="constructor"||!_)&&(d=!0),s+="."+w,g="%"+s+"%",ei(Sn,g))h=Sn[g];else if(h!=null){if(!(w in h)){if(!u)throw new Wn("base intrinsic for "+r+" exists, but the property is not available.");return}if(En&&E+1>=a.length){var M=En(h,w);_=!!M,_&&"get"in M&&!("originalValue"in M.get)?h=M.get:h=h[w]}else _=ei(h,w),h=h[w];_&&!d&&(Sn[g]=h)}}return h},tf={exports:{}},Vh=An,Su=Vh("%Object.defineProperty%",!0),Au=function(){if(Su)try{return Su({},"a",{value:1}),!0}catch(r){return!1}return!1};Au.hasArrayLengthDefineBug=function(){if(!Au())return null;try{return Su([],"length",{value:1}).length!==1}catch(r){return!0}};var nf=Au,Qh=An,ni=Qh("%Object.getOwnPropertyDescriptor%",!0);if(ni)try{ni([],"length")}catch(n){ni=null}var rf=ni,Xh=nf(),bu=An,gr=Xh&&bu("%Object.defineProperty%",!0);if(gr)try{gr({},"a",{value:1})}catch(n){gr=!1}var Zh=bu("%SyntaxError%"),kn=bu("%TypeError%"),uf=rf,jh=function(r,u,a){if(!r||typeof r!="object"&&typeof r!="function")throw new kn("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new kn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new kn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new kn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new kn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new kn("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,g=arguments.length>5?arguments[5]:null,h=arguments.length>6?arguments[6]:!1,d=!!uf&&uf(r,u);if(gr)gr(r,u,{configurable:g===null&&d?d.configurable:!g,enumerable:s===null&&d?d.enumerable:!s,value:a,writable:l===null&&d?d.writable:!l});else if(h||!s&&!l&&!g)r[u]=a;else throw new Zh("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},of=An,af=jh,eg=nf(),ff=rf,sf=of("%TypeError%"),tg=of("%Math.floor%"),ng=function(r,u){if(typeof r!="function")throw new sf("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||tg(u)!==u)throw new sf("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],s=!0,l=!0;if("length"in r&&ff){var g=ff(r,"length");g&&!g.configurable&&(s=!1),g&&!g.writable&&(l=!1)}return(s||l||!a)&&(eg?af(r,"length",u,!0,!0):af(r,"length",u)),r};(function(n){var r=_u,u=An,a=ng,s=u("%TypeError%"),l=u("%Function.prototype.apply%"),g=u("%Function.prototype.call%"),h=u("%Reflect.apply%",!0)||r.call(g,l),d=u("%Object.defineProperty%",!0),y=u("%Math.max%");if(d)try{d({},"a",{value:1})}catch(_){d=null}n.exports=function(w){if(typeof w!="function")throw new s("a function is required");var S=h(r,g,arguments);return a(S,1+y(0,w.length-(arguments.length-1)),!0)};var E=function(){return h(r,l,arguments)};d?d(n.exports,"apply",{value:E}):n.exports.apply=E})(tf);var lf=An,cf=tf.exports,rg=cf(lf("String.prototype.indexOf")),ig=function(r,u){var a=lf(r,!!u);return typeof a=="function"&&rg(r,".prototype.")>-1?cf(a):a},ug={},og=Object.freeze(Object.defineProperty({__proto__:null,default:ug},Symbol.toStringTag,{value:"Module"})),ag=cp(og),Cu=typeof Map=="function"&&Map.prototype,Ou=Object.getOwnPropertyDescriptor&&Cu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ri=Cu&&Ou&&typeof Ou.get=="function"?Ou.get:null,pf=Cu&&Map.prototype.forEach,xu=typeof Set=="function"&&Set.prototype,Tu=Object.getOwnPropertyDescriptor&&xu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ii=xu&&Tu&&typeof Tu.get=="function"?Tu.get:null,hf=xu&&Set.prototype.forEach,fg=typeof WeakMap=="function"&&WeakMap.prototype,dr=fg?WeakMap.prototype.has:null,sg=typeof WeakSet=="function"&&WeakSet.prototype,vr=sg?WeakSet.prototype.has:null,lg=typeof WeakRef=="function"&&WeakRef.prototype,gf=lg?WeakRef.prototype.deref:null,cg=Boolean.prototype.valueOf,pg=Object.prototype.toString,hg=Function.prototype.toString,gg=String.prototype.match,Iu=String.prototype.slice,un=String.prototype.replace,dg=String.prototype.toUpperCase,df=String.prototype.toLowerCase,vf=RegExp.prototype.test,yf=Array.prototype.concat,Mt=Array.prototype.join,vg=Array.prototype.slice,mf=Math.floor,$u=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Du=Object.getOwnPropertySymbols,Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Gn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ke=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Gn?"object":"symbol")?Symbol.toStringTag:null,_f=Object.prototype.propertyIsEnumerable,wf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Ef(n,r){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||vf.call(/e/,r))return r;var u=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var a=n<0?-mf(-n):mf(n);if(a!==n){var s=String(a),l=Iu.call(r,s.length+1);return un.call(s,u,"$&_")+"."+un.call(un.call(l,/([0-9]{3})/g,"$&_"),/_$/,"")}}return un.call(r,u,"$&_")}var Pu=ag,Sf=Pu.custom,Af=Of(Sf)?Sf:null,yg=function n(r,u,a,s){var l=u||{};if(on(l,"quoteStyle")&&l.quoteStyle!=="single"&&l.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(on(l,"maxStringLength")&&(typeof l.maxStringLength=="number"?l.maxStringLength<0&&l.maxStringLength!==1/0:l.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=on(l,"customInspect")?l.customInspect:!0;if(typeof g!="boolean"&&g!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(on(l,"indent")&&l.indent!==null&&l.indent!==" "&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(on(l,"numericSeparator")&&typeof l.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var h=l.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Tf(r,l);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var d=String(r);return h?Ef(r,d):d}if(typeof r=="bigint"){var y=String(r)+"n";return h?Ef(r,y):y}var E=typeof l.depth=="undefined"?5:l.depth;if(typeof a=="undefined"&&(a=0),a>=E&&E>0&&typeof r=="object")return Mu(r)?"[Array]":"[Object]";var _=Rg(l,a);if(typeof s=="undefined")s=[];else if(xf(s,r)>=0)return"[Circular]";function w(qe,K,H){if(K&&(s=vg.call(s),s.push(K)),H){var R={depth:l.depth};return on(l,"quoteStyle")&&(R.quoteStyle=l.quoteStyle),n(qe,R,a+1,s)}return n(qe,l,a+1,s)}if(typeof r=="function"&&!Cf(r)){var S=Og(r),$=ui(r,w);return"[Function"+(S?": "+S:" (anonymous)")+"]"+($.length>0?" { "+Mt.call($,", ")+" }":"")}if(Of(r)){var M=Gn?un.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):Fu.call(r);return typeof r=="object"&&!Gn?yr(M):M}if(Fg(r)){for(var B="<"+df.call(String(r.nodeName)),P=r.attributes||[],k=0;k<P.length;k++)B+=" "+P[k].name+"="+bf(mg(P[k].value),"double",l);return B+=">",r.childNodes&&r.childNodes.length&&(B+="..."),B+="</"+df.call(String(r.nodeName))+">",B}if(Mu(r)){if(r.length===0)return"[]";var F=ui(r,w);return _&&!Mg(F)?"["+Lu(F,_)+"]":"[ "+Mt.call(F,", ")+" ]"}if(wg(r)){var L=ui(r,w);return!("cause"in Error.prototype)&&"cause"in r&&!_f.call(r,"cause")?"{ ["+String(r)+"] "+Mt.call(yf.call("[cause]: "+w(r.cause),L),", ")+" }":L.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+Mt.call(L,", ")+" }"}if(typeof r=="object"&&g){if(Af&&typeof r[Af]=="function"&&Pu)return Pu(r,{depth:E-a});if(g!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(xg(r)){var N=[];return pf&&pf.call(r,function(qe,K){N.push(w(K,r,!0)+" => "+w(qe,r))}),If("Map",ri.call(r),N,_)}if($g(r)){var X=[];return hf&&hf.call(r,function(qe){X.push(w(qe,r))}),If("Set",ii.call(r),X,_)}if(Tg(r))return Ru("WeakMap");if(Dg(r))return Ru("WeakSet");if(Ig(r))return Ru("WeakRef");if(Sg(r))return yr(w(Number(r)));if(bg(r))return yr(w($u.call(r)));if(Ag(r))return yr(cg.call(r));if(Eg(r))return yr(w(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(r===_n)return"{ [object globalThis] }";if(!_g(r)&&!Cf(r)){var z=ui(r,w),ue=wf?wf(r)===Object.prototype:r instanceof Object||r.constructor===Object,ye=r instanceof Object?"":"null prototype",de=!ue&&ke&&Object(r)===r&&ke in r?Iu.call(an(r),8,-1):ye?"Object":"",oe=ue||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",$e=oe+(de||ye?"["+Mt.call(yf.call([],de||[],ye||[]),": ")+"] ":"");return z.length===0?$e+"{}":_?$e+"{"+Lu(z,_)+"}":$e+"{ "+Mt.call(z,", ")+" }"}return String(r)};function bf(n,r,u){var a=(u.quoteStyle||r)==="double"?'"':"'";return a+n+a}function mg(n){return un.call(String(n),/"/g,"&quot;")}function Mu(n){return an(n)==="[object Array]"&&(!ke||!(typeof n=="object"&&ke in n))}function _g(n){return an(n)==="[object Date]"&&(!ke||!(typeof n=="object"&&ke in n))}function Cf(n){return an(n)==="[object RegExp]"&&(!ke||!(typeof n=="object"&&ke in n))}function wg(n){return an(n)==="[object Error]"&&(!ke||!(typeof n=="object"&&ke in n))}function Eg(n){return an(n)==="[object String]"&&(!ke||!(typeof n=="object"&&ke in n))}function Sg(n){return an(n)==="[object Number]"&&(!ke||!(typeof n=="object"&&ke in n))}function Ag(n){return an(n)==="[object Boolean]"&&(!ke||!(typeof n=="object"&&ke in n))}function Of(n){if(Gn)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!Fu)return!1;try{return Fu.call(n),!0}catch(r){}return!1}function bg(n){if(!n||typeof n!="object"||!$u)return!1;try{return $u.call(n),!0}catch(r){}return!1}var Cg=Object.prototype.hasOwnProperty||function(n){return n in this};function on(n,r){return Cg.call(n,r)}function an(n){return pg.call(n)}function Og(n){if(n.name)return n.name;var r=gg.call(hg.call(n),/^function\s*([\w$]+)/);return r?r[1]:null}function xf(n,r){if(n.indexOf)return n.indexOf(r);for(var u=0,a=n.length;u<a;u++)if(n[u]===r)return u;return-1}function xg(n){if(!ri||!n||typeof n!="object")return!1;try{ri.call(n);try{ii.call(n)}catch(r){return!0}return n instanceof Map}catch(r){}return!1}function Tg(n){if(!dr||!n||typeof n!="object")return!1;try{dr.call(n,dr);try{vr.call(n,vr)}catch(r){return!0}return n instanceof WeakMap}catch(r){}return!1}function Ig(n){if(!gf||!n||typeof n!="object")return!1;try{return gf.call(n),!0}catch(r){}return!1}function $g(n){if(!ii||!n||typeof n!="object")return!1;try{ii.call(n);try{ri.call(n)}catch(r){return!0}return n instanceof Set}catch(r){}return!1}function Dg(n){if(!vr||!n||typeof n!="object")return!1;try{vr.call(n,vr);try{dr.call(n,dr)}catch(r){return!0}return n instanceof WeakSet}catch(r){}return!1}function Fg(n){return!n||typeof n!="object"?!1:typeof HTMLElement!="undefined"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function Tf(n,r){if(n.length>r.maxStringLength){var u=n.length-r.maxStringLength,a="... "+u+" more character"+(u>1?"s":"");return Tf(Iu.call(n,0,r.maxStringLength),r)+a}var s=un.call(un.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Pg);return bf(s,"single",r)}function Pg(n){var r=n.charCodeAt(0),u={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return u?"\\"+u:"\\x"+(r<16?"0":"")+dg.call(r.toString(16))}function yr(n){return"Object("+n+")"}function Ru(n){return n+" { ? }"}function If(n,r,u,a){var s=a?Lu(u,a):Mt.call(u,", ");return n+" ("+r+") {"+s+"}"}function Mg(n){for(var r=0;r<n.length;r++)if(xf(n[r],`
3
3
  `)>=0)return!1;return!0}function Rg(n,r){var u;if(n.indent===" ")u=" ";else if(typeof n.indent=="number"&&n.indent>0)u=Mt.call(Array(n.indent+1)," ");else return null;return{base:u,prev:Mt.call(Array(r+1),u)}}function Lu(n,r){if(n.length===0)return"";var u=`
4
4
  `+r.prev+r.base;return u+Mt.call(n,","+u)+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indfnd/utils",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "author": "huxuetong",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,6 +1,6 @@
1
1
  import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/storage'
2
2
 
3
- const PERMISSION_KEY = 'ibp-permission'
3
+ const PERMISSION_KEY = 'ibp-sc-permission'
4
4
 
5
5
  export function getPermissionCache() {
6
6
  return getSessionStorage(PERMISSION_KEY)