@impui/imp 1.0.15 → 1.0.16

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.
Files changed (72) hide show
  1. package/dist/axios/index.es.js +1 -0
  2. package/dist/config/index.es.js +1 -0
  3. package/dist/core/index.es.js +1 -0
  4. package/dist/gotool/go2/index.es.js +1 -0
  5. package/dist/gotool/index/index.es.js +1 -0
  6. package/dist/imph5/index.es.js +1 -0
  7. package/dist/index.es.js +1 -1
  8. package/dist/login/index.es.js +1 -0
  9. package/dist/node_modules/axios/index/index.es.js +1 -0
  10. package/dist/node_modules/axios/lib/adapters/adapters/index.es.js +1 -0
  11. package/dist/node_modules/axios/lib/adapters/fetch/index.es.js +1 -0
  12. package/dist/node_modules/axios/lib/adapters/xhr/index.es.js +1 -0
  13. package/dist/node_modules/axios/lib/axios/index.es.js +1 -0
  14. package/dist/node_modules/axios/lib/cancel/CancelToken/index.es.js +1 -0
  15. package/dist/node_modules/axios/lib/cancel/CanceledError/index.es.js +1 -0
  16. package/dist/node_modules/axios/lib/cancel/isCancel/index.es.js +1 -0
  17. package/dist/node_modules/axios/lib/core/Axios/index.es.js +1 -0
  18. package/dist/node_modules/axios/lib/core/AxiosError/index.es.js +1 -0
  19. package/dist/node_modules/axios/lib/core/AxiosHeaders/index.es.js +1 -0
  20. package/dist/node_modules/axios/lib/core/InterceptorManager/index.es.js +1 -0
  21. package/dist/node_modules/axios/lib/core/buildFullPath/index.es.js +1 -0
  22. package/dist/node_modules/axios/lib/core/dispatchRequest/index.es.js +1 -0
  23. package/dist/node_modules/axios/lib/core/mergeConfig/index.es.js +1 -0
  24. package/dist/node_modules/axios/lib/core/settle/index.es.js +1 -0
  25. package/dist/node_modules/axios/lib/core/transformData/index.es.js +1 -0
  26. package/dist/node_modules/axios/lib/defaults/index/index.es.js +1 -0
  27. package/dist/node_modules/axios/lib/defaults/transitional/index.es.js +1 -0
  28. package/dist/node_modules/axios/lib/env/data/index.es.js +1 -0
  29. package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams/index.es.js +1 -0
  30. package/dist/node_modules/axios/lib/helpers/HttpStatusCode/index.es.js +1 -0
  31. package/dist/node_modules/axios/lib/helpers/bind/index.es.js +1 -0
  32. package/dist/node_modules/axios/lib/helpers/buildURL/index.es.js +1 -0
  33. package/dist/node_modules/axios/lib/helpers/combineURLs/index.es.js +1 -0
  34. package/dist/node_modules/axios/lib/helpers/composeSignals/index.es.js +1 -0
  35. package/dist/node_modules/axios/lib/helpers/cookies/index.es.js +1 -0
  36. package/dist/node_modules/axios/lib/helpers/formDataToJSON/index.es.js +1 -0
  37. package/dist/node_modules/axios/lib/helpers/isAbsoluteURL/index.es.js +1 -0
  38. package/dist/node_modules/axios/lib/helpers/isAxiosError/index.es.js +1 -0
  39. package/dist/node_modules/axios/lib/helpers/isURLSameOrigin/index.es.js +1 -0
  40. package/dist/node_modules/axios/lib/helpers/null/index.es.js +1 -0
  41. package/dist/node_modules/axios/lib/helpers/parseHeaders/index.es.js +1 -0
  42. package/dist/node_modules/axios/lib/helpers/parseProtocol/index.es.js +1 -0
  43. package/dist/node_modules/axios/lib/helpers/progressEventReducer/index.es.js +1 -0
  44. package/dist/node_modules/axios/lib/helpers/resolveConfig/index.es.js +1 -0
  45. package/dist/node_modules/axios/lib/helpers/speedometer/index.es.js +1 -0
  46. package/dist/node_modules/axios/lib/helpers/spread/index.es.js +1 -0
  47. package/dist/node_modules/axios/lib/helpers/throttle/index.es.js +1 -0
  48. package/dist/node_modules/axios/lib/helpers/toFormData/index.es.js +1 -0
  49. package/dist/node_modules/axios/lib/helpers/toURLEncodedForm/index.es.js +1 -0
  50. package/dist/node_modules/axios/lib/helpers/trackStream/index.es.js +1 -0
  51. package/dist/node_modules/axios/lib/helpers/validator/index.es.js +1 -0
  52. package/dist/node_modules/axios/lib/platform/browser/classes/Blob/index.es.js +1 -0
  53. package/dist/node_modules/axios/lib/platform/browser/classes/FormData/index.es.js +1 -0
  54. package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams/index.es.js +1 -0
  55. package/dist/node_modules/axios/lib/platform/browser/index/index.es.js +1 -0
  56. package/dist/node_modules/axios/lib/platform/common/utils/index.es.js +1 -0
  57. package/dist/node_modules/axios/lib/platform/index/index.es.js +1 -0
  58. package/dist/node_modules/axios/lib/utils/index.es.js +1 -0
  59. package/dist/packages/com/dist/browser/index.es/index.es.js +1 -0
  60. package/dist/packages/com/dist/cache/index.es/index.es.js +1 -0
  61. package/dist/packages/com/dist/core/index.es/index.es.js +1 -0
  62. package/dist/packages/com/dist/data/index.es/index.es.js +1 -0
  63. package/dist/packages/com/dist/date/index.es/index.es.js +2 -0
  64. package/dist/packages/com/dist/log/index.es/index.es.js +1 -0
  65. package/dist/packages/com/dist/message/index.es/index.es.js +1 -0
  66. package/dist/packages/com/dist/req/index.es/index.es.js +1 -0
  67. package/dist/packages/com/dist/str/index.es/index.es.js +1 -0
  68. package/dist/packages/com/dist/typetool/index.es/index.es.js +1 -0
  69. package/dist/packages/com/dist/url/index.es/index.es.js +1 -0
  70. package/dist/restool/index/index.es.js +1 -0
  71. package/dist/restool/index.css/index.es.js +1 -0
  72. package/package.json +4 -1
@@ -0,0 +1 @@
1
+ import"../node_modules/axios/index/index.es.js";import*as e from"@impui/com/layer";import{event as o}from"@impui/com/event";import{urltool as r}from"@impui/com/url";import{getLog as s}from"@impui/com/log";import{cache as i}from"@impui/com/cache";import{gotool as t}from"../gotool/index/index.es.js";import{handleUrl as n}from"../core/index.es.js";import{getConfig as a}from"../config/index.es.js";import{isString as c}from"@impui/com/typetool";import u from"../login/index.es.js";import m from"../node_modules/axios/lib/axios/index.es.js";const d=await s(),g="imp_sign",l="imp_useridx";r.getPar("useridx");var p={error:0,success:1,ServerSignError:2,jumpTo:100,window:101,alert:150,msg:160,noMoney:170,noRealName:234,nologin:666};m.codeEnum=p,m.defaults.baseURL="",m.defaults.withCredentials=!0,m.defaults.crossDomain=!0,m.defaults.dataType="json",m.saveLogin=function(e,o){d.debug("写入sign:",o),i.set(g,o),e&&i.set(l,e)},m.interceptors.request.use(async function(e){d.debug("请求拦截",e),function(e,o,r){var s;"post"===e.method?(e.data=e.data||{},s=e.data):(e.params=e.params||{},s=e.params),r&&(s[o]=r)}(e,"_tui_source",r.getPar("_tui_source")||r.getPar("from")||r.getPar("source")),n(e.url),"post"===e.method&&(e.data=r.jsonto(e.data).substring(1));const o=await u.getLogin(null,!0);return o&&(e.headers[g]=o.sign,e.headers[l]=i.get(l)),e},function(e){return Promise.reject(e)}),m.interceptors.response.use(async function(s){if(s.data&&"true"==s.headers["res-encrypt"]){const e=await Promise.all([t.init(),a()]),o=e[0],r=await o.parseRes(s,e[1]);null==r&&window.debug&&console.warn("响应数据解析异常",r),s=r||s}if(c(s.data)){const e=new Error("接口:"+s.config.url+"返回了纯字符串数据:"+s.data);return Promise.reject(e)}switch(d.debug("响应拦截 -> "+s.config.url+"\n",s),s.data.__source=s,(s=s.data).codeEnum=p,s.isSuccess=function(o){return s.code!==p.success&&(o||e.msg(s.msg)),s.code===p.success},s.code){case p.success:return Promise.resolve(s);case p.jumpTo:return void(location.href=s.data);case p.window:return!1!==Promise.resolve(s)&&window.open(s.data),Promise.reject(s);case p.alert:case p.msg:return e.msg(s.msg),Promise.reject(s);case p.noRealName:return impall.showReal_name();case p.ServerSignError:case p.nologin:if(s.__source.config.isTwice)return u.runNoLogin&&u.runNoLogin(s),Promise.resolve(s);const i=function(){return d.debug("检测到未登录返回,发起验证登录之后,重新再请求一遍"),s.__source.config.isTwice=!0,s.__source.config.data=r.toData(s.__source.config.data),m(s.__source.config)};return await o.runM("login","checkLogin"),i()}return Promise.resolve(s)},function(e){return Promise.reject(e)});var f=m.get;m.get=function(e,o,r){return(r=r||{}).params=o,f(e,r)};export{m as axios};
@@ -0,0 +1 @@
1
+ import{extend as i,loadjs as n}from"../packages/com/dist/core/index.es/index.es.js";import"../packages/com/dist/log/index.es/index.es.js";import"../packages/com/dist/browser/index.es/index.es.js";import{date as o}from"../packages/com/dist/date/index.es/index.es.js";import"../packages/com/dist/str/index.es/index.es.js";import{getAndWaitCache as s}from"../packages/com/dist/req/index.es/index.es.js";import{urltool as a}from"../packages/com/dist/url/index.es/index.es.js";import"../packages/com/dist/message/index.es/index.es.js";const e=a.getDomainJson(),t={allsr:"https://impsr.5see.com",debugDomain:"zjyx1.com",isLocalhost:!1,localConfig:null};let c=null;const l={allconfig:"/npm/allconfig.min.js",apiurl:"/npm/apiurl.min.js"},r=o.getTimestamp(),m={config:r,bubble:r,dress:r,gift:r,template:r},d=()=>{if(c)return c;c=t,"undefined"!=typeof __impconfig__&&(c=i(!0,{},t,__impconfig__));for(const i in l)c[i]=c.allsr+l[i];return c};"localhost"===e.main&&(e.main=d().debugDomain,e.mainhost=d().debugDomain,e.port="",e.name=e.mainhost.split(".")[0],e.protocol="https:");const g=()=>i(!0,{},m,window.codever),p=async()=>{if(window.allconfig)return window.allconfig.domainsitetype;return(await s("config_allconfig",async()=>(await n(d().allconfig),window.allconfig))).domainsitetype},f=async()=>{const i=(await p())["localhost"===e.main?d().debugDomain:e.main];return i||{}},w=async()=>await s("config_simplify",async()=>{const i=await x("config_simplify");await n(i);const o=window.sconfig;return delete window.sconfig,o}),u=async()=>await s("config_full",async()=>{console.log("getConfig");const o=await x("config");await n(o);const s=d();let a=window.config;return delete window.config,a.npm=a.allsr+"/npm/",s.isLocalhost&&s.localConfig&&(a=i(!0,{},a,s.localConfig)),a}),x=async i=>{const n=await f();var o=n.res||"sr",s=n.resHost||e.mainhost;return`${e.protocol+"//"+o+"."+s}/live/webSkins_site/${n.sitetype}/config/${i}.js`},y=async()=>await s("config_apiurl",async()=>await n(d().apiurl,{extend:i,config:await u()}));export{p as getAllConfig,y as getApiurl,g as getCodeVer,u as getConfig,f as getDomainConfig,d as getEvnConfig,w as getSimplifyConfig};
@@ -0,0 +1 @@
1
+ import{extend as r}from"@impui/com/core";import{urltool as o}from"@impui/com/url";import{cache as i}from"@impui/com/cache";const e=o.getPar,t=function(o,t){var c,u={v:"1.0.1",Device:0,SourceDevice:parseInt(e("Device")||-1)};t&&(u._tui_source=((c=e("_tui_source")||e("from")||e("source"))||(c=i.get("_tui_source")),c));var a=window.pdata||window.axiosData||window.reqData||{};return o=r(!0,u,a,o)},c=function(r,i,e){return e=t(e,i),r=o.addPars(e,r)};export{c as handleUrl};
@@ -0,0 +1 @@
1
+ (()=>{const t=globalThis,e=()=>{const t=new Error("not implemented");return t.code="ENOSYS",t};if(!t.fs){let s="";t.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(t,e){s+=n.decode(e);const i=s.lastIndexOf("\n");return-1!=i&&(console.log(s.substr(0,i)),s=s.substr(i+1)),e.length},write(t,s,n,i,r,o){if(0!==n||i!==s.length||null!==r)return void o(e());o(null,this.writeSync(t,s))},chmod(t,s,n){n(e())},chown(t,s,n,i){i(e())},close(t,s){s(e())},fchmod(t,s,n){n(e())},fchown(t,s,n,i){i(e())},fstat(t,s){s(e())},fsync(t,e){e(null)},ftruncate(t,s,n){n(e())},lchown(t,s,n,i){i(e())},link(t,s,n){n(e())},lstat(t,s){s(e())},mkdir(t,s,n){n(e())},open(t,s,n,i){i(e())},read(t,s,n,i,r,o){o(e())},readdir(t,s){s(e())},readlink(t,s){s(e())},rename(t,s,n){n(e())},rmdir(t,s){s(e())},stat(t,s){s(e())},symlink(t,s,n){n(e())},truncate(t,s,n){n(e())},unlink(t,s){s(e())},utimes(t,s,n,i){i(e())}}}if(t.process||(t.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!t.crypto){const e=require("node:crypto");t.crypto={getRandomValues(t){e.randomFillSync(t)}}}t.performance||(t.performance={now(){const[t,e]=process.hrtime();return 1e3*t+e/1e6}}),t.TextEncoder||(t.TextEncoder=require("node:util").TextEncoder),t.TextDecoder||(t.TextDecoder=require("node:util").TextDecoder);const s=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");let i=new DataView(new ArrayBuffer(8));var r=[];const o={};t.Go=class{constructor(){this._callbackTimeouts=/* @__PURE__ */new Map,this._nextCallbackTimeoutID=1;const t=()=>new DataView(this._inst.exports.memory.buffer),e=t=>{i.setBigInt64(0,t,!0);const e=i.getFloat64(0,!0);if(0===e)return;if(!isNaN(e))return e;const s=0xffffffffn&t;return this._values[s]},l=s=>{let n=t().getBigUint64(s,!0);return e(n)},c=t=>{const e=0x7FF80000n;if("number"==typeof t)return isNaN(t)?e<<32n:0===t?e<<32n|1n:(i.setFloat64(0,t,!0),i.getBigInt64(0,!0));switch(t){case void 0:return 0n;case null:return e<<32n|2n;case!0:return e<<32n|3n;case!1:return e<<32n|4n}let s=this._ids.get(t);void 0===s&&(s=this._idPool.pop(),void 0===s&&(s=BigInt(this._values.length)),this._values[s]=t,this._goRefCounts[s]=0,this._ids.set(t,s)),this._goRefCounts[s]++;let n=1n;switch(typeof t){case"string":n=2n;break;case"symbol":n=3n;break;case"function":n=4n}return s|(e|n)<<32n},a=(e,s)=>{let n=c(s);t().setBigUint64(e,n,!0)},u=(t,e,s)=>new Uint8Array(this._inst.exports.memory.buffer,t,e),f=(t,e,s)=>{const n=new Array(e);for(let i=0;i<e;i++)n[i]=l(t+8*i);return n},h=(t,e)=>n.decode(new DataView(this._inst.exports.memory.buffer,t,e)),d=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(e,s,i,o){let l=0;if(1==e)for(let c=0;c<i;c++){let e=s+8*c,i=t().getUint32(e+0,!0),o=t().getUint32(e+4,!0);l+=o;for(let s=0;s<o;s++){let e=t().getUint8(i+s);if(13==e);else if(10==e){let t=n.decode(new Uint8Array(r));r=[],console.log(t)}else r.push(e)}}else console.error("invalid file descriptor:",e);return t().setUint32(o,l,!0),0},fd_close:()=>0,fd_fdstat_get:()=>0,fd_seek:()=>0,proc_exit:t=>{throw this.exited=!0,this.exitCode=t,this._resolveExitPromise(),o},random_get:(t,e)=>(crypto.getRandomValues(u(t,e)),0)},gojs:{"runtime.ticks":()=>BigInt(1e6*(d+performance.now())),"runtime.sleepTicks":t=>{setTimeout(()=>{if(!this.exited)try{this._inst.exports.go_scheduler()}catch(t){if(t!==o)throw t}},Number(t)/1e6)},"syscall/js.finalizeRef":t=>{const e=0xffffffffn&t;if(void 0!==this._goRefCounts?.[e]){if(this._goRefCounts[e]--,0===this._goRefCounts[e]){const t=this._values[e];this._values[e]=null,this._ids.delete(t),this._idPool.push(e)}}else console.error("syscall/js.finalizeRef: unknown id",e)},"syscall/js.stringVal":(t,e)=>{const s=h(t>>>=0,e);return c(s)},"syscall/js.valueGet":(t,s,n)=>{let i=h(s,n),r=e(t),o=Reflect.get(r,i);return c(o)},"syscall/js.valueSet":(t,s,n,i)=>{const r=e(t),o=h(s,n),l=e(i);Reflect.set(r,o,l)},"syscall/js.valueDelete":(t,s,n)=>{const i=e(t),r=h(s,n);Reflect.deleteProperty(i,r)},"syscall/js.valueIndex":(t,s)=>c(Reflect.get(e(t),s)),"syscall/js.valueSetIndex":(t,s,n)=>{Reflect.set(e(t),s,e(n))},"syscall/js.valueCall":(s,n,i,r,o,l,c)=>{const u=e(n),d=h(i,r),g=f(o,l);try{const e=Reflect.get(u,d);a(s,Reflect.apply(e,u,g)),t().setUint8(s+8,1)}catch(y){a(s,y),t().setUint8(s+8,0)}},"syscall/js.valueInvoke":(s,n,i,r,o)=>{try{const o=e(n),l=f(i,r);a(s,Reflect.apply(o,void 0,l)),t().setUint8(s+8,1)}catch(l){a(s,l),t().setUint8(s+8,0)}},"syscall/js.valueNew":(s,n,i,r,o)=>{const l=e(n),c=f(i,r);try{a(s,Reflect.construct(l,c)),t().setUint8(s+8,1)}catch(u){a(s,u),t().setUint8(s+8,0)}},"syscall/js.valueLength":t=>e(t).length,"syscall/js.valuePrepareString":(n,i)=>{const r=String(e(i)),o=s.encode(r);a(n,o),t().setInt32(n+8,o.length,!0)},"syscall/js.valueLoadString":(t,s,n,i)=>{const r=e(t);u(s,n).set(r)},"syscall/js.valueInstanceOf":(t,s)=>e(t)instanceof e(s),"syscall/js.copyBytesToGo":(s,n,i,r,o)=>{let l=s,c=s+4;const a=u(n,i),f=e(o);if(!(f instanceof Uint8Array||f instanceof Uint8ClampedArray))return void t().setUint8(c,0);const h=f.subarray(0,a.length);a.set(h),t().setUint32(l,h.length,!0),t().setUint8(c,1)},"syscall/js.copyBytesToJS":(s,n,i,r,o)=>{let l=s,c=s+4;const a=e(n),f=u(i,r);if(!(a instanceof Uint8Array||a instanceof Uint8ClampedArray))return void t().setUint8(c,0);const h=f.subarray(0,a.length);a.set(h),t().setUint32(l,h.length,!0),t().setUint8(c,1)}}},this.importObject.env=this.importObject.gojs}async run(e){if(this._inst=e,this._values=[NaN,0,null,!0,!1,t,this],this._goRefCounts=[],this._ids=/* @__PURE__ */new Map,this._idPool=[],this.exited=!1,this.exitCode=0,this._inst.exports._start){let t=new Promise((t,e)=>{this._resolveExitPromise=t});try{this._inst.exports._start()}catch(s){if(s!==o)throw s}return await t,this.exitCode}this._inst.exports._initialize()}_resume(){if(this.exited)throw new Error("Go program has already exited");try{this._inst.exports.resume()}catch(t){if(t!==o)throw t}this.exited&&this._resolveExitPromise()}_makeFuncWrapper(t){const e=this;return function(){const s={id:t,this:this,args:arguments};return e._pendingEvent=s,e._resume(),s.result}}}})();const t=Go;export{t as default};
@@ -0,0 +1 @@
1
+ import e from"../go2/index.es.js";import{getConfig as t,getCodeVer as s,getApiurl as r}from"../../config/index.es.js";import"../../packages/com/dist/core/index.es/index.es.js";import{getLog as o}from"../../packages/com/dist/log/index.es/index.es.js";import"../../packages/com/dist/browser/index.es/index.es.js";import{bufferToBase64 as a,base64ToBuffer as n}from"../../packages/com/dist/data/index.es/index.es.js";import"../../packages/com/dist/str/index.es/index.es.js";import{getAndWaitCache as i}from"../../packages/com/dist/req/index.es/index.es.js";import"../../packages/com/dist/message/index.es/index.es.js";const c={},m=(await t()).allsr+"/plug/gotool/lib/imptool.wasm",p=await o(),g=async function(){return console.warn("⚠️ 降级方案已启用"),{encrypt:function(){throw new Error("❌ 降级方案未实现:encrypt方法")},parseRes:async function(e,t){try{if("true"!==e.headers["res-encrypt"])return e;const t={data:e.data},s=await r(),o=await axios.post(s.parseRes,{res:encodeURIComponent(JSON.stringify(t)),config:null});return e.data=JSON.parse(o.data),e}catch(s){console.error("❌ 降级方案请求接口失败:",s)}},parseServer:function(){throw new Error("❌ 降级方案未实现:parseServer方法")}}};const l=new class{constructor(e){this.isbase=e===m,this.url=e}async#e(){if(!this.url){const e=await t();this.url=e.allsr+"plug/gotool/lib/imptool.wasm"}return this.url}async#t(t,s){return async function(t,s,r=!1){try{const o=new e;p("=== WASM加载调试开始 ==="),p("URL:",t),p("UserAgent:",navigator.userAgent);const c=await i(t,async()=>{const e=await fetch(t+s);p("✅ 响应状态:",e.status);const r=await e.arrayBuffer();return p("✅ ArrayBuffer大小:",r.byteLength,"bytes"),a(r,{type:"application/wasm"})}),m=await n(c),l=new Uint8Array(m.slice(0,4));p("🔍 WASM文件头:",Array.from(l)),p("🔍 Go importObject结构:",Object.keys(o.importObject)),o.importObject.go&&p("🔍 GoJS导入键:",Object.keys(o.importObject.go)),p("🚀 开始WebAssembly.instantiate...");const w=await WebAssembly.instantiate(m,o.importObject);if(p("✅ WebAssembly实例化成功"),p("🚀 开始go.run..."),o.run(w.instance),p("✅ go.run执行完成"),window.goCrypto){const e=window.goCrypto;return delete window.goCrypto,p("✅ goCrypto加载成功"),e}if(r)return await g();throw console.warn("❌ window.goCrypto未定义,进入诊断模式"),await loadGoWasmWithDiagnosis(t),new Error("❌ window.goCrypto未定义")}catch(o){throw console.error("💥 完整错误堆栈:",o),console.error("错误名称:",o.name),console.error("错误信息:",o.message),o}}(t=t||await this.#e(),s,this.isbase)}async getRunTimes(e=!1){const t=await this.#e();if(!e&&c[t])return c[t];const r=s(),o=r.config?"?d="+r.config:"",a=await this.#t(t,o),n={};if(a)for(let s in a)n[s]=a[s];return c[t]=n,n}async init(){return this.getRunTimes()}async run(e,t){const s=await this.getRunTimes();return s[e]||console.error(`[${e}] 方法不在默认wasm中!`),s[e].apply(null,t)}}(m);export{l as gotool};
@@ -0,0 +1 @@
1
+ import{extend as e}from"@impui/com/core";import{isBoolean as n,isObject as i}from"@impui/com/typetool";import{isAndroid as o,isIOS as s}from"@impui/com/browser";const a=function(){document.addEventListener("click",function(e){var n=e.target.closest("a");if(n&&"window"===n.getAttribute("target")){var i=n.getAttribute("href");d(i),e.preventDefault()}})},t=async function(e){const{layer:n}=await impui.loadAsync(["layer"]);o()?window.AndroidJs.sliderRes(JSON.stringify(e)):s()?window.webkit.messageHandlers.sliderRes.postMessage(e):n.msg("sliderRes滑块回调接口,web端暂不支持!")},r=function(e){window.layer?layer.msg(e):alert(e)},p=function(e){if(e.indexOf("http://")<0&&e.indexOf("https://")<0){var n=e.substring(0,1);return"/"===n?location.origin+e:"#"===n||e.indexOf("javascript:;")>=0?e:location.origin+"/static/"+e}return e},d=function(e,n,i,a){if(e=p(e),n=n||!1,i=i||"",o())window.AndroidJs.appGoNewWin(e,n);else if(s())window.webkit.messageHandlers.appGoNewWin.postMessage({url:e,addclose:n,title:i});else if(1===a)window.open(p(e));else location.href=p(e)},w=function(a,t,r){var p={url:a,type:"page",title:"",rate:1,addclose:!0,sso:!1};n(t)?p.sso=t:!r&&i(t)&&(r=t),r=e(!0,p,r),o()?window.AndroidJs.appGoView(JSON.stringify(r)):s()?window.webkit.messageHandlers.appGoView.postMessage(r):console.warn("pc端不支持GoWebView方法!")},l=function(){o()?window.AndroidJs.appGoToLiveRoom():s()&&window.webkit.messageHandlers.appGoToLiveRoom.postMessage(null)},g=function(e){o()?window.AndroidJs.appGoRoom(e):s()?window.webkit.messageHandlers.appGoRoom.postMessage(e):window.open("/"+e)},c=function(e){if(i(e)||(e={cno:e}),o())window.AndroidJs.appGoRoomV2(JSON.stringify(e));else if(s())window.webkit.messageHandlers.appGoRoomV2.postMessage(e);else{var n="/"+e.cno;e.tuiid&&(n+="?infrom="+e.tuiid),window.open(n)}},m=function(e){var n={targetUrl:e.url||"",title:e.title||"",description:e.desc||"",imgUrl:e.imgsrc||""};o()?window.AndroidJs.appShareBtnShow(JSON.stringify(n)):s()&&window.webkit.messageHandlers.appShareBtnShow.postMessage(n)},f=function(e){var n={targetUrl:e.url||"",title:e.title||"",description:e.desc||"",imgUrl:e.imgsrc||""};o()?window.AndroidJs.appShare(JSON.stringify(n)):s()?window.webkit.messageHandlers.appShare.postMessage(n):r("请在app中分享")},u=function(e){var n={targetUrl:e.url||"",title:e.title||"",description:e.desc||"",imgUrl:e.imgsrc||""};o()?window.AndroidJs.appShareV2(JSON.stringify(n)):s()?window.webkit.messageHandlers.appShareV2.postMessage(n):r("请在app中分享")},b=function(){o()||s()&&window.webkit.messageHandlers.appEmptyClick.postMessage(null)},k=function(e){o()?window.AndroidJs.appInviteShare(e):s()&&window.webkit.messageHandlers.appInviteShare.postMessage(e)},y=function(e){o()?r("安卓端暂无小程序唤起功能!"):s()&&window.webkit.messageHandlers.appWxMiniChongZhi.postMessage(String(e))},A=function(e){o()?window.AndroidJs.handLuckSendGift(JSON.stringify(e)):s()?window.webkit.messageHandlers.handLuckSendGift.postMessage(e):parent.jw&&parent.jw.Comm.sendGift.send(e)},J=function(e){return o()?(window.AndroidJs.appClipData(e),!1):s()?(window.webkit.messageHandlers.appClipData.postMessage(e),!1):navigator.clipboard.writeText(e)},S=function(e){document.title=e;try{o()?window.AndroidJs.appSetTitle(e):s()&&window.webkit.messageHandlers.appSetTitle.postMessage(e)}catch(n){console.error(n)}},M=function(e){o()?window.AndroidJs.appGoBack():s()?window.webkit.messageHandlers.appGoBack.postMessage(null):parent.closeFrame?parent.closeFrame(e):parent.hidepanelPop&&parent.hidepanelPop(e)},H=function(){o()?window.AndroidJs.appGoBack():s()?window.webkit.messageHandlers.appGoBack.postMessage(null):history.back()},G=function(e){o()?window.AndroidJs.userHomePage(String(e)):s()?window.webkit.messageHandlers.userHomePage.postMessage(String(e)):console.warn("web端暂时没有接受goUserHome此消息!")},h=function(){o()?window.AndroidJs.appGoDressUpCenter():s()?window.webkit.messageHandlers.appGoDressUpCenter.postMessage(null):console.warn("web端暂时没有接受appGoDressUpCenter此消息!")},P=function(){o()?window.AndroidJs.appGoPay():s()?window.webkit.messageHandlers.appGoPay.postMessage(null):console.warn("web端暂时没有接受appGoPay此消息!")},v=async function(e){var n=await impui.get("config");o()?window.AndroidJs.goAppPage(String(n.config.openAPP.Android[e])):s()?window.webkit.messageHandlers.goAppPage.postMessage(String(n.config.openAPP.IOS[e])):console.warn("web端暂时不需要定义goAppPage的方法跳转!")},N=function(e,n){i(e)&&(e=(n=e).url),(n=n||{}).url=e,o()?window.AndroidJs.appPlayMP4(JSON.stringify(n)):s()?window.webkit.messageHandlers.appPlayMP4.postMessage(n):console.warn("pc端不支持playMP4方法!")},O=function(e,n){(n=n||{}).notifyName=e,o()?window.AndroidJs.appNotify(JSON.stringify(n)):s()?window.webkit.messageHandlers.appNotify.postMessage(n):console.warn("web端暂时没有接受此消息!notifyName:"+e+", data:",n)};export{w as GoWebView,b as appEmptyClick,H as appGoBack,h as appGoDressUpCenter,P as appGoPay,g as appGoRoom,c as appGoRoomV2,l as appGoToLiveRoom,k as appInviteShare,O as appNotify,M as closeFrame,J as copy,p as getUrl,v as goAppPage,G as goUserHome,a as holdLink,r as msg,y as openWxSappPay,N as playMP4,A as sendGift,S as setTitle,f as share,m as shareBtn,u as shareV2,t as sliderRes,d as windowOpen};
package/dist/index.es.js CHANGED
@@ -1 +1 @@
1
- import{urltool as e,date as t,extend as n,getAndWaitCache as r,loadjs as o,getLog as i,bufferToBase64 as s,base64ToBuffer as a,type as c,message as l,isBoolean as u,cache as h,injectCSS as f,isString as d,isObject as g,isArray as m}from"@impui/com";import*as p from"@impui/com/layer";import{event as y}from"@impui/com/event";import{urltool as w}from"@impui/com/url";import{getLog as b}from"@impui/com/log";import{cache as _}from"@impui/com/cache";import{extend as v}from"@impui/com/core";import{iframeReq as S,get as E}from"@impui/com/req";const O=e.getDomainJson(),L={allsr:"https://impsr.5see.com",debugDomain:"zjyx1.com",isLocalhost:!1,localConfig:null};let x=null;const R={allconfig:"/npm/allconfig.min.js",apiurl:"/npm/apiurl.min.js"},P=t.getTimestamp(),T={config:P,bubble:P,dress:P,gift:P,template:P},k=()=>{if(x)return x;x=L,"undefined"!=typeof __impconfig__&&(x=n(!0,{},L,__impconfig__));for(const e in R)x[e]=x.allsr+R[e];return x};"localhost"===O.main&&(O.main=k().debugDomain,O.mainhost=k().debugDomain,O.port="",O.name=O.mainhost.split(".")[0],O.protocol="https:");const C=()=>n(!0,{},T,window.codever),U=async()=>{if(window.allconfig)return window.allconfig.domainsitetype;return(await r("config_allconfig",async()=>(await o(k().allconfig),window.allconfig))).domainsitetype},A=async()=>{const e=(await U())["localhost"===O.main?k().debugDomain:O.main];return e||{}},j=async()=>await r("config_simplify",async()=>{const e=await B("config_simplify");await o(e);const t=window.sconfig;return delete window.sconfig,t}),N=async()=>await r("config_full",async()=>{console.log("getConfig");const e=await B("config");await o(e);const t=k();let r=window.config;return delete window.config,r.npm=r.allsr+"/npm/",t.isLocalhost&&t.localConfig&&(r=n(!0,{},r,t.localConfig)),r}),B=async e=>{const t=await A();var n=t.res||"sr",r=t.resHost||O.mainhost;return`${O.protocol+"//"+n+"."+r}/live/webSkins_site/${t.sitetype}/config/${e}.js`},I=async()=>await r("config_apiurl",async()=>await o(k().apiurl,{extend:n,config:await N()}));(()=>{const e=globalThis,t=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!e.fs){let n="";e.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,t){n+=r.decode(t);const o=n.lastIndexOf("\n");return-1!=o&&(console.log(n.substr(0,o)),n=n.substr(o+1)),t.length},write(e,n,r,o,i,s){if(0!==r||o!==n.length||null!==i)return void s(t());s(null,this.writeSync(e,n))},chmod(e,n,r){r(t())},chown(e,n,r,o){o(t())},close(e,n){n(t())},fchmod(e,n,r){r(t())},fchown(e,n,r,o){o(t())},fstat(e,n){n(t())},fsync(e,t){t(null)},ftruncate(e,n,r){r(t())},lchown(e,n,r,o){o(t())},link(e,n,r){r(t())},lstat(e,n){n(t())},mkdir(e,n,r){r(t())},open(e,n,r,o){o(t())},read(e,n,r,o,i,s){s(t())},readdir(e,n){n(t())},readlink(e,n){n(t())},rename(e,n,r){r(t())},rmdir(e,n){n(t())},stat(e,n){n(t())},symlink(e,n,r){r(t())},truncate(e,n,r){r(t())},unlink(e,n){n(t())},utimes(e,n,r,o){o(t())}}}if(e.process||(e.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw t()},pid:-1,ppid:-1,umask(){throw t()},cwd(){throw t()},chdir(){throw t()}}),!e.crypto){const t=require("node:crypto");e.crypto={getRandomValues(e){t.randomFillSync(e)}}}e.performance||(e.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),e.TextEncoder||(e.TextEncoder=require("node:util").TextEncoder),e.TextDecoder||(e.TextDecoder=require("node:util").TextDecoder);const n=new TextEncoder("utf-8"),r=new TextDecoder("utf-8");let o=new DataView(new ArrayBuffer(8));var i=[];const s={};e.Go=class{constructor(){this._callbackTimeouts=/* @__PURE__ */new Map,this._nextCallbackTimeoutID=1;const e=()=>new DataView(this._inst.exports.memory.buffer),t=e=>{o.setBigInt64(0,e,!0);const t=o.getFloat64(0,!0);if(0===t)return;if(!isNaN(t))return t;const n=0xffffffffn&e;return this._values[n]},a=n=>{let r=e().getBigUint64(n,!0);return t(r)},c=e=>{const t=0x7FF80000n;if("number"==typeof e)return isNaN(e)?t<<32n:0===e?t<<32n|1n:(o.setFloat64(0,e,!0),o.getBigInt64(0,!0));switch(e){case void 0:return 0n;case null:return t<<32n|2n;case!0:return t<<32n|3n;case!1:return t<<32n|4n}let n=this._ids.get(e);void 0===n&&(n=this._idPool.pop(),void 0===n&&(n=BigInt(this._values.length)),this._values[n]=e,this._goRefCounts[n]=0,this._ids.set(e,n)),this._goRefCounts[n]++;let r=1n;switch(typeof e){case"string":r=2n;break;case"symbol":r=3n;break;case"function":r=4n}return n|(t|r)<<32n},l=(t,n)=>{let r=c(n);e().setBigUint64(t,r,!0)},u=(e,t,n)=>new Uint8Array(this._inst.exports.memory.buffer,e,t),h=(e,t,n)=>{const r=new Array(t);for(let o=0;o<t;o++)r[o]=a(e+8*o);return r},f=(e,t)=>r.decode(new DataView(this._inst.exports.memory.buffer,e,t)),d=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(t,n,o,s){let a=0;if(1==t)for(let c=0;c<o;c++){let t=n+8*c,o=e().getUint32(t+0,!0),s=e().getUint32(t+4,!0);a+=s;for(let n=0;n<s;n++){let t=e().getUint8(o+n);if(13==t);else if(10==t){let e=r.decode(new Uint8Array(i));i=[],console.log(e)}else i.push(t)}}else console.error("invalid file descriptor:",t);return e().setUint32(s,a,!0),0},fd_close:()=>0,fd_fdstat_get:()=>0,fd_seek:()=>0,proc_exit:e=>{throw this.exited=!0,this.exitCode=e,this._resolveExitPromise(),s},random_get:(e,t)=>(crypto.getRandomValues(u(e,t)),0)},gojs:{"runtime.ticks":()=>BigInt(1e6*(d+performance.now())),"runtime.sleepTicks":e=>{setTimeout(()=>{if(!this.exited)try{this._inst.exports.go_scheduler()}catch(e){if(e!==s)throw e}},Number(e)/1e6)},"syscall/js.finalizeRef":e=>{const t=0xffffffffn&e;if(void 0!==this._goRefCounts?.[t]){if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}}else console.error("syscall/js.finalizeRef: unknown id",t)},"syscall/js.stringVal":(e,t)=>{const n=f(e>>>=0,t);return c(n)},"syscall/js.valueGet":(e,n,r)=>{let o=f(n,r),i=t(e),s=Reflect.get(i,o);return c(s)},"syscall/js.valueSet":(e,n,r,o)=>{const i=t(e),s=f(n,r),a=t(o);Reflect.set(i,s,a)},"syscall/js.valueDelete":(e,n,r)=>{const o=t(e),i=f(n,r);Reflect.deleteProperty(o,i)},"syscall/js.valueIndex":(e,n)=>c(Reflect.get(t(e),n)),"syscall/js.valueSetIndex":(e,n,r)=>{Reflect.set(t(e),n,t(r))},"syscall/js.valueCall":(n,r,o,i,s,a,c)=>{const u=t(r),d=f(o,i),g=h(s,a);try{const t=Reflect.get(u,d);l(n,Reflect.apply(t,u,g)),e().setUint8(n+8,1)}catch(m){l(n,m),e().setUint8(n+8,0)}},"syscall/js.valueInvoke":(n,r,o,i,s)=>{try{const s=t(r),a=h(o,i);l(n,Reflect.apply(s,void 0,a)),e().setUint8(n+8,1)}catch(a){l(n,a),e().setUint8(n+8,0)}},"syscall/js.valueNew":(n,r,o,i,s)=>{const a=t(r),c=h(o,i);try{l(n,Reflect.construct(a,c)),e().setUint8(n+8,1)}catch(u){l(n,u),e().setUint8(n+8,0)}},"syscall/js.valueLength":e=>t(e).length,"syscall/js.valuePrepareString":(r,o)=>{const i=String(t(o)),s=n.encode(i);l(r,s),e().setInt32(r+8,s.length,!0)},"syscall/js.valueLoadString":(e,n,r,o)=>{const i=t(e);u(n,r).set(i)},"syscall/js.valueInstanceOf":(e,n)=>t(e)instanceof t(n),"syscall/js.copyBytesToGo":(n,r,o,i,s)=>{let a=n,c=n+4;const l=u(r,o),h=t(s);if(!(h instanceof Uint8Array||h instanceof Uint8ClampedArray))return void e().setUint8(c,0);const f=h.subarray(0,l.length);l.set(f),e().setUint32(a,f.length,!0),e().setUint8(c,1)},"syscall/js.copyBytesToJS":(n,r,o,i,s)=>{let a=n,c=n+4;const l=t(r),h=u(o,i);if(!(l instanceof Uint8Array||l instanceof Uint8ClampedArray))return void e().setUint8(c,0);const f=h.subarray(0,l.length);l.set(f),e().setUint32(a,f.length,!0),e().setUint8(c,1)}}},this.importObject.env=this.importObject.gojs}async run(t){if(this._inst=t,this._values=[NaN,0,null,!0,!1,e,this],this._goRefCounts=[],this._ids=/* @__PURE__ */new Map,this._idPool=[],this.exited=!1,this.exitCode=0,this._inst.exports._start){let e=new Promise((e,t)=>{this._resolveExitPromise=e});try{this._inst.exports._start()}catch(n){if(n!==s)throw n}return await e,this.exitCode}this._inst.exports._initialize()}_resume(){if(this.exited)throw new Error("Go program has already exited");try{this._inst.exports.resume()}catch(e){if(e!==s)throw e}this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}}})();const D=Go,F={},M=(await N()).allsr+"/plug/gotool/lib/imptool.wasm",q=await i(),z=async function(){return console.warn("⚠️ 降级方案已启用"),{encrypt:function(){throw new Error("❌ 降级方案未实现:encrypt方法")},parseRes:async function(e,t){try{if("true"!==e.headers["res-encrypt"])return e;const t={data:e.data},n=await I(),r=await axios.post(n.parseRes,{res:encodeURIComponent(JSON.stringify(t)),config:null});return e.data=JSON.parse(r.data),e}catch(n){console.error("❌ 降级方案请求接口失败:",n)}},parseServer:function(){throw new Error("❌ 降级方案未实现:parseServer方法")}}};const W=new class{constructor(e){this.isbase=e===M,this.url=e}async#e(){if(!this.url){const e=await N();this.url=e.allsr+"plug/gotool/lib/imptool.wasm"}return this.url}async#t(e,t){return async function(e,t,n=!1){try{const o=new D;q("=== WASM加载调试开始 ==="),q("URL:",e),q("UserAgent:",navigator.userAgent);const i=await r(e,async()=>{const n=await fetch(e+t);q("✅ 响应状态:",n.status);const r=await n.arrayBuffer();return q("✅ ArrayBuffer大小:",r.byteLength,"bytes"),s(r,{type:"application/wasm"})}),c=await a(i),l=new Uint8Array(c.slice(0,4));q("🔍 WASM文件头:",Array.from(l)),q("🔍 Go importObject结构:",Object.keys(o.importObject)),o.importObject.go&&q("🔍 GoJS导入键:",Object.keys(o.importObject.go)),q("🚀 开始WebAssembly.instantiate...");const u=await WebAssembly.instantiate(c,o.importObject);if(q("✅ WebAssembly实例化成功"),q("🚀 开始go.run..."),o.run(u.instance),q("✅ go.run执行完成"),window.goCrypto){const e=window.goCrypto;return delete window.goCrypto,q("✅ goCrypto加载成功"),e}if(n)return await z();throw console.warn("❌ window.goCrypto未定义,进入诊断模式"),await loadGoWasmWithDiagnosis(e),new Error("❌ window.goCrypto未定义")}catch(o){throw console.error("💥 完整错误堆栈:",o),console.error("错误名称:",o.name),console.error("错误信息:",o.message),o}}(e=e||await this.#e(),t,this.isbase)}async getRunTimes(e=!1){const t=await this.#e();if(!e&&F[t])return F[t];const n=C(),r=n.config?"?d="+n.config:"",o=await this.#t(t,r),i={};if(o)for(let s in o)i[s]=o[s];return F[t]=i,i}async init(){return this.getRunTimes()}async run(e,t){const n=await this.getRunTimes();return n[e]||console.error(`[${e}] 方法不在默认wasm中!`),n[e].apply(null,t)}}(M);function $(e,t){return function(){return e.apply(t,arguments)}}const{toString:G}=Object.prototype,{getPrototypeOf:H}=Object,{iterator:K,toStringTag:J}=Symbol,V=/* @__PURE__ */(e=>t=>{const n=G.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(/* @__PURE__ */Object.create(null)),X=e=>(e=e.toLowerCase(),t=>V(t)===e),Z=e=>t=>typeof t===e,{isArray:Q}=Array,Y=Z("undefined");function ee(e){return null!==e&&!Y(e)&&null!==e.constructor&&!Y(e.constructor)&&re(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const te=X("ArrayBuffer");const ne=Z("string"),re=Z("function"),oe=Z("number"),ie=e=>null!==e&&"object"==typeof e,se=e=>{if("object"!==V(e))return!1;const t=H(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||J in e||K in e)},ae=X("Date"),ce=X("File"),le=X("Blob"),ue=X("FileList"),he=X("URLSearchParams"),[fe,de,ge,me]=["ReadableStream","Request","Response","Headers"].map(X);function pe(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Q(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ee(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function ye(e,t){if(ee(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const we="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,be=e=>!Y(e)&&e!==we;const _e=/* @__PURE__ */(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&H(Uint8Array)),ve=X("HTMLFormElement"),Se=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ee=X("RegExp"),Oe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};pe(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const Le=X("AsyncFunction"),xe=(Re="function"==typeof setImmediate,Pe=re(we.postMessage),Re?setImmediate:Pe?(Te=`axios@${Math.random()}`,ke=[],we.addEventListener("message",({source:e,data:t})=>{e===we&&t===Te&&ke.length&&ke.shift()()},!1),e=>{ke.push(e),we.postMessage(Te,"*")}):e=>setTimeout(e));var Re,Pe,Te,ke;const Ce="undefined"!=typeof queueMicrotask?queueMicrotask.bind(we):"undefined"!=typeof process&&process.nextTick||xe,Ue={isArray:Q,isArrayBuffer:te,isBuffer:ee,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||re(e.append)&&("formdata"===(t=V(e))||"object"===t&&re(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&te(e.buffer),t},isString:ne,isNumber:oe,isBoolean:e=>!0===e||!1===e,isObject:ie,isPlainObject:se,isEmptyObject:e=>{if(!ie(e)||ee(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:fe,isRequest:de,isResponse:ge,isHeaders:me,isUndefined:Y,isDate:ae,isFile:ce,isBlob:le,isRegExp:Ee,isFunction:re,isStream:e=>ie(e)&&re(e.pipe),isURLSearchParams:he,isTypedArray:_e,isFileList:ue,forEach:pe,merge:function e(){const{caseless:t,skipUndefined:n}=be(this)&&this||{},r={},o=(o,i)=>{const s=t&&ye(r,i)||i;se(r[s])&&se(o)?r[s]=e(r[s],o):se(o)?r[s]=e({},o):Q(o)?r[s]=o.slice():n&&Y(o)||(r[s]=o)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&pe(arguments[i],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(pe(t,(t,r)=>{n&&re(t)?e[r]=$(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&H(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:V,kindOfTest:X,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!oe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[K]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:ve,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:Oe,freezeMethods:e=>{Oe(e,(t,n)=>{if(re(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];re(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ye,global:we,isContextDefined:be,isSpecCompliantForm:function(e){return!!(e&&re(e.append)&&"FormData"===e[J]&&e[K])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ie(e)){if(t.indexOf(e)>=0)return;if(ee(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Q(e)?[]:{};return pe(e,(e,t)=>{const i=n(e,r+1);!Y(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Le,isThenable:e=>e&&(ie(e)||re(e))&&re(e.then)&&re(e.catch),setImmediate:xe,asap:Ce,isIterable:e=>null!=e&&re(e[K])};function Ae(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Ue.inherits(Ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ue.toJSONObject(this.config),code:this.code,status:this.status}}});const je=Ae.prototype,Ne={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ne[e]={value:e}}),Object.defineProperties(Ae,Ne),Object.defineProperty(je,"isAxiosError",{value:!0}),Ae.from=(e,t,n,r,o,i)=>{const s=Object.create(je);Ue.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Ae.call(s,a,c,n,r,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};function Be(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function Ie(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function De(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ie(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Fe=Ue.toFlatObject(Ue,{},null,function(e){return/^is[A-Z]/.test(e)});function Me(e,t,n){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ue.isUndefined(t[e])})).metaTokens,o=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ue.isDate(e))return e.toISOString();if(Ue.isBoolean(e))return e.toString();if(!a&&Ue.isBlob(e))throw new Ae("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(e)||Ue.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(Ue.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ue.isArray(e)&&function(e){return Ue.isArray(e)&&!e.some(Be)}(e)||(Ue.isFileList(e)||Ue.endsWith(n,"[]"))&&(a=Ue.toArray(e)))return n=Ie(n),a.forEach(function(e,r){!Ue.isUndefined(e)&&null!==e&&t.append(!0===s?De([n],r,i):null===s?n:n+"[]",c(e))}),!1;return!!Be(e)||(t.append(De(o,n,i),c(e)),!1)}const u=[],h=Object.assign(Fe,{defaultVisitor:l,convertValue:c,isVisitable:Be});if(!Ue.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ue.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ue.forEach(n,function(n,i){!0===(!(Ue.isUndefined(n)||null===n)&&o.call(t,n,Ue.isString(i)?i.trim():i,r,h))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t}function qe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ze(e,t){this._pairs=[],e&&Me(e,this,t)}const We=ze.prototype;function $e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ge(e,t,n){if(!t)return e;const r=n&&n.encode||$e;Ue.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Ue.isURLSearchParams(t)?t.toString():new ze(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}We.append=function(e,t){this._pairs.push([e,t])},We.toString=function(e){const t=e?function(t){return e.call(this,t,qe)}:qe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class He{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ue.forEach(this.handlers,function(t){null!==t&&e(t)})}}const Ke={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Je={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ze,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ve="undefined"!=typeof window&&"undefined"!=typeof document,Xe="object"==typeof navigator&&navigator||void 0,Ze=Ve&&(!Xe||["ReactNative","NativeScript","NS"].indexOf(Xe.product)<0),Qe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ye=Ve&&window.location.href||"http://localhost",et={.../* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:Ze,hasStandardBrowserWebWorkerEnv:Qe,navigator:Xe,origin:Ye},Symbol.toStringTag,{value:"Module"})),...Je};function tt(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&Ue.isArray(r)?r.length:i,a)return Ue.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&Ue.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Ue.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const n={};return Ue.forEachEntry(e,(e,r)=>{t(function(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const nt={transitional:Ke,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ue.isObject(e);o&&Ue.isHTMLForm(e)&&(e=new FormData(e));if(Ue.isFormData(e))return r?JSON.stringify(tt(e)):e;if(Ue.isArrayBuffer(e)||Ue.isBuffer(e)||Ue.isStream(e)||Ue.isFile(e)||Ue.isBlob(e)||Ue.isReadableStream(e))return e;if(Ue.isArrayBufferView(e))return e.buffer;if(Ue.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Me(e,new et.classes.URLSearchParams,{visitor:function(e,t,n,r){return et.isNode&&Ue.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Ue.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Me(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||nt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ue.isResponse(e)||Ue.isReadableStream(e))return e;if(e&&Ue.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(o){if(n){if("SyntaxError"===o.name)throw Ae.from(o,Ae.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],e=>{nt.headers[e]={}});const rt=Ue.toObjectSet(["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"]),ot=Symbol("internals");function it(e){return e&&String(e).trim().toLowerCase()}function st(e){return!1===e||null==e?e:Ue.isArray(e)?e.map(st):String(e)}function at(e,t,n,r,o){return Ue.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ue.isString(t)?Ue.isString(r)?-1!==t.indexOf(r):Ue.isRegExp(r)?r.test(t):void 0:void 0)}let ct=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=it(t);if(!o)throw new Error("header name must be a non-empty string");const i=Ue.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=st(e))}const i=(e,t)=>Ue.forEach(e,(e,n)=>o(e,n,t));if(Ue.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Ue.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&rt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Ue.isObject(e)&&Ue.isIterable(e)){let n,r,o={};for(const t of e){if(!Ue.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?Ue.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=it(e)){const n=Ue.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=/* @__PURE__ */Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ue.isFunction(t))return t.call(this,e,n);if(Ue.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=it(e)){const n=Ue.findKey(this,e);return!(!n||void 0===this[n]||t&&!at(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=it(e)){const o=Ue.findKey(n,e);!o||t&&!at(0,n[o],o,t)||(delete n[o],r=!0)}}return Ue.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!at(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ue.forEach(this,(r,o)=>{const i=Ue.findKey(n,o);if(i)return t[i]=st(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=st(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=/* @__PURE__ */Object.create(null);return Ue.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ue.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ot]=this[ot]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=it(e);t[r]||(!function(e,t){const n=Ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Ue.isArray(e)?e.forEach(r):r(e),this}};function lt(e,t){const n=this||nt,r=t||n,o=ct.from(r.headers);let i=r.data;return Ue.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ut(e){return!(!e||!e.__CANCEL__)}function ht(e,t,n){Ae.call(this,null==e?"canceled":e,Ae.ERR_CANCELED,t,n),this.name="CanceledError"}function ft(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ae("Request failed with status code "+n.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ue.reduceDescriptors(ct.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Ue.freezeMethods(ct),Ue.inherits(ht,Ae,{__CANCEL__:!0});const dt=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];o||(o=c),n[i]=a,r[i]=c;let u=s,h=0;for(;u!==i;)h+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=l&&c-l;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,c=o(a);r=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},gt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mt=e=>(...t)=>Ue.asap(()=>e(...t)),pt=et.hasStandardBrowserEnv?/* @__PURE__ */((e,t)=>n=>(n=new URL(n,et.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,yt=et.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Ue.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Ue.isString(r)&&a.push(`path=${r}`),Ue.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),Ue.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function wt(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const bt=e=>e instanceof ct?{...e}:e;function _t(e,t){t=t||{};const n={};function r(e,t,n,r){return Ue.isPlainObject(e)&&Ue.isPlainObject(t)?Ue.merge.call({caseless:r},e,t):Ue.isPlainObject(t)?Ue.merge({},t):Ue.isArray(t)?t.slice():t}function o(e,t,n,o){return Ue.isUndefined(t)?Ue.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Ue.isUndefined(t))return r(void 0,t)}function s(e,t){return Ue.isUndefined(t)?Ue.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(bt(e),bt(t),0,!0)};return Ue.forEach(Object.keys({...e,...t}),function(r){const i=c[r]||o,s=i(e[r],t[r],r);Ue.isUndefined(s)&&i!==a||(n[r]=s)}),n}const vt=e=>{const t=_t({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=ct.from(s),t.url=Ge(wt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Ue.isFormData(n))if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Ue.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(et.hasStandardBrowserEnv&&(r&&Ue.isFunction(r)&&(r=r(t)),r||!1!==r&&pt(t.url))){const e=o&&i&&yt.read(i);e&&s.set(o,e)}return t},St="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=vt(e);let o=r.data;const i=ct.from(r.headers).normalize();let s,a,c,l,u,{responseType:h,onUploadProgress:f,onDownloadProgress:d}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function p(){if(!m)return;const r=ct.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());ft(function(e){t(e),g()},function(e){n(e),g()},{data:h&&"text"!==h&&"json"!==h?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=p:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(p)},m.onabort=function(){m&&(n(new Ae("Request aborted",Ae.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new Ae(t&&t.message?t.message:"Network Error",Ae.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Ke;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ae(t,o.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Ue.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Ue.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),h&&"json"!==h&&(m.responseType=r.responseType),d&&([c,u]=dt(d,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,l]=dt(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new ht(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===et.protocols.indexOf(y)?n(new Ae("Unsupported protocol "+y+":",Ae.ERR_BAD_REQUEST,e)):m.send(o||null)})},Et=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ae?t:new ht(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Ae(`timeout ${t} of ms exceeded`,Ae.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>Ue.asap(s),a}},Ot=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Lt=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},xt=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Lt(e))yield*Ot(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:Rt}=Ue,Pt=(({Request:e,Response:t})=>({Request:e,Response:t}))(Ue.global),{ReadableStream:Tt,TextEncoder:kt}=Ue.global,Ct=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Ut=e=>{e=Ue.merge.call({skipUndefined:!0},Pt,e);const{fetch:t,Request:n,Response:r}=e,o=t?Rt(t):"function"==typeof fetch,i=Rt(n),s=Rt(r);if(!o)return!1;const a=o&&Rt(Tt),c=o&&("function"==typeof kt?/* @__PURE__ */(e=>t=>e.encode(t))(new kt):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=i&&a&&Ct(()=>{let e=!1;const t=new n(et.origin,{body:new Tt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=s&&a&&Ct(()=>Ue.isReadableStream(new r("").body)),h={stream:u&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ae(`Response type '${e}' is not supported`,Ae.ERR_NOT_SUPPORT,n)})});const f=async(e,t)=>{const r=Ue.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Ue.isBlob(e))return e.size;if(Ue.isSpecCompliantForm(e)){const t=new n(et.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ue.isArrayBufferView(e)||Ue.isArrayBuffer(e)?e.byteLength:(Ue.isURLSearchParams(e)&&(e+=""),Ue.isString(e)?(await c(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:s,data:a,signal:c,cancelToken:d,timeout:g,onDownloadProgress:m,onUploadProgress:p,responseType:y,headers:w,withCredentials:b="same-origin",fetchOptions:_}=vt(e),v=t||fetch;y=y?(y+"").toLowerCase():"text";let S=Et([c,d&&d.toAbortSignal()],g),E=null;const O=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let L;try{if(p&&l&&"get"!==s&&"head"!==s&&0!==(L=await f(w,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(Ue.isFormData(a)&&(e=t.headers.get("content-type"))&&w.setContentType(e),t.body){const[e,n]=gt(L,dt(mt(p)));a=xt(t.body,65536,e,n)}}Ue.isString(b)||(b=b?"include":"omit");const t=i&&"credentials"in n.prototype,c={..._,signal:S,method:s.toUpperCase(),headers:w.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};E=i&&new n(o,c);let d=await(i?v(E,_):v(o,c));const g=u&&("stream"===y||"response"===y);if(u&&(m||g&&O)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=d[t]});const t=Ue.toFiniteNumber(d.headers.get("content-length")),[n,o]=m&&gt(t,dt(mt(m),!0))||[];d=new r(xt(d.body,65536,n,()=>{o&&o(),O&&O()}),e)}y=y||"text";let x=await h[Ue.findKey(h,y)||"text"](d,e);return!g&&O&&O(),await new Promise((t,n)=>{ft(t,n,{data:x,headers:ct.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:E})})}catch(x){if(O&&O(),x&&"TypeError"===x.name&&/Load failed|fetch/i.test(x.message))throw Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,e,E),{cause:x.cause||x});throw Ae.from(x,x&&x.code,e,E)}}},At=/* @__PURE__ */new Map,jt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,c=i.length,l=At;for(;c--;)s=i[c],a=l.get(s),void 0===a&&l.set(s,a=c?/* @__PURE__ */new Map:Ut(t)),l=a;return a};jt();const Nt={http:null,xhr:St,fetch:{get:jt}};Ue.forEach(Nt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const Bt=e=>`- ${e}`,It=e=>Ue.isFunction(e)||null===e||!1===e;const Dt={getAdapter:function(e,t){e=Ue.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],o=r,!It(r)&&(o=Nt[(n=String(r)).toLowerCase()],void 0===o))throw new Ae(`Unknown adapter '${n}'`);if(o&&(Ue.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Ae("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Bt).join("\n"):" "+Bt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:Nt};function Ft(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ht(null,e)}function Mt(e){Ft(e),e.headers=ct.from(e.headers),e.data=lt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Dt.getAdapter(e.adapter||nt.adapter,e)(e).then(function(t){return Ft(e),t.data=lt.call(e,e.transformResponse,t),t.headers=ct.from(t.headers),t},function(t){return ut(t)||(Ft(e),t&&t.response&&(t.response.data=lt.call(e,e.transformResponse,t.response),t.response.headers=ct.from(t.response.headers))),Promise.reject(t)})}const qt="1.13.2",zt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Wt={};zt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+qt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Ae(r(o," has been removed"+(t?" in "+t:"")),Ae.ERR_DEPRECATED);return t&&!Wt[o]&&(Wt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},zt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const $t={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Ae("option "+i+" must be "+n,Ae.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ae("Unknown option "+i,Ae.ERR_BAD_OPTION)}},validators:zt},Gt=$t.validators;let Ht=class{constructor(e){this.defaults=e||{},this.interceptors={request:new He,response:new He}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_t(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&$t.assertOptions(n,{silentJSONParsing:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean)},!1),null!=r&&(Ue.isFunction(r)?t.paramsSerializer={serialize:r}:$t.assertOptions(r,{encode:Gt.function,serialize:Gt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),$t.assertOptions(t,{baseUrl:Gt.spelling("baseURL"),withXsrfToken:Gt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Ue.merge(o.common,o[t.method]);o&&Ue.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ct.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,h=0;if(!a){const e=[Mt.bind(this),void 0];for(e.unshift(...s),e.push(...c),u=e.length,l=Promise.resolve(t);h<u;)l=l.then(e[h++],e[h++]);return l}u=s.length;let f=t;for(;h<u;){const e=s[h++],t=s[h++];try{f=e(f)}catch(d){t.call(this,d);break}}try{l=Mt.call(this,f)}catch(d){return Promise.reject(d)}for(h=0,u=c.length;h<u;)l=l.then(c[h++],c[h++]);return l}getUri(e){return Ge(wt((e=_t(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Ue.forEach(["delete","get","head","options"],function(e){Ht.prototype[e]=function(t,n){return this.request(_t(n||{},{method:e,url:t,data:(n||{}).data}))}}),Ue.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(_t(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ht.prototype[e]=t(),Ht.prototype[e+"Form"]=t(!0)});const Kt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Kt).forEach(([e,t])=>{Kt[t]=e});const Jt=function e(t){const n=new Ht(t),r=$(Ht.prototype.request,n);return Ue.extend(r,Ht.prototype,n,{allOwnKeys:!0}),Ue.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(_t(t,n))},r}(nt);Jt.Axios=Ht,Jt.CanceledError=ht,Jt.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new ht(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Jt.isCancel=ut,Jt.VERSION=qt,Jt.toFormData=Me,Jt.AxiosError=Ae,Jt.Cancel=Jt.CanceledError,Jt.all=function(e){return Promise.all(e)},Jt.spread=function(e){return function(t){return e.apply(null,t)}},Jt.isAxiosError=function(e){return Ue.isObject(e)&&!0===e.isAxiosError},Jt.mergeConfig=_t,Jt.AxiosHeaders=ct,Jt.formToJSON=e=>tt(Ue.isHTMLForm(e)?new FormData(e):e),Jt.getAdapter=Dt.getAdapter,Jt.HttpStatusCode=Kt,Jt.default=Jt;const{Axios:Vt,AxiosError:Xt,CanceledError:Zt,isCancel:Qt,CancelToken:Yt,VERSION:en,all:tn,Cancel:nn,isAxiosError:rn,spread:on,toFormData:sn,AxiosHeaders:an,HttpStatusCode:cn,formToJSON:ln,getAdapter:un,mergeConfig:hn}=Jt,fn=w.getPar,dn=function(e,t){var n,r={v:"1.0.1",Device:0,SourceDevice:parseInt(fn("Device")||-1)};t&&(r._tui_source=((n=fn("_tui_source")||fn("from")||fn("source"))||(n=_.get("_tui_source")),n));var o=window.pdata||window.axiosData||window.reqData||{};return e=v(!0,r,o,e)},gn=function(e,t,n){return n=dn(n,t),e=w.addPars(n,e)},mn=await b(),pn="imp_sign",yn="imp_useridx";w.getPar("useridx");var wn={error:0,success:1,ServerSignError:2,jumpTo:100,window:101,alert:150,msg:160,noMoney:170,noRealName:234,nologin:666};Jt.codeEnum=wn,Jt.defaults.baseURL="",Jt.defaults.withCredentials=!0,Jt.defaults.crossDomain=!0,Jt.defaults.dataType="json",Jt.saveLogin=function(e,t){mn.debug("写入sign:",t),_.set(pn,t),e&&_.set(yn,e)},Jt.interceptors.request.use(async function(e){mn.debug("请求拦截",e),function(e,t,n){var r;"post"===e.method?(e.data=e.data||{},r=e.data):(e.params=e.params||{},r=e.params),n&&(r[t]=n)}(e,"_tui_source",w.getPar("_tui_source")||w.getPar("from")||w.getPar("source")),gn(e.url),"post"===e.method&&(e.data=w.jsonto(e.data).substring(1));const t=await En.getLogin(null,!0);return t&&(e.headers[pn]=t.sign,e.headers[yn]=_.get(yn)),e},function(e){return Promise.reject(e)}),Jt.interceptors.response.use(async function(e){if(e.data&&"true"==e.headers["res-encrypt"]){const t=await Promise.all([W.init(),N()]),n=t[0],r=await n.parseRes(e,t[1]);null==r&&window.debug&&console.warn("响应数据解析异常",r),e=r||e}if(c.isString(e.data)){const t=new Error("接口:"+e.config.url+"返回了纯字符串数据:"+e.data);return Promise.reject(t)}switch(mn.debug("响应拦截 -> "+e.config.url+"\n",e),e.data.__source=e,(e=e.data).codeEnum=wn,e.isSuccess=function(t){return e.code!==wn.success&&(t||p.msg(e.msg)),e.code===wn.success},e.code){case wn.success:return Promise.resolve(e);case wn.jumpTo:return void(location.href=e.data);case wn.window:return!1!==Promise.resolve(e)&&window.open(e.data),Promise.reject(e);case wn.alert:case wn.msg:return p.msg(e.msg),Promise.reject(e);case wn.noRealName:return impall.showReal_name();case wn.ServerSignError:case wn.nologin:if(e.__source.config.isTwice)return En.runNoLogin&&En.runNoLogin(e),Promise.resolve(e);const t=function(){return mn.debug("检测到未登录返回,发起验证登录之后,重新再请求一遍"),e.__source.config.isTwice=!0,e.__source.config.data=w.toData(e.__source.config.data),Jt(e.__source.config)};return await y.runM("login","checkLogin"),t()}return Promise.resolve(e)},function(e){return Promise.reject(e)});var bn=Jt.get;Jt.get=function(e,t,n){return(n=n||{}).params=t,bn(e,n)};const _n=await N(),vn=await i();class Sn{constructor(){this.loginDomain=window.loginDomain="localhost"===location.hostname&&k().isLocalhost?"https://localhost:44360":_n.domainLogin,this.ver="v1.0.0",this.loginTime=21600,this.prefix="IMP_PLUG_LOGIN_",this.initUrls(),this.initKeys(),this.initEventKeys(),this.bindEvents(),this.iframeBox=null,this.iframe=null,this.iframeBg=null,this.autoLogin={},this.exitLogin={},this.threeLoginWin=null,this.checkTemp(),window.login=this}initUrls(){this.urls={login:gn(this.loginDomain+"/index.html",!0),reg:gn(this.loginDomain+"/index.html?type=reg",!0),loginPage:gn(this.loginDomain+"/loginPage.html",!0),regPage:gn(this.loginDomain+"/regPage.html",!0),autoLogin:gn(this.loginDomain+"/"+this.ver+"/user/autoLogin"),checkSSOLogin:gn(this.loginDomain+"/"+this.ver+"/user/checkSSOLogin"),checkLoginPage:gn(this.loginDomain+"/"+this.ver+"/user/checkLoginPage"),CheckLoginByCode:gn(this.loginDomain+"/"+this.ver+"/user/CheckLoginByCode"),exitLogin:this.loginDomain+"/"+this.ver+"/user/exitLogin",userInfo:this.loginDomain+"/"+this.ver+"/user/UserInfo",writeCookies:"/ashx/member/CheckSSOWriteCookie.ashx",webLoginOut:"/ajax/logout.aspx"}}initKeys(){const e=e=>this.prefix+e;this.keys={msg_loginReturn:e("loginReturn"),msg_close:e("close"),msg_goto:e("goto"),msg_autoSize:e("autoSize"),msg_getSize:e("getSize"),cache_loginSave:e("loginSave"),cache_userInfo:e("userInfo"),checkLogin_code:"code",loginStatus:"__login_status",loginResult:"__login_result",url_tempSignKey:"sign",url_tempUseridxKey:"useridx"}}initEventKeys(){const e=e=>this.prefix+e;this.eventKeys={nologin:e("login"),closeThreeLogin:e("close_login_three")}}bindEvents(){l.on(this.keys.msg_close,()=>{vn.debug("关闭登录框"),this.close()}),l.on(this.keys.msg_goto,e=>{this.handlePageTransition(e)}),l.on(this.keys.msg_autoSize,e=>{this.handleAutoSize(e)}),l.on(this.keys.msg_loginReturn,async e=>{await this.dealwithLoginRes(e)}),l.on(this.eventKeys.closeThreeLogin,e=>{this.save(e),this.closeThreeLoginWin()}),y.onM("login","getLogin",this.getLogin.bind(this)),y.onM("login","noLogin",this.runNoLogin.bind(this))}handlePageTransition(e){if(!this.iframe)return;this.iframe.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframe.classList.add("IMP_PLUG_LOGIN_animateOut");const t=()=>{this.iframe.src=e.url,this.iframe.classList.remove("IMP_PLUG_LOGIN_animateOut"),this.iframe.removeEventListener("transitionend",t)};this.iframe.addEventListener("transitionend",t)}handleAutoSize(e){this.iframe&&(vn.debug("登录框尺寸适配",e),this.iframe.width=e.width,this.iframe.height=e.height,this.iframe.classList.add("IMP_PLUG_LOGIN_animateIn"),this.iframeBg.classList.add("IMP_PLUG_LOGIN_animateIn"))}runAutoLoginCallback(e,t){this.autoLogin.callbacks&&0!==this.autoLogin.callbacks.length&&(this.autoLogin.callbacks.forEach(t=>{if(u(e))t.ok&&t.ok(e);else{const n=this.getLogin(e);t.ok&&t.ok(n&&n.code===Jt.codeEnum.success)}}),this.autoLogin.iframe&&this.autoLogin.iframe.remove(),this.autoLogin.window&&this.autoLogin.window.close(),this.autoLogin={},e&&this.close())}async dealwithLoginRes(t){if(vn.debug("登录消息返回",t),t.isok=t.code===Jt.codeEnum.success,1!==t.code)return this.clear(),void this.runAutoLoginCallback(t);if(t.sign&&8===t.sign.length)this.save(t);else{e.delParsUpUrl([this.keys.url_tempSignKey,this.keys.url_tempUseridxKey]),h.set(this.keys.cache_loginSave,t,this.loginTime),Jt.saveLogin(t.useridx,t.sign);try{_n.domainmaster.startsWith(location.origin)&&await Jt.get(this.urls.writeCookies,null,null,"text")}finally{this.runAutoLoginCallback(t)}}}save(e){const t=e.__source?.headers?.[e.sign]||e.data?.headers?.[e.sign]||e.sign,n=e.useridx||e.data?.___useridx;l.send(this.keys.msg_loginReturn,{code:e.code,msg:e.msg,sign:t,useridx:n})}clear(){h.remove(this.keys.cache_loginSave),h.remove(this.keys.cache_userInfo),h.remove(this.keys.cache_userInfo+"_more"),h.remove(this.keys.cache_userInfo+"_simplify")}onLoginOK(e,t){this.autoLogin.callbacks||(this.autoLogin.callbacks=[]),this.autoLogin.callbacks.push({ok:e,no:t})}create(e){const t=n(!0,{url:"",name:"",option:null},e);this.createIframeBox(),this.createIframe(t),this.applyStyles(t.option||{}),this.appendToDocument()}createIframeBox(){this.iframeBox=document.createElement("div"),this.iframeBox.className="IMP_PLUG_LOGIN_box";const e=parseFloat(window.getComputedStyle(document.documentElement).zoom);e<1&&(this.iframeBox.style.zoom=(1/e).toFixed(2)),this.iframe=document.createElement("iframe"),this.iframeBg=document.createElement("div")}createIframe(e){this.iframe.id=this.iframe.name=e.name,this.iframe.src=e.url;const t=e.option||{};this.iframe.width=t.width||400,this.iframe.height=t.height||400,this.iframe.scrolling=t.scrolling||"no",this.iframe.marginWidth=t.marginWidth||"0",this.iframe.marginHeight=t.marginHeight||"0",this.iframe.frameBorder=t.frameBorder||"0"}applyStyles(e){Object.assign(this.iframe.style,{zIndex:3e3,position:"fixed",borderRadius:e.radius||"none",opacity:0}),Object.assign(this.iframeBg.style,{position:"fixed",backgroundColor:"#6f6f6f80",width:"100%",height:"100%",top:0,left:0,opacity:0}),this.applyPosition(e.offset||"center"),this.applyAnimation(e)}applyPosition(e){const t={center:{top:"50%",left:"50%",transform:"translate(-50%, -50%)"},top:{top:"5%",left:"50%",transform:"translateX(-50%)"},bottom:{bottom:"5%",left:"50%",transform:"translateX(-50%)"},lt:{top:"5%",left:"5%"},lb:{bottom:"5%",left:"5%"},rt:{top:"5%",right:"5%"},rb:{bottom:"5%",right:"5%"}},n=t[e]||t.center;Object.assign(this.iframe.style,n)}applyAnimation(e){const t=e.animTime||300;this.iframe.style.transition=`opacity ${t}ms`,this.iframeBg.style.transition=`opacity ${t}ms`,this.createAnimationStyles(e.anime||0)}createAnimationStyles(e){const t={0:".IMP_PLUG_LOGIN_animateIn{opacity:1 !important;} .IMP_PLUG_LOGIN_animateOut{opacity:0 !important;}"},n=t[e]||t[0],r=document.createElement("style");r.id="IMP_PLUG_LOGIN_animateCss";try{r.appendChild(document.createTextNode(n))}catch(o){r.styleSheet.cssText=n}document.head.appendChild(r)}appendToDocument(){this.iframeBox.append(this.iframe),this.iframeBox.append(this.iframeBg),document.body.append(this.iframeBox)}istop(){return parent===window}close(){if(!this.istop())return;const e=()=>{this.iframeBox&&(this.iframeBox.remove(),this.iframeBox=null),this.autoLogin.iframe&&this.autoLogin.iframe.remove();const e=document.getElementById("IMP_PLUG_LOGIN_animateCss");e&&e.remove()};this.iframeBg&&(this.iframeBg.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframeBg.classList.add("IMP_PLUG_LOGIN_animateOut")),this.iframe?(this.iframe.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframe.classList.add("IMP_PLUG_LOGIN_animateOut"),this.iframe.addEventListener("transitionend",e,{once:!0})):e()}autoSize(e,t){l.send(this.keys.msg_autoSize,{width:e||document.body.scrollWidth,height:t||document.body.scrollHeight})}open(e=!1){if(this.iframeBox)return Promise.resolve();const t=new Promise((e,t)=>{this.onLoginOK(e,t),this.istop()?this.create({url:this.urls.login,name:"signIn",option:{radius:"4px"}}):l.send(this.keys.msg_goto,{url:this.urls.login})});return e?t:t.then(()=>location.reload())}openPage(){const t=e.getPar("sourceurl")||location.href,n=e.addPar("sourceurl",unescape(t),this.urls.loginPage);location.href=n}openReg(e=!1){if(this.iframeBox)return Promise.resolve();const t=new Promise((e,t)=>{this.onLoginOK(e,t),this.istop()?this.create({url:this.urls.reg,name:"signIn",option:{radius:"4px"}}):l.send(this.keys.msg_goto,{url:this.urls.reg})});return e?t:t.then(()=>location.reload())}openRegPage(){const t=e.getPar("sourceurl")||location.href,n=e.addPar("sourceurl",unescape(t),this.urls.regPage);location.href=n}threeLogin(e,t){return new Promise((n,r)=>{this.closeThreeLoginWin(),this.onLoginOK(n,r);const o=gn(`/v1.0.0/user/OpenThreeLogin?type=${e}`,t);this.threeLoginWin=window.open(o)})}closeThreeLoginWin(){this.threeLoginWin&&(this.threeLoginWin.close(),this.threeLoginWin=null)}getWechatCode(){const t=e.getPar("__login_code");if(!t){const e=`${this.loginDomain}/v1.0.0/user/OpenThreeLogin?type=wechatcode&redirect_uri=${encodeURIComponent(location.href)}`;location.href=e}return t}getLogin(e,t=!1){const n=e||h.get(this.keys.cache_loginSave);return n?(t||delete n.sign,n):null}getUser(e,t=!1,n=!1){"function"!=typeof e&&(n=t,t=e,e=null);const r=new Promise((e,r)=>{const o=this.keys.cache_userInfo+"_"+(t?"more":"simplify");if(!n){const t=h.get(o);if(t)return void e(t)}Jt.get(this.urls.userInfo,{more:t?1:0}).then(t=>{1===t.code?(h.set(o,t.data,this.loginTime),e(t.data)):r(t)})});return e?r.then(e):r}islogin(){return!!this.getLogin()}async check(){return!(this.isTempCheck||!this.islogin())||this.checkZ()}checkZ(){return new Promise((t,n)=>{if(!this.autoLogin.iframe&&!this.autoLogin.window){let t=this.urls.autoLogin;t=e.addPars({sign:e.getPar(this.keys.url_tempSignKey),useridx:e.getPar(this.keys.url_tempUseridxKey)},t),this.autoLogin.iframe=this.getIframeUrl(t,this.keys.msg_loginReturn),this.autoLogin.callbacks=[]}this.autoLogin.callbacks.push({ok:t,no:()=>{t(!1)}})})}async checkTemp(){if(this.isTempCheck=e.getPar(this.keys.url_tempSignKey)&&e.getPar(this.keys.url_tempUseridxKey),this.isTempCheck)return this.checkZ()}checkPage(){return new Promise((t,n)=>{const r=e.getPar(this.keys.checkLogin_code),o=parseInt(e.getPar(this.keys.loginStatus)||-1);vn.debug("checkLogin_code:",r),0===o?(e.delParsUpUrl([this.keys.loginStatus]),n("用户未登录!")):o&&r?Jt.get(this.urls.CheckLoginByCode,{code:r}).then(r=>{1===r.code?(e.delParsUpUrl([this.keys.checkLogin_code,this.keys.loginStatus]),this.save(r.data),t(r)):n()}):Jt.get(this.urls.checkSSOLogin).then(n=>{if(1===n.code)this.getUser().then(t);else{let t=e.addPars({redirect_uri:encodeURIComponent(location.href)},this.urls.checkLoginPage);location.href=t}})})}res(t){const n=decodeURIComponent(e.getPar(this.keys.loginResult)||"");if(n){const r=JSON.parse(n);t?.(r),e.delParsUpUrl([this.keys.loginResult])}}exit(e=!1){return vn.debug("退出登录!"),this.exitLogin.Promise||(this.exitLogin.Promise=new Promise(e=>{S.get(this.urls.exitLogin).then(t=>{E(this.urls.webLoginOut,null,()=>{e(t)},"text"),this.clear(),this.exitLogin={}})}),e||(this.exitLogin.Promise=this.exitLogin.Promise.then(()=>{location.reload()}))),this.exitLogin.Promise}getIframeUrl(t,n){const r=document.createElement("iframe");Object.assign(r.style,{position:"absolute",width:"1px",height:"1px",top:"-100px"}),r.dataset.flag=9513,n&&(t=e.addPar("post_msg_name",n,t)),r.src=t;let o,i=!1;const s=()=>{r.removeEventListener("error",a),clearTimeout(o)},a=e=>{i||(i=!0,s(),r.remove(),this.runAutoLoginCallback(!1))};return r.addEventListener("load",e=>{i||(i=!0,s(),console.log("登录页面已打开"))},{once:!0}),r.addEventListener("error",a,{once:!0}),o=setTimeout(()=>{a()},1e4),document.body.append(r),r}onNoLogin(e){y?y.on(this.eventKeys.nologin,e):console.warn("事件模块event未加载,事件相关功能不可用!")}runNoLogin(e){return y?Promise.resolve(y.run(this.eventKeys.nologin,e)):(console.warn("事件模块event未加载,事件相关功能不可用!"),Promise.resolve())}writeXhr(e){if(!e)return console.warn("xhr不能为空!"),e;const t=this.getLogin(null,!0);return t&&(e.withCredentials=!0,e.setRequestHeader("imp_sign",t.sign),e.setRequestHeader("imp_useridx",t.useridx)),e}debug(...e){console&&console.debug&&console.debug(...e)}}const En=new Sn;f("\r\n\r\n\r\n/*粉丝团等级*/\r\n.fanclubgrage{background-repeat:no-repeat;background-size:100%;height:22px !important;aspect-ratio: 77 / 22;display:inline-block;color:#fff;text-indent:32px;line-height:23px !important;font-size: 12px;}\r\n\r\n\r\n","imp-restool");const On={};const Ln=new class{constructor(){this._config=null,this.initPromise=this.init()}async init(){return this._config||(this._config=await N()),this}async ensureConfig(){return this._config||await this.initPromise,this}get statics(){return this._config?{nohead:`${this._config.sr}/live/webSkins_site/${this._config.sitetype}/images/nohead.jpg`}:{nohead:""}}getSrc(e,t,n){if(!this._config)return"";let r=e;if(isNaN(parseInt(e))&&(r=this._config.paths.typeEnums[e]),d(e)&&["emblem","bubble","head","cardskin"].indexOf(e.toLowerCase())>=0&&(g(t)||m(t))&&0===(t=this.titlesTool.getTitlexIdFromType(t,e)))return"";if(4!==r&&0!=t&&!t)return"";r=parseInt(r);const o=this._config.paths.types[`t_${r}`],i=o.pc_path||o.path,s=o.pc_suffix||o.suffix;let a=this._config.js_version;if(n){a=impui.getCodeVer()[n]||this._config.js_version}return t||0===t?`${i}${t}${s}?d=${a}`:`${i}?d=${a}`}getEmotSrc(e,t,n=!1){return n?this.getSrc("emot",`${e}/${t}_s`):this.getSrc("emot",`${e}/${t}`)}getUserLevelSrc(e){return this.getSrc("user",e)}getAnchorLevelSrc(e){return this.getSrc("host",e)}getBubbleZipSrc(e){return this.getSrc("bubble_zip",e)}getFanclubLevelHtml(e,t){return`<span class="fanclubgrage" style="background-image:url(${this.getSrc("fans_grade",e)})">${t}</span>`}async getBubbleImageMap(e,t){const n=this.getBubbleZipSrc(e);return await this.getZipUrlMap(n,t)}getSrImgSrc(e){return e?e.startsWith("http")?e:`${this._config.sr}${e.startsWith("/")?e:"/"+e}`:""}async getZipUrlMap(e,t){await this.ensureConfig();const{jszip:n}=await impui.loadAsync(["jszip"]),r=new n;try{let n;if(On[e])n=On[e];else{const t=await fetch(e),o=await t.arrayBuffer();n=await r.loadAsync(o),On[e]=n}t=t||(()=>!0);const o={},i=[];n.forEach(async(e,n)=>{if(t(e,n)){const t=n.async("blob").then(t=>{const n=URL.createObjectURL(t);return{key:e,url:n}});i.push(t)}});return(await Promise.all(i)).forEach(e=>{o[e.key]=e.url}),o}catch(o){return console.error("获取压缩包失败:",o),null}}get titlesTool(){return{converTitlesex:e=>{if(!e)return{};if(g(e))return e;if(d(e))return JSON.parse(e);const t={};return m(e)&&e.forEach(e=>{t[e.titleid]=e}),t},getTitlesexFromType:(e,t)=>{const n=this.titlesTool.converTitlesex(e),r=[];for(const o in n){n[o].type===t&&r.push(parseInt(o))}return r},getTitlexIdFromType:(e,t)=>{const n=this.titlesTool.converTitlesex(e);let r=0,o=Number.MAX_VALUE;const i=t.toLowerCase();for(const s in n){const e=n[s];if(e.type.toLowerCase()===i){if("bubble"!==i)return parseInt(s);const t=parseInt(e.endtime);t<o&&(r=parseInt(s),o=t)}}return r},getHeadBorderSrc:e=>this.getSrc(7,e),getHeadBorderImg:e=>`<div class="border_img"><img src="${this.titlesTool.getHeadBorderSrc(e)}" /></div>`,getHeadBorder:(e,t)=>(e.addClass("headBorder"),e.append(this.titlesTool.getHeadBorderImg(t)),e)}}};export{Sn as Login,Jt as axios,U as getAllConfig,I as getApiurl,C as getCodeVer,N as getConfig,A as getDomainConfig,k as getEvnConfig,j as getSimplifyConfig,W as gotool,gn as handleUrl,En as login,Ln as restool};
1
+ import{getAllConfig as o,getApiurl as i,getCodeVer as s,getConfig as e,getDomainConfig as r,getEvnConfig as m,getSimplifyConfig as x}from"./config/index.es.js";import{gotool as d}from"./gotool/index/index.es.js";import{Login as n,default as t}from"./login/index.es.js";import"./axios/index.es.js";import{handleUrl as a}from"./core/index.es.js";import{restool as f}from"./restool/index/index.es.js";import{GoWebView as p,appEmptyClick as j,appGoBack as l,appGoDressUpCenter as g,appGoPay as u,appGoRoom as c,appGoRoomV2 as b,appGoToLiveRoom as h,appInviteShare as _,appNotify as k,closeFrame as q,copy as v,getUrl as w,goAppPage as y,goUserHome as z,holdLink as A,msg as B,openWxSappPay as C,playMP4 as D,sendGift as E,setTitle as F,share as G,shareBtn as H,shareV2 as I,sliderRes as J,windowOpen as K}from"./imph5/index.es.js";import{default as L}from"./node_modules/axios/lib/axios/index.es.js";export{p as GoWebView,n as Login,j as appEmptyClick,l as appGoBack,g as appGoDressUpCenter,u as appGoPay,c as appGoRoom,b as appGoRoomV2,h as appGoToLiveRoom,_ as appInviteShare,k as appNotify,L as axios,q as closeFrame,v as copy,o as getAllConfig,i as getApiurl,s as getCodeVer,e as getConfig,r as getDomainConfig,m as getEvnConfig,x as getSimplifyConfig,w as getUrl,y as goAppPage,z as goUserHome,d as gotool,a as handleUrl,A as holdLink,t as login,B as msg,C as openWxSappPay,D as playMP4,f as restool,E as sendGift,F as setTitle,G as share,H as shareBtn,I as shareV2,J as sliderRes,K as windowOpen};
@@ -0,0 +1 @@
1
+ import"../axios/index.es.js";import{extend as e}from"../packages/com/dist/core/index.es/index.es.js";import{getLog as i}from"../packages/com/dist/log/index.es/index.es.js";import{isBoolean as t}from"../packages/com/dist/typetool/index.es/index.es.js";import"../packages/com/dist/browser/index.es/index.es.js";import"../packages/com/dist/str/index.es/index.es.js";import{cache as s}from"../packages/com/dist/cache/index.es/index.es.js";import"../packages/com/dist/req/index.es/index.es.js";import{urltool as o}from"../packages/com/dist/url/index.es/index.es.js";import{message as n}from"../packages/com/dist/message/index.es/index.es.js";import{event as r}from"@impui/com/event";import{handleUrl as a}from"../core/index.es.js";import{getConfig as h,getEvnConfig as l}from"../config/index.es.js";import{iframeReq as c,get as g}from"@impui/com/req";import m from"../node_modules/axios/lib/axios/index.es.js";import"../node_modules/axios/index/index.es.js";const d=await h(),u=await i();class p{constructor(){this.loginDomain=window.loginDomain="localhost"===location.hostname&&l().isLocalhost?"https://localhost:44360":d.domainLogin,this.ver="v1.0.0",this.loginTime=21600,this.prefix="IMP_PLUG_LOGIN_",this.initUrls(),this.initKeys(),this.initEventKeys(),this.bindEvents(),this.iframeBox=null,this.iframe=null,this.iframeBg=null,this.autoLogin={},this.exitLogin={},this.threeLoginWin=null,this.checkTemp(),window.login=this}initUrls(){this.urls={login:a(this.loginDomain+"/index.html",!0),reg:a(this.loginDomain+"/index.html?type=reg",!0),loginPage:a(this.loginDomain+"/loginPage.html",!0),regPage:a(this.loginDomain+"/regPage.html",!0),autoLogin:a(this.loginDomain+"/"+this.ver+"/user/autoLogin"),checkSSOLogin:a(this.loginDomain+"/"+this.ver+"/user/checkSSOLogin"),checkLoginPage:a(this.loginDomain+"/"+this.ver+"/user/checkLoginPage"),CheckLoginByCode:a(this.loginDomain+"/"+this.ver+"/user/CheckLoginByCode"),exitLogin:this.loginDomain+"/"+this.ver+"/user/exitLogin",userInfo:this.loginDomain+"/"+this.ver+"/user/UserInfo",writeCookies:"/ashx/member/CheckSSOWriteCookie.ashx",webLoginOut:"/ajax/logout.aspx"}}initKeys(){const e=e=>this.prefix+e;this.keys={msg_loginReturn:e("loginReturn"),msg_close:e("close"),msg_goto:e("goto"),msg_autoSize:e("autoSize"),msg_getSize:e("getSize"),cache_loginSave:e("loginSave"),cache_userInfo:e("userInfo"),checkLogin_code:"code",loginStatus:"__login_status",loginResult:"__login_result",url_tempSignKey:"sign",url_tempUseridxKey:"useridx"}}initEventKeys(){const e=e=>this.prefix+e;this.eventKeys={nologin:e("login"),closeThreeLogin:e("close_login_three")}}bindEvents(){n.on(this.keys.msg_close,()=>{u.debug("关闭登录框"),this.close()}),n.on(this.keys.msg_goto,e=>{this.handlePageTransition(e)}),n.on(this.keys.msg_autoSize,e=>{this.handleAutoSize(e)}),n.on(this.keys.msg_loginReturn,async e=>{await this.dealwithLoginRes(e)}),n.on(this.eventKeys.closeThreeLogin,e=>{this.save(e),this.closeThreeLoginWin()}),r.onM("login","getLogin",this.getLogin.bind(this)),r.onM("login","noLogin",this.runNoLogin.bind(this))}handlePageTransition(e){if(!this.iframe)return;this.iframe.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframe.classList.add("IMP_PLUG_LOGIN_animateOut");const i=()=>{this.iframe.src=e.url,this.iframe.classList.remove("IMP_PLUG_LOGIN_animateOut"),this.iframe.removeEventListener("transitionend",i)};this.iframe.addEventListener("transitionend",i)}handleAutoSize(e){this.iframe&&(u.debug("登录框尺寸适配",e),this.iframe.width=e.width,this.iframe.height=e.height,this.iframe.classList.add("IMP_PLUG_LOGIN_animateIn"),this.iframeBg.classList.add("IMP_PLUG_LOGIN_animateIn"))}runAutoLoginCallback(e,i){this.autoLogin.callbacks&&0!==this.autoLogin.callbacks.length&&(this.autoLogin.callbacks.forEach(i=>{if(t(e))i.ok&&i.ok(e);else{const t=this.getLogin(e);i.ok&&i.ok(t&&t.code===m.codeEnum.success)}}),this.autoLogin.iframe&&this.autoLogin.iframe.remove(),this.autoLogin.window&&this.autoLogin.window.close(),this.autoLogin={},e&&this.close())}async dealwithLoginRes(e){if(u.debug("登录消息返回",e),e.isok=e.code===m.codeEnum.success,1!==e.code)return this.clear(),void this.runAutoLoginCallback(e);if(e.sign&&8===e.sign.length)this.save(e);else{o.delParsUpUrl([this.keys.url_tempSignKey,this.keys.url_tempUseridxKey]),s.set(this.keys.cache_loginSave,e,this.loginTime),m.saveLogin(e.useridx,e.sign);try{d.domainmaster.startsWith(location.origin)&&await m.get(this.urls.writeCookies,null,null,"text")}finally{this.runAutoLoginCallback(e)}}}save(e){const i=e.__source?.headers?.[e.sign]||e.data?.headers?.[e.sign]||e.sign,t=e.useridx||e.data?.___useridx;n.send(this.keys.msg_loginReturn,{code:e.code,msg:e.msg,sign:i,useridx:t})}clear(){s.remove(this.keys.cache_loginSave),s.remove(this.keys.cache_userInfo),s.remove(this.keys.cache_userInfo+"_more"),s.remove(this.keys.cache_userInfo+"_simplify")}onLoginOK(e,i){this.autoLogin.callbacks||(this.autoLogin.callbacks=[]),this.autoLogin.callbacks.push({ok:e,no:i})}create(i){const t=e(!0,{url:"",name:"",option:null},i);this.createIframeBox(),this.createIframe(t),this.applyStyles(t.option||{}),this.appendToDocument()}createIframeBox(){this.iframeBox=document.createElement("div"),this.iframeBox.className="IMP_PLUG_LOGIN_box";const e=parseFloat(window.getComputedStyle(document.documentElement).zoom);e<1&&(this.iframeBox.style.zoom=(1/e).toFixed(2)),this.iframe=document.createElement("iframe"),this.iframeBg=document.createElement("div")}createIframe(e){this.iframe.id=this.iframe.name=e.name,this.iframe.src=e.url;const i=e.option||{};this.iframe.width=i.width||400,this.iframe.height=i.height||400,this.iframe.scrolling=i.scrolling||"no",this.iframe.marginWidth=i.marginWidth||"0",this.iframe.marginHeight=i.marginHeight||"0",this.iframe.frameBorder=i.frameBorder||"0"}applyStyles(e){Object.assign(this.iframe.style,{zIndex:3e3,position:"fixed",borderRadius:e.radius||"none",opacity:0}),Object.assign(this.iframeBg.style,{position:"fixed",backgroundColor:"#6f6f6f80",width:"100%",height:"100%",top:0,left:0,opacity:0}),this.applyPosition(e.offset||"center"),this.applyAnimation(e)}applyPosition(e){const i={center:{top:"50%",left:"50%",transform:"translate(-50%, -50%)"},top:{top:"5%",left:"50%",transform:"translateX(-50%)"},bottom:{bottom:"5%",left:"50%",transform:"translateX(-50%)"},lt:{top:"5%",left:"5%"},lb:{bottom:"5%",left:"5%"},rt:{top:"5%",right:"5%"},rb:{bottom:"5%",right:"5%"}},t=i[e]||i.center;Object.assign(this.iframe.style,t)}applyAnimation(e){const i=e.animTime||300;this.iframe.style.transition=`opacity ${i}ms`,this.iframeBg.style.transition=`opacity ${i}ms`,this.createAnimationStyles(e.anime||0)}createAnimationStyles(e){const i={0:".IMP_PLUG_LOGIN_animateIn{opacity:1 !important;} .IMP_PLUG_LOGIN_animateOut{opacity:0 !important;}"},t=i[e]||i[0],s=document.createElement("style");s.id="IMP_PLUG_LOGIN_animateCss";try{s.appendChild(document.createTextNode(t))}catch(o){s.styleSheet.cssText=t}document.head.appendChild(s)}appendToDocument(){this.iframeBox.append(this.iframe),this.iframeBox.append(this.iframeBg),document.body.append(this.iframeBox)}istop(){return parent===window}close(){if(!this.istop())return;const e=()=>{this.iframeBox&&(this.iframeBox.remove(),this.iframeBox=null),this.autoLogin.iframe&&this.autoLogin.iframe.remove();const e=document.getElementById("IMP_PLUG_LOGIN_animateCss");e&&e.remove()};this.iframeBg&&(this.iframeBg.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframeBg.classList.add("IMP_PLUG_LOGIN_animateOut")),this.iframe?(this.iframe.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframe.classList.add("IMP_PLUG_LOGIN_animateOut"),this.iframe.addEventListener("transitionend",e,{once:!0})):e()}autoSize(e,i){n.send(this.keys.msg_autoSize,{width:e||document.body.scrollWidth,height:i||document.body.scrollHeight})}open(e=!1){if(this.iframeBox)return Promise.resolve();const i=new Promise((e,i)=>{this.onLoginOK(e,i),this.istop()?this.create({url:this.urls.login,name:"signIn",option:{radius:"4px"}}):n.send(this.keys.msg_goto,{url:this.urls.login})});return e?i:i.then(()=>location.reload())}openPage(){const e=o.getPar("sourceurl")||location.href,i=o.addPar("sourceurl",unescape(e),this.urls.loginPage);location.href=i}openReg(e=!1){if(this.iframeBox)return Promise.resolve();const i=new Promise((e,i)=>{this.onLoginOK(e,i),this.istop()?this.create({url:this.urls.reg,name:"signIn",option:{radius:"4px"}}):n.send(this.keys.msg_goto,{url:this.urls.reg})});return e?i:i.then(()=>location.reload())}openRegPage(){const e=o.getPar("sourceurl")||location.href,i=o.addPar("sourceurl",unescape(e),this.urls.regPage);location.href=i}threeLogin(e,i){return new Promise((t,s)=>{this.closeThreeLoginWin(),this.onLoginOK(t,s);const o=a(`/v1.0.0/user/OpenThreeLogin?type=${e}`,i);this.threeLoginWin=window.open(o)})}closeThreeLoginWin(){this.threeLoginWin&&(this.threeLoginWin.close(),this.threeLoginWin=null)}getWechatCode(){const e=o.getPar("__login_code");if(!e){const e=`${this.loginDomain}/v1.0.0/user/OpenThreeLogin?type=wechatcode&redirect_uri=${encodeURIComponent(location.href)}`;location.href=e}return e}getLogin(e,i=!1){const t=e||s.get(this.keys.cache_loginSave);return t?(i||delete t.sign,t):null}getUser(e,i=!1,t=!1){"function"!=typeof e&&(t=i,i=e,e=null);const o=new Promise((e,o)=>{const n=this.keys.cache_userInfo+"_"+(i?"more":"simplify");if(!t){const i=s.get(n);if(i)return void e(i)}m.get(this.urls.userInfo,{more:i?1:0}).then(i=>{1===i.code?(s.set(n,i.data,this.loginTime),e(i.data)):o(i)})});return e?o.then(e):o}islogin(){return!!this.getLogin()}async check(){return!(this.isTempCheck||!this.islogin())||this.checkZ()}checkZ(){return new Promise((e,i)=>{if(!this.autoLogin.iframe&&!this.autoLogin.window){let e=this.urls.autoLogin;e=o.addPars({sign:o.getPar(this.keys.url_tempSignKey),useridx:o.getPar(this.keys.url_tempUseridxKey)},e),this.autoLogin.iframe=this.getIframeUrl(e,this.keys.msg_loginReturn),this.autoLogin.callbacks=[]}this.autoLogin.callbacks.push({ok:e,no:()=>{e(!1)}})})}async checkTemp(){if(this.isTempCheck=o.getPar(this.keys.url_tempSignKey)&&o.getPar(this.keys.url_tempUseridxKey),this.isTempCheck)return this.checkZ()}checkPage(){return new Promise((e,i)=>{const t=o.getPar(this.keys.checkLogin_code),s=parseInt(o.getPar(this.keys.loginStatus)||-1);u.debug("checkLogin_code:",t),0===s?(o.delParsUpUrl([this.keys.loginStatus]),i("用户未登录!")):s&&t?m.get(this.urls.CheckLoginByCode,{code:t}).then(t=>{1===t.code?(o.delParsUpUrl([this.keys.checkLogin_code,this.keys.loginStatus]),this.save(t.data),e(t)):i()}):m.get(this.urls.checkSSOLogin).then(i=>{if(1===i.code)this.getUser().then(e);else{let e=o.addPars({redirect_uri:encodeURIComponent(location.href)},this.urls.checkLoginPage);location.href=e}})})}res(e){const i=decodeURIComponent(o.getPar(this.keys.loginResult)||"");if(i){const t=JSON.parse(i);e?.(t),o.delParsUpUrl([this.keys.loginResult])}}exit(e=!1){return u.debug("退出登录!"),this.exitLogin.Promise||(this.exitLogin.Promise=new Promise(e=>{c.get(this.urls.exitLogin).then(i=>{g(this.urls.webLoginOut,null,()=>{e(i)},"text"),this.clear(),this.exitLogin={}})}),e||(this.exitLogin.Promise=this.exitLogin.Promise.then(()=>{location.reload()}))),this.exitLogin.Promise}getIframeUrl(e,i){const t=document.createElement("iframe");Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",top:"-100px"}),t.dataset.flag=9513,i&&(e=o.addPar("post_msg_name",i,e)),t.src=e;let s,n=!1;const r=()=>{t.removeEventListener("error",a),clearTimeout(s)},a=e=>{n||(n=!0,r(),t.remove(),this.runAutoLoginCallback(!1))};return t.addEventListener("load",e=>{n||(n=!0,r(),console.log("登录页面已打开"))},{once:!0}),t.addEventListener("error",a,{once:!0}),s=setTimeout(()=>{a()},1e4),document.body.append(t),t}onNoLogin(e){r?r.on(this.eventKeys.nologin,e):console.warn("事件模块event未加载,事件相关功能不可用!")}runNoLogin(e){return r?Promise.resolve(r.run(this.eventKeys.nologin,e)):(console.warn("事件模块event未加载,事件相关功能不可用!"),Promise.resolve())}writeXhr(e){if(!e)return console.warn("xhr不能为空!"),e;const i=this.getLogin(null,!0);return i&&(e.withCredentials=!0,e.setRequestHeader("imp_sign",i.sign),e.setRequestHeader("imp_useridx",i.useridx)),e}debug(...e){console&&console.debug&&console.debug(...e)}}const f=new p;export{p as Login,f as default,f as login};
@@ -0,0 +1 @@
1
+ import o from"../lib/axios/index.es.js";const{Axios:e,AxiosError:r,CanceledError:a,isCancel:s,CancelToken:t,VERSION:i,all:l,Cancel:n,isAxiosError:d,spread:x,toFormData:C,AxiosHeaders:c,HttpStatusCode:m,formToJSON:p,getAdapter:A,mergeConfig:f}=o;export{e as Axios,r as AxiosError,c as AxiosHeaders,n as Cancel,t as CancelToken,a as CanceledError,m as HttpStatusCode,i as VERSION,l as all,o as default,p as formToJSON,A as getAdapter,d as isAxiosError,s as isCancel,f as mergeConfig,x as spread,C as toFormData};
@@ -0,0 +1 @@
1
+ import e from"../../utils/index.es.js";import t from"../../helpers/null/index.es.js";import r from"../xhr/index.es.js";import{getFetch as n}from"../fetch/index.es.js";import o from"../../core/AxiosError/index.es.js";const i={http:t,xhr:r,fetch:{get:n}};e.forEach(i,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const s=e=>`- ${e}`,a=t=>e.isFunction(t)||null===t||!1===t;const p={getAdapter:function(t,r){t=e.isArray(t)?t:[t];const{length:n}=t;let p,c;const d={};for(let s=0;s<n;s++){let n;if(p=t[s],c=p,!a(p)&&(c=i[(n=String(p)).toLowerCase()],void 0===c))throw new o(`Unknown adapter '${n}'`);if(c&&(e.isFunction(c)||(c=c.get(r))))break;d[n||"#"+s]=c}if(!c){const e=Object.entries(d).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(s).join("\n"):" "+s(e[0]):"as no adapter specified";throw new o("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return c},adapters:i};export{p as default};
@@ -0,0 +1 @@
1
+ import e from"../../platform/index/index.es.js";import t from"../../utils/index.es.js";import r from"../../core/AxiosError/index.es.js";import s from"../../helpers/composeSignals/index.es.js";import{trackStream as o}from"../../helpers/trackStream/index.es.js";import n from"../../core/AxiosHeaders/index.es.js";import{progressEventDecorator as a,progressEventReducer as i,asyncDecorator as d}from"../../helpers/progressEventReducer/index.es.js";import c from"../../helpers/resolveConfig/index.es.js";import l from"../../core/settle/index.es.js";const{isFunction:f}=t,u=(({Request:e,Response:t})=>({Request:e,Response:t}))(t.global),{ReadableStream:m,TextEncoder:p}=t.global,h=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},y=y=>{y=t.merge.call({skipUndefined:!0},u,y);const{fetch:g,Request:w,Response:b}=y,x=g?f(g):"function"==typeof fetch,R=f(w),T=f(b);if(!x)return!1;const S=x&&f(m),j=x&&("function"==typeof p?/* @__PURE__ */(e=>t=>e.encode(t))(new p):async e=>new Uint8Array(await new w(e).arrayBuffer())),E=R&&S&&h(()=>{let t=!1;const r=new w(e.origin,{body:new m,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!r}),O=T&&S&&h(()=>t.isReadableStream(new b("").body)),P={stream:O&&(e=>e.body)};x&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!P[e]&&(P[e]=(t,s)=>{let o=t&&t[e];if(o)return o.call(t);throw new r(`Response type '${e}' is not supported`,r.ERR_NOT_SUPPORT,s)})});const C=async(r,s)=>{const o=t.toFiniteNumber(r.getContentLength());return null==o?(async r=>{if(null==r)return 0;if(t.isBlob(r))return r.size;if(t.isSpecCompliantForm(r)){const t=new w(e.origin,{method:"POST",body:r});return(await t.arrayBuffer()).byteLength}return t.isArrayBufferView(r)||t.isArrayBuffer(r)?r.byteLength:(t.isURLSearchParams(r)&&(r+=""),t.isString(r)?(await j(r)).byteLength:void 0)})(s):o};return async e=>{let{url:f,method:u,data:m,signal:p,cancelToken:h,timeout:y,onDownloadProgress:x,onUploadProgress:T,responseType:S,headers:j,withCredentials:L="same-origin",fetchOptions:v}=c(e),A=g||fetch;S=S?(S+"").toLowerCase():"text";let B=s([p,h&&h.toAbortSignal()],y),N=null;const U=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let q;try{if(T&&E&&"get"!==u&&"head"!==u&&0!==(q=await C(j,m))){let e,r=new w(f,{method:"POST",body:m,duplex:"half"});if(t.isFormData(m)&&(e=r.headers.get("content-type"))&&j.setContentType(e),r.body){const[e,t]=a(q,i(d(T)));m=o(r.body,65536,e,t)}}t.isString(L)||(L=L?"include":"omit");const r=R&&"credentials"in w.prototype,s={...v,signal:B,method:u.toUpperCase(),headers:j.normalize().toJSON(),body:m,duplex:"half",credentials:r?L:void 0};N=R&&new w(f,s);let c=await(R?A(N,v):A(f,s));const p=O&&("stream"===S||"response"===S);if(O&&(x||p&&U)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=c[t]});const r=t.toFiniteNumber(c.headers.get("content-length")),[s,n]=x&&a(r,i(d(x),!0))||[];c=new b(o(c.body,65536,s,()=>{n&&n(),U&&U()}),e)}S=S||"text";let h=await P[t.findKey(P,S)||"text"](c,e);return!p&&U&&U(),await new Promise((t,r)=>{l(t,r,{data:h,headers:n.from(c.headers),status:c.status,statusText:c.statusText,config:e,request:N})})}catch(F){if(U&&U(),F&&"TypeError"===F.name&&/Load failed|fetch/i.test(F.message))throw Object.assign(new r("Network Error",r.ERR_NETWORK,e,N),{cause:F.cause||F});throw r.from(F,F&&F.code,e,N)}}},g=/* @__PURE__ */new Map,w=e=>{let t=e&&e.env||{};const{fetch:r,Request:s,Response:o}=t,n=[s,o,r];let a,i,d=n.length,c=g;for(;d--;)a=n[d],i=c.get(a),void 0===i&&c.set(a,i=d?/* @__PURE__ */new Map:y(t)),c=i;return i};w();export{w as getFetch};
@@ -0,0 +1 @@
1
+ import e from"../../utils/index.es.js";import t from"../../core/settle/index.es.js";import n from"../../defaults/transitional/index.es.js";import o from"../../core/AxiosError/index.es.js";import s from"../../cancel/CanceledError/index.es.js";import r from"../../helpers/parseProtocol/index.es.js";import i from"../../platform/index/index.es.js";import a from"../../core/AxiosHeaders/index.es.js";import{progressEventReducer as l}from"../../helpers/progressEventReducer/index.es.js";import d from"../../helpers/resolveConfig/index.es.js";const u="undefined"!=typeof XMLHttpRequest&&function(u){return new Promise(function(p,c){const m=d(u);let f=m.data;const E=a.from(m.headers).normalize();let x,g,T,R,j,{responseType:w,onUploadProgress:h,onDownloadProgress:b}=m;function v(){R&&R(),j&&j(),m.cancelToken&&m.cancelToken.unsubscribe(x),m.signal&&m.signal.removeEventListener("abort",x)}let y=new XMLHttpRequest;function C(){if(!y)return;const e=a.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),n={data:w&&"text"!==w&&"json"!==w?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:e,config:u,request:y};t(function(e){p(e),v()},function(e){c(e),v()},n),y=null}y.open(m.method.toUpperCase(),m.url,!0),y.timeout=m.timeout,"onloadend"in y?y.onloadend=C:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(C)},y.onabort=function(){y&&(c(new o("Request aborted",o.ECONNABORTED,u,y)),y=null)},y.onerror=function(e){const t=e&&e.message?e.message:"Network Error",n=new o(t,o.ERR_NETWORK,u,y);n.event=e||null,c(n),y=null},y.ontimeout=function(){let e=m.timeout?"timeout of "+m.timeout+"ms exceeded":"timeout exceeded";const t=m.transitional||n;m.timeoutErrorMessage&&(e=m.timeoutErrorMessage),c(new o(e,t.clarifyTimeoutError?o.ETIMEDOUT:o.ECONNABORTED,u,y)),y=null},void 0===f&&E.setContentType(null),"setRequestHeader"in y&&e.forEach(E.toJSON(),function(e,t){y.setRequestHeader(t,e)}),e.isUndefined(m.withCredentials)||(y.withCredentials=!!m.withCredentials),w&&"json"!==w&&(y.responseType=m.responseType),b&&([T,j]=l(b,!0),y.addEventListener("progress",T)),h&&y.upload&&([g,R]=l(h),y.upload.addEventListener("progress",g),y.upload.addEventListener("loadend",R)),(m.cancelToken||m.signal)&&(x=e=>{y&&(c(!e||e.type?new s(null,u,y):e),y.abort(),y=null)},m.cancelToken&&m.cancelToken.subscribe(x),m.signal&&(m.signal.aborted?x():m.signal.addEventListener("abort",x)));const L=r(m.url);L&&-1===i.protocols.indexOf(L)?c(new o("Unsupported protocol "+L+":",o.ERR_BAD_REQUEST,u)):y.send(f||null)})};export{u as default};
@@ -0,0 +1 @@
1
+ import e from"../utils/index.es.js";import r from"../helpers/bind/index.es.js";import o from"../core/Axios/index.es.js";import s from"../core/mergeConfig/index.es.js";import t from"../defaults/index/index.es.js";import i from"../helpers/formDataToJSON/index.es.js";import n from"../cancel/CanceledError/index.es.js";import m from"../cancel/CancelToken/index.es.js";import a from"../cancel/isCancel/index.es.js";import{VERSION as d}from"../env/data/index.es.js";import p from"../helpers/toFormData/index.es.js";import l from"../core/AxiosError/index.es.js";import x from"../helpers/spread/index.es.js";import f from"../helpers/isAxiosError/index.es.js";import c from"../core/AxiosHeaders/index.es.js";import j from"../adapters/adapters/index.es.js";import u from"../helpers/HttpStatusCode/index.es.js";const C=function t(i){const n=new o(i),m=r(o.prototype.request,n);return e.extend(m,o.prototype,n,{allOwnKeys:!0}),e.extend(m,n,null,{allOwnKeys:!0}),m.create=function(e){return t(s(i,e))},m}(t);C.Axios=o,C.CanceledError=n,C.CancelToken=m,C.isCancel=a,C.VERSION=d,C.toFormData=p,C.AxiosError=l,C.Cancel=C.CanceledError,C.all=function(e){return Promise.all(e)},C.spread=x,C.isAxiosError=f,C.mergeConfig=s,C.AxiosHeaders=c,C.formToJSON=r=>i(e.isHTMLForm(r)?new FormData(r):r),C.getAdapter=j.getAdapter,C.HttpStatusCode=u,C.default=C;export{C as default};
@@ -0,0 +1 @@
1
+ import s from"../CanceledError/index.es.js";class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});const n=this;this.promise.then(s=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](s);n._listeners=null}),this.promise.then=s=>{let e;const t=new Promise(s=>{n.subscribe(s),e=s}).then(s);return t.cancel=function(){n.unsubscribe(e)},t},e(function(e,r,i){n.reason||(n.reason=new s(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){this.reason?s(this.reason):this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const e=this._listeners.indexOf(s);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const s=new AbortController,e=e=>{s.abort(e)};return this.subscribe(e),s.signal.unsubscribe=()=>this.unsubscribe(e),s.signal}static source(){let s;return{token:new e(function(e){s=e}),cancel:s}}}export{e as default};
@@ -0,0 +1 @@
1
+ import e from"../../core/AxiosError/index.es.js";import r from"../../utils/index.es.js";function i(r,i,o){e.call(this,null==r?"canceled":r,e.ERR_CANCELED,i,o),this.name="CanceledError"}r.inherits(i,e,{__CANCEL__:!0});export{i as default};
@@ -0,0 +1 @@
1
+ function t(t){return!(!t||!t.__CANCEL__)}export{t as default};
@@ -0,0 +1 @@
1
+ import t from"../../utils/index.es.js";import e from"../../helpers/buildURL/index.es.js";import r from"../InterceptorManager/index.es.js";import s from"../dispatchRequest/index.es.js";import o from"../mergeConfig/index.es.js";import n from"../buildFullPath/index.es.js";import a from"../../helpers/validator/index.es.js";import i from"../AxiosHeaders/index.es.js";const l=a.validators;class c{constructor(t){this.defaults=t||{},this.interceptors={request:new r,response:new r}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{r.stack?e&&!String(r.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+e):r.stack=e}catch(s){}}throw r}}_request(e,r){"string"==typeof e?(r=r||{}).url=e:r=e||{},r=o(this.defaults,r);const{transitional:n,paramsSerializer:c,headers:u}=r;void 0!==n&&a.assertOptions(n,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1),null!=c&&(t.isFunction(c)?r.paramsSerializer={serialize:c}:a.assertOptions(c,{encode:l.function,serialize:l.function},!0)),void 0!==r.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),a.assertOptions(r,{baseUrl:l.spelling("baseURL"),withXsrfToken:l.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let h=u&&t.merge(u.common,u[r.method]);u&&t.forEach(["delete","get","head","post","put","patch","common"],t=>{delete u[t]}),r.headers=i.concat(h,u);const d=[];let p=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(r)||(p=p&&t.synchronous,d.unshift(t.fulfilled,t.rejected))});const f=[];let m;this.interceptors.response.forEach(function(t){f.push(t.fulfilled,t.rejected)});let g,b=0;if(!p){const t=[s.bind(this),void 0];for(t.unshift(...d),t.push(...f),g=t.length,m=Promise.resolve(r);b<g;)m=m.then(t[b++],t[b++]);return m}g=d.length;let w=r;for(;b<g;){const t=d[b++],e=d[b++];try{w=t(w)}catch(y){e.call(this,y);break}}try{m=s.call(this,w)}catch(y){return Promise.reject(y)}for(b=0,g=f.length;b<g;)m=m.then(f[b++],f[b++]);return m}getUri(t){t=o(this.defaults,t);const r=n(t.baseURL,t.url,t.allowAbsoluteUrls);return e(r,t.params,t.paramsSerializer)}}t.forEach(["delete","get","head","options"],function(t){c.prototype[t]=function(e,r){return this.request(o(r||{},{method:t,url:e,data:(r||{}).data}))}}),t.forEach(["post","put","patch"],function(t){function e(e){return function(r,s,n){return this.request(o(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}c.prototype[t]=e(),c.prototype[t+"Form"]=e(!0)});export{c as default};
@@ -0,0 +1 @@
1
+ import t from"../../utils/index.es.js";function e(t,e,r,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}t.inherits(e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:t.toJSONObject(this.config),code:this.code,status:this.status}}});const r=e.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{s[t]={value:t}}),Object.defineProperties(e,s),Object.defineProperty(r,"isAxiosError",{value:!0}),e.from=(s,i,o,c,a,n)=>{const E=Object.create(r);t.toFlatObject(s,E,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t);const u=s&&s.message?s.message:"Error",R=null==i&&s?s.code:i;return e.call(E,u,R,o,c,a),s&&null==E.cause&&Object.defineProperty(E,"cause",{value:s,configurable:!0}),E.name=s&&s.name||"Error",n&&Object.assign(E,n),E};export{e as default};
@@ -0,0 +1 @@
1
+ import t from"../../utils/index.es.js";import e from"../../helpers/parseHeaders/index.es.js";const r=Symbol("internals");function s(t){return t&&String(t).trim().toLowerCase()}function n(e){return!1===e||null==e?e:t.isArray(e)?e.map(n):String(e)}function i(e,r,s,n,i){return t.isFunction(n)?n.call(this,r,s):(i&&(r=s),t.isString(r)?t.isString(n)?-1!==r.indexOf(n):t.isRegExp(n)?n.test(r):void 0:void 0)}class o{constructor(t){t&&this.set(t)}set(r,i,o){const c=this;function a(e,r,i){const o=s(r);if(!o)throw new Error("header name must be a non-empty string");const a=t.findKey(c,o);(!a||void 0===c[a]||!0===i||void 0===i&&!1!==c[a])&&(c[a||r]=n(e))}const u=(e,r)=>t.forEach(e,(t,e)=>a(t,e,r));if(t.isPlainObject(r)||r instanceof this.constructor)u(r,i);else if(t.isString(r)&&(r=r.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()))u(e(r),i);else if(t.isObject(r)&&t.isIterable(r)){let e,s,n={};for(const i of r){if(!t.isArray(i))throw TypeError("Object iterator must return a key-value pair");n[s=i[0]]=(e=n[s])?t.isArray(e)?[...e,i[1]]:[e,i[1]]:i[1]}u(n,i)}else null!=r&&a(i,r,o);return this}get(e,r){if(e=s(e)){const s=t.findKey(this,e);if(s){const e=this[s];if(!r)return e;if(!0===r)return function(t){const e=/* @__PURE__ */Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}(e);if(t.isFunction(r))return r.call(this,e,s);if(t.isRegExp(r))return r.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=s(e)){const s=t.findKey(this,e);return!(!s||void 0===this[s]||r&&!i(0,this[s],s,r))}return!1}delete(e,r){const n=this;let o=!1;function c(e){if(e=s(e)){const s=t.findKey(n,e);!s||r&&!i(0,n[s],s,r)||(delete n[s],o=!0)}}return t.isArray(e)?e.forEach(c):c(e),o}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const n=e[r];t&&!i(0,this[n],n,t,!0)||(delete this[n],s=!0)}return s}normalize(e){const r=this,s={};return t.forEach(this,(i,o)=>{const c=t.findKey(s,o);if(c)return r[c]=n(i),void delete r[o];const a=e?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(o):String(o).trim();a!==o&&delete r[o],r[a]=n(i),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(e){const r=/* @__PURE__ */Object.create(null);return t.forEach(this,(s,n)=>{null!=s&&!1!==s&&(r[n]=e&&t.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(e){const n=(this[r]=this[r]={accessors:{}}).accessors,i=this.prototype;function o(e){const r=s(e);n[r]||(!function(e,r){const s=t.toCamelCase(" "+r);["get","set","has"].forEach(t=>{Object.defineProperty(e,t+s,{value:function(e,s,n){return this[t].call(this,r,e,s,n)},configurable:!0})})}(i,e),n[r]=!0)}return t.isArray(e)?e.forEach(o):o(e),this}}o.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),t.reduceDescriptors(o.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),t.freezeMethods(o);export{o as default};
@@ -0,0 +1 @@
1
+ import s from"../../utils/index.es.js";class n{constructor(){this.handlers=[]}use(s,n,e){return this.handlers.push({fulfilled:s,rejected:n,synchronous:!!e&&e.synchronous,runWhen:e?e.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){s.forEach(this.handlers,function(s){null!==s&&n(s)})}}export{n as default};
@@ -0,0 +1 @@
1
+ import e from"../../helpers/isAbsoluteURL/index.es.js";import s from"../../helpers/combineURLs/index.es.js";function r(r,o,t){let i=!e(o);return r&&(i||0==t)?s(r,o):o}export{r as default};
@@ -0,0 +1 @@
1
+ import e from"../transformData/index.es.js";import r from"../../cancel/isCancel/index.es.js";import s from"../../defaults/index/index.es.js";import a from"../../cancel/CanceledError/index.es.js";import n from"../AxiosHeaders/index.es.js";import o from"../../adapters/adapters/index.es.js";function t(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a(null,e)}function d(a){t(a),a.headers=n.from(a.headers),a.data=e.call(a,a.transformRequest),-1!==["post","put","patch"].indexOf(a.method)&&a.headers.setContentType("application/x-www-form-urlencoded",!1);return o.getAdapter(a.adapter||s.adapter,a)(a).then(function(r){return t(a),r.data=e.call(a,a.transformResponse,r),r.headers=n.from(r.headers),r},function(s){return r(s)||(t(a),s&&s.response&&(s.response.data=e.call(a,a.transformResponse,s.response),s.response.headers=n.from(s.response.headers))),Promise.reject(s)})}export{d as default};
@@ -0,0 +1 @@
1
+ import e from"../../utils/index.es.js";import n from"../AxiosHeaders/index.es.js";const t=e=>e instanceof n?{...e}:e;function i(n,i){i=i||{};const s={};function o(n,t,i,s){return e.isPlainObject(n)&&e.isPlainObject(t)?e.merge.call({caseless:s},n,t):e.isPlainObject(t)?e.merge({},t):e.isArray(t)?t.slice():t}function r(n,t,i,s){return e.isUndefined(t)?e.isUndefined(n)?void 0:o(void 0,n,0,s):o(n,t,0,s)}function a(n,t){if(!e.isUndefined(t))return o(void 0,t)}function d(n,t){return e.isUndefined(t)?e.isUndefined(n)?void 0:o(void 0,n):o(void 0,t)}function c(e,t,s){return s in i?o(e,t):s in n?o(void 0,e):void 0}const f={url:a,method:a,data:a,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:c,headers:(e,n,i)=>r(t(e),t(n),0,!0)};return e.forEach(Object.keys({...n,...i}),function(t){const o=f[t]||r,a=o(n[t],i[t],t);e.isUndefined(a)&&o!==c||(s[t]=a)}),s}export{i as default};
@@ -0,0 +1 @@
1
+ import t from"../AxiosError/index.es.js";function s(s,a,e){const o=e.config.validateStatus;e.status&&o&&!o(e.status)?a(new t("Request failed with status code "+e.status,[t.ERR_BAD_REQUEST,t.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e)):s(e)}export{s as default};
@@ -0,0 +1 @@
1
+ import e from"../../utils/index.es.js";import o from"../../defaults/index/index.es.js";import s from"../AxiosHeaders/index.es.js";function t(t,i){const r=this||o,a=i||r,n=s.from(a.headers);let d=a.data;return e.forEach(t,function(e){d=e.call(r,d,n.normalize(),i?i.status:void 0)}),n.normalize(),d}export{t as default};
@@ -0,0 +1 @@
1
+ import e from"../../utils/index.es.js";import t from"../../core/AxiosError/index.es.js";import r from"../transitional/index.es.js";import i from"../../helpers/toFormData/index.es.js";import s from"../../helpers/toURLEncodedForm/index.es.js";import n from"../../platform/index/index.es.js";import o from"../../helpers/formDataToJSON/index.es.js";const a={transitional:r,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,f=e.isObject(t);f&&e.isHTMLForm(t)&&(t=new FormData(t));if(e.isFormData(t))return a?JSON.stringify(o(t)):t;if(e.isArrayBuffer(t)||e.isBuffer(t)||e.isStream(t)||e.isFile(t)||e.isBlob(t)||e.isReadableStream(t))return t;if(e.isArrayBufferView(t))return t.buffer;if(e.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let m;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return s(t,this.formSerializer).toString();if((m=e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return i(m?{"files[]":t}:t,e&&new e,this.formSerializer)}}return f||a?(r.setContentType("application/json",!1),function(t,r,i){if(e.isString(t))try{return(r||JSON.parse)(t),e.trim(t)}catch(s){if("SyntaxError"!==s.name)throw s}return(i||JSON.stringify)(t)}(t)):t}],transformResponse:[function(r){const i=this.transitional||a.transitional,s=i&&i.forcedJSONParsing,n="json"===this.responseType;if(e.isResponse(r)||e.isReadableStream(r))return r;if(r&&e.isString(r)&&(s&&!this.responseType||n)){const e=!(i&&i.silentJSONParsing)&&n;try{return JSON.parse(r,this.parseReviver)}catch(o){if(e){if("SyntaxError"===o.name)throw t.from(o,t.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n.classes.FormData,Blob:n.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};e.forEach(["delete","get","head","post","put","patch"],e=>{a.headers[e]={}});export{a as default};
@@ -0,0 +1 @@
1
+ const r={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};export{r as default};
@@ -0,0 +1 @@
1
+ const o="1.13.2";export{o as VERSION};
@@ -0,0 +1 @@
1
+ import t from"../toFormData/index.es.js";function n(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return n[t]})}function o(n,o){this._pairs=[],n&&t(n,this,o)}const r=o.prototype;r.append=function(t,n){this._pairs.push([t,n])},r.toString=function(t){const o=t?function(o){return t.call(this,o,n)}:n;return this._pairs.map(function(t){return o(t[0])+"="+o(t[1])},"").join("&")};export{o as default};
@@ -0,0 +1 @@
1
+ const e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(e).forEach(([t,o])=>{e[o]=t});export{e as default};
@@ -0,0 +1 @@
1
+ function n(n,t){return function(){return n.apply(t,arguments)}}export{n as default};
@@ -0,0 +1 @@
1
+ import e from"../../utils/index.es.js";import i from"../AxiosURLSearchParams/index.es.js";function n(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function r(r,t,o){if(!t)return r;const s=o&&o.encode||n;e.isFunction(o)&&(o={serialize:o});const c=o&&o.serialize;let a;if(a=c?c(t,o):e.isURLSearchParams(t)?t.toString():new i(t,o).toString(s),a){const e=r.indexOf("#");-1!==e&&(r=r.slice(0,e)),r+=(-1===r.indexOf("?")?"?":"&")+a}return r}export{r as default};
@@ -0,0 +1 @@
1
+ function e(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}export{e as default};
@@ -0,0 +1 @@
1
+ import e from"../../cancel/CanceledError/index.es.js";import o from"../../core/AxiosError/index.es.js";import r from"../../utils/index.es.js";const n=(n,t)=>{const{length:s}=n=n?n.filter(Boolean):[];if(t||s){let s,i=new AbortController;const c=function(r){if(!s){s=!0,l();const n=r instanceof Error?r:this.reason;i.abort(n instanceof o?n:new e(n instanceof Error?n.message:n))}};let a=t&&setTimeout(()=>{a=null,c(new o(`timeout ${t} of ms exceeded`,o.ETIMEDOUT))},t);const l=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(e=>{e.unsubscribe?e.unsubscribe(c):e.removeEventListener("abort",c)}),n=null)};n.forEach(e=>e.addEventListener("abort",c));const{signal:u}=i;return u.unsubscribe=()=>r.asap(l),u}};export{n as default};
@@ -0,0 +1 @@
1
+ import e from"../../utils/index.es.js";import n from"../../platform/index/index.es.js";const t=n.hasStandardBrowserEnv?{write(n,t,o,r,i,s,u){if("undefined"==typeof document)return;const d=[`${n}=${encodeURIComponent(t)}`];e.isNumber(o)&&d.push(`expires=${new Date(o).toUTCString()}`),e.isString(r)&&d.push(`path=${r}`),e.isString(i)&&d.push(`domain=${i}`),!0===s&&d.push("secure"),e.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(e){if("undefined"==typeof document)return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};export{t as default};
@@ -0,0 +1 @@
1
+ import t from"../../utils/index.es.js";function n(n){function r(n,e,i,o){let s=n[o++];if("__proto__"===s)return!0;const u=Number.isFinite(+s),c=o>=n.length;if(s=!s&&t.isArray(i)?i.length:s,c)return t.hasOwnProp(i,s)?i[s]=[i[s],e]:i[s]=e,!u;i[s]&&t.isObject(i[s])||(i[s]=[]);return r(n,e,i[s],o)&&t.isArray(i[s])&&(i[s]=function(t){const n={},r=Object.keys(t);let e;const i=r.length;let o;for(e=0;e<i;e++)o=r[e],n[o]=t[o];return n}(i[s])),!u}if(t.isFormData(n)&&t.isFunction(n.entries)){const e={};return t.forEachEntry(n,(n,i)=>{r(function(n){return t.matchAll(/\w+|\[(\w*)]/g,n).map(t=>"[]"===t[0]?"":t[1]||t[0])}(n),i,e,0)}),e}return null}export{n as default};
@@ -0,0 +1 @@
1
+ function t(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}export{t as default};
@@ -0,0 +1 @@
1
+ import r from"../../utils/index.es.js";function i(i){return r.isObject(i)&&!0===i.isAxiosError}export{i as default};
@@ -0,0 +1 @@
1
+ import o from"../../platform/index/index.es.js";const t=o.hasStandardBrowserEnv?/* @__PURE__ */((t,r)=>e=>(e=new URL(e,o.origin),t.protocol===e.protocol&&t.host===e.host&&(r||t.port===e.port)))(new URL(o.origin),o.navigator&&/(msie|trident)/i.test(o.navigator.userAgent)):()=>!0;export{t as default};
@@ -0,0 +1 @@
1
+ const l=null;export{l as default};
@@ -0,0 +1 @@
1
+ import t from"../../utils/index.es.js";const e=t.toObjectSet(["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"]),i=t=>{const i={};let o,r,n;return t&&t.split("\n").forEach(function(t){n=t.indexOf(":"),o=t.substring(0,n).trim().toLowerCase(),r=t.substring(n+1).trim(),!o||i[o]&&e[o]||("set-cookie"===o?i[o]?i[o].push(r):i[o]=[r]:i[o]=i[o]?i[o]+", "+r:r)}),i};export{i as default};
@@ -0,0 +1 @@
1
+ function e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}export{e as default};
@@ -0,0 +1 @@
1
+ import t from"../speedometer/index.es.js";import e from"../throttle/index.es.js";import o from"../../utils/index.es.js";const l=(o,l,d=3)=>{let s=0;const n=t(50,250);return e(t=>{const e=t.loaded,d=t.lengthComputable?t.total:void 0,r=e-s,a=n(r);s=e;o({loaded:e,total:d,progress:d?e/d:void 0,bytes:r,rate:a||void 0,estimated:a&&d&&e<=d?(d-e)/a:void 0,event:t,lengthComputable:null!=d,[l?"download":"upload"]:!0})},d)},d=(t,e)=>{const o=null!=t;return[l=>e[0]({lengthComputable:o,total:t,loaded:l}),e[1]]},s=t=>(...e)=>o.asap(()=>t(...e));export{s as asyncDecorator,d as progressEventDecorator,l as progressEventReducer};
@@ -0,0 +1 @@
1
+ import e from"../../platform/index/index.es.js";import r from"../../utils/index.es.js";import s from"../isURLSameOrigin/index.es.js";import o from"../cookies/index.es.js";import t from"../../core/buildFullPath/index.es.js";import i from"../../core/mergeConfig/index.es.js";import a from"../../core/AxiosHeaders/index.es.js";import n from"../buildURL/index.es.js";const d=d=>{const m=i({},d);let{data:f,withXSRFToken:l,xsrfHeaderName:c,xsrfCookieName:p,headers:u,auth:x}=m;if(m.headers=u=a.from(u),m.url=n(t(m.baseURL,m.url,m.allowAbsoluteUrls),d.params,d.paramsSerializer),x&&u.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),r.isFormData(f))if(e.hasStandardBrowserEnv||e.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(r.isFunction(f.getHeaders)){const e=f.getHeaders(),r=["content-type","content-length"];Object.entries(e).forEach(([e,s])=>{r.includes(e.toLowerCase())&&u.set(e,s)})}if(e.hasStandardBrowserEnv&&(l&&r.isFunction(l)&&(l=l(m)),l||!1!==l&&s(m.url))){const e=c&&p&&o.read(p);e&&u.set(c,e)}return m};export{d as default};
@@ -0,0 +1 @@
1
+ function n(n,t){n=n||10;const r=new Array(n),e=new Array(n);let o,u=0,a=0;return t=void 0!==t?t:1e3,function(c){const f=Date.now(),i=e[a];o||(o=f),r[u]=c,e[u]=f;let d=a,s=0;for(;d!==u;)s+=r[d++],d%=n;if(u=(u+1)%n,u===a&&(a=(a+1)%n),f-o<t)return;const l=i&&f-i;return l?Math.round(1e3*s/l):void 0}}export{n as default};
@@ -0,0 +1 @@
1
+ function n(n){return function(t){return n.apply(null,t)}}export{n as default};
@@ -0,0 +1 @@
1
+ function t(t,e){let n,l,o=0,u=1e3/e;const a=(e,u=Date.now())=>{o=u,n=null,l&&(clearTimeout(l),l=null),t(...e)};return[(...t)=>{const e=Date.now(),c=e-o;c>=u?a(t,e):(n=t,l||(l=setTimeout(()=>{l=null,a(n)},u-c)))},()=>n&&a(n)]}export{t as default};
@@ -0,0 +1 @@
1
+ import n from"../../utils/index.es.js";import t from"../../core/AxiosError/index.es.js";function e(t){return n.isPlainObject(t)||n.isArray(t)}function i(t){return n.endsWith(t,"[]")?t.slice(0,-2):t}function r(n,t,e){return n?n.concat(t).map(function(n,t){return n=i(n),!e&&t?"["+n+"]":n}).join(e?".":""):t}const o=n.toFlatObject(n,{},null,function(n){return/^is[A-Z]/.test(n)});function s(s,f,u){if(!n.isObject(s))throw new TypeError("target must be an object");f=f||new FormData;const c=(u=n.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!n.isUndefined(e[t])})).metaTokens,a=u.visitor||m,l=u.dots,d=u.indexes,p=(u.Blob||"undefined"!=typeof Blob&&Blob)&&n.isSpecCompliantForm(f);if(!n.isFunction(a))throw new TypeError("visitor must be a function");function b(e){if(null===e)return"";if(n.isDate(e))return e.toISOString();if(n.isBoolean(e))return e.toString();if(!p&&n.isBlob(e))throw new t("Blob is not supported. Use a Buffer instead.");return n.isArrayBuffer(e)||n.isTypedArray(e)?p&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function m(t,o,s){let u=t;if(t&&!s&&"object"==typeof t)if(n.endsWith(o,"{}"))o=c?o:o.slice(0,-2),t=JSON.stringify(t);else if(n.isArray(t)&&function(t){return n.isArray(t)&&!t.some(e)}(t)||(n.isFileList(t)||n.endsWith(o,"[]"))&&(u=n.toArray(t)))return o=i(o),u.forEach(function(t,e){!n.isUndefined(t)&&null!==t&&f.append(!0===d?r([o],e,l):null===d?o:o+"[]",b(t))}),!1;return!!e(t)||(f.append(r(s,o,l),b(t)),!1)}const y=[],j=Object.assign(o,{defaultVisitor:m,convertValue:b,isVisitable:e});if(!n.isObject(s))throw new TypeError("data must be an object");return function t(e,i){if(!n.isUndefined(e)){if(-1!==y.indexOf(e))throw Error("Circular reference detected in "+i.join("."));y.push(e),n.forEach(e,function(e,r){!0===(!(n.isUndefined(e)||null===e)&&a.call(f,e,n.isString(r)?r.trim():r,i,j))&&t(e,i?i.concat(r):[r])}),y.pop()}}(s),f}export{s as default};
@@ -0,0 +1 @@
1
+ import t from"../../utils/index.es.js";import e from"../toFormData/index.es.js";import i from"../../platform/index/index.es.js";function r(r,s){return e(r,new i.classes.URLSearchParams,{visitor:function(e,r,s,o){return i.isNode&&t.isBuffer(e)?(this.append(r,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...s})}export{r as default};
@@ -0,0 +1 @@
1
+ const e=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let a,r=0;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},t=async function*(t,a){for await(const r of n(t))yield*e(r,a)},n=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},a=(e,n,a,r)=>{const i=t(e,n);let o,l=0,c=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return c(),void e.close();let r=n.byteLength;if(a){let e=l+=r;a(e)}e.enqueue(new Uint8Array(n))}catch(t){throw c(t),t}},cancel:e=>(c(e),i.return())},{highWaterMark:2})};export{t as readBytes,e as streamChunk,a as trackStream};
@@ -0,0 +1 @@
1
+ import{VERSION as n}from"../../env/data/index.es.js";import o from"../../core/AxiosError/index.es.js";const e={};["object","boolean","number","function","string","symbol"].forEach((n,o)=>{e[n]=function(e){return typeof e===n||"a"+(o<1?"n ":" ")+n}});const t={};e.transitional=function(e,i,r){function s(o,e){return"[Axios v"+n+"] Transitional option '"+o+"'"+e+(r?". "+r:"")}return(n,r,a)=>{if(!1===e)throw new o(s(r," has been removed"+(i?" in "+i:"")),o.ERR_DEPRECATED);return i&&!t[r]&&(t[r]=!0,console.warn(s(r," has been deprecated since v"+i+" and will be removed in the near future"))),!e||e(n,r,a)}},e.spelling=function(n){return(o,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};const i={assertOptions:function(n,e,t){if("object"!=typeof n)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const s=i[r],a=e[s];if(a){const e=n[s],t=void 0===e||a(e,s,n);if(!0!==t)throw new o("option "+s+" must be "+t,o.ERR_BAD_OPTION_VALUE);continue}if(!0!==t)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:e};export{i as default};
@@ -0,0 +1 @@
1
+ const e="undefined"!=typeof Blob?Blob:null;export{e as default};
@@ -0,0 +1 @@
1
+ const a="undefined"!=typeof FormData?FormData:null;export{a as default};
@@ -0,0 +1 @@
1
+ import e from"../../../../helpers/AxiosURLSearchParams/index.es.js";const a="undefined"!=typeof URLSearchParams?URLSearchParams:e;export{a as default};
@@ -0,0 +1 @@
1
+ import s from"../classes/URLSearchParams/index.es.js";import a from"../classes/FormData/index.es.js";import o from"../classes/Blob/index.es.js";const r={isBrowser:!0,classes:{URLSearchParams:s,FormData:a,Blob:o},protocols:["http","https","file","blob","url","data"]};export{r as default};
@@ -0,0 +1 @@
1
+ const o="undefined"!=typeof window&&"undefined"!=typeof document,e="object"==typeof navigator&&navigator||void 0,t=o&&(!e||["ReactNative","NativeScript","NS"].indexOf(e.product)<0),n="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,i=o&&window.location.href||"http://localhost";export{o as hasBrowserEnv,t as hasStandardBrowserEnv,n as hasStandardBrowserWebWorkerEnv,e as navigator,i as origin};
@@ -0,0 +1 @@
1
+ import o from"../browser/index/index.es.js";import*as s from"../common/utils/index.es.js";const e={...s,...o};export{e as default};
@@ -0,0 +1 @@
1
+ import e from"../helpers/bind/index.es.js";const{toString:t}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:n,toStringTag:o}=Symbol,s=/* @__PURE__ */(e=>r=>{const n=t.call(r);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(/* @__PURE__ */Object.create(null)),i=e=>(e=e.toLowerCase(),t=>s(t)===e),a=e=>t=>typeof t===e,{isArray:l}=Array,c=a("undefined");function u(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&d(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const f=i("ArrayBuffer");const p=a("string"),d=a("function"),y=a("number"),b=e=>null!==e&&"object"==typeof e,m=e=>{if("object"!==s(e))return!1;const t=r(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||o in e||n in e)},O=i("Date"),g=i("File"),h=i("Blob"),j=i("FileList"),w=i("URLSearchParams"),[F,A,S,x]=["ReadableStream","Request","Response","Headers"].map(i);function P(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),l(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(u(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function B(e,t){if(u(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,E=e=>!c(e)&&e!==C;const L=/* @__PURE__ */(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&r(Uint8Array)),D=i("HTMLFormElement"),R=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),T=i("RegExp"),k=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};P(r,(r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)}),Object.defineProperties(e,n)};const M=i("AsyncFunction"),N=(U="function"==typeof setImmediate,v=d(C.postMessage),U?setImmediate:v?(q=`axios@${Math.random()}`,H=[],C.addEventListener("message",({source:e,data:t})=>{e===C&&t===q&&H.length&&H.shift()()},!1),e=>{H.push(e),C.postMessage(q,"*")}):e=>setTimeout(e));var U,v,q,H;const I="undefined"!=typeof queueMicrotask?queueMicrotask.bind(C):"undefined"!=typeof process&&process.nextTick||N,K={isArray:l,isArrayBuffer:f,isBuffer:u,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||d(e.append)&&("formdata"===(t=s(e))||"object"===t&&d(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:p,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:m,isEmptyObject:e=>{if(!b(e)||u(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:F,isRequest:A,isResponse:S,isHeaders:x,isUndefined:c,isDate:O,isFile:g,isBlob:h,isRegExp:T,isFunction:d,isStream:e=>b(e)&&d(e.pipe),isURLSearchParams:w,isTypedArray:L,isFileList:j,forEach:P,merge:function e(){const{caseless:t,skipUndefined:r}=E(this)&&this||{},n={},o=(o,s)=>{const i=t&&B(n,s)||s;m(n[i])&&m(o)?n[i]=e(n[i],o):m(o)?n[i]=e({},o):l(o)?n[i]=o.slice():r&&c(o)||(n[i]=o)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&P(arguments[s],o);return n},extend:(t,r,n,{allOwnKeys:o}={})=>(P(r,(r,o)=>{n&&d(r)?t[o]=e(r,n):t[o]=r},{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,n,o)=>{let s,i,a;const l={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],o&&!o(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&r(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:i,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!y(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[n]).call(e);let o;for(;(o=r.next())&&!o.done;){const r=o.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:D,hasOwnProperty:R,hasOwnProp:R,reduceDescriptors:k,freezeMethods:e=>{k(e,(t,r)=>{if(d(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];d(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return l(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:B,global:C,isContextDefined:E,isSpecCompliantForm:function(e){return!!(e&&d(e.append)&&"FormData"===e[o]&&e[n])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(u(e))return e;if(!("toJSON"in e)){t[n]=e;const o=l(e)?[]:{};return P(e,(e,t)=>{const s=r(e,n+1);!c(s)&&(o[t]=s)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:M,isThenable:e=>e&&(b(e)||d(e))&&d(e.then)&&d(e.catch),setImmediate:N,asap:I,isIterable:e=>null!=e&&d(e[n])};export{K as default};
@@ -0,0 +1 @@
1
+ navigator.userAgent.toLowerCase();
@@ -0,0 +1 @@
1
+ import{diff as e,getTimestamp as t}from"../../date/index.es/index.es.js";import{config as i}from"../../core/index.es/index.es.js";const r=function(e,t){return e+t};class s{constructor(e=""){this.prefix=e||i.cachePrefix}change(e){window.addEventListener("storage",function(t){e&&e(t)})}setPrefix(e=""){this.prefix=e}setDate(t,i,r,s){var a=e(r=r||/* @__PURE__ */new Date);return this.set(t,i,a,s)}set(e,i,s,a){s=s||0;var n=t(),o={value:i,time:s,now:n,endTime:n+s};e=r(this.prefix,e);var l=a?window.sessionStorage:window.localStorage;l&&l.setItem(e,JSON.stringify(o))}setValue(i,s,a,n){key=r(this.prefix,i);var o=a?window.sessionStorage:window.localStorage,l=o.getItem(key);if(l){var d=JSON.parse(l),w=t();if(d.time>0&&w>d.endTime)o.removeItem(key);else{if(d.value=s,n){var m=e(n);w=t(),d.endTime=w+m}o.setItem(key,JSON.stringify(d))}}else this.set(i,s,0,a)}get(e,i){e=r(this.prefix,e);var s=i?window.sessionStorage:window.localStorage;if(!s)return null;var a=s.getItem(e);if(!a)return null;var n=JSON.parse(a),o=t();return n.time>0&&o>n.endTime?(s.removeItem(e),null):n.value}add(e,t,i,r){var s=parseInt(this.get(e,i)||0)+t;return this.setValue(e,s,i,r),s}remove(e,t){e=r(this.prefix,e);var i=t?window.sessionStorage:window.localStorage;i&&i.removeItem(e)}clear(e){(e?window.sessionStorage:window.localStorage).clear()}}const a=new s,n=s;export{a as cache,n as cacheClass};
@@ -0,0 +1 @@
1
+ import*as e from"../../typetool/index.es/index.es.js";import{isFunction as t,isObject as n,isArray as o,isString as a}from"../../typetool/index.es/index.es.js";const{isFunction:r}=e;window.allvar=window.allvar||{};const c=window.allvar,s={cachePrefix:"slcms_"},d=function(e){return new Promise(function(t,n){setTimeout(function(){t()},e)})},i=function(){return new Error(Array.prototype.slice.apply(arguments))},l=function(){var e,t,a,c,s,d,i=arguments[0]||{},u=1,p=arguments.length,m=!1;for("boolean"==typeof i&&(m=i,i=arguments[u]||{},u++),"object"==typeof i||r(i)||(i={}),u===p&&(i=this,u--);u<p;u++)if(arguments[u])for(t in e=arguments[u])a=i[t],i!==(c=e[t])&&(m&&c&&(n(c)||(s=o(c)))?(s?(s=!1,d=a&&o(a)?a:[]):d=a&&n(a)?a:{},i[t]=l(m,d,c)):void 0!==c&&(i[t]=c));return i};!function(){var e=[],t=!1;function n(n){if(!t&&("onreadystatechange"!==n.type||"complete"===document.readyState)){for(var o=0;o<e.length;o++)e[o].call(document);t=!0,e=null}}document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),document.addEventListener("readystatechange",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",n),window.attachEvent("onload",n))}(),c.jsModuleMap={},c.npm_relyMap={};const u=/* @__PURE__ */function(){const e=function(e,t){return c.npm_relyMap[e]=t,new Promise(t=>{if(c.jsModuleMap[e])t(c.jsModuleMap[e]);else{var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,t(c.jsModuleMap[e]))}:n.onload=function(){t(c.jsModuleMap[e])},n.src=e,document.getElementsByTagName("head")[0].appendChild(n)}})};return async function(t,n){if(a(t)&&(t=[t]),o(n)||(n=[n]),1===t.length)return e(t[0],n[0]);for(var r=[],c=0;c<t.length;c++){const o=c>=n.length?null:n[c];r.push(e(t[c],o))}return Promise.all(r)}}();window.getNpmRely=function(){const e=document.currentScript.src;return c.npm_relyMap[e]},window.setJsModule=function(e){const n=document.currentScript.src;t(e)&&(e=e(getNpmRely())),c.jsModuleMap[n]=e};export{s as config,l as extend,i as getError,u as loadjs,d as wait};
@@ -0,0 +1 @@
1
+ const e=async function(e,n){return new Promise(o=>{const t=new Blob([e],n),r=new FileReader;r.onloadend=()=>{const e=r.result.split(",")[1];2*e.length>5242880&&console.warn("WASM文件太大,localStorage可能存储失败"),o(e)},r.readAsDataURL(t)})},n=async function(e){const n=atob(e),o=new Uint8Array(n.length);for(let t=0;t<n.length;t++)o[t]=n.charCodeAt(t);return o.buffer};export{n as base64ToBuffer,e as bufferToBase64};
@@ -0,0 +1,2 @@
1
+ import{getError as e}from"../../core/index.es/index.es.js";const t=["日","一","二","三","四","五","六"],n=function(t,a,o,g){var i,u;if(g=g||!1,t instanceof Date)i=t;else if("number"==typeof t)i=t<1e12&&!g?r(t):s(t);else if("object"==typeof t&&t.low>=0&&t.high>=0)i=r(t);else{if("string"!=typeof t)throw e("在getDate方法中获取日期对象错误,无法识别的参数类型!",t,typeof t);i=(t=t.replace("T"," ")).indexOf("/")>=0?new Date(t):(u=t.replace(/\d+(?=-[^-]+$)/,function(e){return parseInt(e,10)-1}).match(/\d+/g),new Date(parseInt(u[0]),parseInt(u[1]),parseInt(u[2]),parseInt(u[3]||0),parseInt(u[4]||0),parseInt(u[5]||0)))}return a&&(i=n(i.getTime()+864e5*a)),(o=o||!0)||(i=new Date(i.toDateString())),i},a=function(e){return e=n(e||/* @__PURE__ */new Date),parseInt(e.getTime()/1e3)},r=function(e){return new Date(1e3*parseInt(e))},s=function(e){return new Date(parseInt(e))},o=function(e,t){t=t||["秒","分","时"];var n=parseInt(e/3600),a=parseInt(e%3600/60),r=e%3600%60,s="";return n>0&&t.length>=3&&(s+=n+t[2]),(""!==s||a>0)&&t.length>=2&&(s+=a+t[1]),(""!==s||r>0)&&t.length>=1&&(s+=r+t[0]),s},g=function(e,a,r){a=a||"yyyy-MM-dd hh:mm:ss";let s=(e=n(e,null,null,r)).getDay();Math.floor((e.getMonth()+3)/3).toString();var o={"M+":e.getMonth()+1,"d+":e.getDate(),"(h|H)+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),"(w|W)+":t[s],S:e.getMilliseconds()};for(var g in/((y|Y)+)/.test(a)&&(a=a.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),o)new RegExp("("+g+")").test(a)&&(a=a.replace(RegExp.$1,1===RegExp.$1.length?o[g]:("00"+o[g]).substr((""+o[g]).length)));return a},i=function(e){return e=n(e),new Date(e.getYear(),e.getMonth()+1,0).getDate()},u=function(e,t){return n(e).getTime()-n(t).getTime()},l=function(e,t,a){return a=n(a||/* @__PURE__ */new Date),e=n(e),t=n(t),u(a,e)>=0&&u(a,t)<=0},c=function(e,t){var n=a(e),r=a(t);return Math.abs(n-r)},f=function(e){const t=/* @__PURE__ */new Date,a=t.getFullYear(),r=t.getMonth()+1,s=t.getDate(),o=n(e),g=o.getFullYear(),i=o.getMonth()+1,u=o.getDate();return a===g&&r===i&&s===u},D=function(e){const t=n(e),a=new Date(/* @__PURE__ */ /* @__PURE__ */(new Date).toLocaleDateString());let r=a.getDay();r=0==r?7:r;const s=864e5,o=new Date(a.getTime()-s*(r-1)),g=new Date(a.getTime()+s*(8-r));return o.getTime()<=t&&g.getTime()>t},m=function(e){const t=n(e);/* @__PURE__ */
2
+ return(new Date).getFullYear()===t.getFullYear()},p=function(e){let t=/* @__PURE__ */new Date;return t.setDate(t.getDate()+e),t.setHours(0,0,0,0),t},h={getDate:n,getTimestamp:a,getLocalTime:r,getLocalTimeFromMs:s,formatNum:o,format:g,getMonthDayNum:i,compareDate:u,isDateIn:l,diff:c,isCurrentToday:f,isCurrentWeek:D,isCurrentYear:m,getNextDaysZeroHour:p};export{u as compareDate,h as date,c as diff,g as format,o as formatNum,n as getDate,r as getLocalTime,s as getLocalTimeFromMs,i as getMonthDayNum,p as getNextDaysZeroHour,a as getTimestamp,f as isCurrentToday,D as isCurrentWeek,m as isCurrentYear,l as isDateIn};
@@ -0,0 +1 @@
1
+ import{urltool as o}from"../../url/index.es/index.es.js";const n={error:0,warn:5,info:10,log:15,debug:100},e=function(o){return"\n堆栈:"+o.split("\n").filter(o=>!(o.includes("at <anonymous>")||o.includes("at e")||o.includes("Error")||o.includes("at log")||o.includes("at writeLogRecord"))).join("\n")};let l=0;const t={},c=async function(e){l=parseInt(o.getPar("debug")||5),e=e||function(){return l},await e();const c=function(o,n){t[o]=t[o]||[],t[o].push({args:n,stack:(new Error).stack})},r=l>=n.log?console.log:function(...o){c("log",o)},s={enumerable:!0,configurable:!0};return Object.defineProperties(r,{debug:{get:()=>l>=n.debug?console.log:function(...o){c("debug",o)},...s},log:{get:()=>l>=n.log?console.log:function(...o){c("log",o)},...s},info:{get:()=>l>=n.info?console.info:function(...o){c("info",o)},...s},warn:{get:()=>l>=n.warn?console.warn:function(...o){c("warn",o)},...s},error:{get:()=>console.error,...s}}),r.start=function(o,n="color: blue; font-weight: bold;font-size: 14px;"){console.log("%c------------------"+o+" 开始-----------------",n)},r.end=function(o,n="color: blue; font-weight: bold;font-size: 14px;"){console.log("%c------------------"+o+" 结束-----------------",n)},r};window.setLogLevel=function(o,c=!1,r=!0){if(l=o,r){console.log("%c------------------开始输出历史过滤日志 开始-----------------","color: blue; font-weight: bold;font-size: 14px;");for(let o in t){let r=null;if(l>=n[o]&&(r=t[o]),r){console.log("%c输出之前过滤的日志:"+o,"color: green; font-weight: bold;");const n="debug"===o?"log":o;r.forEach(o=>{if(c){const n=o.stack;o.args.push(e(n))}console[n].apply(console,o.args)})}else console.log(`%c日志${o},暂无日志记录`,"color: orange;font-weight: bold;")}console.log("%c------------------开始输出历史过滤日志 结束-----------------","color: blue; font-weight: bold;font-size: 14px;")}};export{c as getLog};
@@ -0,0 +1 @@
1
+ import{isString as e}from"../../typetool/index.es/index.es.js";import{getLog as n}from"../../log/index.es/index.es.js";const t=await n();let a=null;const s=function(){if(a)return a;var n={},s={};return window.addEventListener("message",function(t){if(t.data&&e(t.data)){try{var a=JSON.parse(t.data)}catch(d){return}var o=a.name;if(s[o]){const e=s[o].length;for(var r=0;r<e;r++){var i=s[o][r];i&&i(a.data,a)}}else n[o]=n[o]||[],n[o].push(a)}},!1),a={send:function(e,n,a){if(a=a||parent){var s={name:e,data:n};t.debug("postMessage",e,n,!(!a||!a.postMessage)),a&&a.postMessage&&a.postMessage(JSON.stringify(s),"*")}},on:function(e,t){s[e]=s[e]||[];for(var a=!1,o=0;o<s[e].length;o++)if(s[e][o]===t){a=!0;break}if(!a&&s[e].push(t),n[e])for(;n[e].length>0;){var r=n[e][0];t&&t(r.data,r),n[e].shift()}},reg:function(e,n){return this.on(e,n)},remove:function(e,t){if(t){for(var a=0;a<s[e].length;a++)if(s[e][a]===t){s[e].splice(a,1);break}}else delete s[e],delete n[e]},runOnload:function(){window.name&&this.send("onload_"+window.name)},onload:function(e,n){e.name&&this.reg("onload_"+e.name,n)}},a.on(""),a}();export{s as message};
@@ -0,0 +1 @@
1
+ import{cacheClass as e}from"../../cache/index.es/index.es.js";import{wait as s}from"../../core/index.es/index.es.js";import{getLog as a}from"../../log/index.es/index.es.js";import"../../message/index.es/index.es.js";const i=new e("__req__");window.removeCache=i.remove.bind(i),window.clearCache=i.clear.bind(i),window.cache=i;const n=await a(),t={},o={},r=async(e,a)=>{let c=i.get(e);return c?(o[e]||(a(e).then(s=>{i.set(e,s)}),o[e]=!0),n.debug("命中缓存:",e),c):t[e]?(await s(10),r(e,a)):(t[e]=!0,c=await a(e),i.set(e,c),t[e]=!1,c)};export{r as getAndWaitCache};
@@ -0,0 +1 @@
1
+ String.prototype.TrimStart=function(t){if(null==t||""==t)return this.replace(/^s*/,"");var r=new RegExp("^"+t+"*");return this.replace(r,"")},String.prototype.trimEnd=function(t){if(null==t||""==t){for(var r=/s/,e=(n=this).length;r.test(n.charAt(--e)););return n.slice(0,e+1)}var n=this;for(r=new RegExp(t),e=n.length;r.test(n.charAt(--e)););return n.slice(0,e+1)};
@@ -0,0 +1 @@
1
+ const n=function(n){return null!==n&&"object"==typeof n&&n.constructor===Array},t=function(n){return null!==n&&"string"==typeof n&&n.constructor===String},o=function(n){return null!==n&&"number"==typeof n&&n.constructor===Number},r=function(n){return null!==n&&"boolean"==typeof n&&n.constructor===Boolean},c=function(n){return null!==n&&"object"==typeof n&&n.constructor===Date},u=function(n){return null!==n&&"function"==typeof n&&(n.constructor===Function||"AsyncFunction"===n.constructor.name)},e=function(n){return null!==n&&"object"==typeof n&&n.constructor===Object},s=function(n){return null!==n&&"object"==typeof n&&n.constructor===NodeList},i=function(n){return n instanceof Element||n instanceof Node},f=function(n){return n instanceof Promise||n&&"function"==typeof n.then},a=function(n){return"function"==typeof n&&("AsyncFunction"===n.constructor.name||Function.prototype.toString.call(n).startsWith("async"))};export{n as isArray,a as isAsyncFunction,r as isBoolean,c as isDate,i as isDom,u as isFunction,s as isNodeList,o as isNumber,e as isObject,f as isPromise,t as isString};
@@ -0,0 +1 @@
1
+ import{isString as t,isArray as n,isObject as o}from"../../typetool/index.es/index.es.js";let r=null,e={};function i(t,n){if(n=n||"?",!t)return n;for(var o in t)n=p(o,t[o],n);return n}function a(t){if(!t)return"";var n="";for(var o in t)n+=o+"="+t[o]+"&";return n.trimEnd("&")}function s(t){if(!t)return null;let n=t.split(",");for(var o={},r=0;r<n.length;r++){let t=n[r].split("=");o[t[0]]=t[1]||null}return o}function l(t){if(!t)return"";var n=t.indexOf("://");return n=n>=0?n+3:0,t.substr(n).split("/")[0]}function u(){let t="mh_"+Math.random(),n=new RegExp("(^|;)\\s*"+t+"=12345"),o=/* @__PURE__ */new Date(0),r=document.domain.split("."),e=location.port&&80!==location.port&&443!==location.port?":"+location.port:"",i=[];for(i.unshift(r.pop());r.length;){i.unshift(r.pop());let a=i.join("."),s=t+"=12345;domain=."+a;if(document.cookie=s,n.test(document.cookie))return document.cookie=s+";expires="+o,a+e}return document.domain+e}function c(t){if(r)return r;let n="mh_"+Math.random(),o=new RegExp("(^|;)\\s*"+n+"=12345"),e=/* @__PURE__ */new Date(0),i=document.domain.split("."),a=location.port&&80!==location.port&&443!==location.port?":"+location.port:"",s=[];for(s.unshift(i.pop());i.length;){s.unshift(i.pop());let l=s.join(".");if(r={main:l,port:a,mainhost:l+a,name:l.split(".")[0],protocol:location.protocol},t)return r;{let t=n+"=12345;domain=."+l;if(document.cookie=t,o.test(document.cookie))return document.cookie=t+";expires="+e,r={main:l,port:a,mainhost:l+a,name:l.split(".")[0],protocol:location.protocol},r}}if(!r){let t="localhost";return{main:t,port:a,mainhost:t+a,name:t,protocol:location.protocol}}}function f(n,o,r){if(r){const t=url.indexOf("?");if(-1===t)return"";r=r.substr(t+1)}else r=window.location.search.substr(1);if(!r)return"";o=""===o?"":o||"?";let e="",i=r.split("&");n=t(n)?n.split(","):n;for(var a=0;a<i.length;a++){let t=i[a].split("=");t[1]&&n.indexOf(t[0])>=0&&(e+=(""===e?o:"&")+t[0]+"="+t[1])}return e}function d(t,n){if(!(n=n||window.location.search.substr(1))){var o=window.location.hash.indexOf("?");n=o>=0?window.location.hash.substr(o+1):""}var r=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),e=n.match(r);return null!==e?e[2]:null}function p(t,n,o){if(null==n)return o;var r=o||window.location.href,e="?"===(r=h(t,r))?"":r.indexOf("?")>=0?"&":"?";return r+e+t+"="+escape(n)}function m(t,n){if(!t)return n;var o=n||window.location.href,r="?"===o?"":o.indexOf("?")>=0?"&":"?",e=0;for(var i in o=h(t,o),t)(t[i]||0===t[i])&&(o=o+(r=0===e?r:"&")+i+"="+escape(t[i]),e++);return o}function h(r,e){var i=e||window.location.href,a="",s=i.indexOf("?");if(-1===s)return i;if(!(a=i.substr(s+1)))return i;let l=a.split("&"),u="";r=t(r)?r.split(","):r;for(var c=0;c<l.length;c++){let t=l[c].split("="),e=t[0];(e&&n(r)&&-1===r.indexOf(e)||o(r)&&void 0===r[e])&&(u=u+e+"="+t[1]+"&")}return i.substr(0,s)+"?"+u.substr(0,u.length-1)}function g(t,n){const o=h(t);history.replaceState(null,n,o)}function P(){return e.currentPath||(e.currentPath=location.pathname.substring(0,location.pathname.lastIndexOf("/")+1)),e.currentPath}function w(){return e.domainCurrentPath||(e.domainCurrentPath=location.href.substring(0,location.href.lastIndexOf("/")+1)),e.domainCurrentPath}const x={jsonto:i,formto:a,toData:s,getDomainFromStr:l,getDomain:u,getDomainJson:c,getParsTo:f,getPar:d,addPar:p,addPars:m,delPar:h,delParsUpUrl:g,currentPath:P,domainCurrentPath:w};export{p as addPar,m as addPars,P as currentPath,h as delPar,g as delParsUpUrl,w as domainCurrentPath,a as formto,u as getDomain,l as getDomainFromStr,c as getDomainJson,d as getPar,f as getParsTo,i as jsonto,s as toData,x as urltool};
@@ -0,0 +1 @@
1
+ import{isString as t,isObject as e,isArray as r}from"@impui/com/typetool";import{injectCSS as i}from"@impui/com/style";import s from"../index.css/index.es.js";import{getConfig as n}from"../../config/index.es.js";i(s,"imp-restool");const o={};const c=new class{constructor(){this._config=null,this.initPromise=this.init()}async init(){return this._config||(this._config=await n()),this}async ensureConfig(){return this._config||await this.initPromise,this}get statics(){return this._config?{nohead:`${this._config.sr}/live/webSkins_site/${this._config.sitetype}/images/nohead.jpg`}:{nohead:""}}getSrc(i,s,n){if(!this._config)return"";let o=i;if(isNaN(parseInt(i))&&(o=this._config.paths.typeEnums[i]),t(i)&&["emblem","bubble","head","cardskin"].indexOf(i.toLowerCase())>=0&&(e(s)||r(s))&&0===(s=this.titlesTool.getTitlexIdFromType(s,i)))return"";if(4!==o&&0!=s&&!s)return"";o=parseInt(o);const c=this._config.paths.types[`t_${o}`],a=c.pc_path||c.path,l=c.pc_suffix||c.suffix;let g=this._config.js_version;if(n){g=impui.getCodeVer()[n]||this._config.js_version}return s||0===s?`${a}${s}${l}?d=${g}`:`${a}?d=${g}`}getEmotSrc(t,e,r=!1){return r?this.getSrc("emot",`${t}/${e}_s`):this.getSrc("emot",`${t}/${e}`)}getUserLevelSrc(t){return this.getSrc("user",t)}getAnchorLevelSrc(t){return this.getSrc("host",t)}getBubbleZipSrc(t){return this.getSrc("bubble_zip",t)}getFanclubLevelHtml(t,e){return`<span class="fanclubgrage" style="background-image:url(${this.getSrc("fans_grade",t)})">${e}</span>`}async getBubbleImageMap(t,e){const r=this.getBubbleZipSrc(t);return await this.getZipUrlMap(r,e)}getSrImgSrc(t){return t?t.startsWith("http")?t:`${this._config.sr}${t.startsWith("/")?t:"/"+t}`:""}async getZipUrlMap(t,e){await this.ensureConfig();const{jszip:r}=await impui.loadAsync(["jszip"]),i=new r;try{let r;if(o[t])r=o[t];else{const e=await fetch(t),s=await e.arrayBuffer();r=await i.loadAsync(s),o[t]=r}e=e||(()=>!0);const s={},n=[];r.forEach(async(t,r)=>{if(e(t,r)){const e=r.async("blob").then(e=>{const r=URL.createObjectURL(e);return{key:t,url:r}});n.push(e)}});return(await Promise.all(n)).forEach(t=>{s[t.key]=t.url}),s}catch(s){return console.error("获取压缩包失败:",s),null}}get titlesTool(){return{converTitlesex:i=>{if(!i)return{};if(e(i))return i;if(t(i))return JSON.parse(i);const s={};return r(i)&&i.forEach(t=>{s[t.titleid]=t}),s},getTitlesexFromType:(t,e)=>{const r=this.titlesTool.converTitlesex(t),i=[];for(const s in r){r[s].type===e&&i.push(parseInt(s))}return i},getTitlexIdFromType:(t,e)=>{const r=this.titlesTool.converTitlesex(t);let i=0,s=Number.MAX_VALUE;const n=e.toLowerCase();for(const o in r){const t=r[o];if(t.type.toLowerCase()===n){if("bubble"!==n)return parseInt(o);const e=parseInt(t.endtime);e<s&&(i=parseInt(o),s=e)}}return i},getHeadBorderSrc:t=>this.getSrc(7,t),getHeadBorderImg:t=>`<div class="border_img"><img src="${this.titlesTool.getHeadBorderSrc(t)}" /></div>`,getHeadBorder:(t,e)=>(t.addClass("headBorder"),t.append(this.titlesTool.getHeadBorderImg(e)),t)}}};export{c as restool};
@@ -0,0 +1 @@
1
+ const n="\r\n\r\n\r\n/*粉丝团等级*/\r\n.fanclubgrage{background-repeat:no-repeat;background-size:100%;height:22px !important;aspect-ratio: 77 / 22;display:inline-block;color:#fff;text-indent:32px;line-height:23px !important;font-size: 12px;}\r\n\r\n\r\n";export{n as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impui/imp",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "此库主要是公司相关的特殊处理,只用于公司专有项目,无法用于其他项目",
5
5
  "main": "dist/index.es.js",
6
6
  "files": [
@@ -23,6 +23,9 @@
23
23
  "author": "",
24
24
  "license": "ISC",
25
25
  "type": "commonjs",
26
+ "devDependencies": {
27
+ "axios": "^1.13.2"
28
+ },
26
29
  "dependencies": {
27
30
  "@impui/com": "^1.1.3-beta.7",
28
31
  "axios": "^1.13.2"