yxuse 3.0.37 → 3.0.39
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/api.cjs.js +1 -1
- package/lib/api.es.js +4 -4
- package/lib/app.cjs.js +1 -0
- package/lib/app.es.js +4 -0
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +16 -17
- package/lib/directives.cjs.js +1 -1
- package/lib/directives.es.js +2 -2
- package/lib/hooks.cjs.js +1 -1
- package/lib/hooks.es.js +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs10.js +1 -0
- package/lib/index.cjs11.js +3 -0
- package/lib/index.cjs11.js.gz +0 -0
- package/lib/index.cjs12.js +1 -0
- package/lib/index.cjs13.js +1 -0
- package/lib/index.cjs2.js +1 -42
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs5.js +42 -1
- package/lib/index.cjs5.js.gz +0 -0
- package/lib/index.cjs6.js +1 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs7.js +1 -3
- package/lib/index.cjs8.js +1 -1
- package/lib/index.cjs9.js +1 -1
- package/lib/index.es.js +45 -18
- package/lib/index.es10.js +311 -0
- package/lib/index.es10.js.gz +0 -0
- package/lib/index.es11.js +1682 -0
- package/lib/index.es11.js.gz +0 -0
- package/lib/index.es12.js +124 -0
- package/lib/index.es13.js +19 -0
- package/lib/index.es2.js +14 -8213
- package/lib/index.es3.js +41 -131
- package/lib/index.es4.js +33 -38
- package/lib/index.es5.js +7347 -33
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es6.js +893 -301
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +18 -1674
- package/lib/index.es8.js +4 -15
- package/lib/index.es9.js +7 -20
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +17 -17
- package/lib/translate.cjs.js +1 -1
- package/lib/translate.es.js +11 -13
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +2 -2
- package/lib/yxIcon.cjs.js +1 -1
- package/lib/yxIcon.es.js +3 -3
- package/package.json +6 -1
- package/types/app/index.d.ts +1 -0
- package/types/bc/index.d.ts +5 -0
- package/types/config/index.d.ts +3 -0
- package/types/index.d.ts +6 -2
- package/types/theme/index.d.ts +8 -0
- package/types/translate/index.d.ts +1 -1
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs7.js.gz +0 -0
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es7.js.gz +0 -0
package/lib/index.cjs7.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
"use strict";var rt=Object.defineProperty;var Se=Object.getOwnPropertySymbols;var st=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable;var Z=(e,t,n)=>t in e?rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t)=>{for(var n in t||(t={}))st.call(t,n)&&Z(e,n,t[n]);if(Se)for(var n of Se(t))ot.call(t,n)&&Z(e,n,t[n]);return e};var ee=(e,t,n)=>(Z(e,typeof t!="symbol"?t+"":t,n),n);var j=(e,t,n)=>new Promise((r,s)=>{var i=l=>{try{c(n.next(l))}catch(u){s(u)}},o=l=>{try{c(n.throw(l))}catch(u){s(u)}},c=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,o);c((n=n.apply(e,t)).next())});const S=require("element-plus");function Ue(e,t){return function(){return e.apply(t,arguments)}}const{toString:_e}=Object.prototype,{getPrototypeOf:le}=Object,fe=(e=>t=>{const n=_e.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>fe(t)===e),G=e=>t=>typeof t===e,{isArray:L}=Array,D=G("undefined");function it(e){return e!==null&&!D(e)&&e.constructor!==null&&!D(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Be=A("ArrayBuffer");function at(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Be(e.buffer),t}const ct=G("string"),N=G("function"),Fe=G("number"),de=e=>e!==null&&typeof e=="object",ut=e=>e===!0||e===!1,H=e=>{if(fe(e)!=="object")return!1;const t=le(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},lt=A("Date"),ft=A("File"),dt=A("Blob"),pt=A("FileList"),ht=e=>de(e)&&N(e.pipe),mt=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||_e.call(e)===t||N(e.toString)&&e.toString()===t)},Et=A("URLSearchParams"),yt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function k(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),L(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function De(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ke=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Me=e=>!D(e)&&e!==ke;function oe(){const{caseless:e}=Me(this)&&this||{},t={},n=(r,s)=>{const i=e&&De(t,s)||s;H(t[i])&&H(r)?t[i]=oe(t[i],r):H(r)?t[i]=oe({},r):L(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&k(arguments[r],n);return t}const wt=(e,t,n,{allOwnKeys:r}={})=>(k(t,(s,i)=>{n&&N(s)?e[i]=Ue(s,n):e[i]=s},{allOwnKeys:r}),e),St=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bt=(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)},gt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&le(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ot=e=>{if(!e)return null;if(L(e))return e;let t=e.length;if(!Fe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},At=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&le(Uint8Array)),Tt=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Nt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Pt=A("HTMLFormElement"),Ct=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),be=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xt=A("RegExp"),Ie=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,(s,i)=>{t(s,i,e)!==!1&&(r[i]=s)}),Object.defineProperties(e,r)},Lt=e=>{Ie(e,(t,n)=>{if(N(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(N(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ut=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return L(e)?r(e):r(String(e).split(t)),n},_t=()=>{},Bt=(e,t)=>(e=+e,Number.isFinite(e)?e:t),te="abcdefghijklmnopqrstuvwxyz",ge="0123456789",je={DIGIT:ge,ALPHA:te,ALPHA_DIGIT:te+te.toUpperCase()+ge},Ft=(e=16,t=je.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Dt(e){return!!(e&&N(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const kt=e=>{const t=new Array(10),n=(r,s)=>{if(de(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=L(r)?[]:{};return k(r,(o,c)=>{const l=n(o,s+1);!D(l)&&(i[c]=l)}),t[s]=void 0,i}}return r};return n(e,0)},a={isArray:L,isArrayBuffer:Be,isBuffer:it,isFormData:mt,isArrayBufferView:at,isString:ct,isNumber:Fe,isBoolean:ut,isObject:de,isPlainObject:H,isUndefined:D,isDate:lt,isFile:ft,isBlob:dt,isRegExp:xt,isFunction:N,isStream:ht,isURLSearchParams:Et,isTypedArray:At,isFileList:pt,forEach:k,merge:oe,extend:wt,trim:yt,stripBOM:St,inherits:bt,toFlatObject:gt,kindOf:fe,kindOfTest:A,endsWith:Rt,toArray:Ot,forEachEntry:Tt,matchAll:Nt,isHTMLForm:Pt,hasOwnProperty:be,hasOwnProp:be,reduceDescriptors:Ie,freezeMethods:Lt,toObjectSet:Ut,toCamelCase:Ct,noop:_t,toFiniteNumber:Bt,findKey:De,global:ke,isContextDefined:Me,ALPHABET:je,generateString:Ft,isSpecCompliantForm:Dt,toJSONObject:kt};function m(e,t,n,r,s){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),s&&(this.response=s)}a.inherits(m,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:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const He=m.prototype,qe={};["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=>{qe[e]={value:e}});Object.defineProperties(m,qe);Object.defineProperty(He,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,i)=>{const o=Object.create(He);return a.toFlatObject(e,o,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),m.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Mt=null;function ie(e){return a.isPlainObject(e)||a.isArray(e)}function Je(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Re(e,t,n){return e?e.concat(t).map(function(s,i){return s=Je(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function It(e){return a.isArray(e)&&!e.some(ie)}const jt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function $(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,R){return!a.isUndefined(R[h])});const r=n.metaTokens,s=n.visitor||f,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!l&&a.isBlob(d))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,h,R){let b=d;if(d&&!R&&typeof d=="object"){if(a.endsWith(h,"{}"))h=r?h:h.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&It(d)||(a.isFileList(d)||a.endsWith(h,"[]"))&&(b=a.toArray(d)))return h=Je(h),b.forEach(function(I,nt){!(a.isUndefined(I)||I===null)&&t.append(o===!0?Re([h],nt,i):o===null?h:h+"[]",u(I))}),!1}return ie(d)?!0:(t.append(Re(R,h,i),u(d)),!1)}const p=[],w=Object.assign(jt,{defaultVisitor:f,convertValue:u,isVisitable:ie});function E(d,h){if(!a.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(d),a.forEach(d,function(b,P){(!(a.isUndefined(b)||b===null)&&s.call(t,b,a.isString(P)?P.trim():P,h,w))===!0&&E(b,h?h.concat(P):[P])}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Oe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function pe(e,t){this._pairs=[],e&&$(e,this,t)}const ze=pe.prototype;ze.append=function(t,n){this._pairs.push([t,n])};ze.toString=function(t){const n=t?function(r){return t.call(this,r,Oe)}:Oe;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ht(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ve(e,t,n){if(!t)return e;const r=n&&n.encode||Ht,s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new pe(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ae{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qt=typeof URLSearchParams!="undefined"?URLSearchParams:pe,Jt=typeof FormData!="undefined"?FormData:null,zt=(()=>{let e;return typeof navigator!="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"})(),Vt=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",g={isBrowser:!0,classes:{URLSearchParams:qt,FormData:Jt,Blob},isStandardBrowserEnv:zt,isStandardBrowserWebWorkerEnv:Vt,protocols:["http","https","file","blob","url","data"]};function Gt(e,t){return $(e,new g.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return g.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function $t(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function vt(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function $e(e){function t(n,r,s,i){let o=n[i++];const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,l?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=vt(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t($t(r),s,n,0)}),n}return null}const Kt={"Content-Type":void 0};function Wt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const v={transitional:Ge,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s&&s?JSON.stringify($e(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return $(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Wt(t)):t}],transformResponse:[function(t){const n=this.transitional||v.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:g.classes.FormData,Blob:g.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){v.headers[t]={}});a.forEach(["post","put","patch"],function(t){v.headers[t]=a.merge(Kt)});const he=v,Xt=a.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"]),Qt=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&Xt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Te=Symbol("internals");function B(e){return e&&String(e).trim().toLowerCase()}function q(e){return e===!1||e==null?e:a.isArray(e)?e.map(q):String(e)}function Yt(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function Zt(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function ne(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function en(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function tn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class K{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,l,u){const f=B(l);if(!f)throw new Error("header name must be a non-empty string");const p=a.findKey(s,f);(!p||s[p]===void 0||u===!0||u===void 0&&s[p]!==!1)&&(s[p||l]=q(c))}const o=(c,l)=>a.forEach(c,(u,f)=>i(u,f,l));return a.isPlainObject(t)||t instanceof this.constructor?o(t,n):a.isString(t)&&(t=t.trim())&&!Zt(t)?o(Qt(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=B(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Yt(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=B(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ne(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=B(o),o){const c=a.findKey(r,o);c&&(!n||ne(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ne(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=q(s),delete n[i];return}const c=t?en(i):String(i).trim();c!==i&&delete n[i],n[c]=q(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Te]=this[Te]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=B(o);r[c]||(tn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}}K.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.freezeMethods(K.prototype);a.freezeMethods(K);const O=K;function re(e,t){const n=this||he,r=t||n,s=O.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function ve(e){return!!(e&&e.__CANCEL__)}function M(e,t,n){m.call(this,e==null?"canceled":e,m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(M,m,{__CANCEL__:!0});function nn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const rn=g.isStandardBrowserEnv?function(){return{write:function(n,r,s,i,o,c){const l=[];l.push(n+"="+encodeURIComponent(r)),a.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),a.isString(i)&&l.push("path="+i),a.isString(o)&&l.push("domain="+o),c===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function sn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function on(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ke(e,t){return e&&!sn(t)?on(e,t):t}const an=g.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const c=a.isString(o)?s(o):o;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function cn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function un(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=r[i];o||(o=u),n[s]=l,r[s]=u;let p=i,w=0;for(;p!==s;)w+=n[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const E=f&&u-f;return E?Math.round(w*1e3/E):void 0}}function Ne(e,t){let n=0;const r=un(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,c=i-n,l=r(c),u=i<=o;n=i;const f={loaded:i,total:o,progress:o?i/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:s};f[t?"download":"upload"]=!0,e(f)}}const ln=typeof XMLHttpRequest!="undefined",fn=ln&&function(e){return new Promise(function(n,r){let s=e.data;const i=O.from(e.headers).normalize(),o=e.responseType;let c;function l(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}a.isFormData(s)&&(g.isStandardBrowserEnv||g.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const E=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(E+":"+d))}const f=Ke(e.baseURL,e.url);u.open(e.method.toUpperCase(),Ve(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function p(){if(!u)return;const E=O.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:E,config:e,request:u};nn(function(b){n(b),l()},function(b){r(b),l()},h),u=null}if("onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},u.onabort=function(){u&&(r(new m("Request aborted",m.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let d=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||Ge;e.timeoutErrorMessage&&(d=e.timeoutErrorMessage),r(new m(d,h.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,u)),u=null},g.isStandardBrowserEnv){const E=(e.withCredentials||an(f))&&e.xsrfCookieName&&rn.read(e.xsrfCookieName);E&&i.set(e.xsrfHeaderName,E)}s===void 0&&i.setContentType(null),"setRequestHeader"in u&&a.forEach(i.toJSON(),function(d,h){u.setRequestHeader(h,d)}),a.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&o!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Ne(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Ne(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=E=>{u&&(r(!E||E.type?new M(null,e,u):E),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const w=cn(f);if(w&&g.protocols.indexOf(w)===-1){r(new m("Unsupported protocol "+w+":",m.ERR_BAD_REQUEST,e));return}u.send(s||null)})},J={http:Mt,xhr:fn};a.forEach(J,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const dn={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let s=0;s<t&&(n=e[s],!(r=a.isString(n)?J[n.toLowerCase()]:n));s++);if(!r)throw r===!1?new m(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(a.hasOwnProp(J,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!a.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:J};function se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new M(null,e)}function Pe(e){return se(e),e.headers=O.from(e.headers),e.data=re.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dn.getAdapter(e.adapter||he.adapter)(e).then(function(r){return se(e),r.data=re.call(e,e.transformResponse,r),r.headers=O.from(r.headers),r},function(r){return ve(r)||(se(e),r&&r.response&&(r.response.data=re.call(e,e.transformResponse,r.response),r.response.headers=O.from(r.response.headers))),Promise.reject(r)})}const Ce=e=>e instanceof O?e.toJSON():e;function x(e,t){t=t||{};const n={};function r(u,f,p){return a.isPlainObject(u)&&a.isPlainObject(f)?a.merge.call({caseless:p},u,f):a.isPlainObject(f)?a.merge({},f):a.isArray(f)?f.slice():f}function s(u,f,p){if(a.isUndefined(f)){if(!a.isUndefined(u))return r(void 0,u,p)}else return r(u,f,p)}function i(u,f){if(!a.isUndefined(f))return r(void 0,f)}function o(u,f){if(a.isUndefined(f)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function c(u,f,p){if(p in t)return r(u,f);if(p in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,f)=>s(Ce(u),Ce(f),!0)};return a.forEach(Object.keys(e).concat(Object.keys(t)),function(f){const p=l[f]||s,w=p(e[f],t[f],f);a.isUndefined(w)&&p!==c||(n[f]=w)}),n}const We="1.3.3",me={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{me[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xe={};me.transitional=function(t,n,r){function s(i,o){return"[Axios v"+We+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new m(s(o," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!xe[o]&&(xe[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};function pn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],l=c===void 0||o(c,i,e);if(l!==!0)throw new m("option "+i+" must be "+l,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+i,m.ERR_BAD_OPTION)}}const ae={assertOptions:pn,validators:me},T=ae.validators;class V{constructor(t){this.defaults=t,this.interceptors={request:new Ae,response:new Ae}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=x(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ae.assertOptions(r,{silentJSONParsing:T.transitional(T.boolean),forcedJSONParsing:T.transitional(T.boolean),clarifyTimeoutError:T.transitional(T.boolean)},!1),s!==void 0&&ae.assertOptions(s,{encode:T.function,serialize:T.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&a.merge(i.common,i[n.method]),o&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=O.concat(o,i);const c=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let f,p=0,w;if(!l){const d=[Pe.bind(this),void 0];for(d.unshift.apply(d,c),d.push.apply(d,u),w=d.length,f=Promise.resolve(n);p<w;)f=f.then(d[p++],d[p++]);return f}w=c.length;let E=n;for(p=0;p<w;){const d=c[p++],h=c[p++];try{E=d(E)}catch(R){h.call(this,R);break}}try{f=Pe.call(this,E)}catch(d){return Promise.reject(d)}for(p=0,w=u.length;p<w;)f=f.then(u[p++],u[p++]);return f}getUri(t){t=x(this.defaults,t);const n=Ke(t.baseURL,t.url);return Ve(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(n,r){return this.request(x(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(x(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}V.prototype[t]=n(),V.prototype[t+"Form"]=n(!0)});const z=V;class Ee{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 r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new M(i,o,c),n(r.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)}static source(){let t;return{token:new Ee(function(s){t=s}),cancel:t}}}const hn=Ee;function mn(e){return function(n){return e.apply(null,n)}}function En(e){return a.isObject(e)&&e.isAxiosError===!0}const ce={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(ce).forEach(([e,t])=>{ce[t]=e});const yn=ce;function Xe(e){const t=new z(e),n=Ue(z.prototype.request,t);return a.extend(n,z.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Xe(x(e,s))},n}const y=Xe(he);y.Axios=z;y.CanceledError=M;y.CancelToken=hn;y.isCancel=ve;y.VERSION=We;y.toFormData=$;y.AxiosError=m;y.Cancel=y.CanceledError;y.all=function(t){return Promise.all(t)};y.spread=mn;y.isAxiosError=En;y.mergeConfig=x;y.AxiosHeaders=O;y.formToJSON=e=>$e(a.isHTMLForm(e)?new FormData(e):e);y.HttpStatusCode=yn;y.default=y;const wn={LOGIN_URL:`${window.location.origin}/ttc/cloud/#/login`,HOME_URL:`${window.location.origin}/ttc/cloud/#/cloud`,INTEGRATED_BASE_URL:"/gateway/integrated-management/api/v1"},ye={ttc:wn},Sn=(e="ttc")=>Y.get(`${ye[e].INTEGRATED_BASE_URL}/account/auth/route/list`),bn=(e="ttc")=>Y.get(`${ye[e].INTEGRATED_BASE_URL}/account/home/menu`),we=(e="ttc")=>{Q({token:""})},W=(e="ttc")=>{var s;const t=`${e}GlobalState`,n=(s=localStorage.getItem(t))!=null?s:"{}";return JSON.parse(n)?JSON.parse(n).token:null},Qe=(r,...s)=>j(exports,[r,...s],function*({userName:e,password:t},n="ttc"){const i=U("loginApiUrl"),{data:o}=yield Y.post(i,{userName:e,password:t});o.tokenValue&&S.ElMessage.success("登录成功"),Q({token:o.tokenValue,userInfo:o})}),gn=(e="ttc")=>{var s;const t=`${e}GlobalState`,n=(s=localStorage.getItem(t))!=null?s:"{}";return JSON.parse(n)?JSON.parse(n).userInfo:null},Rn=()=>j(exports,null,function*(){return W()?yield bn():[]}),X=()=>{if(Ze()){we();const e=location.pathname;if(console.log("跳转至登录页",e,e.includes(C())),e.includes(C()))return;console.log("跳转至登录页",C()),location.replace(C())}else{console.log("开发环境!!!");const e=window.prompt("当前系统处于开发环境,当前登录过期,请输入登录账号","");if(e!==null){const t=window.prompt("请输入登录密码","");(t===null||t=="")&&window.prompt("请输入登录密码",""),Qe({userName:e,password:t})}}},On=()=>{window.location.replace(Ye())},C=()=>U("loginUrl"),Ye=()=>U("homeUrl"),Q=e=>{var r;const t=(r=localStorage.getItem("ttcGlobalState"))!=null?r:"{}",n=_(_({},JSON.parse(t)),e);localStorage.setItem("ttcGlobalState",JSON.stringify(n))},U=e=>{var n,r;return(r=JSON.parse((n=localStorage.getItem("ttcGlobalState"))!=null?n:"{}")[e])!=null?r:""},Ze=()=>U("environment")==="production",An=(e,t=!0,n)=>j(exports,null,function*(){if(!W()&&t)return X();try{const{data:r}=yield Sn(n),s=r.filter(c=>c.routeTag.includes(e)),i=s.filter(c=>c.routeType==="VIEW"),o=s.filter(c=>c.routeType==="BTN");return sessionStorage.setItem("ttcUserBtnList",JSON.stringify(o.map(c=>c.routeTag))),{userMenuList:i,userBtnList:o}}catch(r){}}),Tn=(e,t,n)=>{let r=[];return e.forEach(s=>{const i=`/src/views${s.routeView}/config.ts`,o=`/src/views${s.routeView}/index.vue`;if(t[o]&&n[i]){const c=n[i],l={path:s.routeView,name:s.routeView.split("/")[1],meta:{title:c.title,icon:c.icon},component:t[o]};r.push(l)}}),r},et=e=>{var n;if(!e)return!1;const t=(n=sessionStorage.getItem("ttcUserBtnList"))!=null?n:"[]";return JSON.parse(t).includes(e)},Nn=Object.freeze(Object.defineProperty({__proto__:null,autoLogin:Qe,getHomeUrl:Ye,getLoginUrl:C,getSystemConfig:U,getToken:W,getUserInfo:gn,getUserIsHaveBtnPower:et,getUserPermissions:An,getUserRouteList:Rn,getUserRouter:Tn,isProduction:Ze,jumpToHome:On,jumpToLogin:X,removeToken:we,setSystemConfig:Q},Symbol.toStringTag,{value:"Module"}));let tt;const Pn={lock:!0,text:"加载中...",fullscreen:!0,background:"rgba(0, 0, 0, 0.6)"},Cn=()=>{tt=S.ElLoading.service(Pn)},xn=()=>{tt.close()};let F=0;const Ln=()=>{F===0&&Cn(),F++},Le=()=>{F<=0||(F--,F===0&&xn())};var ue=(e=>(e[e.SUCCESS=200]="SUCCESS",e[e.ERROR=500]="ERROR",e[e.OVERDUE=401]="OVERDUE",e[e.TIMEOUT=3e4]="TIMEOUT",e))(ue||{});const Un={timeout:3e4,withCredentials:!0},_n=(e,t)=>{switch(e){case 400:S.ElMessage.error(t||"请求失败!请您稍后重试");break;case 401:location.href.includes(C())||(S.ElMessage.error(t||"登录失效!请您重新登录"),X());break;case 403:S.ElMessage.error(t||"当前账号无权限访问!");break;case 404:S.ElMessage.error("你所访问的资源不存在!");break;case 405:S.ElMessage.error(t||"请求方式错误!请您稍后重试");break;case 408:S.ElMessage.error(t||"请求超时!请您稍后重试");break;case 500:S.ElMessage.error(t||"服务异常!");break;case 502:S.ElMessage.error("网关错误!");break;case 503:S.ElMessage.error("服务不可用!");break;case 504:S.ElMessage.error("网关超时!");break;default:S.ElMessage.error("请求失败!")}};class Bn{constructor(t){ee(this,"service");ee(this,"customResMap");this.service=y.create(t),this.setupInterceptors(),this.customResMap={}}setupInterceptors(){this.service.interceptors.request.use(t=>{var n;return(n=t.headers)!=null&&n.noLoading||Ln(),t.headers.token=W(),t!=null&&t.customResHandler&&(t!=null&&t.url)&&(this.customResMap[t==null?void 0:t.url]=t.customResHandler),t},t=>Promise.reject(t)),this.service.interceptors.response.use(t=>{const{data:n,config:r}=t;return Le(),r.url&&this.customResMap[r.url]?this.customResMap[r.url](n):(n.code==ue.OVERDUE?this.handleOverdueResponse(n):n.code!==ue.SUCCESS&&this.handleErrorResponse(n),n)},t=>{Le();const{config:n}=t;return n!=null&&n.url&&this.customResMap[n.url]&&this.customResMap[n.url](t.response),t.message.includes("timeout")?S.ElMessage.error("请求超时!请稍后重试"):t.message.includes("Network Error")&&S.ElMessage.error("网络错误!请稍后重试"),t.response&&_n(t.response.status),window.navigator.onLine||S.ElNotification({title:"提示",message:"当前网络似乎开小差了",type:"warning",duration:5e3}),Promise.reject(t)})}handleOverdueResponse(t){return we(),X(),S.ElNotification({title:"登录过期提醒",message:t.resultMsg||"当前登录失效",type:"warning",duration:5e3}),Promise.reject(t)}handleErrorResponse(t){return S.ElMessage.error(t.resultMsg),Promise.reject(t)}get(t,n,r={}){return this.service.get(t,_({params:n},r))}post(t,n,r={}){return this.service.post(t,n,r)}put(t,n,r={}){return this.service.put(t,n,r)}delete(t,n,r={}){return this.service.delete(t,_({params:n},r))}}const Y=new Bn(Un);exports.URL=ye;exports.getSystemConfig=U;exports.getUserIsHaveBtnPower=et;exports.http=Y;exports.index=Nn;exports.setSystemConfig=Q;
|
|
1
|
+
"use strict";const i=require("./index.cjs11.js"),s={mounted(t,e){n(t,e)}},n=(t,e)=>{const c=e.value;return i.getUserIsHaveBtnPower(c)?"":t.remove()},r={auth:s},o={install:function(t){Object.keys(r).forEach(e=>{t.directive(e,r[e])})}},u=Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"}));exports.directives=u;exports.directives$1=o;
|
package/lib/index.cjs8.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./index.
|
|
1
|
+
"use strict";const e=require("./index.cjs10.js"),o=Object.freeze(Object.defineProperty({__proto__:null,useTime:e.useTime},Symbol.toStringTag,{value:"Module"}));exports.yxHooks=o;
|
package/lib/index.cjs9.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=(e="isWebApp")=>{const s=new URLSearchParams(window.location.href.split("?")[1]),t=Object.fromEntries(s.entries());return!!(t[e]&&+t[e])},o=Object.freeze(Object.defineProperty({__proto__:null,isWebApp:r},Symbol.toStringTag,{value:"Module"}));exports.app=o;exports.isWebApp=r;
|
package/lib/index.es.js
CHANGED
|
@@ -1,22 +1,49 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { y as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./index.
|
|
6
|
-
import {
|
|
7
|
-
import "./index.es7.js";
|
|
1
|
+
import { u as r } from "./index.es2.js";
|
|
2
|
+
import { y as a } from "./index.es3.js";
|
|
3
|
+
import { a as s } from "./index.es4.js";
|
|
4
|
+
import { g as e, t as i, B as m, a as p } from "./index.es5.js";
|
|
5
|
+
import { b as $ } from "./index.es5.js";
|
|
6
|
+
import { c as n } from "./index.es6.js";
|
|
7
|
+
import { d as l } from "./index.es7.js";
|
|
8
|
+
import { y as f } from "./index.es8.js";
|
|
9
|
+
import { a as x } from "./index.es9.js";
|
|
10
|
+
import { i as z } from "./index.es9.js";
|
|
11
|
+
import { u as H } from "./index.es10.js";
|
|
12
|
+
import "./index.es11.js";
|
|
8
13
|
import "element-plus";
|
|
9
|
-
import "./index.
|
|
14
|
+
import "./index.es12.js";
|
|
15
|
+
import "./index.es13.js";
|
|
10
16
|
import "vue";
|
|
17
|
+
const c = {
|
|
18
|
+
install: (o) => {
|
|
19
|
+
o.config.globalProperties.$yx18n = (t) => e(t);
|
|
20
|
+
}
|
|
21
|
+
}, u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
22
|
+
__proto__: null,
|
|
23
|
+
default: c
|
|
24
|
+
}, Symbol.toStringTag, { value: "Module" })), P = {
|
|
25
|
+
utils: r,
|
|
26
|
+
api: s,
|
|
27
|
+
app: x,
|
|
28
|
+
theme: i,
|
|
29
|
+
components: n,
|
|
30
|
+
directives: l,
|
|
31
|
+
BC: m,
|
|
32
|
+
translate: p,
|
|
33
|
+
yxi18n: u,
|
|
34
|
+
yxHooks: f,
|
|
35
|
+
yxIcon: a
|
|
36
|
+
};
|
|
11
37
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
38
|
+
$ as BC,
|
|
39
|
+
s as api,
|
|
40
|
+
n as components,
|
|
41
|
+
P as default,
|
|
42
|
+
z as isWebApp,
|
|
43
|
+
i as theme,
|
|
44
|
+
p as translate,
|
|
45
|
+
H as useTime,
|
|
46
|
+
r as utils,
|
|
47
|
+
a as yxIcon,
|
|
48
|
+
u as yxi18n
|
|
22
49
|
};
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { ref as R } from "vue";
|
|
2
|
+
var X = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
3
|
+
function tt(M) {
|
|
4
|
+
return M && M.__esModule && Object.prototype.hasOwnProperty.call(M, "default") ? M.default : M;
|
|
5
|
+
}
|
|
6
|
+
var q = { exports: {} };
|
|
7
|
+
(function(M, rt) {
|
|
8
|
+
(function(A, Y) {
|
|
9
|
+
M.exports = Y();
|
|
10
|
+
})(X, function() {
|
|
11
|
+
var A = 1e3, Y = 6e4, E = 36e5, I = "millisecond", S = "second", b = "minute", O = "hour", y = "day", j = "week", m = "month", J = "quarter", v = "year", _ = "date", Z = "Invalid Date", B = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, G = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Q = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
|
|
12
|
+
var n = ["th", "st", "nd", "rd"], t = s % 100;
|
|
13
|
+
return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
14
|
+
} }, F = function(s, n, t) {
|
|
15
|
+
var r = String(s);
|
|
16
|
+
return !r || r.length >= n ? s : "" + Array(n + 1 - r.length).join(t) + s;
|
|
17
|
+
}, K = { s: F, z: function(s) {
|
|
18
|
+
var n = -s.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
|
|
19
|
+
return (n <= 0 ? "+" : "-") + F(r, 2, "0") + ":" + F(e, 2, "0");
|
|
20
|
+
}, m: function s(n, t) {
|
|
21
|
+
if (n.date() < t.date())
|
|
22
|
+
return -s(t, n);
|
|
23
|
+
var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), i = t - e < 0, u = n.clone().add(r + (i ? -1 : 1), m);
|
|
24
|
+
return +(-(r + (t - e) / (i ? e - u : u - e)) || 0);
|
|
25
|
+
}, a: function(s) {
|
|
26
|
+
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
27
|
+
}, p: function(s) {
|
|
28
|
+
return { M: m, y: v, w: j, d: y, D: _, h: O, m: b, s: S, ms: I, Q: J }[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
29
|
+
}, u: function(s) {
|
|
30
|
+
return s === void 0;
|
|
31
|
+
} }, k = "en", p = {};
|
|
32
|
+
p[k] = Q;
|
|
33
|
+
var z = "$isDayjsObject", N = function(s) {
|
|
34
|
+
return s instanceof L || !(!s || !s[z]);
|
|
35
|
+
}, C = function s(n, t, r) {
|
|
36
|
+
var e;
|
|
37
|
+
if (!n)
|
|
38
|
+
return k;
|
|
39
|
+
if (typeof n == "string") {
|
|
40
|
+
var i = n.toLowerCase();
|
|
41
|
+
p[i] && (e = i), t && (p[i] = t, e = i);
|
|
42
|
+
var u = n.split("-");
|
|
43
|
+
if (!e && u.length > 1)
|
|
44
|
+
return s(u[0]);
|
|
45
|
+
} else {
|
|
46
|
+
var o = n.name;
|
|
47
|
+
p[o] = n, e = o;
|
|
48
|
+
}
|
|
49
|
+
return !r && e && (k = e), e || !r && k;
|
|
50
|
+
}, f = function(s, n) {
|
|
51
|
+
if (N(s))
|
|
52
|
+
return s.clone();
|
|
53
|
+
var t = typeof n == "object" ? n : {};
|
|
54
|
+
return t.date = s, t.args = arguments, new L(t);
|
|
55
|
+
}, a = K;
|
|
56
|
+
a.l = C, a.i = N, a.w = function(s, n) {
|
|
57
|
+
return f(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
|
58
|
+
};
|
|
59
|
+
var L = function() {
|
|
60
|
+
function s(t) {
|
|
61
|
+
this.$L = C(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[z] = !0;
|
|
62
|
+
}
|
|
63
|
+
var n = s.prototype;
|
|
64
|
+
return n.parse = function(t) {
|
|
65
|
+
this.$d = function(r) {
|
|
66
|
+
var e = r.date, i = r.utc;
|
|
67
|
+
if (e === null)
|
|
68
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
69
|
+
if (a.u(e))
|
|
70
|
+
return /* @__PURE__ */ new Date();
|
|
71
|
+
if (e instanceof Date)
|
|
72
|
+
return new Date(e);
|
|
73
|
+
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
74
|
+
var u = e.match(B);
|
|
75
|
+
if (u) {
|
|
76
|
+
var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
|
|
77
|
+
return i ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return new Date(e);
|
|
81
|
+
}(t), this.init();
|
|
82
|
+
}, n.init = function() {
|
|
83
|
+
var t = this.$d;
|
|
84
|
+
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
|
|
85
|
+
}, n.$utils = function() {
|
|
86
|
+
return a;
|
|
87
|
+
}, n.isValid = function() {
|
|
88
|
+
return this.$d.toString() !== Z;
|
|
89
|
+
}, n.isSame = function(t, r) {
|
|
90
|
+
var e = f(t);
|
|
91
|
+
return this.startOf(r) <= e && e <= this.endOf(r);
|
|
92
|
+
}, n.isAfter = function(t, r) {
|
|
93
|
+
return f(t) < this.startOf(r);
|
|
94
|
+
}, n.isBefore = function(t, r) {
|
|
95
|
+
return this.endOf(r) < f(t);
|
|
96
|
+
}, n.$g = function(t, r, e) {
|
|
97
|
+
return a.u(t) ? this[r] : this.set(e, t);
|
|
98
|
+
}, n.unix = function() {
|
|
99
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
100
|
+
}, n.valueOf = function() {
|
|
101
|
+
return this.$d.getTime();
|
|
102
|
+
}, n.startOf = function(t, r) {
|
|
103
|
+
var e = this, i = !!a.u(r) || r, u = a.p(t), o = function(w, l) {
|
|
104
|
+
var g = a.w(e.$u ? Date.UTC(e.$y, l, w) : new Date(e.$y, l, w), e);
|
|
105
|
+
return i ? g : g.endOf(y);
|
|
106
|
+
}, c = function(w, l) {
|
|
107
|
+
return a.w(e.toDate()[w].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(l)), e);
|
|
108
|
+
}, h = this.$W, d = this.$M, $ = this.$D, T = "set" + (this.$u ? "UTC" : "");
|
|
109
|
+
switch (u) {
|
|
110
|
+
case v:
|
|
111
|
+
return i ? o(1, 0) : o(31, 11);
|
|
112
|
+
case m:
|
|
113
|
+
return i ? o(1, d) : o(0, d + 1);
|
|
114
|
+
case j:
|
|
115
|
+
var D = this.$locale().weekStart || 0, H = (h < D ? h + 7 : h) - D;
|
|
116
|
+
return o(i ? $ - H : $ + (6 - H), d);
|
|
117
|
+
case y:
|
|
118
|
+
case _:
|
|
119
|
+
return c(T + "Hours", 0);
|
|
120
|
+
case O:
|
|
121
|
+
return c(T + "Minutes", 1);
|
|
122
|
+
case b:
|
|
123
|
+
return c(T + "Seconds", 2);
|
|
124
|
+
case S:
|
|
125
|
+
return c(T + "Milliseconds", 3);
|
|
126
|
+
default:
|
|
127
|
+
return this.clone();
|
|
128
|
+
}
|
|
129
|
+
}, n.endOf = function(t) {
|
|
130
|
+
return this.startOf(t, !1);
|
|
131
|
+
}, n.$set = function(t, r) {
|
|
132
|
+
var e, i = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[y] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[v] = u + "FullYear", e[O] = u + "Hours", e[b] = u + "Minutes", e[S] = u + "Seconds", e[I] = u + "Milliseconds", e)[i], c = i === y ? this.$D + (r - this.$W) : r;
|
|
133
|
+
if (i === m || i === v) {
|
|
134
|
+
var h = this.clone().set(_, 1);
|
|
135
|
+
h.$d[o](c), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
|
|
136
|
+
} else
|
|
137
|
+
o && this.$d[o](c);
|
|
138
|
+
return this.init(), this;
|
|
139
|
+
}, n.set = function(t, r) {
|
|
140
|
+
return this.clone().$set(t, r);
|
|
141
|
+
}, n.get = function(t) {
|
|
142
|
+
return this[a.p(t)]();
|
|
143
|
+
}, n.add = function(t, r) {
|
|
144
|
+
var e, i = this;
|
|
145
|
+
t = Number(t);
|
|
146
|
+
var u = a.p(r), o = function(d) {
|
|
147
|
+
var $ = f(i);
|
|
148
|
+
return a.w($.date($.date() + Math.round(d * t)), i);
|
|
149
|
+
};
|
|
150
|
+
if (u === m)
|
|
151
|
+
return this.set(m, this.$M + t);
|
|
152
|
+
if (u === v)
|
|
153
|
+
return this.set(v, this.$y + t);
|
|
154
|
+
if (u === y)
|
|
155
|
+
return o(1);
|
|
156
|
+
if (u === j)
|
|
157
|
+
return o(7);
|
|
158
|
+
var c = (e = {}, e[b] = Y, e[O] = E, e[S] = A, e)[u] || 1, h = this.$d.getTime() + t * c;
|
|
159
|
+
return a.w(h, this);
|
|
160
|
+
}, n.subtract = function(t, r) {
|
|
161
|
+
return this.add(-1 * t, r);
|
|
162
|
+
}, n.format = function(t) {
|
|
163
|
+
var r = this, e = this.$locale();
|
|
164
|
+
if (!this.isValid())
|
|
165
|
+
return e.invalidDate || Z;
|
|
166
|
+
var i = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, $ = e.months, T = e.meridiem, D = function(l, g, x, W) {
|
|
167
|
+
return l && (l[g] || l(r, i)) || x[g].slice(0, W);
|
|
168
|
+
}, H = function(l) {
|
|
169
|
+
return a.s(o % 12 || 12, l, "0");
|
|
170
|
+
}, w = T || function(l, g, x) {
|
|
171
|
+
var W = l < 12 ? "AM" : "PM";
|
|
172
|
+
return x ? W.toLowerCase() : W;
|
|
173
|
+
};
|
|
174
|
+
return i.replace(G, function(l, g) {
|
|
175
|
+
return g || function(x) {
|
|
176
|
+
switch (x) {
|
|
177
|
+
case "YY":
|
|
178
|
+
return String(r.$y).slice(-2);
|
|
179
|
+
case "YYYY":
|
|
180
|
+
return a.s(r.$y, 4, "0");
|
|
181
|
+
case "M":
|
|
182
|
+
return h + 1;
|
|
183
|
+
case "MM":
|
|
184
|
+
return a.s(h + 1, 2, "0");
|
|
185
|
+
case "MMM":
|
|
186
|
+
return D(e.monthsShort, h, $, 3);
|
|
187
|
+
case "MMMM":
|
|
188
|
+
return D($, h);
|
|
189
|
+
case "D":
|
|
190
|
+
return r.$D;
|
|
191
|
+
case "DD":
|
|
192
|
+
return a.s(r.$D, 2, "0");
|
|
193
|
+
case "d":
|
|
194
|
+
return String(r.$W);
|
|
195
|
+
case "dd":
|
|
196
|
+
return D(e.weekdaysMin, r.$W, d, 2);
|
|
197
|
+
case "ddd":
|
|
198
|
+
return D(e.weekdaysShort, r.$W, d, 3);
|
|
199
|
+
case "dddd":
|
|
200
|
+
return d[r.$W];
|
|
201
|
+
case "H":
|
|
202
|
+
return String(o);
|
|
203
|
+
case "HH":
|
|
204
|
+
return a.s(o, 2, "0");
|
|
205
|
+
case "h":
|
|
206
|
+
return H(1);
|
|
207
|
+
case "hh":
|
|
208
|
+
return H(2);
|
|
209
|
+
case "a":
|
|
210
|
+
return w(o, c, !0);
|
|
211
|
+
case "A":
|
|
212
|
+
return w(o, c, !1);
|
|
213
|
+
case "m":
|
|
214
|
+
return String(c);
|
|
215
|
+
case "mm":
|
|
216
|
+
return a.s(c, 2, "0");
|
|
217
|
+
case "s":
|
|
218
|
+
return String(r.$s);
|
|
219
|
+
case "ss":
|
|
220
|
+
return a.s(r.$s, 2, "0");
|
|
221
|
+
case "SSS":
|
|
222
|
+
return a.s(r.$ms, 3, "0");
|
|
223
|
+
case "Z":
|
|
224
|
+
return u;
|
|
225
|
+
}
|
|
226
|
+
return null;
|
|
227
|
+
}(l) || u.replace(":", "");
|
|
228
|
+
});
|
|
229
|
+
}, n.utcOffset = function() {
|
|
230
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
231
|
+
}, n.diff = function(t, r, e) {
|
|
232
|
+
var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * Y, d = this - c, $ = function() {
|
|
233
|
+
return a.m(u, c);
|
|
234
|
+
};
|
|
235
|
+
switch (o) {
|
|
236
|
+
case v:
|
|
237
|
+
i = $() / 12;
|
|
238
|
+
break;
|
|
239
|
+
case m:
|
|
240
|
+
i = $();
|
|
241
|
+
break;
|
|
242
|
+
case J:
|
|
243
|
+
i = $() / 3;
|
|
244
|
+
break;
|
|
245
|
+
case j:
|
|
246
|
+
i = (d - h) / 6048e5;
|
|
247
|
+
break;
|
|
248
|
+
case y:
|
|
249
|
+
i = (d - h) / 864e5;
|
|
250
|
+
break;
|
|
251
|
+
case O:
|
|
252
|
+
i = d / E;
|
|
253
|
+
break;
|
|
254
|
+
case b:
|
|
255
|
+
i = d / Y;
|
|
256
|
+
break;
|
|
257
|
+
case S:
|
|
258
|
+
i = d / A;
|
|
259
|
+
break;
|
|
260
|
+
default:
|
|
261
|
+
i = d;
|
|
262
|
+
}
|
|
263
|
+
return e ? i : a.a(i);
|
|
264
|
+
}, n.daysInMonth = function() {
|
|
265
|
+
return this.endOf(m).$D;
|
|
266
|
+
}, n.$locale = function() {
|
|
267
|
+
return p[this.$L];
|
|
268
|
+
}, n.locale = function(t, r) {
|
|
269
|
+
if (!t)
|
|
270
|
+
return this.$L;
|
|
271
|
+
var e = this.clone(), i = C(t, r, !0);
|
|
272
|
+
return i && (e.$L = i), e;
|
|
273
|
+
}, n.clone = function() {
|
|
274
|
+
return a.w(this.$d, this);
|
|
275
|
+
}, n.toDate = function() {
|
|
276
|
+
return new Date(this.valueOf());
|
|
277
|
+
}, n.toJSON = function() {
|
|
278
|
+
return this.isValid() ? this.toISOString() : null;
|
|
279
|
+
}, n.toISOString = function() {
|
|
280
|
+
return this.$d.toISOString();
|
|
281
|
+
}, n.toString = function() {
|
|
282
|
+
return this.$d.toUTCString();
|
|
283
|
+
}, s;
|
|
284
|
+
}(), V = L.prototype;
|
|
285
|
+
return f.prototype = V, [["$ms", I], ["$s", S], ["$m", b], ["$H", O], ["$W", y], ["$M", m], ["$y", v], ["$D", _]].forEach(function(s) {
|
|
286
|
+
V[s[1]] = function(n) {
|
|
287
|
+
return this.$g(n, s[0], s[1]);
|
|
288
|
+
};
|
|
289
|
+
}), f.extend = function(s, n) {
|
|
290
|
+
return s.$i || (s(n, L, f), s.$i = !0), f;
|
|
291
|
+
}, f.locale = C, f.isDayjs = N, f.unix = function(s) {
|
|
292
|
+
return f(1e3 * s);
|
|
293
|
+
}, f.en = p[k], f.Ls = p, f.p = {}, f;
|
|
294
|
+
});
|
|
295
|
+
})(q);
|
|
296
|
+
var et = q.exports;
|
|
297
|
+
const nt = /* @__PURE__ */ tt(et), P = R("");
|
|
298
|
+
let U;
|
|
299
|
+
const it = () => {
|
|
300
|
+
const M = () => {
|
|
301
|
+
U = setTimeout(() => {
|
|
302
|
+
P.value = nt().format("YYYY-MM-DD HH:mm:ss"), U && clearTimeout(U), M();
|
|
303
|
+
}, 1e3);
|
|
304
|
+
};
|
|
305
|
+
return M(), { time: P };
|
|
306
|
+
};
|
|
307
|
+
export {
|
|
308
|
+
X as c,
|
|
309
|
+
tt as g,
|
|
310
|
+
it as u
|
|
311
|
+
};
|
|
Binary file
|