@qlover/fe-corekit 1.2.1
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/README.md +158 -0
- package/dist/index.d.ts +2574 -0
- package/dist/index.es.js +1 -0
- package/dist/index.umd.js +1 -0
- package/dist/interface/index.d.ts +928 -0
- package/dist/interface/index.es.js +1 -0
- package/dist/interface/index.umd.js +1 -0
- package/dist/server/index.cjs.js +1 -0
- package/dist/server/index.d.ts +152 -0
- package/dist/server/index.es.js +1 -0
- package/package.json +65 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=function(){function t(t){this.config=t,this.plugins=[]}return t.prototype.use=function(t){this.plugins.find((function(r){return r===t||r.pluginName===t.pluginName||r.constructor===t.constructor}))&&t.onlyOne?console.warn("Plugin ".concat(t.pluginName," is already used, skip adding")):this.plugins.push(t)},t}(),r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},r(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var e=function(){return e=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},e.apply(this,arguments)};function o(t,r,n,e){return new(n||(n=Promise))((function(o,i){function u(t){try{a(e.next(t))}catch(t){i(t)}}function s(t){try{a(e.throw(t))}catch(t){i(t)}}function a(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,s)}a((e=e.apply(t,r||[])).next())}))}function i(t,r){var n,e,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,e&&(o=2&s[0]?e.return:s[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,s[1])).done)return o;switch(e=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,e=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(t,i)}catch(t){s=[6,t],e=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function u(t,r,n){if(n||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var s,a=function(t){function r(r,n){var e=this.constructor,o=t.call(this,n instanceof Error?n.message:n||r)||this;return o.id=r,n instanceof Error&&"stack"in n&&(o.stack=n.stack),Object.setPrototypeOf(o,e.prototype),o}return n(r,t),r}(Error),c=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r}(a);!function(t){t.REQUEST_ERROR="REQUEST_ERROR",t.ENV_FETCH_NOT_SUPPORT="ENV_FETCH_NOT_SUPPORT",t.FETCHER_NONE="FETCHER_NONE",t.RESPONSE_NOT_OK="RESPONSE_NOT_OK",t.ABORT_ERROR="ABORT_ERROR",t.URL_NONE="URL_NONE"}(s||(s={}));var f,l,p,h,v=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.runHooks=function(t,r,n){for(var e=[],s=3;s<arguments.length;s++)e[s-3]=arguments[s];return o(this,void 0,void 0,(function(){var o,s,a,c,f,l,p,h;return i(this,(function(i){switch(i.label){case 0:o=-1,(a=n||{parameters:void 0,hooksRuntimes:{}}).hooksRuntimes.times=0,a.hooksRuntimes.index=void 0,c=0,f=t,i.label=1;case 1:return c<f.length?(l=f[c],o++,"function"!=typeof l[r]||"function"==typeof l.enabled&&!l.enabled(r,n)?[3,3]:(null===(h=a.hooksRuntimes)||void 0===h?void 0:h.breakChain)?[3,4]:(a.hooksRuntimes.pluginName=l.pluginName,a.hooksRuntimes.hookName=r,a.hooksRuntimes.times++,a.hooksRuntimes.index=o,[4,l[r].apply(l,u([n],e,!1))])):[3,4];case 2:if(void 0!==(p=i.sent())&&(s=p,a.hooksRuntimes.returnValue=p,a.hooksRuntimes.returnBreakChain))return[2,s];i.label=3;case 3:return c++,[3,1];case 4:return[2,s]}}))}))},r.prototype.execNoError=function(t,r){return o(this,void 0,void 0,(function(){var n;return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.exec(t,r)];case 1:return[2,e.sent()];case 2:return(n=e.sent())instanceof a?[2,n]:[2,new a("UNKNOWN_ASYNC_ERROR",n)];case 3:return[2]}}))}))},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a async function!");return this.run(e,n)},r.prototype.run=function(t,r){return o(this,void 0,void 0,(function(){var n,e,u,s=this;return i(this,(function(c){switch(c.label){case 0:n={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}},e=function(t){return o(s,void 0,void 0,(function(){var n;return i(this,(function(e){switch(e.label){case 0:return[4,this.runHooks(this.plugins,"onExec",t,r)];case 1:return e.sent(),0!==t.hooksRuntimes.times?[3,3]:(n=t,[4,r(t)]);case 2:return n.returnValue=e.sent(),[2];case 3:return t.returnValue=t.hooksRuntimes.returnValue,[2]}}))}))},c.label=1;case 1:return c.trys.push([1,5,7,8]),[4,this.runHooks(this.plugins,"onBefore",n)];case 2:return c.sent(),[4,e(n)];case 3:return c.sent(),[4,this.runHooks(this.plugins,"onSuccess",n)];case 4:return c.sent(),[2,n.returnValue];case 5:return u=c.sent(),n.error=u,[4,this.runHooks(this.plugins,"onError",n)];case 6:if(c.sent(),n.hooksRuntimes.returnValue&&(n.error=n.hooksRuntimes.returnValue),n.error instanceof a)throw n.error;throw new a("UNKNOWN_ASYNC_ERROR",n.error);case 7:return n.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0},[7];case 8:return[2]}}))}))},r}(t),y=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.runHooks=function(t,r,n){for(var e,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var s,a=-1,c=n||{parameters:void 0,hooksRuntimes:{}};c.hooksRuntimes.times=0,c.hooksRuntimes.index=void 0;for(var f=0,l=t;f<l.length;f++){var p=l[f];if(a++,"function"==typeof p[r]&&("function"!=typeof p.enabled||p.enabled(r,c))){if(null===(e=c.hooksRuntimes)||void 0===e?void 0:e.breakChain)break;c.hooksRuntimes.pluginName=p.pluginName,c.hooksRuntimes.hookName=r,c.hooksRuntimes.times++,c.hooksRuntimes.index=a;var h=p[r].apply(p,u([n],o,!1));if(void 0!==h&&(s=h,c.hooksRuntimes.returnValue=h,c.hooksRuntimes.returnBreakChain))return s}}return s},r.prototype.execNoError=function(t,r){try{return this.exec(t,r)}catch(t){return t instanceof a?t:new a("UNKNOWN_SYNC_ERROR",t)}},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a function!");return this.run(e,n)},r.prototype.run=function(t,r){var n,e=this,o={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}};try{return this.runHooks(this.plugins,"onBefore",o),n=o,e.runHooks(e.plugins,"onExec",n,r),n.returnValue=n.hooksRuntimes.times?n.hooksRuntimes.returnValue:r(n),this.runHooks(this.plugins,"onSuccess",o),o.returnValue}catch(t){if(o.error=t,this.runHooks(this.plugins,"onError",o),o.hooksRuntimes.returnValue&&(o.error=o.hooksRuntimes.returnValue),o.error instanceof a)throw o.error;throw new a("UNKNOWN_SYNC_ERROR",o.error)}finally{o.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}}},r}(t),d=function(){return!0},g=function(){function t(t){var r;void 0===t&&(t={}),this.pluginName="RetryPlugin",this.onlyOne=!0,this.options=e(e({retryDelay:1e3,useExponentialBackoff:!1,shouldRetry:d},t),{maxRetries:Math.min(Math.max(1,null!==(r=t.maxRetries)&&void 0!==r?r:3),16)})}return t.prototype.delay=function(t){return o(this,void 0,void 0,(function(){var r;return i(this,(function(n){return r=this.options.useExponentialBackoff?this.options.retryDelay*Math.pow(2,t):this.options.retryDelay,[2,new Promise((function(t){return setTimeout(t,r)}))]}))}))},t.prototype.onExec=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return this.options.maxRetries<1?[2,r(t)]:[2,this.retry(r,t,this.options,this.options.maxRetries)]}))}))},t.prototype.shouldRetry=function(t){var r=t.error;return t.retryCount>0&&this.options.shouldRetry(r)},t.prototype.retry=function(t,r,n,e){return o(this,void 0,void 0,(function(){var o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,t(r)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),!this.shouldRetry({error:o,retryCount:e}))throw new a("RETRY_ERROR","All ".concat(n.maxRetries," attempts failed: ").concat(o.message));return[4,this.delay(n.maxRetries-e)];case 3:return i.sent(),e--,[2,this.retry(t,r,n,e)];case 4:return[2]}}))}))},t}(),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var R,_,O=b(h?p:(h=1,p=l?f:(l=1,f=function(t){return t&&t.length?t[0]:void 0})));var E,w,N,k,j,S,x,T,P,A,C,U,q,B,I,z,V,F,H,D,G=b(_?R:(_=1,R=function(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}));function L(){if(k)return N;k=1;var t=function(){if(w)return E;w=1;var t="object"==typeof m&&m&&m.Object===Object&&m;return E=t}(),r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")();return N=n}function $(){if(S)return j;S=1;var t=L().Symbol;return j=t}function K(){if(U)return C;U=1;var t=$(),r=function(){if(T)return x;T=1;var t=$(),r=Object.prototype,n=r.hasOwnProperty,e=r.toString,o=t?t.toStringTag:void 0;return x=function(t){var r=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var s=e.call(t);return u&&(r?t[o]=i:delete t[o]),s}}(),n=function(){if(A)return P;A=1;var t=Object.prototype.toString;return P=function(r){return t.call(r)}}(),e=t?t.toStringTag:void 0;return C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":e&&e in Object(t)?r(t):n(t)}}function W(){if(z)return I;z=1;var t=(B?q:(B=1,q=function(t,r){return function(n){return t(r(n))}}))(Object.getPrototypeOf,Object);return I=t}function M(){if(F)return V;return F=1,V=function(t){return null!=t&&"object"==typeof t}}var J,Q,Y,Z,X=b(function(){if(D)return H;D=1;var t=K(),r=W(),n=M(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,s=i.call(Object);return H=function(e){if(!n(e)||"[object Object]"!=t(e))return!1;var o=r(e);if(null===o)return!0;var a=u.call(o,"constructor")&&o.constructor;return"function"==typeof a&&a instanceof a&&i.call(a)==s}}());function tt(){if(Q)return J;Q=1;var t=Array.isArray;return J=t}var rt,nt,et=function(){if(Z)return Y;Z=1;var t=K(),r=tt(),n=M();return Y=function(e){return"string"==typeof e||!r(e)&&n(e)&&"[object String]"==t(e)}}(),ot=b(et),it=b(tt());function ut(){if(nt)return rt;return nt=1,rt=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}var st,at=b(ut()),ct={LOG:"LOG",INFO:"INFO",ERROR:"ERROR",WARN:"WARN",DEBUG:"DEBUG"},ft=function(){function t(t){var r=void 0===t?{}:t,n=r.isCI,e=void 0!==n&&n,o=r.dryRun,i=void 0!==o&&o,u=r.debug,s=void 0!==u&&u,a=r.silent,c=void 0!==a&&a;this.isCI=e,this.isDryRun=i,this.isDebug=s,this.isSilent=c}return t.prototype.print=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.isSilent||console.log.apply(console,r)},t.prototype.prefix=function(t,r){return t},t.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.LOG],t,!1))},t.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.INFO,this.prefix(ct.INFO)],t,!1))},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.WARN,this.prefix(ct.WARN)],t,!1))},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.ERROR,this.prefix(ct.ERROR)],t,!1))},t.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDebug){var n=O(t),e=at(n)?JSON.stringify(n):String(n);this.print.apply(this,u([ct.DEBUG,this.prefix(ct.DEBUG),e],t.slice(1),!1))}},t.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isDebug&&this.print.apply(this,u([ct.DEBUG],t,!1))},t.prototype.exec=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=X(G(t))?G(t):void 0,e=n||{},o=e.isDryRun,i=e.isExternal;if(o||this.isDryRun){var u=[null==i?"$":"!",t.slice(0,null==n?void 0:-1).map((function(t){return ot(t)?t:it(t)?t.join(" "):String(t)})).join(" ")].join(" ").trim();this.log(u)}},t.prototype.obtrusive=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isCI||this.log(),this.log.apply(this,t),this.isCI||this.log()},t}(),lt={exports:{}};var pt,ht,vt,yt,dt,gt,mt,bt,Rt,_t,Ot,Et,wt,Nt,kt,jt,St,xt,Tt,Pt,At,Ct,Ut,qt,Bt,It,zt,Vt,Ft,Ht,Dt,Gt,Lt,$t,Kt,Wt,Mt,Jt,Qt,Yt,Zt,Xt,tr,rr,nr,er,or,ir,ur,sr,ar,cr,fr,lr,pr,hr,vr,yr,dr,gr,mr,br,Rr,_r,Or,Er,wr,Nr,kr,jr,Sr,xr,Tr,Pr,Ar,Cr,Ur,qr,Br,Ir,zr,Vr,Fr,Hr,Dr,Gr,Lr,$r,Kr,Wr,Mr,Jr,Qr,Yr,Zr,Xr,tn,rn,nn,en,on,un,sn,an,cn,fn,ln,pn,hn,vn,yn,dn,gn,mn,bn,Rn,_n,On,En,wn,Nn,kn,jn,Sn,xn,Tn,Pn,An,Cn,Un,qn,Bn,In,zn,Vn,Fn,Hn=(st||(st=1,function(t,r){function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.apply(void 0,t)}function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!1,t)}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!0,t)}function i(t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;++n)r.push(i(t[n]));return r}if(u(t)){for(var n in r={},t)r[n]=i(t[n]);return r}return t}function u(t){return t&&"object"==typeof t&&!Array.isArray(t)}function s(t,r){if(!u(t))return r;for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=u(t[n])&&u(r[n])?s(t[n],r[n]):r[n]);return t}function a(t,r,n){var e;!t&&u(e=n.shift())||(e={});for(var o=0;o<n.length;++o){var a=n[o];if(u(a))for(var c in a)if("__proto__"!==c&&"constructor"!==c&&"prototype"!==c){var f=t?i(a[c]):a[c];e[c]=r?s(e[c],f):f}}return e}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=r.clone=r.recursive=r.merge=r.main=void 0,t.exports=r=n,r.default=n,r.main=n,n.clone=i,n.isPlainObject=u,n.recursive=o,r.merge=e,r.recursive=o,r.clone=i,r.isPlainObject=u}(lt,lt.exports)),lt.exports),Dn=b(Hn);function Gn(){if(ht)return pt;ht=1;var t=K(),r=M();return pt=function(n){return"symbol"==typeof n||r(n)&&"[object Symbol]"==t(n)}}function Ln(){if(_t)return Rt;_t=1;var t,r=function(){if(bt)return mt;bt=1;var t=L()["__core-js_shared__"];return mt=t}(),n=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Rt=function(t){return!!n&&n in t}}function $n(){if(Nt)return wt;Nt=1;var t=function(){if(gt)return dt;gt=1;var t=K(),r=ut();return dt=function(n){if(!r(n))return!1;var e=t(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}(),r=Ln(),n=ut(),e=function(){if(Et)return Ot;Et=1;var t=Function.prototype.toString;return Ot=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,s=i.toString,a=u.hasOwnProperty,c=RegExp("^"+s.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return wt=function(i){return!(!n(i)||r(i))&&(t(i)?c:o).test(e(i))}}function Kn(){if(xt)return St;xt=1;var t=$n(),r=jt?kt:(jt=1,kt=function(t,r){return null==t?void 0:t[r]});return St=function(n,e){var o=r(n,e);return t(o)?o:void 0}}function Wn(){if(Pt)return Tt;Pt=1;var t=Kn()(Object,"create");return Tt=t}function Mn(){if(Gt)return Dt;Gt=1;var t=function(){if(Ct)return At;Ct=1;var t=Wn();return At=function(){this.__data__=t?t(null):{},this.size=0}}(),r=qt?Ut:(qt=1,Ut=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}),n=function(){if(It)return Bt;It=1;var t=Wn(),r=Object.prototype.hasOwnProperty;return Bt=function(n){var e=this.__data__;if(t){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(e,n)?e[n]:void 0}}(),e=function(){if(Vt)return zt;Vt=1;var t=Wn(),r=Object.prototype.hasOwnProperty;return zt=function(n){var e=this.__data__;return t?void 0!==e[n]:r.call(e,n)}}(),o=function(){if(Ht)return Ft;Ht=1;var t=Wn();return Ft=function(r,n){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Dt=i}function Jn(){if(Wt)return Kt;return Wt=1,Kt=function(t,r){return t===r||t!=t&&r!=r}}function Qn(){if(Jt)return Mt;Jt=1;var t=Jn();return Mt=function(r,n){for(var e=r.length;e--;)if(t(r[e][0],n))return e;return-1}}function Yn(){if(ir)return or;ir=1;var t=$t?Lt:($t=1,Lt=function(){this.__data__=[],this.size=0}),r=function(){if(Yt)return Qt;Yt=1;var t=Qn(),r=Array.prototype.splice;return Qt=function(n){var e=this.__data__,o=t(e,n);return!(o<0||(o==e.length-1?e.pop():r.call(e,o,1),--this.size,0))}}(),n=function(){if(Xt)return Zt;Xt=1;var t=Qn();return Zt=function(r){var n=this.__data__,e=t(n,r);return e<0?void 0:n[e][1]}}(),e=function(){if(rr)return tr;rr=1;var t=Qn();return tr=function(r){return t(this.__data__,r)>-1}}(),o=function(){if(er)return nr;er=1;var t=Qn();return nr=function(r,n){var e=this.__data__,o=t(e,r);return o<0?(++this.size,e.push([r,n])):e[o][1]=n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,or=i}function Zn(){if(cr)return ar;cr=1;var t=Mn(),r=Yn(),n=function(){if(sr)return ur;sr=1;var t=Kn()(L(),"Map");return ur=t}();return ar=function(){this.size=0,this.__data__={hash:new t,map:new(n||r),string:new t}}}function Xn(){if(hr)return pr;hr=1;var t=lr?fr:(lr=1,fr=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t});return pr=function(r,n){var e=r.__data__;return t(n)?e["string"==typeof n?"string":"hash"]:e.map}}function te(){if(Er)return Or;Er=1;var t=Zn(),r=function(){if(yr)return vr;yr=1;var t=Xn();return vr=function(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}}(),n=function(){if(gr)return dr;gr=1;var t=Xn();return dr=function(r){return t(this,r).get(r)}}(),e=function(){if(br)return mr;br=1;var t=Xn();return mr=function(r){return t(this,r).has(r)}}(),o=function(){if(_r)return Rr;_r=1;var t=Xn();return Rr=function(r,n){var e=t(this,r),o=e.size;return e.set(r,n),this.size+=e.size==o?0:1,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Or=i}function re(){if(jr)return kr;jr=1;var t=function(){if(Nr)return wr;Nr=1;var t=te();function r(n,e){if("function"!=typeof n||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=e?e.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=n.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,wr=r}();return kr=function(r){var n=t(r,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}}function ne(){if(Cr)return Ar;Cr=1;var t=$(),r=Pr?Tr:(Pr=1,Tr=function(t,r){for(var n=-1,e=null==t?0:t.length,o=Array(e);++n<e;)o[n]=r(t[n],n,t);return o}),n=tt(),e=Gn(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Ar=function t(o){if("string"==typeof o)return o;if(n(o))return r(o,t)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},Ar}function ee(){if(Ir)return Br;Ir=1;var t=tt(),r=function(){if(yt)return vt;yt=1;var t=tt(),r=Gn(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e=/^\w*$/;return vt=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!r(o))||e.test(o)||!n.test(o)||null!=i&&o in Object(i)}}(),n=function(){if(xr)return Sr;xr=1;var t=re(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,e=t((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,r,o,i){e.push(o?i.replace(n,"$1"):r||t)})),e}));return Sr=e}(),e=function(){if(qr)return Ur;qr=1;var t=ne();return Ur=function(r){return null==r?"":t(r)}}();return Br=function(o,i){return t(o)?o:r(o,i)?[o]:n(e(o))}}function oe(){if(Vr)return zr;Vr=1;var t=Gn();return zr=function(r){if("string"==typeof r||t(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}}function ie(){if(Gr)return Dr;Gr=1;var t=Kn(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Dr=r}function ue(){if(Wr)return Kr;Wr=1;var t=function(){if($r)return Lr;$r=1;var t=ie();return Lr=function(r,n,e){"__proto__"==n&&t?t(r,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[n]=e}}(),r=Jn(),n=Object.prototype.hasOwnProperty;return Kr=function(e,o,i){var u=e[o];n.call(e,o)&&r(u,i)&&(void 0!==i||o in e)||t(e,o,i)}}function se(){if(Jr)return Mr;Jr=1;var t=/^(?:0|[1-9]\d*)$/;return Mr=function(r,n){var e=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&t.test(r))&&r>-1&&r%1==0&&r<n}}function ae(){if(Xr)return Zr;Xr=1;var t=function(){if(Hr)return Fr;Hr=1;var t=ee(),r=oe();return Fr=function(n,e){for(var o=0,i=(e=t(e,n)).length;null!=n&&o<i;)n=n[r(e[o++])];return o&&o==i?n:void 0}}(),r=function(){if(Yr)return Qr;Yr=1;var t=ue(),r=ee(),n=se(),e=ut(),o=oe();return Qr=function(i,u,s,a){if(!e(i))return i;for(var c=-1,f=(u=r(u,i)).length,l=f-1,p=i;null!=p&&++c<f;){var h=o(u[c]),v=s;if("__proto__"===h||"constructor"===h||"prototype"===h)return i;if(c!=l){var y=p[h];void 0===(v=a?a(y,h,p):void 0)&&(v=e(y)?y:n(u[c+1])?[]:{})}t(p,h,v),p=p[h]}return i}}(),n=ee();return Zr=function(e,o,i){for(var u=-1,s=o.length,a={};++u<s;){var c=o[u],f=t(e,c);i(f,c)&&r(a,n(c,e),f)}return a}}function ce(){if(un)return on;un=1;var t=function(){if(en)return nn;en=1;var t=K(),r=M();return nn=function(n){return r(n)&&"[object Arguments]"==t(n)}}(),r=M(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return r(t)&&e.call(t,"callee")&&!o.call(t,"callee")};return on=i}function fe(){if(fn)return cn;fn=1;var t=ee(),r=ce(),n=tt(),e=se(),o=an?sn:(an=1,sn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}),i=oe();return cn=function(u,s,a){for(var c=-1,f=(s=t(s,u)).length,l=!1;++c<f;){var p=i(s[c]);if(!(l=null!=u&&a(u,p)))break;u=u[p]}return l||++c!=f?l:!!(f=null==u?0:u.length)&&o(f)&&e(p,f)&&(n(u)||r(u))}}function le(){if(pn)return ln;pn=1;var t=rn?tn:(rn=1,tn=function(t,r){return null!=t&&r in Object(t)}),r=fe();return ln=function(n,e){return null!=n&&r(n,e,t)}}function pe(){if(Rn)return bn;Rn=1;var t=dn?yn:(dn=1,yn=function(t,r){for(var n=-1,e=r.length,o=t.length;++n<e;)t[o+n]=r[n];return t}),r=function(){if(mn)return gn;mn=1;var t=$(),r=ce(),n=tt(),e=t?t.isConcatSpreadable:void 0;return gn=function(t){return n(t)||r(t)||!!(e&&t&&t[e])}}();return bn=function n(e,o,i,u,s){var a=-1,c=e.length;for(i||(i=r),s||(s=[]);++a<c;){var f=e[a];o>0&&i(f)?o>1?n(f,o-1,i,u,s):t(s,f):u||(s[s.length]=f)}return s},bn}function he(){if(kn)return Nn;kn=1;var t=wn?En:(wn=1,En=function(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}),r=Math.max;return Nn=function(n,e,o){return e=r(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,s=r(i.length-e,0),a=Array(s);++u<s;)a[u]=i[e+u];u=-1;for(var c=Array(e+1);++u<e;)c[u]=i[u];return c[e]=o(a),t(n,this,c)}},Nn}function ve(){if(An)return Pn;An=1;var t=Sn?jn:(Sn=1,jn=function(t){return function(){return t}}),r=ie(),n=Tn?xn:(Tn=1,xn=function(t){return t});return Pn=r?function(n,e){return r(n,"toString",{configurable:!0,enumerable:!1,value:t(e),writable:!0})}:n}function ye(){if(Bn)return qn;Bn=1;var t=ve(),r=function(){if(Un)return Cn;Un=1;var t=Date.now;return Cn=function(r){var n=0,e=0;return function(){var o=t(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return r.apply(void 0,arguments)}},Cn}(),n=r(t);return qn=n}function de(){if(zn)return In;zn=1;var t=function(){if(On)return _n;On=1;var t=pe();return _n=function(r){return null!=r&&r.length?t(r,1):[]}}(),r=he(),n=ye();return In=function(e){return n(r(e,void 0,t),e+"")}}var ge,me=function(){if(Fn)return Vn;Fn=1;var t=function(){if(vn)return hn;vn=1;var t=ae(),r=le();return hn=function(n,e){return t(n,e,(function(t,e){return r(n,e)}))}}(),r=de()((function(r,n){return null==r?{}:t(r,n)}));return Vn=r}(),be=b(me),Re=["cache","credentials","headers","integrity","keepalive","mode","priority","redirect","referrer","referrerPolicy","signal"],_e=function(){function t(t){if(void 0===t&&(t={}),!t.fetcher){if("function"!=typeof fetch)throw new a(s.ENV_FETCH_NOT_SUPPORT);t.fetcher=fetch}this.executor=new v,this.config=t}return t.prototype.getConfig=function(){return this.config},t.prototype.usePlugin=function(t){this.executor.use(t)},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){var r,n,e,u,c,f=this;return i(this,(function(l){if(r=this.getConfig(),n=Hn.merge({},r,t),e=n.fetcher,u=function(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}(n,["fetcher"]),"function"!=typeof e)throw new a(s.FETCHER_NONE);if(!u.url)throw new a(s.URL_NONE);return c=function(t){return o(f,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return[4,e(this.parametersToRequest(t.parameters))];case 1:return r=n.sent(),[2,this.toAdapterResponse(r,r,t.parameters)]}}))}))},[2,this.executor.exec(u,c)]}))}))},t.prototype.parametersToRequest=function(t){var r=t.url,n=void 0===r?"/":r,e=t.method,o=void 0===e?"GET":e,i=t.data,u=be(t,Re);return new Request(n,Object.assign(u,{body:i,method:o.toUpperCase()}))},t.prototype.toAdapterResponse=function(t,r,n){return{data:t,status:r.status,statusText:r.statusText,headers:this.getResponseHeaders(r),config:n,response:r}},t.prototype.getResponseHeaders=function(t){var r={};return t.headers.forEach((function(t,n){r[n]=t})),r},t}(),Oe=function(){function t(t,r){void 0===r&&(r={}),this.config=r,this.axiosInstance=t.create(r)}return t.prototype.getConfig=function(){return this.config},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.axiosInstance.request(t)]}))}))},t}(),Ee=function(){function t(){this.pluginName="FetchAbortPlugin",this.onlyOne=!0,this.controllers=new Map}return t.prototype.generateRequestKey=function(t){if(t.requestId)return t.requestId;var r=t.params?JSON.stringify(t.params):"",n=t.body?JSON.stringify(t.body):"";return"".concat(t.method||"GET","-").concat(t.url,"-").concat(r,"-").concat(n)},t.prototype.onBefore=function(t){var r=this.generateRequestKey(t.parameters);if(this.controllers.has(r)&&this.abort(t.parameters),!t.parameters.signal){var n=new AbortController;this.controllers.set(r,n),t.parameters.signal=n.signal}},t.prototype.onSuccess=function(t){var r=t.parameters;r&&this.controllers.delete(this.generateRequestKey(r))},t.prototype.onError=function(t){var r=t.error,n=t.parameters;if(this.isSameAbortError(r)&&n){var e=this.generateRequestKey(n),o=this.controllers.get(e);return this.controllers.delete(e),new c(s.ABORT_ERROR,(null==o?void 0:o.signal.reason)||r)}},t.prototype.isSameAbortError=function(t){return t instanceof Error&&"AbortError"===t.name||(t instanceof DOMException&&"AbortError"===t.name||t instanceof Event&&"abort"===t.type)},t.prototype.abort=function(t){var r="string"==typeof t?t:this.generateRequestKey(t),n=this.controllers.get(r);n&&(n.abort(new c(s.ABORT_ERROR,"The operation was aborted")),this.controllers.delete(r),"string"!=typeof t&&"function"==typeof t.onAbort&&t.onAbort.call(t,t))},t.prototype.abortAll=function(){this.controllers.forEach((function(t){return t.abort()})),this.controllers.clear()},t}(),we=function(){function t(){this.pluginName="FetchURLPlugin"}return t.prototype.isFullURL=function(t){return t.startsWith("http://")||t.startsWith("https://")},t.prototype.appendQueryParams=function(t,r){void 0===r&&(r={});var n=t.split("?"),e=n[0],o=n[1];(void 0===o?"":o).split("&").forEach((function(t){var n=t.split("="),e=n[0],o=n[1];e&&o&&(r[e]=o)}));var i=Object.entries(r).map((function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)})).join("&");return[e,i].join("?")},t.prototype.connectBaseURL=function(t,r){return"".concat(r,"/").concat(t)},t.prototype.buildUrl=function(t){var r=t.url,n=void 0===r?"":r,e=t.baseURL,o=void 0===e?"":e,i=t.params;if(!this.isFullURL(n)){var u=n.startsWith("/")?n.slice(1):n,s=o.endsWith("/")?o.slice(0,-1):o;n=this.connectBaseURL(u,s)}return i&&Object.keys(i).length>0&&(n=this.appendQueryParams(n,i)),n},t.prototype.onBefore=function(t){var r=t.parameters;r.url=this.buildUrl(r)},t.prototype.onSuccess=function(t){var r=t.returnValue;if(!r.response.ok){var n=new c(s.RESPONSE_NOT_OK,"Request failed with status: ".concat(r.status," ").concat(r.statusText));throw n.response=r.response,n}},t.prototype.onError=function(t){var r=t.error;return r instanceof c?r:new c(s.REQUEST_ERROR,r)},t}(),Ne=function(){function t(t){this.adapter=t,this.executor=new v}return t.prototype.usePlugin=function(t){return this.executor.use(t),this},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){var r,n,e=this;return i(this,(function(o){return r=this.adapter.getConfig(),n=Dn({},r,t),[2,this.executor.exec(n,(function(t){return e.adapter.request(t.parameters)}))]}))}))},t.prototype.get=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"GET"}))]}))}))},t.prototype.post=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"POST"}))]}))}))},t.prototype.put=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"PUT"}))]}))}))},t.prototype.delete=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"DELETE"}))]}))}))},t.prototype.patch=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"PATCH"}))]}))}))},t.prototype.head=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"HEAD"}))]}))}))},t.prototype.options=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"OPTIONS"}))]}))}))},t.prototype.trace=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"TRACE"}))]}))}))},t.prototype.connect=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"CONNECT"}))]}))}))},t}(),ke=function(){function t(t){void 0===t&&(t={}),this.options=t,this[ge]="JSONSerializer"}return t.prototype.createReplacer=function(t){return Array.isArray(t)?t:null===t?function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}:"function"==typeof t?function(r,n){var e="string"==typeof n?n.replace(/\r\n/g,"\n"):n;return t.call(this,r,e)}:function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}},t.prototype.stringify=function(t,r,n){try{var e=this.createReplacer(r);return Array.isArray(e)?JSON.stringify(t,e,n):JSON.stringify(t,e,null!=n?n:this.options.pretty?this.options.indent||2:void 0)}catch(t){if(t instanceof TypeError&&t.message.includes("circular"))throw new TypeError("Cannot stringify data with circular references");throw t}},t.prototype.parse=function(t,r){return JSON.parse(t,r)},t.prototype.serialize=function(t){return this.stringify(t,this.options.replacer||null,this.options.pretty?this.options.indent||2:void 0)},t.prototype.deserialize=function(t,r){try{return this.parse(t)}catch(t){return r}},t.prototype.serializeArray=function(t){return"["+t.map((function(t){return JSON.stringify(t)})).join(",")+"]"},t}();ge=Symbol.toStringTag;var je=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.serialize=function(t){var r=Buffer.from(t,"utf8").toString("base64");return this.options.urlSafe?this.makeUrlSafe(r):r},t.prototype.deserialize=function(t,r){try{return/^[A-Za-z0-9+/]*={0,2}$/.test(t)?(this.options.urlSafe&&(t=this.makeUrlUnsafe(t)),Buffer.from(t,"base64").toString("utf8")):null!=r?r:""}catch(t){return null!=r?r:""}},t.prototype.makeUrlSafe=function(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.prototype.makeUrlUnsafe=function(t){for(t=t.replace(/-/g,"+").replace(/_/g,"/");t.length%4;)t+="=";return t},t}(),Se=function(){function t(t,r){void 0===r&&(r=new ke),this.storage=t,this.serializer=r,this.store={}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.storage?this.storage.length:Object.keys(this.store).length},enumerable:!1,configurable:!0}),t.prototype.setItem=function(t,r,n){var e={key:t,value:r,expire:n};"number"==typeof n&&n>0&&(e.expire=n);var o=this.serializer.serialize(e);this.storage?this.storage.setItem(t,o):this.store[t]=o},t.prototype.getItem=function(t,r){var n,e=this.storage?this.storage.getItem(t):this.store[t],o=null!=r?r:null;if(!e)return o;var i=this.serializer.deserialize(e,o);return"object"==typeof i?"number"==typeof i.expire&&i.expire<Date.now()?(this.removeItem(t),o):null!==(n=null==i?void 0:i.value)&&void 0!==n?n:o:o},t.prototype.removeItem=function(t){this.storage?this.storage.removeItem(t):delete this.store[t]},t.prototype.clear=function(){this.storage?this.storage.clear():this.store={}},t}();export{v as AsyncExecutor,je as Base64Serializer,t as Executor,a as ExecutorError,Ee as FetchAbortPlugin,we as FetchURLPlugin,ke as JSONSerializer,Se as JSONStorage,ct as LEVELS,ft as Logger,Oe as RequestAdapterAxios,_e as RequestAdapterFetch,c as RequestError,s as RequestErrorID,Ne as RequestScheduler,g as RetryPlugin,y as SyncExecutor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).FeUtilsCommon={})}(this,(function(t){"use strict";var r=function(){function t(t){this.config=t,this.plugins=[]}return t.prototype.use=function(t){this.plugins.find((function(r){return r===t||r.pluginName===t.pluginName||r.constructor===t.constructor}))&&t.onlyOne?console.warn("Plugin ".concat(t.pluginName," is already used, skip adding")):this.plugins.push(t)},t}(),n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},n(t,r)};function e(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var o=function(){return o=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},o.apply(this,arguments)};function i(t,r,n,e){return new(n||(n=Promise))((function(o,i){function u(t){try{a(e.next(t))}catch(t){i(t)}}function s(t){try{a(e.throw(t))}catch(t){i(t)}}function a(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,s)}a((e=e.apply(t,r||[])).next())}))}function u(t,r){var n,e,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,e&&(o=2&s[0]?e.return:s[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,s[1])).done)return o;switch(e=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,e=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(t,i)}catch(t){s=[6,t],e=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function s(t,r,n){if(n||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var a,c=function(t){function r(r,n){var e=this.constructor,o=t.call(this,n instanceof Error?n.message:n||r)||this;return o.id=r,n instanceof Error&&"stack"in n&&(o.stack=n.stack),Object.setPrototypeOf(o,e.prototype),o}return e(r,t),r}(Error),f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r}(c);t.RequestErrorID=void 0,(a=t.RequestErrorID||(t.RequestErrorID={})).REQUEST_ERROR="REQUEST_ERROR",a.ENV_FETCH_NOT_SUPPORT="ENV_FETCH_NOT_SUPPORT",a.FETCHER_NONE="FETCHER_NONE",a.RESPONSE_NOT_OK="RESPONSE_NOT_OK",a.ABORT_ERROR="ABORT_ERROR",a.URL_NONE="URL_NONE";var l,p,h,v,y=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.runHooks=function(t,r,n){for(var e=[],o=3;o<arguments.length;o++)e[o-3]=arguments[o];return i(this,void 0,void 0,(function(){var o,i,a,c,f,l,p,h;return u(this,(function(u){switch(u.label){case 0:o=-1,(a=n||{parameters:void 0,hooksRuntimes:{}}).hooksRuntimes.times=0,a.hooksRuntimes.index=void 0,c=0,f=t,u.label=1;case 1:return c<f.length?(l=f[c],o++,"function"!=typeof l[r]||"function"==typeof l.enabled&&!l.enabled(r,n)?[3,3]:(null===(h=a.hooksRuntimes)||void 0===h?void 0:h.breakChain)?[3,4]:(a.hooksRuntimes.pluginName=l.pluginName,a.hooksRuntimes.hookName=r,a.hooksRuntimes.times++,a.hooksRuntimes.index=o,[4,l[r].apply(l,s([n],e,!1))])):[3,4];case 2:if(void 0!==(p=u.sent())&&(i=p,a.hooksRuntimes.returnValue=p,a.hooksRuntimes.returnBreakChain))return[2,i];u.label=3;case 3:return c++,[3,1];case 4:return[2,i]}}))}))},r.prototype.execNoError=function(t,r){return i(this,void 0,void 0,(function(){var n;return u(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.exec(t,r)];case 1:return[2,e.sent()];case 2:return(n=e.sent())instanceof c?[2,n]:[2,new c("UNKNOWN_ASYNC_ERROR",n)];case 3:return[2]}}))}))},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a async function!");return this.run(e,n)},r.prototype.run=function(t,r){return i(this,void 0,void 0,(function(){var n,e,o,s=this;return u(this,(function(a){switch(a.label){case 0:n={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}},e=function(t){return i(s,void 0,void 0,(function(){var n;return u(this,(function(e){switch(e.label){case 0:return[4,this.runHooks(this.plugins,"onExec",t,r)];case 1:return e.sent(),0!==t.hooksRuntimes.times?[3,3]:(n=t,[4,r(t)]);case 2:return n.returnValue=e.sent(),[2];case 3:return t.returnValue=t.hooksRuntimes.returnValue,[2]}}))}))},a.label=1;case 1:return a.trys.push([1,5,7,8]),[4,this.runHooks(this.plugins,"onBefore",n)];case 2:return a.sent(),[4,e(n)];case 3:return a.sent(),[4,this.runHooks(this.plugins,"onSuccess",n)];case 4:return a.sent(),[2,n.returnValue];case 5:return o=a.sent(),n.error=o,[4,this.runHooks(this.plugins,"onError",n)];case 6:if(a.sent(),n.hooksRuntimes.returnValue&&(n.error=n.hooksRuntimes.returnValue),n.error instanceof c)throw n.error;throw new c("UNKNOWN_ASYNC_ERROR",n.error);case 7:return n.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0},[7];case 8:return[2]}}))}))},r}(r),d=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.runHooks=function(t,r,n){for(var e,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var u,a=-1,c=n||{parameters:void 0,hooksRuntimes:{}};c.hooksRuntimes.times=0,c.hooksRuntimes.index=void 0;for(var f=0,l=t;f<l.length;f++){var p=l[f];if(a++,"function"==typeof p[r]&&("function"!=typeof p.enabled||p.enabled(r,c))){if(null===(e=c.hooksRuntimes)||void 0===e?void 0:e.breakChain)break;c.hooksRuntimes.pluginName=p.pluginName,c.hooksRuntimes.hookName=r,c.hooksRuntimes.times++,c.hooksRuntimes.index=a;var h=p[r].apply(p,s([n],o,!1));if(void 0!==h&&(u=h,c.hooksRuntimes.returnValue=h,c.hooksRuntimes.returnBreakChain))return u}}return u},r.prototype.execNoError=function(t,r){try{return this.exec(t,r)}catch(t){return t instanceof c?t:new c("UNKNOWN_SYNC_ERROR",t)}},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a function!");return this.run(e,n)},r.prototype.run=function(t,r){var n,e=this,o={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}};try{return this.runHooks(this.plugins,"onBefore",o),n=o,e.runHooks(e.plugins,"onExec",n,r),n.returnValue=n.hooksRuntimes.times?n.hooksRuntimes.returnValue:r(n),this.runHooks(this.plugins,"onSuccess",o),o.returnValue}catch(t){if(o.error=t,this.runHooks(this.plugins,"onError",o),o.hooksRuntimes.returnValue&&(o.error=o.hooksRuntimes.returnValue),o.error instanceof c)throw o.error;throw new c("UNKNOWN_SYNC_ERROR",o.error)}finally{o.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}}},r}(r),g=function(){return!0},m=function(){function t(t){var r;void 0===t&&(t={}),this.pluginName="RetryPlugin",this.onlyOne=!0,this.options=o(o({retryDelay:1e3,useExponentialBackoff:!1,shouldRetry:g},t),{maxRetries:Math.min(Math.max(1,null!==(r=t.maxRetries)&&void 0!==r?r:3),16)})}return t.prototype.delay=function(t){return i(this,void 0,void 0,(function(){var r;return u(this,(function(n){return r=this.options.useExponentialBackoff?this.options.retryDelay*Math.pow(2,t):this.options.retryDelay,[2,new Promise((function(t){return setTimeout(t,r)}))]}))}))},t.prototype.onExec=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return this.options.maxRetries<1?[2,r(t)]:[2,this.retry(r,t,this.options,this.options.maxRetries)]}))}))},t.prototype.shouldRetry=function(t){var r=t.error;return t.retryCount>0&&this.options.shouldRetry(r)},t.prototype.retry=function(t,r,n,e){return i(this,void 0,void 0,(function(){var o;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,t(r)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),!this.shouldRetry({error:o,retryCount:e}))throw new c("RETRY_ERROR","All ".concat(n.maxRetries," attempts failed: ").concat(o.message));return[4,this.delay(n.maxRetries-e)];case 3:return i.sent(),e--,[2,this.retry(t,r,n,e)];case 4:return[2]}}))}))},t}(),b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _,O,E=R(v?h:(v=1,h=p?l:(p=1,l=function(t){return t&&t.length?t[0]:void 0})));var w,N,k,S,x,j,T,A,P,C,q,U,I,D,z,B,F,V,H,L,G=R(O?_:(O=1,_=function(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}));function $(){if(S)return k;S=1;var t=function(){if(N)return w;N=1;var t="object"==typeof b&&b&&b.Object===Object&&b;return w=t}(),r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")();return k=n}function K(){if(j)return x;j=1;var t=$().Symbol;return x=t}function W(){if(U)return q;U=1;var t=K(),r=function(){if(A)return T;A=1;var t=K(),r=Object.prototype,n=r.hasOwnProperty,e=r.toString,o=t?t.toStringTag:void 0;return T=function(t){var r=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var s=e.call(t);return u&&(r?t[o]=i:delete t[o]),s}}(),n=function(){if(C)return P;C=1;var t=Object.prototype.toString;return P=function(r){return t.call(r)}}(),e=t?t.toStringTag:void 0;return q=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":e&&e in Object(t)?r(t):n(t)}}function J(){if(B)return z;B=1;var t=(D?I:(D=1,I=function(t,r){return function(n){return t(r(n))}}))(Object.getPrototypeOf,Object);return z=t}function M(){if(V)return F;return V=1,F=function(t){return null!=t&&"object"==typeof t}}var Q,Y,Z,X,tt=R(function(){if(L)return H;L=1;var t=W(),r=J(),n=M(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,s=i.call(Object);return H=function(e){if(!n(e)||"[object Object]"!=t(e))return!1;var o=r(e);if(null===o)return!0;var a=u.call(o,"constructor")&&o.constructor;return"function"==typeof a&&a instanceof a&&i.call(a)==s}}());function rt(){if(Y)return Q;Y=1;var t=Array.isArray;return Q=t}var nt,et,ot=function(){if(X)return Z;X=1;var t=W(),r=rt(),n=M();return Z=function(e){return"string"==typeof e||!r(e)&&n(e)&&"[object String]"==t(e)}}(),it=R(ot),ut=R(rt());function st(){if(et)return nt;return et=1,nt=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}var at,ct=R(st()),ft={LOG:"LOG",INFO:"INFO",ERROR:"ERROR",WARN:"WARN",DEBUG:"DEBUG"},lt=function(){function t(t){var r=void 0===t?{}:t,n=r.isCI,e=void 0!==n&&n,o=r.dryRun,i=void 0!==o&&o,u=r.debug,s=void 0!==u&&u,a=r.silent,c=void 0!==a&&a;this.isCI=e,this.isDryRun=i,this.isDebug=s,this.isSilent=c}return t.prototype.print=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.isSilent||console.log.apply(console,r)},t.prototype.prefix=function(t,r){return t},t.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.LOG],t,!1))},t.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.INFO,this.prefix(ft.INFO)],t,!1))},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.WARN,this.prefix(ft.WARN)],t,!1))},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.ERROR,this.prefix(ft.ERROR)],t,!1))},t.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDebug){var n=E(t),e=ct(n)?JSON.stringify(n):String(n);this.print.apply(this,s([ft.DEBUG,this.prefix(ft.DEBUG),e],t.slice(1),!1))}},t.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isDebug&&this.print.apply(this,s([ft.DEBUG],t,!1))},t.prototype.exec=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=tt(G(t))?G(t):void 0,e=n||{},o=e.isDryRun,i=e.isExternal;if(o||this.isDryRun){var u=[null==i?"$":"!",t.slice(0,null==n?void 0:-1).map((function(t){return it(t)?t:ut(t)?t.join(" "):String(t)})).join(" ")].join(" ").trim();this.log(u)}},t.prototype.obtrusive=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isCI||this.log(),this.log.apply(this,t),this.isCI||this.log()},t}(),pt={exports:{}};var ht,vt,yt,dt,gt,mt,bt,Rt,_t,Ot,Et,wt,Nt,kt,St,xt,jt,Tt,At,Pt,Ct,qt,Ut,It,Dt,zt,Bt,Ft,Vt,Ht,Lt,Gt,$t,Kt,Wt,Jt,Mt,Qt,Yt,Zt,Xt,tr,rr,nr,er,or,ir,ur,sr,ar,cr,fr,lr,pr,hr,vr,yr,dr,gr,mr,br,Rr,_r,Or,Er,wr,Nr,kr,Sr,xr,jr,Tr,Ar,Pr,Cr,qr,Ur,Ir,Dr,zr,Br,Fr,Vr,Hr,Lr,Gr,$r,Kr,Wr,Jr,Mr,Qr,Yr,Zr,Xr,tn,rn,nn,en,on,un,sn,an,cn,fn,ln,pn,hn,vn,yn,dn,gn,mn,bn,Rn,_n,On,En,wn,Nn,kn,Sn,xn,jn,Tn,An,Pn,Cn,qn,Un,In,Dn,zn,Bn,Fn,Vn,Hn=(at||(at=1,function(t,r){function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.apply(void 0,t)}function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!1,t)}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!0,t)}function i(t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;++n)r.push(i(t[n]));return r}if(u(t)){for(var n in r={},t)r[n]=i(t[n]);return r}return t}function u(t){return t&&"object"==typeof t&&!Array.isArray(t)}function s(t,r){if(!u(t))return r;for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=u(t[n])&&u(r[n])?s(t[n],r[n]):r[n]);return t}function a(t,r,n){var e;!t&&u(e=n.shift())||(e={});for(var o=0;o<n.length;++o){var a=n[o];if(u(a))for(var c in a)if("__proto__"!==c&&"constructor"!==c&&"prototype"!==c){var f=t?i(a[c]):a[c];e[c]=r?s(e[c],f):f}}return e}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=r.clone=r.recursive=r.merge=r.main=void 0,t.exports=r=n,r.default=n,r.main=n,n.clone=i,n.isPlainObject=u,n.recursive=o,r.merge=e,r.recursive=o,r.clone=i,r.isPlainObject=u}(pt,pt.exports)),pt.exports),Ln=R(Hn);function Gn(){if(vt)return ht;vt=1;var t=W(),r=M();return ht=function(n){return"symbol"==typeof n||r(n)&&"[object Symbol]"==t(n)}}function $n(){if(Ot)return _t;Ot=1;var t,r=function(){if(Rt)return bt;Rt=1;var t=$()["__core-js_shared__"];return bt=t}(),n=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return _t=function(t){return!!n&&n in t}}function Kn(){if(kt)return Nt;kt=1;var t=function(){if(mt)return gt;mt=1;var t=W(),r=st();return gt=function(n){if(!r(n))return!1;var e=t(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}(),r=$n(),n=st(),e=function(){if(wt)return Et;wt=1;var t=Function.prototype.toString;return Et=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,s=i.toString,a=u.hasOwnProperty,c=RegExp("^"+s.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Nt=function(i){return!(!n(i)||r(i))&&(t(i)?c:o).test(e(i))}}function Wn(){if(Tt)return jt;Tt=1;var t=Kn(),r=xt?St:(xt=1,St=function(t,r){return null==t?void 0:t[r]});return jt=function(n,e){var o=r(n,e);return t(o)?o:void 0}}function Jn(){if(Pt)return At;Pt=1;var t=Wn()(Object,"create");return At=t}function Mn(){if(Gt)return Lt;Gt=1;var t=function(){if(qt)return Ct;qt=1;var t=Jn();return Ct=function(){this.__data__=t?t(null):{},this.size=0}}(),r=It?Ut:(It=1,Ut=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}),n=function(){if(zt)return Dt;zt=1;var t=Jn(),r=Object.prototype.hasOwnProperty;return Dt=function(n){var e=this.__data__;if(t){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(e,n)?e[n]:void 0}}(),e=function(){if(Ft)return Bt;Ft=1;var t=Jn(),r=Object.prototype.hasOwnProperty;return Bt=function(n){var e=this.__data__;return t?void 0!==e[n]:r.call(e,n)}}(),o=function(){if(Ht)return Vt;Ht=1;var t=Jn();return Vt=function(r,n){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Lt=i}function Qn(){if(Jt)return Wt;return Jt=1,Wt=function(t,r){return t===r||t!=t&&r!=r}}function Yn(){if(Qt)return Mt;Qt=1;var t=Qn();return Mt=function(r,n){for(var e=r.length;e--;)if(t(r[e][0],n))return e;return-1}}function Zn(){if(ur)return ir;ur=1;var t=Kt?$t:(Kt=1,$t=function(){this.__data__=[],this.size=0}),r=function(){if(Zt)return Yt;Zt=1;var t=Yn(),r=Array.prototype.splice;return Yt=function(n){var e=this.__data__,o=t(e,n);return!(o<0||(o==e.length-1?e.pop():r.call(e,o,1),--this.size,0))}}(),n=function(){if(tr)return Xt;tr=1;var t=Yn();return Xt=function(r){var n=this.__data__,e=t(n,r);return e<0?void 0:n[e][1]}}(),e=function(){if(nr)return rr;nr=1;var t=Yn();return rr=function(r){return t(this.__data__,r)>-1}}(),o=function(){if(or)return er;or=1;var t=Yn();return er=function(r,n){var e=this.__data__,o=t(e,r);return o<0?(++this.size,e.push([r,n])):e[o][1]=n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,ir=i}function Xn(){if(fr)return cr;fr=1;var t=Mn(),r=Zn(),n=function(){if(ar)return sr;ar=1;var t=Wn()($(),"Map");return sr=t}();return cr=function(){this.size=0,this.__data__={hash:new t,map:new(n||r),string:new t}}}function te(){if(vr)return hr;vr=1;var t=pr?lr:(pr=1,lr=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t});return hr=function(r,n){var e=r.__data__;return t(n)?e["string"==typeof n?"string":"hash"]:e.map}}function re(){if(wr)return Er;wr=1;var t=Xn(),r=function(){if(dr)return yr;dr=1;var t=te();return yr=function(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}}(),n=function(){if(mr)return gr;mr=1;var t=te();return gr=function(r){return t(this,r).get(r)}}(),e=function(){if(Rr)return br;Rr=1;var t=te();return br=function(r){return t(this,r).has(r)}}(),o=function(){if(Or)return _r;Or=1;var t=te();return _r=function(r,n){var e=t(this,r),o=e.size;return e.set(r,n),this.size+=e.size==o?0:1,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Er=i}function ne(){if(xr)return Sr;xr=1;var t=function(){if(kr)return Nr;kr=1;var t=re();function r(n,e){if("function"!=typeof n||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=e?e.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=n.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,Nr=r}();return Sr=function(r){var n=t(r,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}}function ee(){if(qr)return Cr;qr=1;var t=K(),r=Pr?Ar:(Pr=1,Ar=function(t,r){for(var n=-1,e=null==t?0:t.length,o=Array(e);++n<e;)o[n]=r(t[n],n,t);return o}),n=rt(),e=Gn(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Cr=function t(o){if("string"==typeof o)return o;if(n(o))return r(o,t)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},Cr}function oe(){if(zr)return Dr;zr=1;var t=rt(),r=function(){if(dt)return yt;dt=1;var t=rt(),r=Gn(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e=/^\w*$/;return yt=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!r(o))||e.test(o)||!n.test(o)||null!=i&&o in Object(i)}}(),n=function(){if(Tr)return jr;Tr=1;var t=ne(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,e=t((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,r,o,i){e.push(o?i.replace(n,"$1"):r||t)})),e}));return jr=e}(),e=function(){if(Ir)return Ur;Ir=1;var t=ee();return Ur=function(r){return null==r?"":t(r)}}();return Dr=function(o,i){return t(o)?o:r(o,i)?[o]:n(e(o))}}function ie(){if(Fr)return Br;Fr=1;var t=Gn();return Br=function(r){if("string"==typeof r||t(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}}function ue(){if(Gr)return Lr;Gr=1;var t=Wn(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Lr=r}function se(){if(Jr)return Wr;Jr=1;var t=function(){if(Kr)return $r;Kr=1;var t=ue();return $r=function(r,n,e){"__proto__"==n&&t?t(r,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[n]=e}}(),r=Qn(),n=Object.prototype.hasOwnProperty;return Wr=function(e,o,i){var u=e[o];n.call(e,o)&&r(u,i)&&(void 0!==i||o in e)||t(e,o,i)}}function ae(){if(Qr)return Mr;Qr=1;var t=/^(?:0|[1-9]\d*)$/;return Mr=function(r,n){var e=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&t.test(r))&&r>-1&&r%1==0&&r<n}}function ce(){if(tn)return Xr;tn=1;var t=function(){if(Hr)return Vr;Hr=1;var t=oe(),r=ie();return Vr=function(n,e){for(var o=0,i=(e=t(e,n)).length;null!=n&&o<i;)n=n[r(e[o++])];return o&&o==i?n:void 0}}(),r=function(){if(Zr)return Yr;Zr=1;var t=se(),r=oe(),n=ae(),e=st(),o=ie();return Yr=function(i,u,s,a){if(!e(i))return i;for(var c=-1,f=(u=r(u,i)).length,l=f-1,p=i;null!=p&&++c<f;){var h=o(u[c]),v=s;if("__proto__"===h||"constructor"===h||"prototype"===h)return i;if(c!=l){var y=p[h];void 0===(v=a?a(y,h,p):void 0)&&(v=e(y)?y:n(u[c+1])?[]:{})}t(p,h,v),p=p[h]}return i}}(),n=oe();return Xr=function(e,o,i){for(var u=-1,s=o.length,a={};++u<s;){var c=o[u],f=t(e,c);i(f,c)&&r(a,n(c,e),f)}return a}}function fe(){if(sn)return un;sn=1;var t=function(){if(on)return en;on=1;var t=W(),r=M();return en=function(n){return r(n)&&"[object Arguments]"==t(n)}}(),r=M(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return r(t)&&e.call(t,"callee")&&!o.call(t,"callee")};return un=i}function le(){if(ln)return fn;ln=1;var t=oe(),r=fe(),n=rt(),e=ae(),o=cn?an:(cn=1,an=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}),i=ie();return fn=function(u,s,a){for(var c=-1,f=(s=t(s,u)).length,l=!1;++c<f;){var p=i(s[c]);if(!(l=null!=u&&a(u,p)))break;u=u[p]}return l||++c!=f?l:!!(f=null==u?0:u.length)&&o(f)&&e(p,f)&&(n(u)||r(u))}}function pe(){if(hn)return pn;hn=1;var t=nn?rn:(nn=1,rn=function(t,r){return null!=t&&r in Object(t)}),r=le();return pn=function(n,e){return null!=n&&r(n,e,t)}}function he(){if(_n)return Rn;_n=1;var t=gn?dn:(gn=1,dn=function(t,r){for(var n=-1,e=r.length,o=t.length;++n<e;)t[o+n]=r[n];return t}),r=function(){if(bn)return mn;bn=1;var t=K(),r=fe(),n=rt(),e=t?t.isConcatSpreadable:void 0;return mn=function(t){return n(t)||r(t)||!!(e&&t&&t[e])}}();return Rn=function n(e,o,i,u,s){var a=-1,c=e.length;for(i||(i=r),s||(s=[]);++a<c;){var f=e[a];o>0&&i(f)?o>1?n(f,o-1,i,u,s):t(s,f):u||(s[s.length]=f)}return s},Rn}function ve(){if(Sn)return kn;Sn=1;var t=Nn?wn:(Nn=1,wn=function(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}),r=Math.max;return kn=function(n,e,o){return e=r(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,s=r(i.length-e,0),a=Array(s);++u<s;)a[u]=i[e+u];u=-1;for(var c=Array(e+1);++u<e;)c[u]=i[u];return c[e]=o(a),t(n,this,c)}},kn}function ye(){if(Cn)return Pn;Cn=1;var t=jn?xn:(jn=1,xn=function(t){return function(){return t}}),r=ue(),n=An?Tn:(An=1,Tn=function(t){return t});return Pn=r?function(n,e){return r(n,"toString",{configurable:!0,enumerable:!1,value:t(e),writable:!0})}:n}function de(){if(Dn)return In;Dn=1;var t=ye(),r=function(){if(Un)return qn;Un=1;var t=Date.now;return qn=function(r){var n=0,e=0;return function(){var o=t(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return r.apply(void 0,arguments)}},qn}(),n=r(t);return In=n}function ge(){if(Bn)return zn;Bn=1;var t=function(){if(En)return On;En=1;var t=he();return On=function(r){return null!=r&&r.length?t(r,1):[]}}(),r=ve(),n=de();return zn=function(e){return n(r(e,void 0,t),e+"")}}var me,be=function(){if(Vn)return Fn;Vn=1;var t=function(){if(yn)return vn;yn=1;var t=ce(),r=pe();return vn=function(n,e){return t(n,e,(function(t,e){return r(n,e)}))}}(),r=ge()((function(r,n){return null==r?{}:t(r,n)}));return Fn=r}(),Re=R(be),_e=["cache","credentials","headers","integrity","keepalive","mode","priority","redirect","referrer","referrerPolicy","signal"],Oe=function(){function r(r){if(void 0===r&&(r={}),!r.fetcher){if("function"!=typeof fetch)throw new c(t.RequestErrorID.ENV_FETCH_NOT_SUPPORT);r.fetcher=fetch}this.executor=new y,this.config=r}return r.prototype.getConfig=function(){return this.config},r.prototype.usePlugin=function(t){this.executor.use(t)},r.prototype.request=function(r){return i(this,void 0,void 0,(function(){var n,e,o,s,a,f=this;return u(this,(function(l){if(n=this.getConfig(),e=Hn.merge({},n,r),o=e.fetcher,s=function(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}(e,["fetcher"]),"function"!=typeof o)throw new c(t.RequestErrorID.FETCHER_NONE);if(!s.url)throw new c(t.RequestErrorID.URL_NONE);return a=function(t){return i(f,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return[4,o(this.parametersToRequest(t.parameters))];case 1:return r=n.sent(),[2,this.toAdapterResponse(r,r,t.parameters)]}}))}))},[2,this.executor.exec(s,a)]}))}))},r.prototype.parametersToRequest=function(t){var r=t.url,n=void 0===r?"/":r,e=t.method,o=void 0===e?"GET":e,i=t.data,u=Re(t,_e);return new Request(n,Object.assign(u,{body:i,method:o.toUpperCase()}))},r.prototype.toAdapterResponse=function(t,r,n){return{data:t,status:r.status,statusText:r.statusText,headers:this.getResponseHeaders(r),config:n,response:r}},r.prototype.getResponseHeaders=function(t){var r={};return t.headers.forEach((function(t,n){r[n]=t})),r},r}(),Ee=function(){function t(t,r){void 0===r&&(r={}),this.config=r,this.axiosInstance=t.create(r)}return t.prototype.getConfig=function(){return this.config},t.prototype.request=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.axiosInstance.request(t)]}))}))},t}(),we=function(){function r(){this.pluginName="FetchAbortPlugin",this.onlyOne=!0,this.controllers=new Map}return r.prototype.generateRequestKey=function(t){if(t.requestId)return t.requestId;var r=t.params?JSON.stringify(t.params):"",n=t.body?JSON.stringify(t.body):"";return"".concat(t.method||"GET","-").concat(t.url,"-").concat(r,"-").concat(n)},r.prototype.onBefore=function(t){var r=this.generateRequestKey(t.parameters);if(this.controllers.has(r)&&this.abort(t.parameters),!t.parameters.signal){var n=new AbortController;this.controllers.set(r,n),t.parameters.signal=n.signal}},r.prototype.onSuccess=function(t){var r=t.parameters;r&&this.controllers.delete(this.generateRequestKey(r))},r.prototype.onError=function(r){var n=r.error,e=r.parameters;if(this.isSameAbortError(n)&&e){var o=this.generateRequestKey(e),i=this.controllers.get(o);return this.controllers.delete(o),new f(t.RequestErrorID.ABORT_ERROR,(null==i?void 0:i.signal.reason)||n)}},r.prototype.isSameAbortError=function(t){return t instanceof Error&&"AbortError"===t.name||(t instanceof DOMException&&"AbortError"===t.name||t instanceof Event&&"abort"===t.type)},r.prototype.abort=function(r){var n="string"==typeof r?r:this.generateRequestKey(r),e=this.controllers.get(n);e&&(e.abort(new f(t.RequestErrorID.ABORT_ERROR,"The operation was aborted")),this.controllers.delete(n),"string"!=typeof r&&"function"==typeof r.onAbort&&r.onAbort.call(r,r))},r.prototype.abortAll=function(){this.controllers.forEach((function(t){return t.abort()})),this.controllers.clear()},r}(),Ne=function(){function r(){this.pluginName="FetchURLPlugin"}return r.prototype.isFullURL=function(t){return t.startsWith("http://")||t.startsWith("https://")},r.prototype.appendQueryParams=function(t,r){void 0===r&&(r={});var n=t.split("?"),e=n[0],o=n[1];(void 0===o?"":o).split("&").forEach((function(t){var n=t.split("="),e=n[0],o=n[1];e&&o&&(r[e]=o)}));var i=Object.entries(r).map((function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)})).join("&");return[e,i].join("?")},r.prototype.connectBaseURL=function(t,r){return"".concat(r,"/").concat(t)},r.prototype.buildUrl=function(t){var r=t.url,n=void 0===r?"":r,e=t.baseURL,o=void 0===e?"":e,i=t.params;if(!this.isFullURL(n)){var u=n.startsWith("/")?n.slice(1):n,s=o.endsWith("/")?o.slice(0,-1):o;n=this.connectBaseURL(u,s)}return i&&Object.keys(i).length>0&&(n=this.appendQueryParams(n,i)),n},r.prototype.onBefore=function(t){var r=t.parameters;r.url=this.buildUrl(r)},r.prototype.onSuccess=function(r){var n=r.returnValue;if(!n.response.ok){var e=new f(t.RequestErrorID.RESPONSE_NOT_OK,"Request failed with status: ".concat(n.status," ").concat(n.statusText));throw e.response=n.response,e}},r.prototype.onError=function(r){var n=r.error;return n instanceof f?n:new f(t.RequestErrorID.REQUEST_ERROR,n)},r}(),ke=function(){function t(t){this.adapter=t,this.executor=new y}return t.prototype.usePlugin=function(t){return this.executor.use(t),this},t.prototype.request=function(t){return i(this,void 0,void 0,(function(){var r,n,e=this;return u(this,(function(o){return r=this.adapter.getConfig(),n=Ln({},r,t),[2,this.executor.exec(n,(function(t){return e.adapter.request(t.parameters)}))]}))}))},t.prototype.get=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"GET"}))]}))}))},t.prototype.post=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"POST"}))]}))}))},t.prototype.put=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"PUT"}))]}))}))},t.prototype.delete=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"DELETE"}))]}))}))},t.prototype.patch=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"PATCH"}))]}))}))},t.prototype.head=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"HEAD"}))]}))}))},t.prototype.options=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"OPTIONS"}))]}))}))},t.prototype.trace=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"TRACE"}))]}))}))},t.prototype.connect=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"CONNECT"}))]}))}))},t}(),Se=function(){function t(t){void 0===t&&(t={}),this.options=t,this[me]="JSONSerializer"}return t.prototype.createReplacer=function(t){return Array.isArray(t)?t:null===t?function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}:"function"==typeof t?function(r,n){var e="string"==typeof n?n.replace(/\r\n/g,"\n"):n;return t.call(this,r,e)}:function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}},t.prototype.stringify=function(t,r,n){try{var e=this.createReplacer(r);return Array.isArray(e)?JSON.stringify(t,e,n):JSON.stringify(t,e,null!=n?n:this.options.pretty?this.options.indent||2:void 0)}catch(t){if(t instanceof TypeError&&t.message.includes("circular"))throw new TypeError("Cannot stringify data with circular references");throw t}},t.prototype.parse=function(t,r){return JSON.parse(t,r)},t.prototype.serialize=function(t){return this.stringify(t,this.options.replacer||null,this.options.pretty?this.options.indent||2:void 0)},t.prototype.deserialize=function(t,r){try{return this.parse(t)}catch(t){return r}},t.prototype.serializeArray=function(t){return"["+t.map((function(t){return JSON.stringify(t)})).join(",")+"]"},t}();me=Symbol.toStringTag;var xe=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.serialize=function(t){var r=Buffer.from(t,"utf8").toString("base64");return this.options.urlSafe?this.makeUrlSafe(r):r},t.prototype.deserialize=function(t,r){try{return/^[A-Za-z0-9+/]*={0,2}$/.test(t)?(this.options.urlSafe&&(t=this.makeUrlUnsafe(t)),Buffer.from(t,"base64").toString("utf8")):null!=r?r:""}catch(t){return null!=r?r:""}},t.prototype.makeUrlSafe=function(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.prototype.makeUrlUnsafe=function(t){for(t=t.replace(/-/g,"+").replace(/_/g,"/");t.length%4;)t+="=";return t},t}(),je=function(){function t(t,r){void 0===r&&(r=new Se),this.storage=t,this.serializer=r,this.store={}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.storage?this.storage.length:Object.keys(this.store).length},enumerable:!1,configurable:!0}),t.prototype.setItem=function(t,r,n){var e={key:t,value:r,expire:n};"number"==typeof n&&n>0&&(e.expire=n);var o=this.serializer.serialize(e);this.storage?this.storage.setItem(t,o):this.store[t]=o},t.prototype.getItem=function(t,r){var n,e=this.storage?this.storage.getItem(t):this.store[t],o=null!=r?r:null;if(!e)return o;var i=this.serializer.deserialize(e,o);return"object"==typeof i?"number"==typeof i.expire&&i.expire<Date.now()?(this.removeItem(t),o):null!==(n=null==i?void 0:i.value)&&void 0!==n?n:o:o},t.prototype.removeItem=function(t){this.storage?this.storage.removeItem(t):delete this.store[t]},t.prototype.clear=function(){this.storage?this.storage.clear():this.store={}},t}();t.AsyncExecutor=y,t.Base64Serializer=xe,t.Executor=r,t.ExecutorError=c,t.FetchAbortPlugin=we,t.FetchURLPlugin=Ne,t.JSONSerializer=Se,t.JSONStorage=je,t.LEVELS=ft,t.Logger=lt,t.RequestAdapterAxios=Ee,t.RequestAdapterFetch=Oe,t.RequestError=f,t.RequestScheduler=ke,t.RetryPlugin=m,t.SyncExecutor=d}));
|