@lntvow/utils 4.0.12 → 4.0.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var rt=Object.create;var A=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var st=Object.getPrototypeOf,at=Object.prototype.hasOwnProperty;var mt=(t,e)=>{for(var n in e)A(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of it(e))!at.call(t,o)&&o!==n&&A(t,o,{get:()=>e[o],enumerable:!(r=ot(e,o))||r.enumerable});return t};var S=(t,e,n)=>(n=t!=null?rt(st(t)):{},Z(e||!t||!t.__esModule?A(n,"default",{value:t,enumerable:!0}):n,t)),ct=t=>Z(A({},"__esModule",{value:!0}),t);var $e={};mt($e,{base64Decode:()=>yt,base64Encode:()=>bt,castArray:()=>y,compose:()=>ht,composeRight:()=>Ot,debounce:()=>wt,debugWarn:()=>K,debugWarnInvalidTypeMessage:()=>Tt,decimalToBinary:()=>xt,deepClone:()=>O,deepMerge:()=>_,deprecated:()=>Mt,error:()=>jt,generateRandomArray:()=>Ut,generateRandomColor:()=>_t,generateRandomDate:()=>k,generateRandomEmail:()=>J,generateRandomFloat:()=>qt,generateRandomIdCard:()=>Bt,generateRandomMobilePhone:()=>Vt,generateRandomStringFromSource:()=>E,getRandomInt:()=>a,getRandomItem:()=>p,getRandomString:()=>g,getRandomUrl:()=>Xt,hasChanged:()=>lt,isArray:()=>u,isBoolean:()=>ft,isChineseString:()=>se,isDate:()=>Y,isDateString:()=>et,isDef:()=>dt,isEmail:()=>he,isEmptyString:()=>Oe,isEnglishAphabet:()=>Jt,isFloat:()=>ae,isFunction:()=>$,isIdCard:()=>we,isInteger:()=>ue,isLowerCase:()=>re,isLowerCaseAndNumber:()=>oe,isLowerCaseAndNumberAndChinese:()=>ie,isMap:()=>C,isMobilePhone:()=>be,isNegativeFloat:()=>pe,isNegativeInteger:()=>le,isNonNegativeFloat:()=>ce,isNonNegativeInteger:()=>de,isNonPositiveFloat:()=>fe,isNonPositiveInteger:()=>xe,isNull:()=>ut,isNumber:()=>f,isNumberOrNumberString:()=>Qt,isObject:()=>pt,isObjectLike:()=>w,isPlainObject:()=>x,isPositiveFloat:()=>me,isPositiveInteger:()=>ge,isPromise:()=>U,isRegExp:()=>v,isSet:()=>F,isString:()=>I,isSymbol:()=>N,isUndef:()=>h,isUndefined:()=>gt,isUpperCase:()=>te,isUpperCaseAndNumber:()=>ee,isUpperCaseAndNumberAndChinese:()=>ne,isUrl:()=>ye,log:()=>T,objectToString:()=>G,omit:()=>vt,pick:()=>L,qs:()=>Dt,throttle:()=>Pt,throwError:()=>s,throwErrorInvalidTypeMessage:()=>Rt,toTypeString:()=>b,toTypeValue:()=>j,validatorChineseOrEnglish:()=>Nt,validatorChineseOrEnglishOrNumber:()=>It,validatorUppercaseOrNumbersOrSpecial:()=>Ct,validatorUppercaseOrNumbersOrUnderline:()=>Ft,warn:()=>St});module.exports=ct($e);function pt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var G=Object.prototype.toString,b=t=>G.call(t),j=t=>b(t).slice(8,-1),I=t=>typeof t=="string",f=t=>typeof t=="number"&&Number.isFinite(t),ft=t=>typeof t=="boolean",ut=t=>t===null,gt=t=>t===void 0,N=t=>typeof t=="symbol",u=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",Y=t=>b(t)==="[object Date]",v=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,dt=t=>t!=null,lt=(t,e)=>t!==e;function x(t){return b(t)==="[object Object]"}function y(t){return u(t)?t:[t]}function xt(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function bt(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=q[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function yt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=q.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function ht(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Ot(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function wt(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(Y(r))return new Date(r);if(v(r))return new RegExp(r);if(U(r))return r;if(e.has(r))return e.get(r);if(C(r)){let i=new Map;return e.set(r,i),r.forEach((c,d)=>i.set(n(d),n(c))),i}if(F(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=u(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function _(t,e,n={}){return V(B(t,n),B(e,n),n)}function V(t,e,n){return u(t)?At(t,e,n):$t(t,e,n)}function $t(t,e,n){if(!x(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(x(t[o])||u(t[o]))&&(x(e[o])||u(e[o]))?t[o]=V(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function At(t,e,n){let{mergeStrategy:r="replace"}=n;if(u(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function B(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var M=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new M(`[${t}] ${e}`)}function K(t,e){let n=I(t)?new M(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function St(...t){console.warn(...t)}function jt(...t){console.error(...t)}var Mt=({from:t,replacement:e,version:n,type:r="API"})=>{K(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Rt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${j(r)} with value ${r}.`;s(t,o)}function Tt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${j(r)} with value ${r}.`;K(t,o)}var R=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},T=(t,...e)=>{R("info",t,...e)};T.info=(t,...e)=>{R("info",t,...e)};T.error=(t,...e)=>{R("error",t,...e)};T.warn=(t,...e)=>{R("warn",t,...e)};function kt(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function X(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function Et(t,e,n){let r=_({encode:!0},{...n}),o=X(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var Dt={parse:kt,stringify:X,appendQueryString:Et};function Pt(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function It(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Nt(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Ct(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Ft(t){return/^[\dA-Z_]+$/.test(t)}function L(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return x(t)&&y(e).forEach(d=>{N(d)&&!o||!(r?d in t:Object.hasOwn(t,d))||!m&&(r?Yt(t,d):Object.getOwnPropertyDescriptor(t,d))?.enumerable===!1||(i[d]=O(t[d]))}),i}function Yt(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function vt(t,e){if(!x(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return L(n,o)}function Ut(t,e){return(!f(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function _t(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var l=S(require("dayjs"),1),Q=S(require("dayjs/plugin/customParseFormat"),1);function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){f(t)&&(t={max:t});let{min:e=1,max:n=p(Lt())}=t;Kt(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function Kt(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Lt(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,l.extend)(Q.default);function k(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,l.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,l.default)(e).isValid()||!(0,l.default)(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,l.default)(e).year(),m=(0,l.default)(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),d=a({min:1,max:31}),W=a(23),H=a(59),nt=a(59),P=(0,l.default)(`${i}-${c}-${d} ${W}:${H}:${nt}`);return P.isBefore((0,l.default)(e))||P.isAfter((0,l.default)(n))?k(t):P.format(r)}function g(t={}){let e=Wt(t),n=Ht(e);Zt(n);let{length:r}=e;Gt(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var zt=16,z=1;function Wt(t){let e=f(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:f(t.length)?{max:t.length,min:t.length}:{max:zt,min:z,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function Ht(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function Zt(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Gt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<z&&s("getRandomString",`Minimum length cannot be less than ${z}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function J(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${g(1)}${g({length:a({max:30,min:1})})}${g(1)}@${p(t)}`;return/\.{2,}/.test(e)?J():e}function qt(t={}){f(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function E(t,e){(!f(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!u(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function Bt(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,k({format:"YYYYMMDD"}),E(3,e),E(1,[...e,"X","x"])].join("")}function Vt(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Xt(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${g({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${g({length:{min:2,max:4}})}`,`?query=${g({length:{min:5,max:6}})}`,`?search=${g({length:{min:1,max:4}})}`,`?token=${g({length:{min:16,max:16}})}`];return`${p(t)}${g({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Qt(t){return/^\d+$/.test(t)}function Jt(t){return/^[A-Z]+$/i.test(t)}function te(t){return/^[A-Z]+$/.test(t)}function ee(t){return/^[\dA-Z]+$/.test(t)}function ne(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function re(t){return/^[a-z]+$/.test(t)}function oe(t){return/^[\da-z]+$/.test(t)}function ie(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function se(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function ae(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function me(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ce(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function pe(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function fe(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function ue(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ge(t){return/^[1-9]\d*$/.test(t)}function de(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function le(t){return/^-[1-9]\d*$/.test(t)}function xe(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var D=S(require("dayjs"),1),tt=S(require("dayjs/plugin/customParseFormat"),1);function be(t){return/^1[3-9]\d{9}$/.test(t)}function ye(t){return/^https?:\/\/\S+$/i.test(t)}function he(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function Oe(t){return t===""}function et(t,e="YYYY-MM-DD HH:mm:ss"){return(0,D.extend)(tt.default),(0,D.default)(t,e,!0).isValid()}function we(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&et(t.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,error,generateRandomArray,generateRandomColor,generateRandomDate,generateRandomEmail,generateRandomFloat,generateRandomIdCard,generateRandomMobilePhone,generateRandomStringFromSource,getRandomInt,getRandomItem,getRandomString,getRandomUrl,hasChanged,isArray,isBoolean,isChineseString,isDate,isDateString,isDef,isEmail,isEmptyString,isEnglishAphabet,isFloat,isFunction,isIdCard,isInteger,isLowerCase,isLowerCaseAndNumber,isLowerCaseAndNumberAndChinese,isMap,isMobilePhone,isNegativeFloat,isNegativeInteger,isNonNegativeFloat,isNonNegativeInteger,isNonPositiveFloat,isNonPositiveInteger,isNull,isNumber,isNumberOrNumberString,isObject,isObjectLike,isPlainObject,isPositiveFloat,isPositiveInteger,isPromise,isRegExp,isSet,isString,isSymbol,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,isUrl,log,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline,warn});
|
|
1
|
+
"use strict";var et=Object.create;var w=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var ot=Object.getPrototypeOf,it=Object.prototype.hasOwnProperty;var st=(t,e)=>{for(var r in e)w(t,r,{get:e[r],enumerable:!0})},W=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of nt(e))!it.call(t,o)&&o!==r&&w(t,o,{get:()=>e[o],enumerable:!(n=rt(e,o))||n.enumerable});return t};var S=(t,e,r)=>(r=t!=null?et(ot(t)):{},W(e||!t||!t.__esModule?w(r,"default",{value:t,enumerable:!0}):r,t)),at=t=>W(w({},"__esModule",{value:!0}),t);var Oe={};st(Oe,{base64Decode:()=>xt,base64Encode:()=>lt,castArray:()=>y,compose:()=>bt,composeRight:()=>yt,debounce:()=>ht,debugWarn:()=>U,debugWarnInvalidTypeMessage:()=>Mt,decimalToBinary:()=>dt,deepClone:()=>O,deepMerge:()=>v,deprecated:()=>St,error:()=>wt,generateRandomArray:()=>Yt,generateRandomColor:()=>vt,generateRandomDate:()=>R,generateRandomEmail:()=>X,generateRandomFloat:()=>Zt,generateRandomIdCard:()=>Gt,generateRandomMobilePhone:()=>qt,generateRandomStringFromSource:()=>T,getRandomInt:()=>a,getRandomItem:()=>p,getRandomString:()=>g,getRandomUrl:()=>Bt,hasChanged:()=>gt,isArray:()=>u,isBoolean:()=>ct,isChineseString:()=>oe,isDate:()=>C,isDateString:()=>J,isDef:()=>ut,isEmail:()=>be,isEmptyString:()=>ye,isEnglishAphabet:()=>Xt,isFloat:()=>ie,isFunction:()=>A,isIdCard:()=>he,isInteger:()=>pe,isLowerCase:()=>ee,isLowerCaseAndNumber:()=>re,isLowerCaseAndNumberAndChinese:()=>ne,isMap:()=>N,isMobilePhone:()=>le,isNegativeFloat:()=>me,isNegativeInteger:()=>ge,isNonNegativeFloat:()=>ae,isNonNegativeInteger:()=>ue,isNonPositiveFloat:()=>ce,isNonPositiveInteger:()=>de,isNull:()=>pt,isNumber:()=>f,isNumberOrNumberString:()=>Vt,isObject:()=>mt,isObjectLike:()=>$,isPlainObject:()=>x,isPositiveFloat:()=>se,isPositiveInteger:()=>fe,isPromise:()=>Y,isRegExp:()=>F,isSet:()=>k,isString:()=>P,isSymbol:()=>I,isUndef:()=>h,isUndefined:()=>ft,isUpperCase:()=>Qt,isUpperCaseAndNumber:()=>Jt,isUpperCaseAndNumberAndChinese:()=>te,isUrl:()=>xe,objectToString:()=>H,omit:()=>Ft,pick:()=>_,qs:()=>Et,throttle:()=>Dt,throwError:()=>s,throwErrorInvalidTypeMessage:()=>jt,toTypeString:()=>b,toTypeValue:()=>j,validatorChineseOrEnglish:()=>It,validatorChineseOrEnglishOrNumber:()=>Pt,validatorUppercaseOrNumbersOrSpecial:()=>Nt,validatorUppercaseOrNumbersOrUnderline:()=>kt,warn:()=>At});module.exports=at(Oe);function mt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function $(t){return t!==null&&typeof t=="object"}var H=Object.prototype.toString,b=t=>H.call(t),j=t=>b(t).slice(8,-1),P=t=>typeof t=="string",f=t=>typeof t=="number"&&Number.isFinite(t),ct=t=>typeof t=="boolean",pt=t=>t===null,ft=t=>t===void 0,I=t=>typeof t=="symbol",u=Array.isArray,A=t=>typeof t=="function",N=t=>b(t)==="[object Map]",k=t=>b(t)==="[object Set]",C=t=>b(t)==="[object Date]",F=t=>b(t)==="[object RegExp]",Y=t=>$(t)&&A(t?.then)&&A(t?.catch),h=t=>t==null,ut=t=>t!=null,gt=(t,e)=>t!==e;function x(t){return b(t)==="[object Object]"}function y(t){return u(t)?t:[t]}function dt(t){let e=[],r,n="";for(;t>0;)r=Math.floor(t%2),e.push(r),t=Math.floor(t/2);for(;e.length>0;)n+=e.pop().toString();return n}var Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function lt(t){let e="",r="";for(let o=0;o<t.length;o++)r+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)e+=Z[parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=e.length%4;return n!==0&&(e+="=".repeat(4-n)),e}function xt(t){let e="",r="";for(let n=0;n<t.length&&t[n]!=="=";n++)r+=Z.indexOf(t[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=parseInt(r.slice(n,n+8),2);o&&(e+=String.fromCharCode(o))}return e}function bt(...t){return t.reduce((e,r)=>function(...n){return r(e(...n))})}function yt(...t){return t.reduce((e,r)=>function(...n){return e(r(...n))})}function ht(t,e=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{t.apply(this,n)},e)}}function O(t){let e=new WeakMap;function r(n){if(!$(n))return n;if(C(n))return new Date(n);if(F(n))return new RegExp(n);if(Y(n))return n;if(e.has(n))return e.get(n);if(N(n)){let i=new Map;return e.set(n,i),n.forEach((c,d)=>i.set(r(d),r(c))),i}if(k(n)){let i=new Set;return e.set(n,i),n.forEach(c=>i.add(r(c))),i}let o=u(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));e.set(n,o);let m=Object.getOwnPropertyDescriptors(n);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:r(c.value)})}return o}return r(t)}function v(t,e,r={}){return q(G(t,r),G(e,r),r)}function q(t,e,r){return u(t)?$t(t,e,r):Ot(t,e,r)}function Ot(t,e,r){if(!x(e))return e;let n=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(x(t[o])||u(t[o]))&&(x(e[o])||u(e[o]))?t[o]=q(t[o],e[o],r):Object.defineProperty(t,o,n[o])}),t}function $t(t,e,r){let{mergeStrategy:n="replace"}=r;if(u(e))switch(n){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function G(t,e){let{deepClone:r=!0}=e;return r?O(t):t}var M=class extends Error{constructor(e,r="Utils"){super(e),this.name=r}};function s(t,e){throw new M(`[${t}] ${e}`)}function U(t,e){let r=P(t)?new M(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(r)}function At(...t){console.warn(...t)}function wt(...t){console.error(...t)}var St=({from:t,replacement:e,version:r,type:n="API"})=>{U(`${n}`,`${t} is about to be deprecated in version ${r}, please use ${e} instead.`)};function jt(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${j(n)} with value ${n}.`;s(t,o)}function Mt(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${j(n)} with value ${n}.`;U(t,o)}function Rt(t,e){let{decode:r=!0}=e||{},n={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");n[i]=r?decodeURIComponent(c):c}return n}function B(t,e){let{encode:r=!0}=e||{},n=[];for(let o in t){let m=t[o];n.push(`${o}=${r?encodeURIComponent(m):m}`)}return n.join("&")}function Tt(t,e,r){let n=v({encode:!0},{...r}),o=B(e,n);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var Et={parse:Rt,stringify:B,appendQueryString:Tt};function Dt(t,e=500){let r=null;return function(...n){if(h(r))return r=Date.now(),t.apply(this,n);let o=Date.now();if(o-r>=e)return r=o,t.apply(this,n)}}function Pt(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function It(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Nt(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function kt(t){return/^[\dA-Z_]+$/.test(t)}function _(t,e,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=r,i={};return x(t)&&y(e).forEach(d=>{I(d)&&!o||!(n?d in t:Object.hasOwn(t,d))||!m&&(n?Ct(t,d):Object.getOwnPropertyDescriptor(t,d))?.enumerable===!1||(i[d]=O(t[d]))}),i}function Ct(t,e){let r=t;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Ft(t,e){if(!x(t))return{};let r=O(t),n=y(e),o=Object.keys(r).filter(m=>!n.includes(m));return _(r,o)}function Yt(t,e){return(!f(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),A(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((r,n)=>e(r,n))}function vt(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var l=S(require("dayjs"),1),V=S(require("dayjs/plugin/customParseFormat"),1);function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){f(t)&&(t={max:t});let{min:e=1,max:r=p(_t())}=t;Ut(e,r);let n=Math.ceil(e),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function Ut(t,e){let r=Math.ceil(t),n=Math.floor(e);Number.isSafeInteger(r)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(n)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),n<r&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function _t(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(r)})}(0,l.extend)(V.default);function R(t={}){let{start:e="1800-01-01 00:00:00",end:r=(0,l.default)().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=t;(!(0,l.default)(e).isValid()||!(0,l.default)(r).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,l.default)(e).year(),m=(0,l.default)(r).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),d=a({min:1,max:31}),L=a(23),z=a(59),tt=a(59),D=(0,l.default)(`${i}-${c}-${d} ${L}:${z}:${tt}`);return D.isBefore((0,l.default)(e))||D.isAfter((0,l.default)(r))?R(t):D.format(n)}function g(t={}){let e=Lt(t),r=zt(e);Wt(r);let{length:n}=e;Ht(n.min,n.max);let o=a(n),m=e.prefix||"";for(let i=0;i<o;i++)m+=r.charAt(Math.floor(Math.random()*r.length));return m+(e.suffix||"")}var Kt=16,K=1;function Lt(t){let e=f(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:f(t.length)?{max:t.length,min:t.length}:{max:Kt,min:K,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function zt(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function Wt(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Ht(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<K&&s("getRandomString",`Minimum length cannot be less than ${K}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function X(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${g(1)}${g({length:a({max:30,min:1})})}${g(1)}@${p(t)}`;return/\.{2,}/.test(e)?X():e}function Zt(t={}){f(t)&&(t={max:t});let{min:e=0,max:r=1,fractionDigits:n=2}=t;if(e===r)return e;if(e>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(r-e)+e}function T(t,e){(!f(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!u(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<t;n++)r+=p(e);return r}function Gt(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,R({format:"YYYYMMDD"}),T(3,e),T(1,[...e,"X","x"])].join("")}function qt(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Bt(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],r=[`?name=${g({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${g({length:{min:2,max:4}})}`,`?query=${g({length:{min:5,max:6}})}`,`?search=${g({length:{min:1,max:4}})}`,`?token=${g({length:{min:16,max:16}})}`];return`${p(t)}${g({length:{min:5,max:25}})}${p(e)}${p(r)}`}function Vt(t){return/^\d+$/.test(t)}function Xt(t){return/^[A-Z]+$/i.test(t)}function Qt(t){return/^[A-Z]+$/.test(t)}function Jt(t){return/^[\dA-Z]+$/.test(t)}function te(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function ee(t){return/^[a-z]+$/.test(t)}function re(t){return/^[\da-z]+$/.test(t)}function ne(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function oe(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function ie(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function se(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ae(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function me(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ce(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function pe(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function fe(t){return/^[1-9]\d*$/.test(t)}function ue(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function ge(t){return/^-[1-9]\d*$/.test(t)}function de(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var E=S(require("dayjs"),1),Q=S(require("dayjs/plugin/customParseFormat"),1);function le(t){return/^1[3-9]\d{9}$/.test(t)}function xe(t){return/^https?:\/\/\S+$/i.test(t)}function be(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function ye(t){return t===""}function J(t,e="YYYY-MM-DD HH:mm:ss"){return(0,E.extend)(Q.default),(0,E.default)(t,e,!0).isValid()}function he(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&J(t.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,error,generateRandomArray,generateRandomColor,generateRandomDate,generateRandomEmail,generateRandomFloat,generateRandomIdCard,generateRandomMobilePhone,generateRandomStringFromSource,getRandomInt,getRandomItem,getRandomString,getRandomUrl,hasChanged,isArray,isBoolean,isChineseString,isDate,isDateString,isDef,isEmail,isEmptyString,isEnglishAphabet,isFloat,isFunction,isIdCard,isInteger,isLowerCase,isLowerCaseAndNumber,isLowerCaseAndNumberAndChinese,isMap,isMobilePhone,isNegativeFloat,isNegativeInteger,isNonNegativeFloat,isNonNegativeInteger,isNonPositiveFloat,isNonPositiveInteger,isNull,isNumber,isNumberOrNumberString,isObject,isObjectLike,isPlainObject,isPositiveFloat,isPositiveInteger,isPromise,isRegExp,isSet,isString,isSymbol,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,isUrl,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline,warn});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Vt=Object.create;var kt=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var jt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Jt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qt(e))!Gt.call(t,i)&&i!==n&&kt(t,i,{get:()=>e[i],enumerable:!(r=Xt(e,i))||r.enumerable});return t};var ut=(t,e,n)=>(n=t!=null?Vt(Bt(t)):{},Jt(e||!t||!t.__esModule?kt(n,"default",{value:t,enumerable:!0}):n,t));var wt=jt(($t,Mt)=>{"use strict";(function(t,e){typeof $t=="object"&&typeof Mt<"u"?Mt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})($t,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",v="month",X="quarter",I="year",_="date",it="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,O={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(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},H={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,v),f=o-a<0,m=s.clone().add(u+(f?-1:1),v);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:v,y:I,w:h,d:b,D:_,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=H;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==it},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,T){var L=g.w(a.$u?Date.UTC(a.$y,T,V):new Date(a.$y,T,V),a);return f?L:L.endOf(b)},w=function(V,T){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(T)),a)},S=this.$W,A=this.$M,C=this.$D,G="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case v:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,tt=(S<q?S+7:S)-q;return d(f?C-tt:C+(6-tt),A);case b:case _:return w(G+"Hours",0);case l:return w(G+"Minutes",1);case y:return w(G+"Seconds",2);case i:return w(G+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[_]=m+"Date",a[v]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===v||f===I){var S=this.clone().set(_,1);S.$d[d](w),S.init(),this.$d=S.set(_,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===v)return this.set(v,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||it;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,G=a.meridiem,q=function(T,L,B,J){return T&&(T[L]||T(u,f))||B[L].slice(0,J)},tt=function(T){return g.s(d%12||12,T,"0")},V=G||function(T,L,B){var J=T<12?"AM":"PM";return B?J.toLowerCase():J};return f.replace(x,function(T,L){return L||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return tt(1);case"hh":return tt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(T)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case v:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(v).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",v],["$y",I],["$D",_]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var Dt=jt((Ot,St)=>{"use strict";(function(t,e){typeof Ot=="object"&&typeof St<"u"?St.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Ot,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var H=1;H<=24;H+=1)if(p.indexOf(M(H,0,x))>-1){O=H>12;break}}else O=p===(x?"pm":"PM");return O},_={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:v,ZZ:v};function it(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),H=M.length,j=0;j<H;j+=1){var P=M[j],K=_[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<H;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,H=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=it(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,G=d.minutes,q=d.seconds,tt=d.milliseconds,V=d.zone,T=d.week,L=new Date,B=A||(w||S?1:L.getDate()),J=w||L.getFullYear(),st=0;w&&!S||(st=S>0?S-1:L.getMonth());var at,lt=C||0,gt=G||0,ht=q||0,xt=tt||0;return V?new Date(Date.UTC(J,st,B,lt,gt,ht,xt+60*V.offset*1e3)):f?new Date(Date.UTC(J,st,B,lt,gt,ht,xt)):(at=new Date(J,st,B,lt,gt,ht,xt),T&&(at=m(at).week(T).toDate()),at)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else H.call(this,j)}}})});function he(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function ct(t){return t!==null&&typeof t=="object"}var Qt=Object.prototype.toString,et=t=>Qt.call(t),yt=t=>et(t).slice(8,-1),Yt=t=>typeof t=="string",U=t=>typeof t=="number"&&Number.isFinite(t),$e=t=>typeof t=="boolean",Me=t=>t===null,we=t=>t===void 0,Rt=t=>typeof t=="symbol",Z=Array.isArray,ft=t=>typeof t=="function",Et=t=>et(t)==="[object Map]",Ct=t=>et(t)==="[object Set]",It=t=>et(t)==="[object Date]",Pt=t=>et(t)==="[object RegExp]",Nt=t=>ct(t)&&ft(t?.then)&&ft(t?.catch),rt=t=>t==null,Oe=t=>t!=null,Se=(t,e)=>t!==e;function Q(t){return et(t)==="[object Object]"}function nt(t){return Z(t)?t:[t]}function Ne(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function _e(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=_t[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Le(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_t.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function He(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Ue(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function We(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!ct(r))return r;if(It(r))return new Date(r);if(Pt(r))return new RegExp(r);if(Nt(r))return r;if(e.has(r))return e.get(r);if(Et(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Ct(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=Z(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function Ft(t,e,n={}){return Ht(Lt(t,n),Lt(e,n),n)}function Ht(t,e,n){return Z(t)?ee(t,e,n):te(t,e,n)}function te(t,e,n){if(!Q(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(Q(t[i])||Z(t[i]))&&(Q(e[i])||Z(e[i]))?t[i]=Ht(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function ee(t,e,n){let{mergeStrategy:r="replace"}=n;if(Z(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Lt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var mt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new mt(`[${t}] ${e}`)}function Ut(t,e){let n=Yt(t)?new mt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Je(...t){console.warn(...t)}function Qe(...t){console.error(...t)}var tn=({from:t,replacement:e,version:n,type:r="API"})=>{Ut(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function en(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;D(t,i)}function nn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;Ut(t,i)}var pt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},bt=(t,...e)=>{pt("info",t,...e)};bt.info=(t,...e)=>{pt("info",t,...e)};bt.error=(t,...e)=>{pt("error",t,...e)};bt.warn=(t,...e)=>{pt("warn",t,...e)};function ne(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Zt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function re(t,e,n){let r=Ft({encode:!0},{...n}),i=Zt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var an={parse:ne,stringify:Zt,appendQueryString:re};function fn(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function dn(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function ln(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function gn(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function hn(t){return/^[\dA-Z_]+$/.test(t)}function Wt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return Q(t)&&nt(e).forEach(h=>{Rt(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?oe(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function oe(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Nn(t,e){if(!Q(t))return{};let n=ot(t),r=nt(e),i=Object.keys(n).filter(y=>!r.includes(y));return Wt(n,i)}function Wn(t,e){return(!U(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),ft(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Kn(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var W=ut(wt(),1),zt=ut(Dt(),1);function F(t){return t[Math.floor(Math.random()*t.length)]}function k(t={}){U(t)&&(t={max:t});let{min:e=1,max:n=F(se())}=t;ie(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function ie(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function se(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,W.extend)(zt.default);function At(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,W.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,W.default)(e).isValid()||!(0,W.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,W.default)(e).year(),y=(0,W.default)(n).year(),l=k({min:i,max:y}),b=k({min:1,max:12}),h=k({min:1,max:31}),v=k(23),X=k(59),I=k(59),_=(0,W.default)(`${l}-${b}-${h} ${v}:${X}:${I}`);return _.isBefore((0,W.default)(e))||_.isAfter((0,W.default)(n))?At(t):_.format(r)}function z(t={}){let e=ue(t),n=ce(e);fe(n);let{length:r}=e;me(r.min,r.max);let i=k(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var ae=16,vt=1;function ue(t){let e=U(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:U(t.length)?{max:t.length,min:t.length}:{max:ae,min:vt,...t.length},extra:e?[]:[...new Set(nt(t.extra||[]))]}}function ce(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=nt(t.extra).join(""),e}function fe(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function me(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<vt&&D("getRandomString",`Minimum length cannot be less than ${vt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function pe(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${z(1)}${z({length:k({max:30,min:1})})}${z(1)}@${F(t)}`;return/\.{2,}/.test(e)?pe():e}function pr(t={}){U(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function Tt(t,e){(!U(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!Z(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=F(e);return n}function Mr(){let t=k({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,At({format:"YYYYMMDD"}),Tt(3,e),Tt(1,[...e,"X","x"])].join("")}function Dr(){return F(["13","14","15","16","17","18","19"])+k(999999999).toString().padEnd(9,"0")}function jr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${z({length:{min:4,max:8}})}`,`?id=${k()}`,`?page=${z({length:{min:2,max:4}})}`,`?query=${z({length:{min:5,max:6}})}`,`?search=${z({length:{min:1,max:4}})}`,`?token=${z({length:{min:16,max:16}})}`];return`${F(t)}${z({length:{min:5,max:25}})}${F(e)}${F(n)}`}function Kr(t){return/^\d+$/.test(t)}function Vr(t){return/^[A-Z]+$/i.test(t)}function Xr(t){return/^[A-Z]+$/.test(t)}function qr(t){return/^[\dA-Z]+$/.test(t)}function Br(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Gr(t){return/^[a-z]+$/.test(t)}function Jr(t){return/^[\da-z]+$/.test(t)}function Qr(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function to(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function no(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function ro(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function oo(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function io(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function so(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function uo(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function co(t){return/^[1-9]\d*$/.test(t)}function fo(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function mo(t){return/^-[1-9]\d*$/.test(t)}function po(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var dt=ut(wt(),1),Kt=ut(Dt(),1);function go(t){return/^1[3-9]\d{9}$/.test(t)}function ho(t){return/^https?:\/\/\S+$/i.test(t)}function xo(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function yo(t){return t===""}function de(t,e="YYYY-MM-DD HH:mm:ss"){return(0,dt.extend)(Kt.default),(0,dt.default)(t,e,!0).isValid()}function bo(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&de(t.slice(6,14),"YYYYMMDD")}export{Le as base64Decode,_e as base64Encode,nt as castArray,He as compose,Ue as composeRight,We as debounce,Ut as debugWarn,nn as debugWarnInvalidTypeMessage,Ne as decimalToBinary,ot as deepClone,Ft as deepMerge,tn as deprecated,Qe as error,Wn as generateRandomArray,Kn as generateRandomColor,At as generateRandomDate,pe as generateRandomEmail,pr as generateRandomFloat,Mr as generateRandomIdCard,Dr as generateRandomMobilePhone,Tt as generateRandomStringFromSource,k as getRandomInt,F as getRandomItem,z as getRandomString,jr as getRandomUrl,Se as hasChanged,Z as isArray,$e as isBoolean,to as isChineseString,It as isDate,de as isDateString,Oe as isDef,xo as isEmail,yo as isEmptyString,Vr as isEnglishAphabet,no as isFloat,ft as isFunction,bo as isIdCard,uo as isInteger,Gr as isLowerCase,Jr as isLowerCaseAndNumber,Qr as isLowerCaseAndNumberAndChinese,Et as isMap,go as isMobilePhone,io as isNegativeFloat,mo as isNegativeInteger,oo as isNonNegativeFloat,fo as isNonNegativeInteger,so as isNonPositiveFloat,po as isNonPositiveInteger,Me as isNull,U as isNumber,Kr as isNumberOrNumberString,he as isObject,ct as isObjectLike,Q as isPlainObject,ro as isPositiveFloat,co as isPositiveInteger,Nt as isPromise,Pt as isRegExp,Ct as isSet,Yt as isString,Rt as isSymbol,rt as isUndef,we as isUndefined,Xr as isUpperCase,qr as isUpperCaseAndNumber,Br as isUpperCaseAndNumberAndChinese,ho as isUrl,bt as log,Qt as objectToString,Nn as omit,Wt as pick,an as qs,fn as throttle,D as throwError,en as throwErrorInvalidTypeMessage,et as toTypeString,yt as toTypeValue,ln as validatorChineseOrEnglish,dn as validatorChineseOrEnglishOrNumber,gn as validatorUppercaseOrNumbersOrSpecial,hn as validatorUppercaseOrNumbersOrUnderline,Je as warn};
|
|
1
|
+
var zt=Object.create;var vt=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var Xt=Object.getPrototypeOf,qt=Object.prototype.hasOwnProperty;var Tt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Bt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Vt(e))!qt.call(t,i)&&i!==n&&vt(t,i,{get:()=>e[i],enumerable:!(r=Kt(e,i))||r.enumerable});return t};var ut=(t,e,n)=>(n=t!=null?zt(Xt(t)):{},Bt(e||!t||!t.__esModule?vt(n,"default",{value:t,enumerable:!0}):n,t));var $t=Tt((yt,bt)=>{"use strict";(function(t,e){typeof yt=="object"&&typeof bt<"u"?bt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(yt,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",v="month",X="quarter",I="year",_="date",it="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,O={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(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},H={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,v),f=o-a<0,m=s.clone().add(u+(f?-1:1),v);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:v,y:I,w:h,d:b,D:_,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},Y="en",P={};P[Y]=O;var K="$isDayjsObject",N=function(c){return c instanceof k||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return Y;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(Y=a),a||!u&&Y},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new k(o)},g=H;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var k=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==it},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,T){var L=g.w(a.$u?Date.UTC(a.$y,T,V):new Date(a.$y,T,V),a);return f?L:L.endOf(b)},w=function(V,T){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(T)),a)},S=this.$W,A=this.$M,C=this.$D,G="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case v:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,tt=(S<q?S+7:S)-q;return d(f?C-tt:C+(6-tt),A);case b:case _:return w(G+"Hours",0);case l:return w(G+"Minutes",1);case y:return w(G+"Seconds",2);case i:return w(G+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[_]=m+"Date",a[v]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===v||f===I){var S=this.clone().set(_,1);S.$d[d](w),S.init(),this.$d=S.set(_,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===v)return this.set(v,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||it;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,G=a.meridiem,q=function(T,L,B,J){return T&&(T[L]||T(u,f))||B[L].slice(0,J)},tt=function(T){return g.s(d%12||12,T,"0")},V=G||function(T,L,B){var J=T<12?"AM":"PM";return B?J.toLowerCase():J};return f.replace(x,function(T,L){return L||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return tt(1);case"hh":return tt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(T)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case v:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(v).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=k.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",v],["$y",I],["$D",_]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,k,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[Y],$.Ls=P,$.p={},$})});var Ot=Tt((Mt,wt)=>{"use strict";(function(t,e){typeof Mt=="object"&&typeof wt<"u"?wt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Mt,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var H=1;H<=24;H+=1)if(p.indexOf(M(H,0,x))>-1){O=H>12;break}}else O=p===(x?"pm":"PM");return O},_={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:v,ZZ:v};function it(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,k){var E=k&&k.toUpperCase();return g||O[k]||t[k]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),H=M.length,Y=0;Y<H;Y+=1){var P=M[Y],K=_[P],N=K&&K[0],R=K&&K[1];M[Y]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},k=0,E=0;k<H;k+=1){var c=M[k];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,H=M.parse;M.parse=function(Y){var P=Y.date,K=Y.utc,N=Y.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,k=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=it(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,G=d.minutes,q=d.seconds,tt=d.milliseconds,V=d.zone,T=d.week,L=new Date,B=A||(w||S?1:L.getDate()),J=w||L.getFullYear(),st=0;w&&!S||(st=S>0?S-1:L.getMonth());var at,dt=C||0,lt=G||0,gt=q||0,ht=tt||0;return V?new Date(Date.UTC(J,st,B,dt,lt,gt,ht+60*V.offset*1e3)):f?new Date(Date.UTC(J,st,B,dt,lt,gt,ht)):(at=new Date(J,st,B,dt,lt,gt,ht),T&&(at=m(at).week(T).toDate()),at)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),k&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else H.call(this,Y)}}})});function le(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function ct(t){return t!==null&&typeof t=="object"}var Gt=Object.prototype.toString,et=t=>Gt.call(t),xt=t=>et(t).slice(8,-1),jt=t=>typeof t=="string",U=t=>typeof t=="number"&&Number.isFinite(t),ye=t=>typeof t=="boolean",be=t=>t===null,$e=t=>t===void 0,Yt=t=>typeof t=="symbol",Z=Array.isArray,ft=t=>typeof t=="function",kt=t=>et(t)==="[object Map]",Rt=t=>et(t)==="[object Set]",Et=t=>et(t)==="[object Date]",Ct=t=>et(t)==="[object RegExp]",It=t=>ct(t)&&ft(t?.then)&&ft(t?.catch),rt=t=>t==null,Me=t=>t!=null,we=(t,e)=>t!==e;function Q(t){return et(t)==="[object Object]"}function nt(t){return Z(t)?t:[t]}function Ie(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Pe(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Pt[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Ne(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Pt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function Le(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Fe(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function Ue(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!ct(r))return r;if(Et(r))return new Date(r);if(Ct(r))return new RegExp(r);if(It(r))return r;if(e.has(r))return e.get(r);if(kt(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Rt(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=Z(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function _t(t,e,n={}){return Lt(Nt(t,n),Nt(e,n),n)}function Lt(t,e,n){return Z(t)?Qt(t,e,n):Jt(t,e,n)}function Jt(t,e,n){if(!Q(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(Q(t[i])||Z(t[i]))&&(Q(e[i])||Z(e[i]))?t[i]=Lt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function Qt(t,e,n){let{mergeStrategy:r="replace"}=n;if(Z(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Nt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var mt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new mt(`[${t}] ${e}`)}function Ft(t,e){let n=jt(t)?new mt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Be(...t){console.warn(...t)}function Ge(...t){console.error(...t)}var Je=({from:t,replacement:e,version:n,type:r="API"})=>{Ft(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Qe(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${xt(r)} with value ${r}.`;D(t,i)}function tn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${xt(r)} with value ${r}.`;Ft(t,i)}function te(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Ht(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function ee(t,e,n){let r=_t({encode:!0},{...n}),i=Ht(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var rn={parse:te,stringify:Ht,appendQueryString:ee};function an(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function fn(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function mn(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function pn(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function dn(t){return/^[\dA-Z_]+$/.test(t)}function Ut(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return Q(t)&&nt(e).forEach(h=>{Yt(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?ne(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function ne(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Cn(t,e){if(!Q(t))return{};let n=ot(t),r=nt(e),i=Object.keys(n).filter(y=>!r.includes(y));return Ut(n,i)}function Hn(t,e){return(!U(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),ft(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Zn(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var W=ut($t(),1),Zt=ut(Ot(),1);function F(t){return t[Math.floor(Math.random()*t.length)]}function j(t={}){U(t)&&(t={max:t});let{min:e=1,max:n=F(oe())}=t;re(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function re(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function oe(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,W.extend)(Zt.default);function St(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,W.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,W.default)(e).isValid()||!(0,W.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,W.default)(e).year(),y=(0,W.default)(n).year(),l=j({min:i,max:y}),b=j({min:1,max:12}),h=j({min:1,max:31}),v=j(23),X=j(59),I=j(59),_=(0,W.default)(`${l}-${b}-${h} ${v}:${X}:${I}`);return _.isBefore((0,W.default)(e))||_.isAfter((0,W.default)(n))?St(t):_.format(r)}function z(t={}){let e=se(t),n=ae(e);ue(n);let{length:r}=e;ce(r.min,r.max);let i=j(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var ie=16,Dt=1;function se(t){let e=U(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:U(t.length)?{max:t.length,min:t.length}:{max:ie,min:Dt,...t.length},extra:e?[]:[...new Set(nt(t.extra||[]))]}}function ae(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=nt(t.extra).join(""),e}function ue(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function ce(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Dt&&D("getRandomString",`Minimum length cannot be less than ${Dt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function fe(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${z(1)}${z({length:j({max:30,min:1})})}${z(1)}@${F(t)}`;return/\.{2,}/.test(e)?fe():e}function cr(t={}){U(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function At(t,e){(!U(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!Z(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=F(e);return n}function yr(){let t=j({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,St({format:"YYYYMMDD"}),At(3,e),At(1,[...e,"X","x"])].join("")}function wr(){return F(["13","14","15","16","17","18","19"])+j(999999999).toString().padEnd(9,"0")}function vr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${z({length:{min:4,max:8}})}`,`?id=${j()}`,`?page=${z({length:{min:2,max:4}})}`,`?query=${z({length:{min:5,max:6}})}`,`?search=${z({length:{min:1,max:4}})}`,`?token=${z({length:{min:16,max:16}})}`];return`${F(t)}${z({length:{min:5,max:25}})}${F(e)}${F(n)}`}function Zr(t){return/^\d+$/.test(t)}function Wr(t){return/^[A-Z]+$/i.test(t)}function zr(t){return/^[A-Z]+$/.test(t)}function Kr(t){return/^[\dA-Z]+$/.test(t)}function Vr(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Xr(t){return/^[a-z]+$/.test(t)}function qr(t){return/^[\da-z]+$/.test(t)}function Br(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Gr(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function Qr(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function to(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function eo(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function no(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ro(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function io(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function so(t){return/^[1-9]\d*$/.test(t)}function ao(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function uo(t){return/^-[1-9]\d*$/.test(t)}function co(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var pt=ut($t(),1),Wt=ut(Ot(),1);function mo(t){return/^1[3-9]\d{9}$/.test(t)}function po(t){return/^https?:\/\/\S+$/i.test(t)}function lo(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function go(t){return t===""}function me(t,e="YYYY-MM-DD HH:mm:ss"){return(0,pt.extend)(Wt.default),(0,pt.default)(t,e,!0).isValid()}function ho(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&me(t.slice(6,14),"YYYYMMDD")}export{Ne as base64Decode,Pe as base64Encode,nt as castArray,Le as compose,Fe as composeRight,Ue as debounce,Ft as debugWarn,tn as debugWarnInvalidTypeMessage,Ie as decimalToBinary,ot as deepClone,_t as deepMerge,Je as deprecated,Ge as error,Hn as generateRandomArray,Zn as generateRandomColor,St as generateRandomDate,fe as generateRandomEmail,cr as generateRandomFloat,yr as generateRandomIdCard,wr as generateRandomMobilePhone,At as generateRandomStringFromSource,j as getRandomInt,F as getRandomItem,z as getRandomString,vr as getRandomUrl,we as hasChanged,Z as isArray,ye as isBoolean,Gr as isChineseString,Et as isDate,me as isDateString,Me as isDef,lo as isEmail,go as isEmptyString,Wr as isEnglishAphabet,Qr as isFloat,ft as isFunction,ho as isIdCard,io as isInteger,Xr as isLowerCase,qr as isLowerCaseAndNumber,Br as isLowerCaseAndNumberAndChinese,kt as isMap,mo as isMobilePhone,no as isNegativeFloat,uo as isNegativeInteger,eo as isNonNegativeFloat,ao as isNonNegativeInteger,ro as isNonPositiveFloat,co as isNonPositiveInteger,be as isNull,U as isNumber,Zr as isNumberOrNumberString,le as isObject,ct as isObjectLike,Q as isPlainObject,to as isPositiveFloat,so as isPositiveInteger,It as isPromise,Ct as isRegExp,Rt as isSet,jt as isString,Yt as isSymbol,rt as isUndef,$e as isUndefined,zr as isUpperCase,Kr as isUpperCaseAndNumber,Vr as isUpperCaseAndNumberAndChinese,po as isUrl,Gt as objectToString,Cn as omit,Ut as pick,rn as qs,an as throttle,D as throwError,Qe as throwErrorInvalidTypeMessage,et as toTypeString,xt as toTypeValue,mn as validatorChineseOrEnglish,fn as validatorChineseOrEnglishOrNumber,pn as validatorUppercaseOrNumbersOrSpecial,dn as validatorUppercaseOrNumbersOrUnderline,Be as warn};
|
|
@@ -510,13 +510,6 @@ declare const deprecated: ({ from, replacement, version, type, }: {
|
|
|
510
510
|
declare function throwErrorInvalidTypeMessage(scope: string, key: string, type: string, value: unknown): void;
|
|
511
511
|
declare function debugWarnInvalidTypeMessage(scope: string, key: string, type: string, value: unknown): void;
|
|
512
512
|
|
|
513
|
-
declare const log: {
|
|
514
|
-
(name: unknown, ...arg: unknown[]): void;
|
|
515
|
-
info(name: unknown, ...arg: unknown[]): void;
|
|
516
|
-
error(name: unknown, ...arg: unknown[]): void;
|
|
517
|
-
warn(name: unknown, ...arg: unknown[]): void;
|
|
518
|
-
};
|
|
519
|
-
|
|
520
513
|
/**
|
|
521
514
|
* 解析查询字符串
|
|
522
515
|
* @param str 转换的字符串
|
|
@@ -828,4 +821,4 @@ declare function isDateString(val: string, format?: string): boolean;
|
|
|
828
821
|
*/
|
|
829
822
|
declare function isIdCard(val: string): boolean;
|
|
830
823
|
|
|
831
|
-
export { type AnyObject, type ArrayItem, type Arrayable, type ParseOptions, type PlainObject, type StringNumber, type StringifyOptions, base64Decode, base64Encode, castArray, compose, composeRight, debounce, debugWarn, debugWarnInvalidTypeMessage, decimalToBinary, deepClone, deepMerge, deprecated, error, generateRandomArray, generateRandomColor, generateRandomDate, generateRandomEmail, generateRandomFloat, generateRandomIdCard, generateRandomMobilePhone, generateRandomStringFromSource, getRandomInt, getRandomItem, getRandomString, getRandomUrl, hasChanged, isArray, isBoolean, isChineseString, isDate, isDateString, isDef, isEmail, isEmptyString, isEnglishAphabet, isFloat, isFunction, isIdCard, isInteger, isLowerCase, isLowerCaseAndNumber, isLowerCaseAndNumberAndChinese, isMap, isMobilePhone, isNegativeFloat, isNegativeInteger, isNonNegativeFloat, isNonNegativeInteger, isNonPositiveFloat, isNonPositiveInteger, isNull, isNumber, isNumberOrNumberString, isObject, isObjectLike, isPlainObject, isPositiveFloat, isPositiveInteger, isPromise, isRegExp, isSet, isString, isSymbol, isUndef, isUndefined, isUpperCase, isUpperCaseAndNumber, isUpperCaseAndNumberAndChinese, isUrl,
|
|
824
|
+
export { type AnyObject, type ArrayItem, type Arrayable, type ParseOptions, type PlainObject, type StringNumber, type StringifyOptions, base64Decode, base64Encode, castArray, compose, composeRight, debounce, debugWarn, debugWarnInvalidTypeMessage, decimalToBinary, deepClone, deepMerge, deprecated, error, generateRandomArray, generateRandomColor, generateRandomDate, generateRandomEmail, generateRandomFloat, generateRandomIdCard, generateRandomMobilePhone, generateRandomStringFromSource, getRandomInt, getRandomItem, getRandomString, getRandomUrl, hasChanged, isArray, isBoolean, isChineseString, isDate, isDateString, isDef, isEmail, isEmptyString, isEnglishAphabet, isFloat, isFunction, isIdCard, isInteger, isLowerCase, isLowerCaseAndNumber, isLowerCaseAndNumberAndChinese, isMap, isMobilePhone, isNegativeFloat, isNegativeInteger, isNonNegativeFloat, isNonNegativeInteger, isNonPositiveFloat, isNonPositiveInteger, isNull, isNumber, isNumberOrNumberString, isObject, isObjectLike, isPlainObject, isPositiveFloat, isPositiveInteger, isPromise, isRegExp, isSet, isString, isSymbol, isUndef, isUndefined, isUpperCase, isUpperCaseAndNumber, isUpperCaseAndNumberAndChinese, isUrl, objectToString, omit, pick, qs, throttle, throwError, throwErrorInvalidTypeMessage, toTypeString, toTypeValue, validatorChineseOrEnglish, validatorChineseOrEnglishOrNumber, validatorUppercaseOrNumbersOrSpecial, validatorUppercaseOrNumbersOrUnderline, warn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* @ts-self-types="./esm-bundler.d.ts" */
|
|
2
|
-
function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var q=Object.prototype.toString,b=t=>q.call(t),M=t=>b(t).slice(8,-1),I=t=>typeof t=="string",u=t=>typeof t=="number"&&Number.isFinite(t),yt=t=>typeof t=="boolean",ht=t=>t===null,Ot=t=>t===void 0,N=t=>typeof t=="symbol",g=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",Y=t=>b(t)==="[object Date]",v=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,wt=t=>t!=null,$t=(t,e)=>t!==e;function l(t){return b(t)==="[object Object]"}function y(t){return g(t)?t:[t]}function Ct(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ft(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=_[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Yt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function Ut(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function _t(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function Lt(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(Y(r))return new Date(r);if(v(r))return new RegExp(r);if(U(r))return r;if(e.has(r))return e.get(r);if(C(r)){let i=new Map;return e.set(r,i),r.forEach((c,f)=>i.set(n(f),n(c))),i}if(F(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=g(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function L(t,e,n={}){return z(K(t,n),K(e,n),n)}function z(t,e,n){return g(t)?V(t,e,n):B(t,e,n)}function B(t,e,n){if(!l(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(l(t[o])||g(t[o]))&&(l(e[o])||g(e[o]))?t[o]=z(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function V(t,e,n){let{mergeStrategy:r="replace"}=n;if(g(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function K(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var A=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new A(`[${t}] ${e}`)}function W(t,e){let n=I(t)?new A(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Vt(...t){console.warn(...t)}function Xt(...t){console.error(...t)}var Qt=({from:t,replacement:e,version:n,type:r="API"})=>{W(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Jt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${M(r)} with value ${r}.`;s(t,o)}function te(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${M(r)} with value ${r}.`;W(t,o)}var S=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},R=(t,...e)=>{S("info",t,...e)};R.info=(t,...e)=>{S("info",t,...e)};R.error=(t,...e)=>{S("error",t,...e)};R.warn=(t,...e)=>{S("warn",t,...e)};function X(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function H(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function Q(t,e,n){let r=L({encode:!0},{...n}),o=H(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var oe={parse:X,stringify:H,appendQueryString:Q};function ae(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function pe(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function fe(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ue(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function ge(t){return/^[\dA-Z_]+$/.test(t)}function Z(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return l(t)&&y(e).forEach(f=>{N(f)&&!o||!(r?f in t:Object.hasOwn(t,f))||!m&&(r?J(t,f):Object.getOwnPropertyDescriptor(t,f))?.enumerable===!1||(i[f]=O(t[f]))}),i}function J(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ne(t,e){if(!l(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return Z(n,o)}function Ke(t,e){return(!u(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function ze(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import x,{extend as nt}from"dayjs";import rt from"dayjs/plugin/customParseFormat";function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){u(t)&&(t={max:t});let{min:e=1,max:n=p(et())}=t;tt(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function tt(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function et(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}nt(rt);function T(t={}){let{start:e="1800-01-01 00:00:00",end:n=x().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!x(e).isValid()||!x(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=x(e).year(),m=x(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),f=a({min:1,max:31}),D=a(23),P=a(59),G=a(59),j=x(`${i}-${c}-${f} ${D}:${P}:${G}`);return j.isBefore(x(e))||j.isAfter(x(n))?T(t):j.format(r)}function d(t={}){let e=it(t),n=st(e);at(n);let{length:r}=e;mt(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var ot=16,k=1;function it(t){let e=u(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:u(t.length)?{max:t.length,min:t.length}:{max:ot,min:k,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function st(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function at(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function mt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<k&&s("getRandomString",`Minimum length cannot be less than ${k}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function ct(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${d(1)}${d({length:a({max:30,min:1})})}${d(1)}@${p(t)}`;return/\.{2,}/.test(e)?ct():e}function un(t={}){u(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function E(t,e){(!u(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function wn(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,T({format:"YYYYMMDD"}),E(3,e),E(1,[...e,"X","x"])].join("")}function jn(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function En(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${d({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${d({length:{min:2,max:4}})}`,`?query=${d({length:{min:5,max:6}})}`,`?search=${d({length:{min:1,max:4}})}`,`?token=${d({length:{min:16,max:16}})}`];return`${p(t)}${d({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Zn(t){return/^\d+$/.test(t)}function Gn(t){return/^[A-Z]+$/i.test(t)}function qn(t){return/^[A-Z]+$/.test(t)}function Bn(t){return/^[\dA-Z]+$/.test(t)}function Vn(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Xn(t){return/^[a-z]+$/.test(t)}function Qn(t){return/^[\da-z]+$/.test(t)}function Jn(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function tr(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function nr(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function rr(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function or(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function ir(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function sr(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function mr(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function cr(t){return/^[1-9]\d*$/.test(t)}function pr(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function fr(t){return/^-[1-9]\d*$/.test(t)}function ur(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}import pt,{extend as ft}from"dayjs";import ut from"dayjs/plugin/customParseFormat";function xr(t){return/^1[3-9]\d{9}$/.test(t)}function br(t){return/^https?:\/\/\S+$/i.test(t)}function yr(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function hr(t){return t===""}function gt(t,e="YYYY-MM-DD HH:mm:ss"){return ft(ut),pt(t,e,!0).isValid()}function Or(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&>(t.slice(6,14),"YYYYMMDD")}export{Yt as base64Decode,Ft as base64Encode,y as castArray,Ut as compose,_t as composeRight,Lt as debounce,W as debugWarn,te as debugWarnInvalidTypeMessage,Ct as decimalToBinary,O as deepClone,L as deepMerge,Qt as deprecated,Xt as error,Ke as generateRandomArray,ze as generateRandomColor,T as generateRandomDate,ct as generateRandomEmail,un as generateRandomFloat,wn as generateRandomIdCard,jn as generateRandomMobilePhone,E as generateRandomStringFromSource,a as getRandomInt,p as getRandomItem,d as getRandomString,En as getRandomUrl,$t as hasChanged,g as isArray,yt as isBoolean,tr as isChineseString,Y as isDate,gt as isDateString,wt as isDef,yr as isEmail,hr as isEmptyString,Gn as isEnglishAphabet,nr as isFloat,$ as isFunction,Or as isIdCard,mr as isInteger,Xn as isLowerCase,Qn as isLowerCaseAndNumber,Jn as isLowerCaseAndNumberAndChinese,C as isMap,xr as isMobilePhone,ir as isNegativeFloat,fr as isNegativeInteger,or as isNonNegativeFloat,pr as isNonNegativeInteger,sr as isNonPositiveFloat,ur as isNonPositiveInteger,ht as isNull,u as isNumber,Zn as isNumberOrNumberString,dt as isObject,w as isObjectLike,l as isPlainObject,rr as isPositiveFloat,cr as isPositiveInteger,U as isPromise,v as isRegExp,F as isSet,I as isString,N as isSymbol,h as isUndef,Ot as isUndefined,qn as isUpperCase,Bn as isUpperCaseAndNumber,Vn as isUpperCaseAndNumberAndChinese,br as isUrl,R as log,q as objectToString,Ne as omit,Z as pick,oe as qs,ae as throttle,s as throwError,Jt as throwErrorInvalidTypeMessage,b as toTypeString,M as toTypeValue,fe as validatorChineseOrEnglish,pe as validatorChineseOrEnglishOrNumber,ue as validatorUppercaseOrNumbersOrSpecial,ge as validatorUppercaseOrNumbersOrUnderline,Vt as warn};
|
|
2
|
+
function ut(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function $(t){return t!==null&&typeof t=="object"}var Z=Object.prototype.toString,b=t=>Z.call(t),j=t=>b(t).slice(8,-1),P=t=>typeof t=="string",u=t=>typeof t=="number"&&Number.isFinite(t),xt=t=>typeof t=="boolean",bt=t=>t===null,yt=t=>t===void 0,I=t=>typeof t=="symbol",g=Array.isArray,A=t=>typeof t=="function",N=t=>b(t)==="[object Map]",k=t=>b(t)==="[object Set]",C=t=>b(t)==="[object Date]",F=t=>b(t)==="[object RegExp]",Y=t=>$(t)&&A(t?.then)&&A(t?.catch),h=t=>t==null,ht=t=>t!=null,Ot=(t,e)=>t!==e;function l(t){return b(t)==="[object Object]"}function y(t){return g(t)?t:[t]}function Nt(t){let e=[],r,n="";for(;t>0;)r=Math.floor(t%2),e.push(r),t=Math.floor(t/2);for(;e.length>0;)n+=e.pop().toString();return n}var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function kt(t){let e="",r="";for(let o=0;o<t.length;o++)r+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)e+=v[parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=e.length%4;return n!==0&&(e+="=".repeat(4-n)),e}function Ct(t){let e="",r="";for(let n=0;n<t.length&&t[n]!=="=";n++)r+=v.indexOf(t[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=parseInt(r.slice(n,n+8),2);o&&(e+=String.fromCharCode(o))}return e}function Yt(...t){return t.reduce((e,r)=>function(...n){return r(e(...n))})}function vt(...t){return t.reduce((e,r)=>function(...n){return e(r(...n))})}function _t(t,e=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{t.apply(this,n)},e)}}function O(t){let e=new WeakMap;function r(n){if(!$(n))return n;if(C(n))return new Date(n);if(F(n))return new RegExp(n);if(Y(n))return n;if(e.has(n))return e.get(n);if(N(n)){let i=new Map;return e.set(n,i),n.forEach((c,f)=>i.set(r(f),r(c))),i}if(k(n)){let i=new Set;return e.set(n,i),n.forEach(c=>i.add(r(c))),i}let o=g(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));e.set(n,o);let m=Object.getOwnPropertyDescriptors(n);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:r(c.value)})}return o}return r(t)}function _(t,e,r={}){return K(U(t,r),U(e,r),r)}function K(t,e,r){return g(t)?q(t,e,r):G(t,e,r)}function G(t,e,r){if(!l(e))return e;let n=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(l(t[o])||g(t[o]))&&(l(e[o])||g(e[o]))?t[o]=K(t[o],e[o],r):Object.defineProperty(t,o,n[o])}),t}function q(t,e,r){let{mergeStrategy:n="replace"}=r;if(g(e))switch(n){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function U(t,e){let{deepClone:r=!0}=e;return r?O(t):t}var w=class extends Error{constructor(e,r="Utils"){super(e),this.name=r}};function s(t,e){throw new w(`[${t}] ${e}`)}function L(t,e){let r=P(t)?new w(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(r)}function qt(...t){console.warn(...t)}function Bt(...t){console.error(...t)}var Vt=({from:t,replacement:e,version:r,type:n="API"})=>{L(`${n}`,`${t} is about to be deprecated in version ${r}, please use ${e} instead.`)};function Xt(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${j(n)} with value ${n}.`;s(t,o)}function Qt(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${j(n)} with value ${n}.`;L(t,o)}function B(t,e){let{decode:r=!0}=e||{},n={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");n[i]=r?decodeURIComponent(c):c}return n}function z(t,e){let{encode:r=!0}=e||{},n=[];for(let o in t){let m=t[o];n.push(`${o}=${r?encodeURIComponent(m):m}`)}return n.join("&")}function V(t,e,r){let n=_({encode:!0},{...r}),o=z(e,n);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var ee={parse:B,stringify:z,appendQueryString:V};function oe(t,e=500){let r=null;return function(...n){if(h(r))return r=Date.now(),t.apply(this,n);let o=Date.now();if(o-r>=e)return r=o,t.apply(this,n)}}function ae(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function me(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ce(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function pe(t){return/^[\dA-Z_]+$/.test(t)}function W(t,e,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=r,i={};return l(t)&&y(e).forEach(f=>{I(f)&&!o||!(n?f in t:Object.hasOwn(t,f))||!m&&(n?X(t,f):Object.getOwnPropertyDescriptor(t,f))?.enumerable===!1||(i[f]=O(t[f]))}),i}function X(t,e){let r=t;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Pe(t,e){if(!l(t))return{};let r=O(t),n=y(e),o=Object.keys(r).filter(m=>!n.includes(m));return W(r,o)}function ve(t,e){return(!u(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),A(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((r,n)=>e(r,n))}function _e(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import x,{extend as tt}from"dayjs";import et from"dayjs/plugin/customParseFormat";function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){u(t)&&(t={max:t});let{min:e=1,max:r=p(J())}=t;Q(e,r);let n=Math.ceil(e),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function Q(t,e){let r=Math.ceil(t),n=Math.floor(e);Number.isSafeInteger(r)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(n)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),n<r&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function J(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(r)})}tt(et);function M(t={}){let{start:e="1800-01-01 00:00:00",end:r=x().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=t;(!x(e).isValid()||!x(r).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=x(e).year(),m=x(r).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),f=a({min:1,max:31}),E=a(23),D=a(59),H=a(59),S=x(`${i}-${c}-${f} ${E}:${D}:${H}`);return S.isBefore(x(e))||S.isAfter(x(r))?M(t):S.format(n)}function d(t={}){let e=nt(t),r=ot(e);it(r);let{length:n}=e;st(n.min,n.max);let o=a(n),m=e.prefix||"";for(let i=0;i<o;i++)m+=r.charAt(Math.floor(Math.random()*r.length));return m+(e.suffix||"")}var rt=16,R=1;function nt(t){let e=u(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:u(t.length)?{max:t.length,min:t.length}:{max:rt,min:R,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function ot(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function it(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function st(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<R&&s("getRandomString",`Minimum length cannot be less than ${R}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function at(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${d(1)}${d({length:a({max:30,min:1})})}${d(1)}@${p(t)}`;return/\.{2,}/.test(e)?at():e}function mr(t={}){u(t)&&(t={max:t});let{min:e=0,max:r=1,fractionDigits:n=2}=t;if(e===r)return e;if(e>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(r-e)+e}function T(t,e){(!u(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<t;n++)r+=p(e);return r}function br(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,M({format:"YYYYMMDD"}),T(3,e),T(1,[...e,"X","x"])].join("")}function $r(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Mr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],r=[`?name=${d({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${d({length:{min:2,max:4}})}`,`?query=${d({length:{min:5,max:6}})}`,`?search=${d({length:{min:1,max:4}})}`,`?token=${d({length:{min:16,max:16}})}`];return`${p(t)}${d({length:{min:5,max:25}})}${p(e)}${p(r)}`}function Lr(t){return/^\d+$/.test(t)}function zr(t){return/^[A-Z]+$/i.test(t)}function Wr(t){return/^[A-Z]+$/.test(t)}function Hr(t){return/^[\dA-Z]+$/.test(t)}function Zr(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Gr(t){return/^[a-z]+$/.test(t)}function qr(t){return/^[\da-z]+$/.test(t)}function Br(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Vr(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function Qr(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function Jr(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function tn(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function en(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function rn(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function on(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function sn(t){return/^[1-9]\d*$/.test(t)}function an(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function mn(t){return/^-[1-9]\d*$/.test(t)}function cn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}import mt,{extend as ct}from"dayjs";import pt from"dayjs/plugin/customParseFormat";function gn(t){return/^1[3-9]\d{9}$/.test(t)}function dn(t){return/^https?:\/\/\S+$/i.test(t)}function ln(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function xn(t){return t===""}function ft(t,e="YYYY-MM-DD HH:mm:ss"){return ct(pt),mt(t,e,!0).isValid()}function bn(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&ft(t.slice(6,14),"YYYYMMDD")}export{Ct as base64Decode,kt as base64Encode,y as castArray,Yt as compose,vt as composeRight,_t as debounce,L as debugWarn,Qt as debugWarnInvalidTypeMessage,Nt as decimalToBinary,O as deepClone,_ as deepMerge,Vt as deprecated,Bt as error,ve as generateRandomArray,_e as generateRandomColor,M as generateRandomDate,at as generateRandomEmail,mr as generateRandomFloat,br as generateRandomIdCard,$r as generateRandomMobilePhone,T as generateRandomStringFromSource,a as getRandomInt,p as getRandomItem,d as getRandomString,Mr as getRandomUrl,Ot as hasChanged,g as isArray,xt as isBoolean,Vr as isChineseString,C as isDate,ft as isDateString,ht as isDef,ln as isEmail,xn as isEmptyString,zr as isEnglishAphabet,Qr as isFloat,A as isFunction,bn as isIdCard,on as isInteger,Gr as isLowerCase,qr as isLowerCaseAndNumber,Br as isLowerCaseAndNumberAndChinese,N as isMap,gn as isMobilePhone,en as isNegativeFloat,mn as isNegativeInteger,tn as isNonNegativeFloat,an as isNonNegativeInteger,rn as isNonPositiveFloat,cn as isNonPositiveInteger,bt as isNull,u as isNumber,Lr as isNumberOrNumberString,ut as isObject,$ as isObjectLike,l as isPlainObject,Jr as isPositiveFloat,sn as isPositiveInteger,Y as isPromise,F as isRegExp,k as isSet,P as isString,I as isSymbol,h as isUndef,yt as isUndefined,Wr as isUpperCase,Hr as isUpperCaseAndNumber,Zr as isUpperCaseAndNumberAndChinese,dn as isUrl,Z as objectToString,Pe as omit,W as pick,ee as qs,oe as throttle,s as throwError,Xt as throwErrorInvalidTypeMessage,b as toTypeString,j as toTypeValue,me as validatorChineseOrEnglish,ae as validatorChineseOrEnglishOrNumber,ce as validatorUppercaseOrNumbersOrSpecial,pe as validatorUppercaseOrNumbersOrUnderline,qt as warn};
|
package/dist/utils.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lntvowUtils=(()=>{var Gt=Object.create;var ft=Object.defineProperty;var Jt=Object.getOwnPropertyDescriptor;var Qt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var Ft=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ne=(t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})},Ht=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qt(e))!ee.call(t,i)&&i!==n&&ft(t,i,{get:()=>e[i],enumerable:!(r=Jt(e,i))||r.enumerable});return t};var mt=(t,e,n)=>(n=t!=null?Gt(te(t)):{},Ht(e||!t||!t.__esModule?ft(n,"default",{value:t,enumerable:!0}):n,t)),re=t=>Ht(ft({},"__esModule",{value:!0}),t);var It=Ft((Et,Ct)=>{"use strict";(function(t,e){typeof Et=="object"&&typeof Ct<"u"?Ct.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Et,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",T="month",X="quarter",I="year",L="date",at="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,O={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(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},W={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,T),f=o-a<0,m=s.clone().add(u+(f?-1:1),T);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:T,y:I,w:h,d:b,D:L,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=W;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==at},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,k){var F=g.w(a.$u?Date.UTC(a.$y,k,V):new Date(a.$y,k,V),a);return f?F:F.endOf(b)},w=function(V,k){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(k)),a)},S=this.$W,A=this.$M,C=this.$D,J="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case T:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),A);case b:case L:return w(J+"Hours",0);case l:return w(J+"Minutes",1);case y:return w(J+"Seconds",2);case i:return w(J+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[L]=m+"Date",a[T]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===T||f===I){var S=this.clone().set(L,1);S.$d[d](w),S.init(),this.$d=S.set(L,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===T)return this.set(T,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||at;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,J=a.meridiem,q=function(k,F,B,Q){return k&&(k[F]||k(u,f))||B[F].slice(0,Q)},nt=function(k){return g.s(d%12||12,k,"0")},V=J||function(k,F,B){var Q=k<12?"AM":"PM";return B?Q.toLowerCase():Q};return f.replace(x,function(k,F){return F||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(k)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case T:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",T],["$y",I],["$D",L]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var _t=Ft((Pt,Nt)=>{"use strict";(function(t,e){typeof Pt=="object"&&typeof Nt<"u"?Nt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Pt,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},T=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var W=1;W<=24;W+=1)if(p.indexOf(M(W,0,x))>-1){O=W>12;break}}else O=p===(x?"pm":"PM");return O},L={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:T,ZZ:T};function at(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),W=M.length,j=0;j<W;j+=1){var P=M[j],K=L[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<W;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,W=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=at(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,V=d.zone,k=d.week,F=new Date,B=A||(w||S?1:F.getDate()),Q=w||F.getFullYear(),ut=0;w&&!S||(ut=S>0?S-1:F.getMonth());var ct,bt=C||0,$t=J||0,Mt=q||0,wt=nt||0;return V?new Date(Date.UTC(Q,ut,B,bt,$t,Mt,wt+60*V.offset*1e3)):f?new Date(Date.UTC(Q,ut,B,bt,$t,Mt,wt)):(ct=new Date(Q,ut,B,bt,$t,Mt,wt),k&&(ct=m(ct).week(k).toDate()),ct)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else W.call(this,j)}}})});var xn={};ne(xn,{base64Decode:()=>pe,base64Encode:()=>me,castArray:()=>et,compose:()=>de,composeRight:()=>le,debounce:()=>ge,debugWarn:()=>Yt,debugWarnInvalidTypeMessage:()=>we,decimalToBinary:()=>fe,deepClone:()=>ot,deepMerge:()=>jt,deprecated:()=>$e,error:()=>be,generateRandomArray:()=>Ee,generateRandomColor:()=>Ce,generateRandomDate:()=>ht,generateRandomEmail:()=>Xt,generateRandomFloat:()=>Ue,generateRandomIdCard:()=>Ze,generateRandomMobilePhone:()=>We,generateRandomStringFromSource:()=>xt,getRandomInt:()=>v,getRandomItem:()=>_,getRandomString:()=>Z,getRandomUrl:()=>ze,hasChanged:()=>ce,isArray:()=>U,isBoolean:()=>ie,isChineseString:()=>tn,isDate:()=>vt,isDateString:()=>Bt,isDef:()=>ue,isEmail:()=>ln,isEmptyString:()=>gn,isEnglishAphabet:()=>Ve,isFloat:()=>en,isFunction:()=>st,isIdCard:()=>hn,isInteger:()=>an,isLowerCase:()=>Ge,isLowerCaseAndNumber:()=>Je,isLowerCaseAndNumberAndChinese:()=>Qe,isMap:()=>Dt,isMobilePhone:()=>pn,isNegativeFloat:()=>on,isNegativeInteger:()=>fn,isNonNegativeFloat:()=>rn,isNonNegativeInteger:()=>cn,isNonPositiveFloat:()=>sn,isNonPositiveInteger:()=>mn,isNull:()=>se,isNumber:()=>H,isNumberOrNumberString:()=>Ke,isObject:()=>oe,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>nn,isPositiveInteger:()=>un,isPromise:()=>kt,isRegExp:()=>Tt,isSet:()=>At,isString:()=>Ot,isSymbol:()=>St,isUndef:()=>rt,isUndefined:()=>ae,isUpperCase:()=>Xe,isUpperCaseAndNumber:()=>qe,isUpperCaseAndNumberAndChinese:()=>Be,isUrl:()=>dn,log:()=>gt,objectToString:()=>Ut,omit:()=>Re,pick:()=>Rt,qs:()=>De,throttle:()=>Ae,throwError:()=>D,throwErrorInvalidTypeMessage:()=>Me,toTypeString:()=>tt,toTypeValue:()=>pt,validatorChineseOrEnglish:()=>Te,validatorChineseOrEnglishOrNumber:()=>ve,validatorUppercaseOrNumbersOrSpecial:()=>ke,validatorUppercaseOrNumbersOrUnderline:()=>je,warn:()=>ye});function oe(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function it(t){return t!==null&&typeof t=="object"}var Ut=Object.prototype.toString,tt=t=>Ut.call(t),pt=t=>tt(t).slice(8,-1),Ot=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),ie=t=>typeof t=="boolean",se=t=>t===null,ae=t=>t===void 0,St=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",Dt=t=>tt(t)==="[object Map]",At=t=>tt(t)==="[object Set]",vt=t=>tt(t)==="[object Date]",Tt=t=>tt(t)==="[object RegExp]",kt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,ue=t=>t!=null,ce=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function fe(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function me(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Zt[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function pe(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Zt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function de(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function le(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function ge(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!it(r))return r;if(vt(r))return new Date(r);if(Tt(r))return new RegExp(r);if(kt(r))return r;if(e.has(r))return e.get(r);if(Dt(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(At(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=U(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function jt(t,e,n={}){return zt(Wt(t,n),Wt(e,n),n)}function zt(t,e,n){return U(t)?xe(t,e,n):he(t,e,n)}function he(t,e,n){if(!G(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(G(t[i])||U(t[i]))&&(G(e[i])||U(e[i]))?t[i]=zt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function xe(t,e,n){let{mergeStrategy:r="replace"}=n;if(U(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Wt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var dt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new dt(`[${t}] ${e}`)}function Yt(t,e){let n=Ot(t)?new dt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function ye(...t){console.warn(...t)}function be(...t){console.error(...t)}var $e=({from:t,replacement:e,version:n,type:r="API"})=>{Yt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Me(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;D(t,i)}function we(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;Yt(t,i)}var lt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},gt=(t,...e)=>{lt("info",t,...e)};gt.info=(t,...e)=>{lt("info",t,...e)};gt.error=(t,...e)=>{lt("error",t,...e)};gt.warn=(t,...e)=>{lt("warn",t,...e)};function Oe(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Kt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function Se(t,e,n){let r=jt({encode:!0},{...n}),i=Kt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var De={parse:Oe,stringify:Kt,appendQueryString:Se};function Ae(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function ve(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Te(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ke(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function je(t){return/^[\dA-Z_]+$/.test(t)}function Rt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return G(t)&&et(e).forEach(h=>{St(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?Ye(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function Ye(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Re(t,e){if(!G(t))return{};let n=ot(t),r=et(e),i=Object.keys(n).filter(y=>!r.includes(y));return Rt(n,i)}function Ee(t,e){return(!H(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),st(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Ce(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var z=mt(It(),1),Vt=mt(_t(),1);function _(t){return t[Math.floor(Math.random()*t.length)]}function v(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=_(Pe())}=t;Ie(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function Ie(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Pe(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,z.extend)(Vt.default);function ht(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,z.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,z.default)(e).isValid()||!(0,z.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,z.default)(e).year(),y=(0,z.default)(n).year(),l=v({min:i,max:y}),b=v({min:1,max:12}),h=v({min:1,max:31}),T=v(23),X=v(59),I=v(59),L=(0,z.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return L.isBefore((0,z.default)(e))||L.isAfter((0,z.default)(n))?ht(t):L.format(r)}function Z(t={}){let e=_e(t),n=Le(e);Fe(n);let{length:r}=e;He(r.min,r.max);let i=v(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var Ne=16,Lt=1;function _e(t){let e=H(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:H(t.length)?{max:t.length,min:t.length}:{max:Ne,min:Lt,...t.length},extra:e?[]:[...new Set(et(t.extra||[]))]}}function Le(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=et(t.extra).join(""),e}function Fe(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function He(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Lt&&D("getRandomString",`Minimum length cannot be less than ${Lt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function Xt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:v({max:30,min:1})})}${Z(1)}@${_(t)}`;return/\.{2,}/.test(e)?Xt():e}function Ue(t={}){H(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function xt(t,e){(!H(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!U(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=_(e);return n}function Ze(){let t=v({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,ht({format:"YYYYMMDD"}),xt(3,e),xt(1,[...e,"X","x"])].join("")}function We(){return _(["13","14","15","16","17","18","19"])+v(999999999).toString().padEnd(9,"0")}function ze(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${v()}`,`?page=${Z({length:{min:2,max:4}})}`,`?query=${Z({length:{min:5,max:6}})}`,`?search=${Z({length:{min:1,max:4}})}`,`?token=${Z({length:{min:16,max:16}})}`];return`${_(t)}${Z({length:{min:5,max:25}})}${_(e)}${_(n)}`}function Ke(t){return/^\d+$/.test(t)}function Ve(t){return/^[A-Z]+$/i.test(t)}function Xe(t){return/^[A-Z]+$/.test(t)}function qe(t){return/^[\dA-Z]+$/.test(t)}function Be(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Ge(t){return/^[a-z]+$/.test(t)}function Je(t){return/^[\da-z]+$/.test(t)}function Qe(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function tn(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function en(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function nn(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function rn(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function on(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function sn(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function an(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function un(t){return/^[1-9]\d*$/.test(t)}function cn(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function fn(t){return/^-[1-9]\d*$/.test(t)}function mn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var yt=mt(It(),1),qt=mt(_t(),1);function pn(t){return/^1[3-9]\d{9}$/.test(t)}function dn(t){return/^https?:\/\/\S+$/i.test(t)}function ln(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function gn(t){return t===""}function Bt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,yt.extend)(qt.default),(0,yt.default)(t,e,!0).isValid()}function hn(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&Bt(t.slice(6,14),"YYYYMMDD")}return re(xn);})();
|
|
1
|
+
"use strict";var lntvowUtils=(()=>{var qt=Object.create;var ft=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Jt=Object.getPrototypeOf,Qt=Object.prototype.hasOwnProperty;var _t=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),te=(t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})},Lt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Gt(e))!Qt.call(t,i)&&i!==n&&ft(t,i,{get:()=>e[i],enumerable:!(r=Bt(e,i))||r.enumerable});return t};var mt=(t,e,n)=>(n=t!=null?qt(Jt(t)):{},Lt(e||!t||!t.__esModule?ft(n,"default",{value:t,enumerable:!0}):n,t)),ee=t=>Lt(ft({},"__esModule",{value:!0}),t);var Et=_t((kt,Rt)=>{"use strict";(function(t,e){typeof kt=="object"&&typeof Rt<"u"?Rt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(kt,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",T="month",X="quarter",I="year",L="date",at="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,O={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(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},W={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,T),f=o-a<0,m=s.clone().add(u+(f?-1:1),T);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:T,y:I,w:h,d:b,D:L,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},Y="en",P={};P[Y]=O;var K="$isDayjsObject",N=function(c){return c instanceof k||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return Y;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(Y=a),a||!u&&Y},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new k(o)},g=W;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var k=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==at},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,j){var F=g.w(a.$u?Date.UTC(a.$y,j,V):new Date(a.$y,j,V),a);return f?F:F.endOf(b)},w=function(V,j){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(j)),a)},S=this.$W,A=this.$M,C=this.$D,J="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case T:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),A);case b:case L:return w(J+"Hours",0);case l:return w(J+"Minutes",1);case y:return w(J+"Seconds",2);case i:return w(J+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[L]=m+"Date",a[T]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===T||f===I){var S=this.clone().set(L,1);S.$d[d](w),S.init(),this.$d=S.set(L,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===T)return this.set(T,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||at;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,J=a.meridiem,q=function(j,F,B,Q){return j&&(j[F]||j(u,f))||B[F].slice(0,Q)},nt=function(j){return g.s(d%12||12,j,"0")},V=J||function(j,F,B){var Q=j<12?"AM":"PM";return B?Q.toLowerCase():Q};return f.replace(x,function(j,F){return F||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(j)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case T:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=k.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",T],["$y",I],["$D",L]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,k,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[Y],$.Ls=P,$.p={},$})});var Pt=_t((Ct,It)=>{"use strict";(function(t,e){typeof Ct=="object"&&typeof It<"u"?It.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Ct,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},T=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var W=1;W<=24;W+=1)if(p.indexOf(M(W,0,x))>-1){O=W>12;break}}else O=p===(x?"pm":"PM");return O},L={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:T,ZZ:T};function at(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,k){var E=k&&k.toUpperCase();return g||O[k]||t[k]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),W=M.length,Y=0;Y<W;Y+=1){var P=M[Y],K=L[P],N=K&&K[0],R=K&&K[1];M[Y]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},k=0,E=0;k<W;k+=1){var c=M[k];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,W=M.parse;M.parse=function(Y){var P=Y.date,K=Y.utc,N=Y.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,k=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=at(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,V=d.zone,j=d.week,F=new Date,B=A||(w||S?1:F.getDate()),Q=w||F.getFullYear(),ut=0;w&&!S||(ut=S>0?S-1:F.getMonth());var ct,xt=C||0,yt=J||0,bt=q||0,$t=nt||0;return V?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t+60*V.offset*1e3)):f?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t)):(ct=new Date(Q,ut,B,xt,yt,bt,$t),j&&(ct=m(ct).week(j).toDate()),ct)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),k&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else W.call(this,Y)}}})});var gn={};te(gn,{base64Decode:()=>fe,base64Encode:()=>ce,castArray:()=>et,compose:()=>me,composeRight:()=>pe,debounce:()=>de,debugWarn:()=>jt,debugWarnInvalidTypeMessage:()=>$e,decimalToBinary:()=>ue,deepClone:()=>ot,deepMerge:()=>Tt,deprecated:()=>ye,error:()=>xe,generateRandomArray:()=>ke,generateRandomColor:()=>Re,generateRandomDate:()=>lt,generateRandomEmail:()=>Kt,generateRandomFloat:()=>Fe,generateRandomIdCard:()=>He,generateRandomMobilePhone:()=>Ue,generateRandomStringFromSource:()=>gt,getRandomInt:()=>v,getRandomItem:()=>_,getRandomString:()=>Z,getRandomUrl:()=>Ze,hasChanged:()=>ae,isArray:()=>U,isBoolean:()=>re,isChineseString:()=>Je,isDate:()=>Dt,isDateString:()=>Xt,isDef:()=>se,isEmail:()=>pn,isEmptyString:()=>dn,isEnglishAphabet:()=>ze,isFloat:()=>Qe,isFunction:()=>st,isIdCard:()=>ln,isInteger:()=>on,isLowerCase:()=>qe,isLowerCaseAndNumber:()=>Be,isLowerCaseAndNumberAndChinese:()=>Ge,isMap:()=>Ot,isMobilePhone:()=>fn,isNegativeFloat:()=>nn,isNegativeInteger:()=>un,isNonNegativeFloat:()=>en,isNonNegativeInteger:()=>an,isNonPositiveFloat:()=>rn,isNonPositiveInteger:()=>cn,isNull:()=>oe,isNumber:()=>H,isNumberOrNumberString:()=>We,isObject:()=>ne,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>tn,isPositiveInteger:()=>sn,isPromise:()=>vt,isRegExp:()=>At,isSet:()=>St,isString:()=>Mt,isSymbol:()=>wt,isUndef:()=>rt,isUndefined:()=>ie,isUpperCase:()=>Ke,isUpperCaseAndNumber:()=>Ve,isUpperCaseAndNumberAndChinese:()=>Xe,isUrl:()=>mn,objectToString:()=>Ft,omit:()=>Ye,pick:()=>Yt,qs:()=>Oe,throttle:()=>Se,throwError:()=>D,throwErrorInvalidTypeMessage:()=>be,toTypeString:()=>tt,toTypeValue:()=>pt,validatorChineseOrEnglish:()=>Ae,validatorChineseOrEnglishOrNumber:()=>De,validatorUppercaseOrNumbersOrSpecial:()=>ve,validatorUppercaseOrNumbersOrUnderline:()=>Te,warn:()=>he});function ne(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function it(t){return t!==null&&typeof t=="object"}var Ft=Object.prototype.toString,tt=t=>Ft.call(t),pt=t=>tt(t).slice(8,-1),Mt=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),re=t=>typeof t=="boolean",oe=t=>t===null,ie=t=>t===void 0,wt=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",Ot=t=>tt(t)==="[object Map]",St=t=>tt(t)==="[object Set]",Dt=t=>tt(t)==="[object Date]",At=t=>tt(t)==="[object RegExp]",vt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,se=t=>t!=null,ae=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function ue(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ce(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Ht[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function fe(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Ht.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function me(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function pe(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function de(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!it(r))return r;if(Dt(r))return new Date(r);if(At(r))return new RegExp(r);if(vt(r))return r;if(e.has(r))return e.get(r);if(Ot(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(St(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=U(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function Tt(t,e,n={}){return Zt(Ut(t,n),Ut(e,n),n)}function Zt(t,e,n){return U(t)?ge(t,e,n):le(t,e,n)}function le(t,e,n){if(!G(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(G(t[i])||U(t[i]))&&(G(e[i])||U(e[i]))?t[i]=Zt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function ge(t,e,n){let{mergeStrategy:r="replace"}=n;if(U(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Ut(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var dt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new dt(`[${t}] ${e}`)}function jt(t,e){let n=Mt(t)?new dt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function he(...t){console.warn(...t)}function xe(...t){console.error(...t)}var ye=({from:t,replacement:e,version:n,type:r="API"})=>{jt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function be(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;D(t,i)}function $e(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;jt(t,i)}function Me(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Wt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function we(t,e,n){let r=Tt({encode:!0},{...n}),i=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var Oe={parse:Me,stringify:Wt,appendQueryString:we};function Se(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function De(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Ae(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ve(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Te(t){return/^[\dA-Z_]+$/.test(t)}function Yt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return G(t)&&et(e).forEach(h=>{wt(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?je(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function je(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ye(t,e){if(!G(t))return{};let n=ot(t),r=et(e),i=Object.keys(n).filter(y=>!r.includes(y));return Yt(n,i)}function ke(t,e){return(!H(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),st(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Re(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var z=mt(Et(),1),zt=mt(Pt(),1);function _(t){return t[Math.floor(Math.random()*t.length)]}function v(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=_(Ce())}=t;Ee(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function Ee(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Ce(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,z.extend)(zt.default);function lt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,z.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,z.default)(e).isValid()||!(0,z.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,z.default)(e).year(),y=(0,z.default)(n).year(),l=v({min:i,max:y}),b=v({min:1,max:12}),h=v({min:1,max:31}),T=v(23),X=v(59),I=v(59),L=(0,z.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return L.isBefore((0,z.default)(e))||L.isAfter((0,z.default)(n))?lt(t):L.format(r)}function Z(t={}){let e=Pe(t),n=Ne(e);_e(n);let{length:r}=e;Le(r.min,r.max);let i=v(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var Ie=16,Nt=1;function Pe(t){let e=H(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:H(t.length)?{max:t.length,min:t.length}:{max:Ie,min:Nt,...t.length},extra:e?[]:[...new Set(et(t.extra||[]))]}}function Ne(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=et(t.extra).join(""),e}function _e(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Le(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Nt&&D("getRandomString",`Minimum length cannot be less than ${Nt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function Kt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:v({max:30,min:1})})}${Z(1)}@${_(t)}`;return/\.{2,}/.test(e)?Kt():e}function Fe(t={}){H(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function gt(t,e){(!H(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!U(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=_(e);return n}function He(){let t=v({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,lt({format:"YYYYMMDD"}),gt(3,e),gt(1,[...e,"X","x"])].join("")}function Ue(){return _(["13","14","15","16","17","18","19"])+v(999999999).toString().padEnd(9,"0")}function Ze(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${v()}`,`?page=${Z({length:{min:2,max:4}})}`,`?query=${Z({length:{min:5,max:6}})}`,`?search=${Z({length:{min:1,max:4}})}`,`?token=${Z({length:{min:16,max:16}})}`];return`${_(t)}${Z({length:{min:5,max:25}})}${_(e)}${_(n)}`}function We(t){return/^\d+$/.test(t)}function ze(t){return/^[A-Z]+$/i.test(t)}function Ke(t){return/^[A-Z]+$/.test(t)}function Ve(t){return/^[\dA-Z]+$/.test(t)}function Xe(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function qe(t){return/^[a-z]+$/.test(t)}function Be(t){return/^[\da-z]+$/.test(t)}function Ge(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Je(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function Qe(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function tn(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function en(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function nn(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function rn(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function on(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function sn(t){return/^[1-9]\d*$/.test(t)}function an(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function un(t){return/^-[1-9]\d*$/.test(t)}function cn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var ht=mt(Et(),1),Vt=mt(Pt(),1);function fn(t){return/^1[3-9]\d{9}$/.test(t)}function mn(t){return/^https?:\/\/\S+$/i.test(t)}function pn(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function dn(t){return t===""}function Xt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,ht.extend)(Vt.default),(0,ht.default)(t,e,!0).isValid()}function ln(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&Xt(t.slice(6,14),"YYYYMMDD")}return ee(gn);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lntvow/utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript utilities",
|
|
6
6
|
"keywords": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dayjs": "^1.11.13"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@lntvow/dev": "^4.4.
|
|
32
|
+
"@lntvow/dev": "^4.4.20",
|
|
33
33
|
"@vitest/coverage-v8": "^3.2.4",
|
|
34
34
|
"@vitest/ui": "^3.2.4",
|
|
35
35
|
"tsup": "^8.5.0",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"scripts": {
|
|
40
40
|
"postinstall": "simple-git-hooks",
|
|
41
41
|
"rimraf": "rimraf ./node_modules/",
|
|
42
|
+
"ncu": "ncu -u && pnpm install",
|
|
42
43
|
"commit": "git add . && git-cz && git push",
|
|
43
44
|
"release": "git add . && bumpp package.json jsr.json --all --no-tag --no-print-commits",
|
|
44
45
|
"lint:eslint": "eslint \"src/**/*.{js,jsx,ts,tsx,vue}\" --fix",
|
|
45
46
|
"lint:tsc": "tsc --noEmit",
|
|
46
47
|
"lint": "run-p lint:eslint lint:tsc",
|
|
47
|
-
"ncu": "ncu -u && pnpm install",
|
|
48
48
|
"dev": "vite",
|
|
49
49
|
"test": "vitest",
|
|
50
50
|
"test:ui": "vitest --ui --coverage.enabled=true",
|