g-ui-web 1.1.23 → 1.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/g-ui-web.js +11 -7
- package/lib/g-ui-web.js.gz +0 -0
- package/lib/g-ui-web.umd.cjs +1 -1
- package/package.json +1 -1
package/lib/g-ui-web.js
CHANGED
|
@@ -48720,14 +48720,18 @@ class K3 {
|
|
|
48720
48720
|
R0(this, "data", Nr({}));
|
|
48721
48721
|
R0(this, "dataUrl");
|
|
48722
48722
|
R0(this, "events");
|
|
48723
|
-
if (this.events = {}, !t
|
|
48723
|
+
if (this.events = {}, !t)
|
|
48724
|
+
throw console.error("dataUrl is undefined or null"), new Error("Invalid dataUrl");
|
|
48725
|
+
if (typeof t == "string" || typeof t == "number" || typeof t == "object" && t !== null && !t.path)
|
|
48724
48726
|
this.loadStaticData(t);
|
|
48725
|
-
else if (Array.isArray(t))
|
|
48727
|
+
else if (Array.isArray(t)) {
|
|
48728
|
+
if (!t.some((r) => r && r.path))
|
|
48729
|
+
throw console.error("Array dataUrl must contain at least one object with a path property"), new Error("Invalid array dataUrl");
|
|
48726
48730
|
this.dataUrl = t, this.load(this.dataUrl);
|
|
48727
|
-
else
|
|
48728
|
-
|
|
48729
|
-
|
|
48730
|
-
|
|
48731
|
+
} else if (typeof t == "object" && t !== null && t.path)
|
|
48732
|
+
this.dataUrl = t, [void 0, !0].includes(t == null ? void 0 : t.autoQuery) && this.load(this.dataUrl);
|
|
48733
|
+
else
|
|
48734
|
+
throw console.error("Invalid dataUrl type. Expected object, array, string, or number."), new Error("Invalid dataUrl type");
|
|
48731
48735
|
}
|
|
48732
48736
|
loadStaticData(t) {
|
|
48733
48737
|
this.data = t, xe(() => {
|
|
@@ -48782,7 +48786,7 @@ const Kt = (e) => {
|
|
|
48782
48786
|
params: r[1] ? qy.parse(r[1]) : {}
|
|
48783
48787
|
});
|
|
48784
48788
|
}
|
|
48785
|
-
return e
|
|
48789
|
+
return (e == null ? void 0 : e.path) != null && (t = new K3(e)), e != null && e.dsKey && (t = e), !(e != null && e.path) && !(e != null && e.dsKey) && !(typeof e == "string" && y5.some((r) => e.includes(r))) && !["string", "number"].includes(typeof e) && (t = new K3(e)), t;
|
|
48786
48790
|
}, Y3 = (e) => Array.isArray(e) ? "数组" : typeof e == "object" && e !== null ? "对象" : typeof e == "string" ? "字符串" : "其他类型";
|
|
48787
48791
|
var B$e = {
|
|
48788
48792
|
name: "zh-cn",
|
package/lib/g-ui-web.js.gz
CHANGED
|
Binary file
|
package/lib/g-ui-web.umd.cjs
CHANGED
|
@@ -87,7 +87,7 @@ For more detail, please visit: ${a}
|
|
|
87
87
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(a=>o.set(a)),o}static accessor(t){const o=(this[A7]=this[A7]={accessors:{}}).accessors,a=this.prototype;function i(l){const s=P0(l);o[s]||(WLe(a,l),o[s]=!0)}return Xe.isArray(t)?t.forEach(i):i(t),this}}Ia.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Xe.reduceDescriptors(Ia.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),Xe.freezeMethods(Ia);function Q6(e,t){const n=this||L0,o=t||n,a=Ia.from(o.headers);let i=o.data;return Xe.forEach(e,function(s){i=s.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function D7(e){return!!(e&&e.__CANCEL__)}function Dh(e,t,n){xn.call(this,e??"canceled",xn.ERR_CANCELED,t,n),this.name="CanceledError"}Xe.inherits(Dh,xn,{__CANCEL__:!0});function N7(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new xn("Request failed with status code "+n.status,[xn.ERR_BAD_REQUEST,xn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ULe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function KLe(e,t){e=e||10;const n=new Array(e),o=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=o[i];l||(l=d),n[a]=c,o[a]=d;let f=i,p=0;for(;f!==a;)p+=n[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),d-l<t)return;const h=u&&d-u;return h?Math.round(p*1e3/h):void 0}}function jLe(e,t){let n=0,o=1e3/t,a,i;const l=(d,u=Date.now())=>{n=u,a=null,i&&(clearTimeout(i),i=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),f=u-n;f>=o?l(d,u):(a=d,i||(i=setTimeout(()=>{i=null,l(a)},o-f)))},()=>a&&l(a)]}const wb=(e,t,n=3)=>{let o=0;const a=KLe(50,250);return jLe(i=>{const l=i.loaded,s=i.lengthComputable?i.total:void 0,c=l-o,d=a(c),u=l<=s;o=l;const f={loaded:l,total:s,progress:s?l/s:void 0,bytes:c,rate:d||void 0,estimated:d&&s&&u?(s-l)/d:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},B7=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},O7=e=>(...t)=>Xe.asap(()=>e(...t)),YLe=Jo.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jo.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jo.origin),Jo.navigator&&/(msie|trident)/i.test(Jo.navigator.userAgent)):()=>!0,qLe=Jo.hasStandardBrowserEnv?{write(e,t,n,o,a,i){const l=[e+"="+encodeURIComponent(t)];Xe.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Xe.isString(o)&&l.push("path="+o),Xe.isString(a)&&l.push("domain="+a),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function XLe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ZLe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function V7(e,t){return e&&!XLe(t)?ZLe(e,t):t}const I7=e=>e instanceof Ia?{...e}:e;function Gu(e,t){t=t||{};const n={};function o(d,u,f,p){return Xe.isPlainObject(d)&&Xe.isPlainObject(u)?Xe.merge.call({caseless:p},d,u):Xe.isPlainObject(u)?Xe.merge({},u):Xe.isArray(u)?u.slice():u}function a(d,u,f,p){if(Xe.isUndefined(u)){if(!Xe.isUndefined(d))return o(void 0,d,f,p)}else return o(d,u,f,p)}function i(d,u){if(!Xe.isUndefined(u))return o(void 0,u)}function l(d,u){if(Xe.isUndefined(u)){if(!Xe.isUndefined(d))return o(void 0,d)}else return o(void 0,u)}function s(d,u,f){if(f in t)return o(d,u);if(f in e)return o(void 0,d)}const c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(d,u,f)=>a(I7(d),I7(u),f,!0)};return Xe.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=c[u]||a,p=f(e[u],t[u],u);Xe.isUndefined(p)&&f!==s||(n[u]=p)}),n}const R7=e=>{const t=Gu({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:i,headers:l,auth:s}=t;t.headers=l=Ia.from(l),t.url=E7(V7(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(Xe.isFormData(n)){if(Jo.hasStandardBrowserEnv||Jo.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((c=l.getContentType())!==!1){const[d,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];l.setContentType([d||"multipart/form-data",...u].join("; "))}}if(Jo.hasStandardBrowserEnv&&(o&&Xe.isFunction(o)&&(o=o(t)),o||o!==!1&&YLe(t.url))){const d=a&&i&&qLe.read(i);d&&l.set(a,d)}return t},JLe=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const a=R7(e);let i=a.data;const l=Ia.from(a.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:d}=a,u,f,p,h,m;function g(){h&&h(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function y(){if(!v)return;const b=Ia.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:b,config:e,request:v};N7(function(S){n(S),g()},function(S){o(S),g()},C),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new xn("Request aborted",xn.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new xn("Network Error",xn.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const C=a.transitional||T7;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),o(new xn(w,C.clarifyTimeoutError?xn.ETIMEDOUT:xn.ECONNABORTED,e,v)),v=null},i===void 0&&l.setContentType(null),"setRequestHeader"in v&&Xe.forEach(l.toJSON(),function(w,C){v.setRequestHeader(C,w)}),Xe.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),s&&s!=="json"&&(v.responseType=a.responseType),d&&([p,m]=wb(d,!0),v.addEventListener("progress",p)),c&&v.upload&&([f,h]=wb(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(u=b=>{v&&(o(!b||b.type?new Dh(null,e,v):b),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const _=ULe(a.url);if(_&&Jo.protocols.indexOf(_)===-1){o(new xn("Unsupported protocol "+_+":",xn.ERR_BAD_REQUEST,e));return}v.send(i||null)})},QLe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,a;const i=function(d){if(!a){a=!0,s();const u=d instanceof Error?d:this.reason;o.abort(u instanceof xn?u:new Dh(u instanceof Error?u.message:u))}};let l=t&&setTimeout(()=>{l=null,i(new xn(`timeout ${t} of ms exceeded`,xn.ETIMEDOUT))},t);const s=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:c}=o;return c.unsubscribe=()=>Xe.asap(s),c}},e9e=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,a;for(;o<n;)a=o+t,yield e.slice(o,a),o=a},t9e=async function*(e,t){for await(const n of n9e(e))yield*e9e(n,t)},n9e=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},L7=(e,t,n,o)=>{const a=t9e(e,t);let i=0,l,s=c=>{l||(l=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await a.next();if(d){s(),c.close();return}let f=u.byteLength;if(n){let p=i+=f;n(p)}c.enqueue(new Uint8Array(u))}catch(d){throw s(d),d}},cancel(c){return s(c),a.return()}},{highWaterMark:2})},Cb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",P7=Cb&&typeof ReadableStream=="function",r9e=Cb&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),$7=(e,...t)=>{try{return!!e(...t)}catch{return!1}},o9e=P7&&$7(()=>{let e=!1;const t=new Request(Jo.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),z7=64*1024,eE=P7&&$7(()=>Xe.isReadableStream(new Response("").body)),xb={stream:eE&&(e=>e.body)};Cb&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xb[t]&&(xb[t]=Xe.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new xn(`Response type '${t}' is not supported`,xn.ERR_NOT_SUPPORT,o)})})})(new Response);const a9e=async e=>{if(e==null)return 0;if(Xe.isBlob(e))return e.size;if(Xe.isSpecCompliantForm(e))return(await new Request(Jo.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Xe.isArrayBufferView(e)||Xe.isArrayBuffer(e))return e.byteLength;if(Xe.isURLSearchParams(e)&&(e=e+""),Xe.isString(e))return(await r9e(e)).byteLength},i9e=async(e,t)=>{const n=Xe.toFiniteNumber(e.getContentLength());return n??a9e(t)},tE={http:TLe,xhr:JLe,fetch:Cb&&(async e=>{let{url:t,method:n,data:o,signal:a,cancelToken:i,timeout:l,onDownloadProgress:s,onUploadProgress:c,responseType:d,headers:u,withCredentials:f="same-origin",fetchOptions:p}=R7(e);d=d?(d+"").toLowerCase():"text";let h=QLe([a,i&&i.toAbortSignal()],l),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(c&&o9e&&n!=="get"&&n!=="head"&&(v=await i9e(u,o))!==0){let C=new Request(t,{method:"POST",body:o,duplex:"half"}),x;if(Xe.isFormData(o)&&(x=C.headers.get("content-type"))&&u.setContentType(x),C.body){const[S,E]=B7(v,wb(O7(c)));o=L7(C.body,z7,S,E)}}Xe.isString(f)||(f=f?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:y?f:void 0});let _=await fetch(m);const b=eE&&(d==="stream"||d==="response");if(eE&&(s||b&&g)){const C={};["status","statusText","headers"].forEach(k=>{C[k]=_[k]});const x=Xe.toFiniteNumber(_.headers.get("content-length")),[S,E]=s&&B7(x,wb(O7(s),!0))||[];_=new Response(L7(_.body,z7,S,()=>{E&&E(),g&&g()}),C)}d=d||"text";let w=await xb[Xe.findKey(xb,d)||"text"](_,e);return!b&&g&&g(),await new Promise((C,x)=>{N7(C,x,{data:w,headers:Ia.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new xn("Network Error",xn.ERR_NETWORK,e,m),{cause:y.cause||y}):xn.from(y,y&&y.code,e,m)}})};Xe.forEach(tE,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const F7=e=>`- ${e}`,l9e=e=>Xe.isFunction(e)||e===null||e===!1,H7={getAdapter:e=>{e=Xe.isArray(e)?e:[e];const{length:t}=e;let n,o;const a={};for(let i=0;i<t;i++){n=e[i];let l;if(o=n,!l9e(n)&&(o=tE[(l=String(n)).toLowerCase()],o===void 0))throw new xn(`Unknown adapter '${l}'`);if(o)break;a[l||"#"+i]=o}if(!o){const i=Object.entries(a).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since :
|
|
88
88
|
`+i.map(F7).join(`
|
|
89
89
|
`):" "+F7(i[0]):"as no adapter specified";throw new xn("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:tE};function nE(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dh(null,e)}function G7(e){return nE(e),e.headers=Ia.from(e.headers),e.data=Q6.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),H7.getAdapter(e.adapter||L0.adapter)(e).then(function(o){return nE(e),o.data=Q6.call(e,e.transformResponse,o),o.headers=Ia.from(o.headers),o},function(o){return D7(o)||(nE(e),o&&o.response&&(o.response.data=Q6.call(e,e.transformResponse,o.response),o.response.headers=Ia.from(o.response.headers))),Promise.reject(o)})}const W7="1.7.8",Sb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Sb[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const U7={};Sb.transitional=function(t,n,o){function a(i,l){return"[Axios v"+W7+"] Transitional option '"+i+"'"+l+(o?". "+o:"")}return(i,l,s)=>{if(t===!1)throw new xn(a(l," has been removed"+(n?" in "+n:"")),xn.ERR_DEPRECATED);return n&&!U7[l]&&(U7[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,s):!0}},Sb.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function s9e(e,t,n){if(typeof e!="object")throw new xn("options must be an object",xn.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let a=o.length;for(;a-- >0;){const i=o[a],l=t[i];if(l){const s=e[i],c=s===void 0||l(s,i,e);if(c!==!0)throw new xn("option "+i+" must be "+c,xn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new xn("Unknown option "+i,xn.ERR_BAD_OPTION)}}const Eb={assertOptions:s9e,validators:Sb},ps=Eb.validators;class Wu{constructor(t){this.defaults=t,this.interceptors={request:new k7,response:new k7}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
90
|
-
`+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Gu(this.defaults,n);const{transitional:o,paramsSerializer:a,headers:i}=n;o!==void 0&&Eb.assertOptions(o,{silentJSONParsing:ps.transitional(ps.boolean),forcedJSONParsing:ps.transitional(ps.boolean),clarifyTimeoutError:ps.transitional(ps.boolean)},!1),a!=null&&(Xe.isFunction(a)?n.paramsSerializer={serialize:a}:Eb.assertOptions(a,{encode:ps.function,serialize:ps.function},!0)),Eb.assertOptions(n,{baseUrl:ps.spelling("baseURL"),withXsrfToken:ps.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&Xe.merge(i.common,i[n.method]);i&&Xe.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Ia.concat(l,i);const s=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let u,f=0,p;if(!c){const m=[G7.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,d),p=m.length,u=Promise.resolve(n);f<p;)u=u.then(m[f++],m[f++]);return u}p=s.length;let h=n;for(f=0;f<p;){const m=s[f++],g=s[f++];try{h=m(h)}catch(v){g.call(this,v);break}}try{u=G7.call(this,h)}catch(m){return Promise.reject(m)}for(f=0,p=d.length;f<p;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=Gu(this.defaults,t);const n=V7(t.baseURL,t.url);return E7(n,t.params,t.paramsSerializer)}}Xe.forEach(["delete","get","head","options"],function(t){Wu.prototype[t]=function(n,o){return this.request(Gu(o||{},{method:t,url:n,data:(o||{}).data}))}}),Xe.forEach(["post","put","patch"],function(t){function n(o){return function(i,l,s){return this.request(Gu(s||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}Wu.prototype[t]=n(),Wu.prototype[t+"Form"]=n(!0)});class rE{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const o=this;this.promise.then(a=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](a);o._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(s=>{o.subscribe(s),i=s}).then(a);return l.cancel=function(){o.unsubscribe(i)},l},t(function(i,l,s){o.reason||(o.reason=new Dh(i,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new rE(function(a){t=a}),cancel:t}}}function c9e(e){return function(n){return e.apply(null,n)}}function d9e(e){return Xe.isObject(e)&&e.isAxiosError===!0}const oE={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};Object.entries(oE).forEach(([e,t])=>{oE[t]=e});function K7(e){const t=new Wu(e),n=c7(Wu.prototype.request,t);return Xe.extend(n,Wu.prototype,t,{allOwnKeys:!0}),Xe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return K7(Gu(e,a))},n}const io=K7(L0);io.Axios=Wu,io.CanceledError=Dh,io.CancelToken=rE,io.isCancel=D7,io.VERSION=W7,io.toFormData=bb,io.AxiosError=xn,io.Cancel=io.CanceledError,io.all=function(t){return Promise.all(t)},io.spread=c9e,io.isAxiosError=d9e,io.mergeConfig=Gu,io.AxiosHeaders=Ia,io.formToJSON=e=>M7(Xe.isHTMLForm(e)?new FormData(e):e),io.getAdapter=H7.getAdapter,io.HttpStatusCode=oE,io.default=io;const u9e={400:{message:"错误请求",status:400},401:{message:"未授权",status:401},403:{message:"拒绝访问",status:403},404:{message:"请求错误,未找到该资源",status:404},405:{message:"请求方法未允许",status:405},408:{message:"请求超时",status:408},500:{message:"服务器端出错",status:500},501:{message:"网络未实现",status:501},502:{message:"网络错误",status:502},503:{message:"服务不可用",status:503},504:{message:"网络超时",status:504},505:{message:"http版本不支持该请求",status:505}};function f9e(e){return u9e[e]||{message:"网络连接错误"}}const j7=(e,t)=>{if(!e)return null;if(!t||!t.includes("multipart/form-data")){const n={};return Object.entries(e).forEach(([o,a])=>{a!=null&&(n[o]=a)}),n}else{const n=new FormData;return Object.entries(e).forEach(([o,a])=>{n.append(o,a)}),n}},Y7=(()=>{let e=null,t=0;return{instance:e,count:t,show:a=>{t===0&&(e=r7.service({lock:!0,text:(a==null?void 0:a.text)??"拼命加载中...",background:(a==null?void 0:a.background)??"rgba(0, 0, 0, 0.7)"})),t++},hide:()=>{t--,e&&t<=0&&(e.close(),e=null)}}})(),p9e=e=>{Y7.show(e)},h9e=()=>{Y7.hide()},m9e={"Access-Control-Allow-Origin":"*","X-Requested-With":"XMLHttpRequest"};function g9e(e){return`${e.url}`}function v9e(e,t,n){e.data.code==200||e.status==200?n.callback&&n.callback(t.resultFilter?t.resultFilter(e.data):e.data):n.errorCallback&&n.errorCallback(e.data.errorMsg||"请求失败!",e.data.code||e.status)}function q7(e,t){const n=f9e(e.response.status);t.errorCallback&&t.errorCallback(n.message,n.status)}async function y9e(e,t){var n;e.isLoading&&p9e(e.loadingConfig);try{const o={url:g9e(e),method:e.method||"get",headers:{...m9e,"Content-Type":e.ContentType?e.ContentType:"application/json;charset=UTF-8",...e.headers},params:j7(e.params,e.ContentType),data:j7(e.data,e.ContentType),timeout:e.timeout||6e4,withCredentials:e.withCredentials||!1,responseType:e.ResponseType?e.ResponseType:"json"},a=await io(o);a.status==200?v9e(a,e,t):q7(a,t)}catch(o){o.message.indexOf("timeout")!=-1?Sl.error("网络超时"):o.message=="Network Error"?Sl.error("网络连接错误"):o&&(o!=null&&o.response)&&((n=o.response)!=null&&n.data)?Sl.error(o.response.statusText):q7(o,t)}finally{h9e(),t.loadingSwitch&&t.loadingSwitch(!1),t.complete&&t.complete(e.url)}}function X7(e,t={}){const o={...{complete:i=>{},callback:i=>{},cancelCallback:i=>{},errorCallback:(i,l)=>{Sl.error(i)}},...t},a={};return a.then=i=>(i&&(o.callback=l=>{i(l)}),a),a.catch=i=>(i&&(o.errorCallback=(l,s)=>{i(l,s)}),a),a.finally=i=>(i&&(o.complete=l=>{i(l)}),a),a.loadingSwitch=(i,l)=>(o.loadingSwitch=s=>{i[l]=s},a),a.lockSwitch=(i,l)=>(o.lock=()=>i[l],t.loadingSwitch=s=>{i[l]=s},a),setTimeout(()=>{o.lock&&o.lock()||(o.loadingSwitch&&o.loadingSwitch(!0),y9e(e,o))},1),a}const Z7=e=>Array.isArray(e)?"数组":typeof e=="object"&&e!==null?"对象":typeof e=="string"?"字符串":"其他类型",b9e={getList(e){var n,o,a,i,l,s,c,d;const t=e!=null&&e.key?{[(n=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:n.tokenName]:((o=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:o.token)||"",sysCode:((a=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:a.sysCode)||"",appType:((i=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:i.appType)||"",...e.headers}:{[(l=An.state["gui-ajax-config"])==null?void 0:l.tokenName]:((s=An.state["gui-ajax-config"])==null?void 0:s.token)||"",sysCode:((c=An.state["gui-ajax-config"])==null?void 0:c.sysCode)||"",appType:((d=An.state["gui-ajax-config"])==null?void 0:d.appType)||"",...e.headers};if(Z7(e)=="对象"){const u=!e.method||e.method.toLowerCase()=="get"||e.method.toLowerCase()=="GET"||e.method.toLowerCase()=="delete"||e.method.toLowerCase()=="DELETE";return X7({url:e.path,method:e.method,data:u?null:e.params,params:u?e.params:null,ContentType:e.ContentType,headers:t,isLoading:!1})}else if(Z7(e)=="字符串")return X7({url:e,isLoading:!1})}},J7=async e=>{let t;const n=await b9e.getList(e);if(e.resPath){let o=e.resPath.split("/");t=Jue(n,o)}else t=(n==null?void 0:n.data)||n;return{resData:t,res:n}};var $0={};function _9e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var w9e=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if(typeof e!="string"||e.length===0)return a;var i=/\+/g;e=e.split(t);var l=1e3;o&&typeof o.maxKeys=="number"&&(l=o.maxKeys);var s=e.length;l>0&&s>l&&(s=l);for(var c=0;c<s;++c){var d=e[c].replace(i,"%20"),u=d.indexOf(n),f,p,h,m;u>=0?(f=d.substr(0,u),p=d.substr(u+1)):(f=d,p=""),h=decodeURIComponent(f),m=decodeURIComponent(p),_9e(a,h)?Array.isArray(a[h])?a[h].push(m):a[h]=[a[h],m]:a[h]=m}return a},z0=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},C9e=function(e,t,n,o){return t=t||"&",n=n||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(a){var i=encodeURIComponent(z0(a))+n;return Array.isArray(e[a])?e[a].map(function(l){return i+encodeURIComponent(z0(l))}).join(t):i+encodeURIComponent(z0(e[a]))}).filter(Boolean).join(t):o?encodeURIComponent(z0(o))+n+encodeURIComponent(z0(e)):""};$0.decode=$0.parse=w9e,$0.encode=$0.stringify=C9e;const aE=["http://","https://",void 0];class kb{constructor(t){A1(this,"dsKey","DataSource");A1(this,"data",r.reactive({}));A1(this,"dataUrl");A1(this,"events");if(this.events={},!t.path&&!["string","number"].includes(typeof t)&&!Array.isArray(t)||Array.isArray(t)&&!t.some(n=>n.path))this.loadStaticData(t);else if(Array.isArray(t))this.dataUrl=t,this.load(this.dataUrl);else{const n=[void 0,!0].includes(t==null?void 0:t.autoQuery);this.dataUrl=t,n&&this.load(this.dataUrl)}}loadStaticData(t){this.data=t,r.nextTick(()=>{this.trigger("load",this.data)})}async load(t){if(this.dataUrl=t,Array.isArray(t)){const n=t.map(async(o,a)=>await J7(o));await Promise.all(n).then(o=>{this.data=o.map((a,i)=>{const s=t[i].transformResponse;return s?s(a==null?void 0:a.resData,a==null?void 0:a.res):a==null?void 0:a.resData}),this.trigger("load",this.data)}).catch(o=>{this.data={},this.trigger("load",this.data)})}else{const n=await J7(t),o=t.transformResponse;this.data=o?o(n==null?void 0:n.resData,n==null?void 0:n.res):n==null?void 0:n.resData,this.trigger("load",this.data)}}reload(t){var n;if(iE(t)=="数组")if(!t.some(o=>o.params))this.dataUrl=t,this.load(this.dataUrl);else{const o=(n=this.dataUrl)==null?void 0:n.map((a,i)=>({...a,params:t[i]}));this.dataUrl=o,this.load(this.dataUrl)}else iE(t)=="对象"?t.path&&aE.some(o=>t.path.includes(o))?(this.dataUrl=t,this.load(this.dataUrl)):(this.dataUrl.params=t,this.load(this.dataUrl)):iE(t)=="字符串"&&(this.dataUrl=t,this.load(this.dataUrl))}on(t,n){this.events[t]||(this.events[t]=[]),this.events[t].push(n)}trigger(t,n){this.events[t]&&this.events[t].forEach(o=>{o(n)})}}const Ct=e=>{let t=null;if(typeof e=="string"&&aE.some(n=>e.includes(n))){const n=e.split("?");t=new kb({path:n[0],params:n[1]?$0.parse(n[1]):{}})}return e!=null&&e.path&&(t=new kb(e)),e!=null&&e.dsKey&&(t=e),!(e!=null&&e.path)&&!(e!=null&&e.dsKey)&&!(typeof e=="string"&&aE.some(n=>e.includes(n)))&&!["string","number"].includes(typeof e)&&(t=new kb(e)),t},iE=e=>Array.isArray(e)?"数组":typeof e=="object"&&e!==null?"对象":typeof e=="string"?"字符串":"其他类型";var x9e={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/*! *****************************************************************************
|
|
90
|
+
`+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Gu(this.defaults,n);const{transitional:o,paramsSerializer:a,headers:i}=n;o!==void 0&&Eb.assertOptions(o,{silentJSONParsing:ps.transitional(ps.boolean),forcedJSONParsing:ps.transitional(ps.boolean),clarifyTimeoutError:ps.transitional(ps.boolean)},!1),a!=null&&(Xe.isFunction(a)?n.paramsSerializer={serialize:a}:Eb.assertOptions(a,{encode:ps.function,serialize:ps.function},!0)),Eb.assertOptions(n,{baseUrl:ps.spelling("baseURL"),withXsrfToken:ps.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&Xe.merge(i.common,i[n.method]);i&&Xe.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Ia.concat(l,i);const s=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let u,f=0,p;if(!c){const m=[G7.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,d),p=m.length,u=Promise.resolve(n);f<p;)u=u.then(m[f++],m[f++]);return u}p=s.length;let h=n;for(f=0;f<p;){const m=s[f++],g=s[f++];try{h=m(h)}catch(v){g.call(this,v);break}}try{u=G7.call(this,h)}catch(m){return Promise.reject(m)}for(f=0,p=d.length;f<p;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=Gu(this.defaults,t);const n=V7(t.baseURL,t.url);return E7(n,t.params,t.paramsSerializer)}}Xe.forEach(["delete","get","head","options"],function(t){Wu.prototype[t]=function(n,o){return this.request(Gu(o||{},{method:t,url:n,data:(o||{}).data}))}}),Xe.forEach(["post","put","patch"],function(t){function n(o){return function(i,l,s){return this.request(Gu(s||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}Wu.prototype[t]=n(),Wu.prototype[t+"Form"]=n(!0)});class rE{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const o=this;this.promise.then(a=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](a);o._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(s=>{o.subscribe(s),i=s}).then(a);return l.cancel=function(){o.unsubscribe(i)},l},t(function(i,l,s){o.reason||(o.reason=new Dh(i,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new rE(function(a){t=a}),cancel:t}}}function c9e(e){return function(n){return e.apply(null,n)}}function d9e(e){return Xe.isObject(e)&&e.isAxiosError===!0}const oE={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};Object.entries(oE).forEach(([e,t])=>{oE[t]=e});function K7(e){const t=new Wu(e),n=c7(Wu.prototype.request,t);return Xe.extend(n,Wu.prototype,t,{allOwnKeys:!0}),Xe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return K7(Gu(e,a))},n}const io=K7(L0);io.Axios=Wu,io.CanceledError=Dh,io.CancelToken=rE,io.isCancel=D7,io.VERSION=W7,io.toFormData=bb,io.AxiosError=xn,io.Cancel=io.CanceledError,io.all=function(t){return Promise.all(t)},io.spread=c9e,io.isAxiosError=d9e,io.mergeConfig=Gu,io.AxiosHeaders=Ia,io.formToJSON=e=>M7(Xe.isHTMLForm(e)?new FormData(e):e),io.getAdapter=H7.getAdapter,io.HttpStatusCode=oE,io.default=io;const u9e={400:{message:"错误请求",status:400},401:{message:"未授权",status:401},403:{message:"拒绝访问",status:403},404:{message:"请求错误,未找到该资源",status:404},405:{message:"请求方法未允许",status:405},408:{message:"请求超时",status:408},500:{message:"服务器端出错",status:500},501:{message:"网络未实现",status:501},502:{message:"网络错误",status:502},503:{message:"服务不可用",status:503},504:{message:"网络超时",status:504},505:{message:"http版本不支持该请求",status:505}};function f9e(e){return u9e[e]||{message:"网络连接错误"}}const j7=(e,t)=>{if(!e)return null;if(!t||!t.includes("multipart/form-data")){const n={};return Object.entries(e).forEach(([o,a])=>{a!=null&&(n[o]=a)}),n}else{const n=new FormData;return Object.entries(e).forEach(([o,a])=>{n.append(o,a)}),n}},Y7=(()=>{let e=null,t=0;return{instance:e,count:t,show:a=>{t===0&&(e=r7.service({lock:!0,text:(a==null?void 0:a.text)??"拼命加载中...",background:(a==null?void 0:a.background)??"rgba(0, 0, 0, 0.7)"})),t++},hide:()=>{t--,e&&t<=0&&(e.close(),e=null)}}})(),p9e=e=>{Y7.show(e)},h9e=()=>{Y7.hide()},m9e={"Access-Control-Allow-Origin":"*","X-Requested-With":"XMLHttpRequest"};function g9e(e){return`${e.url}`}function v9e(e,t,n){e.data.code==200||e.status==200?n.callback&&n.callback(t.resultFilter?t.resultFilter(e.data):e.data):n.errorCallback&&n.errorCallback(e.data.errorMsg||"请求失败!",e.data.code||e.status)}function q7(e,t){const n=f9e(e.response.status);t.errorCallback&&t.errorCallback(n.message,n.status)}async function y9e(e,t){var n;e.isLoading&&p9e(e.loadingConfig);try{const o={url:g9e(e),method:e.method||"get",headers:{...m9e,"Content-Type":e.ContentType?e.ContentType:"application/json;charset=UTF-8",...e.headers},params:j7(e.params,e.ContentType),data:j7(e.data,e.ContentType),timeout:e.timeout||6e4,withCredentials:e.withCredentials||!1,responseType:e.ResponseType?e.ResponseType:"json"},a=await io(o);a.status==200?v9e(a,e,t):q7(a,t)}catch(o){o.message.indexOf("timeout")!=-1?Sl.error("网络超时"):o.message=="Network Error"?Sl.error("网络连接错误"):o&&(o!=null&&o.response)&&((n=o.response)!=null&&n.data)?Sl.error(o.response.statusText):q7(o,t)}finally{h9e(),t.loadingSwitch&&t.loadingSwitch(!1),t.complete&&t.complete(e.url)}}function X7(e,t={}){const o={...{complete:i=>{},callback:i=>{},cancelCallback:i=>{},errorCallback:(i,l)=>{Sl.error(i)}},...t},a={};return a.then=i=>(i&&(o.callback=l=>{i(l)}),a),a.catch=i=>(i&&(o.errorCallback=(l,s)=>{i(l,s)}),a),a.finally=i=>(i&&(o.complete=l=>{i(l)}),a),a.loadingSwitch=(i,l)=>(o.loadingSwitch=s=>{i[l]=s},a),a.lockSwitch=(i,l)=>(o.lock=()=>i[l],t.loadingSwitch=s=>{i[l]=s},a),setTimeout(()=>{o.lock&&o.lock()||(o.loadingSwitch&&o.loadingSwitch(!0),y9e(e,o))},1),a}const Z7=e=>Array.isArray(e)?"数组":typeof e=="object"&&e!==null?"对象":typeof e=="string"?"字符串":"其他类型",b9e={getList(e){var n,o,a,i,l,s,c,d;const t=e!=null&&e.key?{[(n=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:n.tokenName]:((o=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:o.token)||"",sysCode:((a=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:a.sysCode)||"",appType:((i=An.state["gui-ajax-config"][e==null?void 0:e.key])==null?void 0:i.appType)||"",...e.headers}:{[(l=An.state["gui-ajax-config"])==null?void 0:l.tokenName]:((s=An.state["gui-ajax-config"])==null?void 0:s.token)||"",sysCode:((c=An.state["gui-ajax-config"])==null?void 0:c.sysCode)||"",appType:((d=An.state["gui-ajax-config"])==null?void 0:d.appType)||"",...e.headers};if(Z7(e)=="对象"){const u=!e.method||e.method.toLowerCase()=="get"||e.method.toLowerCase()=="GET"||e.method.toLowerCase()=="delete"||e.method.toLowerCase()=="DELETE";return X7({url:e.path,method:e.method,data:u?null:e.params,params:u?e.params:null,ContentType:e.ContentType,headers:t,isLoading:!1})}else if(Z7(e)=="字符串")return X7({url:e,isLoading:!1})}},J7=async e=>{let t;const n=await b9e.getList(e);if(e.resPath){let o=e.resPath.split("/");t=Jue(n,o)}else t=(n==null?void 0:n.data)||n;return{resData:t,res:n}};var $0={};function _9e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var w9e=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if(typeof e!="string"||e.length===0)return a;var i=/\+/g;e=e.split(t);var l=1e3;o&&typeof o.maxKeys=="number"&&(l=o.maxKeys);var s=e.length;l>0&&s>l&&(s=l);for(var c=0;c<s;++c){var d=e[c].replace(i,"%20"),u=d.indexOf(n),f,p,h,m;u>=0?(f=d.substr(0,u),p=d.substr(u+1)):(f=d,p=""),h=decodeURIComponent(f),m=decodeURIComponent(p),_9e(a,h)?Array.isArray(a[h])?a[h].push(m):a[h]=[a[h],m]:a[h]=m}return a},z0=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},C9e=function(e,t,n,o){return t=t||"&",n=n||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(a){var i=encodeURIComponent(z0(a))+n;return Array.isArray(e[a])?e[a].map(function(l){return i+encodeURIComponent(z0(l))}).join(t):i+encodeURIComponent(z0(e[a]))}).filter(Boolean).join(t):o?encodeURIComponent(z0(o))+n+encodeURIComponent(z0(e)):""};$0.decode=$0.parse=w9e,$0.encode=$0.stringify=C9e;const aE=["http://","https://",void 0];class kb{constructor(t){A1(this,"dsKey","DataSource");A1(this,"data",r.reactive({}));A1(this,"dataUrl");A1(this,"events");if(this.events={},!t)throw console.error("dataUrl is undefined or null"),new Error("Invalid dataUrl");if(typeof t=="string"||typeof t=="number"||typeof t=="object"&&t!==null&&!t.path)this.loadStaticData(t);else if(Array.isArray(t)){if(!t.some(n=>n&&n.path))throw console.error("Array dataUrl must contain at least one object with a path property"),new Error("Invalid array dataUrl");this.dataUrl=t,this.load(this.dataUrl)}else if(typeof t=="object"&&t!==null&&t.path)this.dataUrl=t,[void 0,!0].includes(t==null?void 0:t.autoQuery)&&this.load(this.dataUrl);else throw console.error("Invalid dataUrl type. Expected object, array, string, or number."),new Error("Invalid dataUrl type")}loadStaticData(t){this.data=t,r.nextTick(()=>{this.trigger("load",this.data)})}async load(t){if(this.dataUrl=t,Array.isArray(t)){const n=t.map(async(o,a)=>await J7(o));await Promise.all(n).then(o=>{this.data=o.map((a,i)=>{const s=t[i].transformResponse;return s?s(a==null?void 0:a.resData,a==null?void 0:a.res):a==null?void 0:a.resData}),this.trigger("load",this.data)}).catch(o=>{this.data={},this.trigger("load",this.data)})}else{const n=await J7(t),o=t.transformResponse;this.data=o?o(n==null?void 0:n.resData,n==null?void 0:n.res):n==null?void 0:n.resData,this.trigger("load",this.data)}}reload(t){var n;if(iE(t)=="数组")if(!t.some(o=>o.params))this.dataUrl=t,this.load(this.dataUrl);else{const o=(n=this.dataUrl)==null?void 0:n.map((a,i)=>({...a,params:t[i]}));this.dataUrl=o,this.load(this.dataUrl)}else iE(t)=="对象"?t.path&&aE.some(o=>t.path.includes(o))?(this.dataUrl=t,this.load(this.dataUrl)):(this.dataUrl.params=t,this.load(this.dataUrl)):iE(t)=="字符串"&&(this.dataUrl=t,this.load(this.dataUrl))}on(t,n){this.events[t]||(this.events[t]=[]),this.events[t].push(n)}trigger(t,n){this.events[t]&&this.events[t].forEach(o=>{o(n)})}}const Ct=e=>{let t=null;if(typeof e=="string"&&aE.some(n=>e.includes(n))){const n=e.split("?");t=new kb({path:n[0],params:n[1]?$0.parse(n[1]):{}})}return(e==null?void 0:e.path)!=null&&(t=new kb(e)),e!=null&&e.dsKey&&(t=e),!(e!=null&&e.path)&&!(e!=null&&e.dsKey)&&!(typeof e=="string"&&aE.some(n=>e.includes(n)))&&!["string","number"].includes(typeof e)&&(t=new kb(e)),t},iE=e=>Array.isArray(e)?"数组":typeof e=="object"&&e!==null?"对象":typeof e=="string"?"字符串":"其他类型";var x9e={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/*! *****************************************************************************
|
|
91
91
|
Copyright (c) Microsoft Corporation.
|
|
92
92
|
|
|
93
93
|
Permission to use, copy, modify, and/or distribute this software for any
|