@lntvow/utils 4.0.25 → 4.1.0
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 ne=Object.create;var S=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var me=(e,t)=>{for(var r in t)S(e,r,{get:t[r],enumerable:!0})},Z=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ie(t))!ae.call(e,o)&&o!==r&&S(e,o,{get:()=>t[o],enumerable:!(n=oe(t,o))||n.enumerable});return e};var N=(e,t,r)=>(r=e!=null?ne(se(e)):{},Z(t||!e||!e.__esModule?S(r,"default",{value:e,enumerable:!0}):r,e)),ce=e=>Z(S({},"__esModule",{value:!0}),e);var $t={};me($t,{base64Decode:()=>ye,base64Encode:()=>be,castArray:()=>h,compose:()=>he,composeRight:()=>Oe,debounce:()=>we,debugWarn:()=>_,debugWarnInvalidTypeMessage:()=>Me,decimalToBinary:()=>xe,deepClone:()=>w,deepMerge:()=>K,deprecated:()=>Re,error:()=>je,generateRandomArray:()=>Ue,generateRandomColor:()=>Ke,generateRandomDate:()=>k,generateRandomEmail:()=>J,generateRandomFloat:()=>qe,generateRandomIdCard:()=>Be,generateRandomMobilePhone:()=>Ve,generateRandomStringFromSource:()=>E,getRandomInt:()=>m,getRandomItem:()=>f,getRandomString:()=>l,getRandomUrl:()=>Xe,hasChanged:()=>de,isArray:()=>g,isBoolean:()=>fe,isChineseString:()=>st,isDate:()=>v,isDateString:()=>te,isDef:()=>le,isEmail:()=>ht,isEmptyString:()=>Ot,isEnglishAphabet:()=>Je,isFloat:()=>at,isFunction:()=>A,isIdCard:()=>wt,isInteger:()=>ut,isLowerCase:()=>nt,isLowerCaseAndNumber:()=>ot,isLowerCaseAndNumberAndChinese:()=>it,isMap:()=>C,isMobilePhone:()=>bt,isNegativeFloat:()=>pt,isNegativeInteger:()=>dt,isNonNegativeFloat:()=>ct,isNonNegativeInteger:()=>lt,isNonPositiveFloat:()=>ft,isNonPositiveInteger:()=>xt,isNull:()=>ue,isNumber:()=>u,isNumberOrNumberString:()=>Qe,isObject:()=>pe,isObjectLike:()=>$,isPlainObject:()=>b,isPositiveFloat:()=>mt,isPositiveInteger:()=>gt,isPromise:()=>U,isRegExp:()=>Y,isSet:()=>F,isString:()=>D,isSymbol:()=>I,isUndef:()=>O,isUndefined:()=>ge,isUpperCase:()=>et,isUpperCaseAndNumber:()=>tt,isUpperCaseAndNumberAndChinese:()=>rt,isUrl:()=>yt,objectToString:()=>G,omit:()=>Ye,pick:()=>L,qs:()=>Pe,throttle:()=>Ne,throwError:()=>a,throwErrorInvalidTypeMessage:()=>Te,toTypeString:()=>y,toTypeValue:()=>j,validatorChineseOrEnglish:()=>Ie,validatorChineseOrEnglishOrNumber:()=>De,validatorUppercaseOrNumbersOrSpecial:()=>Ce,validatorUppercaseOrNumbersOrUnderline:()=>Fe,warn:()=>Se});module.exports=ce($t);function pe(e){let t=typeof e;return e!==null&&(t==="object"||t==="function")}function $(e){return e!==null&&typeof e=="object"}var G=Object.prototype.toString,y=e=>G.call(e),j=e=>y(e).slice(8,-1),D=e=>typeof e=="string",u=e=>typeof e=="number"&&Number.isFinite(e),fe=e=>typeof e=="boolean",ue=e=>e===null,ge=e=>e===void 0,I=e=>typeof e=="symbol",g=Array.isArray,A=e=>typeof e=="function",C=e=>y(e)==="[object Map]",F=e=>y(e)==="[object Set]",v=e=>y(e)==="[object Date]",Y=e=>y(e)==="[object RegExp]",U=e=>$(e)&&A(e?.then)&&A(e?.catch),O=e=>e==null,le=e=>e!=null,de=(e,t)=>e!==t;function b(e){return y(e)==="[object Object]"}function h(e){return g(e)?e:[e]}function xe(e){let t=[],r,n="";for(;e>0;)r=Math.floor(e%2),t.push(r),e=Math.floor(e/2);for(;t.length>0;)n+=t.pop().toString();return n}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function be(e){let t="",r="";for(let o=0;o<e.length;o++)r+=e[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)t+=q[Number.parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=t.length%4;return n!==0&&(t+="=".repeat(4-n)),t}function ye(e){let t="",r="";for(let n=0;n<e.length&&e[n]!=="=";n++)r+=q.indexOf(e[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=Number.parseInt(r.slice(n,n+8),2);o&&(t+=String.fromCharCode(o))}return t}function he(...e){return e.reduce((t,r)=>function(...n){return r(t(...n))})}function Oe(...e){return e.reduce((t,r)=>function(...n){return t(r(...n))})}function we(e,t=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}function w(e){let t=new WeakMap;function r(n){if(!$(n))return n;if(v(n))return new Date(n);if(Y(n))return new RegExp(n);if(U(n))return n;if(t.has(n))return t.get(n);if(C(n)){let s=new Map;return t.set(n,s),n.forEach((p,d)=>s.set(r(d),r(p))),s}if(F(n)){let s=new Set;return t.set(n,s),n.forEach(p=>s.add(r(p))),s}let o=g(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));t.set(n,o);let c=Object.getOwnPropertyDescriptors(n);for(let s of Reflect.ownKeys(c)){let p=c[s];p.get||p.set?Object.defineProperty(o,s,p):Object.defineProperty(o,s,{...p,value:r(p.value)})}return o}return r(e)}function K(e,t,r={}){return V(B(e,r),B(t,r),r)}function V(e,t,r){return g(e)?Ae(e,t,r):$e(e,t,r)}function $e(e,t,r){if(!b(t))return t;let n=Object.getOwnPropertyDescriptors(t);return Reflect.ownKeys(t).forEach(o=>{(b(e[o])||g(e[o]))&&(b(t[o])||g(t[o]))?e[o]=V(e[o],t[o],r):Object.defineProperty(e,o,n[o])}),e}function Ae(e,t,r){let{mergeStrategy:n="replace"}=r;if(g(t))switch(n){case"merge":return e.concat(t);case"replace":return t;default:return t}return t}function B(e,t){let{deepClone:r=!0}=t;return r?w(e):e}var R=class extends Error{constructor(t,r="Utils"){super(t),this.name=r}};function a(e,t){throw new R(`[${e}] ${t}`)}function _(e,t){let r=D(e)?new R(`[${e}] ${t}`,"UtilsWarn"):e;console.warn(r)}function Se(...e){console.warn(...e)}function je(...e){console.error(...e)}var Re=({from:e,replacement:t,version:r,type:n="API"})=>{_(`${n}`,`${e} is about to be deprecated in version ${r}, please use ${t} instead.`)};function Te(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${j(n)} with value ${n}.`;a(e,o)}function Me(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${j(n)} with value ${n}.`;_(e,o)}var T=(e,t,...r)=>{if(!t)return;let n=r.length===0?"":r.length===1?r[0]:r;console[e](`[Log] ${t}:`,n)},M=(e,...t)=>{T("info",e,...t)};M.info=(e,...t)=>{T("info",e,...t)};M.error=(e,...t)=>{T("error",e,...t)};M.warn=(e,...t)=>{T("warn",e,...t)};typeof globalThis<"u"&&(globalThis.log=M);function ke(e,t){let{decode:r=!0}=t||{},n={};e.startsWith("?")&&(e=e.slice(1)),e.includes("?")&&(e=e.slice(e.indexOf("?")+1));let o=e.split("&").filter(Boolean);for(let c of o){let[s,p]=c.split("=");n[s]=r?decodeURIComponent(p):p}return n}function X(e,t){let{encode:r=!0}=t||{},n=[];for(let o in e){let c=e[o];n.push(`${o}=${r?encodeURIComponent(c):c}`)}return n.join("&")}function Ee(e,t,r){let n=K({encode:!0},{...r}),o=X(t,n);return e.includes("?")?e.endsWith("?")||e.endsWith("&")?`${e}${o}`:`${e}&${o}`:`${e}?${o}`}var Pe={parse:ke,stringify:X,appendQueryString:Ee};function Ne(e,t=500){let r=null;return function(...n){if(O(r))return r=Date.now(),e.apply(this,n);let o=Date.now();if(o-r>=t)return r=o,e.apply(this,n)}}function De(e){return!O(e)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(e)}function Ie(e){return!O(e)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(e)}function Ce(e){return!O(e)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(e)}function Fe(e){return/^[\dA-Z_]+$/.test(e)}function L(e,t,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:c=!1}=r,s={};return b(e)&&h(t).forEach(d=>{I(d)&&!o||!(n?d in e:Object.hasOwn(e,d))||!c&&(n?ve(e,d):Object.getOwnPropertyDescriptor(e,d))?.enumerable===!1||(s[d]=w(e[d]))}),s}function ve(e,t){let r=e;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Ye(e,t){if(!b(e))return{};let r=w(e),n=h(t),o=Object.keys(r).filter(c=>!n.includes(c));return L(r,o)}function Ue(e,t){return(!u(e)||e<=0)&&a("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),A(t)||a("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:e}).fill(0).map((r,n)=>t(r,n))}function Ke(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var x=N(require("dayjs"),1),Q=N(require("dayjs/plugin/customParseFormat.js"),1);function f(e){return e[Math.floor(Math.random()*e.length)]}function m(e={}){u(e)&&(e={max:e});let{min:t=1,max:r=f(Le())}=e;_e(t,r);let n=Math.ceil(t),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function _e(e,t){let r=Math.ceil(e),n=Math.floor(t);Number.isSafeInteger(r)||a("getRandomInt",`The minimum value Math.ceil(${e}) should be a safe integer`),Number.isSafeInteger(n)||a("getRandomInt",`The maximum value Math.floor(${t}) should be a safe integer`),n<r&&(t>=e&&a("getRandomInt",`No integer value found between ${e} and ${t}`),a("getRandomInt",`The maximum value ${t} should be greater than the minimum value ${e}`))}function Le(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((e,t)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,t+1);return Number(r)})}x.default.extend(Q.default);function k(e={}){let{start:t="1800-01-01 00:00:00",end:r=(0,x.default)().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=e;(!(0,x.default)(t).isValid()||!(0,x.default)(r).isValid())&&a("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,x.default)(t).year(),c=(0,x.default)(r).year(),s=m({min:o,max:c}),p=m({min:1,max:12}),d=m({min:1,max:31}),W=m(23),H=m(59),re=m(59),P=(0,x.default)(`${s}-${p}-${d} ${W}:${H}:${re}`);return P.isBefore((0,x.default)(t))||P.isAfter((0,x.default)(r))?k(e):P.format(n)}function l(e={}){let t=We(e),r=He(t);Ze(r);let{length:n}=t;Ge(n.min,n.max);let o=m(n),c=t.prefix||"";for(let s=0;s<o;s++)c+=r.charAt(Math.floor(Math.random()*r.length));return c+(t.suffix||"")}var ze=16,z=1;function We(e){let t=u(e);return{lowerCase:!0,upperCase:!0,number:!0,...t?{}:e,length:t?{max:e,min:e}:u(e.length)?{max:e.length,min:e.length}:{max:ze,min:z,...e.length},extra:t?[]:[...new Set(h(e.extra||[]))]}}function He(e){let t="";return e.lowerCase&&(t+="abcdefghijklmnopqrstuvwxyz"),e.upperCase&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.number&&(t+="0123456789"),t+=h(e.extra).join(""),t}function Ze(e){e.length===0&&a("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Ge(e,t){Number.isInteger(e)||a("getRandomString","min must be an integer"),Number.isInteger(t)||a("getRandomString","max must be an integer"),e<z&&a("getRandomString",`Minimum length cannot be less than ${z}`),t<e&&a("getRandomString","Maximum length cannot be less than minimum length")}function J(){let e=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],t=`${l(1)}${l({length:m({max:30,min:1})})}${l(1)}@${f(e)}`;return/\.{2,}/.test(t)?J():t}function qe(e={}){u(e)&&(e={max:e});let{min:t=0,max:r=1,fractionDigits:n=2}=e;if(t===r)return t;if(t>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${t}`);return Math.random()*(r-t)+t}function E(e,t){(!u(e)||e<=0)&&a("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(t)||t.length===0)&&a("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<e;n++)r+=f(t);return r}function Be(){let e=m({min:1e5,max:999999}),t=[0,1,2,3,4,5,6,7,8,9];return[e,k({format:"YYYYMMDD"}),E(3,t),E(1,[...t,"X","x"])].join("")}function Ve(){return f(["13","14","15","16","17","18","19"])+m(999999999).toString().padEnd(9,"0")}function Xe(){let e=["http://","https://"],t=[".com",".net",".org",".cn",".top"],r=[`?name=${l({length:{min:4,max:8}})}`,`?id=${m()}`,`?page=${l({length:{min:2,max:4}})}`,`?query=${l({length:{min:5,max:6}})}`,`?search=${l({length:{min:1,max:4}})}`,`?token=${l({length:{min:16,max:16}})}`];return`${f(e)}${l({length:{min:5,max:25}})}${f(t)}${f(r)}`}function Qe(e){return/^\d+$/.test(e)}function Je(e){return/^[A-Z]+$/i.test(e)}function et(e){return/^[A-Z]+$/.test(e)}function tt(e){return/^[\dA-Z]+$/.test(e)}function rt(e){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(e)}function nt(e){return/^[a-z]+$/.test(e)}function ot(e){return/^[\da-z]+$/.test(e)}function it(e){return/^[\da-z\u4E00-\u9FA5]+$/.test(e)}function st(e){return/^[\u4E00-\u9FA5]+$/.test(e)}function at(e){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(e)}function mt(e){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function ct(e){return/^(?:0|[1-9]\d*)\.\d+$/.test(e)}function pt(e){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function ft(e){return/^-(?:0|[1-9]\d*)\.\d+$/.test(e)}function ut(e){return/^-?(?:0|[1-9]\d*)$/.test(e)}function gt(e){return/^[1-9]\d*$/.test(e)}function lt(e){return/^(?:0|[1-9]\d*)$/.test(e)&&!Object.is(e,-0)}function dt(e){return/^-[1-9]\d*$/.test(e)}function xt(e){return/^-(?:0|[1-9]\d*)$/.test(e)||Object.is(e,-0)}var ee=N(require("dayjs"),1);function bt(e){return/^1[3-9]\d{9}$/.test(e)}function yt(e){return/^https?:\/\/\S+$/i.test(e)}function ht(e){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e)}function Ot(e){return e===""}function te(e,t="YYYY-MM-DD HH:mm:ss"){return(0,ee.default)(e,t,!0).isValid()}function wt(e){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(e)&&te(e.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
|
+
"use strict";var ne=Object.create;var S=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var me=(e,t)=>{for(var r in t)S(e,r,{get:t[r],enumerable:!0})},Z=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ie(t))!ae.call(e,o)&&o!==r&&S(e,o,{get:()=>t[o],enumerable:!(n=oe(t,o))||n.enumerable});return e};var N=(e,t,r)=>(r=e!=null?ne(se(e)):{},Z(t||!e||!e.__esModule?S(r,"default",{value:e,enumerable:!0}):r,e)),pe=e=>Z(S({},"__esModule",{value:!0}),e);var Ot={};me(Ot,{base64Decode:()=>ye,base64Encode:()=>be,castArray:()=>h,compose:()=>he,composeRight:()=>Oe,debounce:()=>we,debugWarn:()=>L,debugWarnInvalidTypeMessage:()=>je,decimalToBinary:()=>xe,deepClone:()=>w,deepMerge:()=>K,deprecated:()=>Se,generateRandomArray:()=>ve,generateRandomColor:()=>Ye,generateRandomDate:()=>k,generateRandomEmail:()=>J,generateRandomFloat:()=>Ze,generateRandomIdCard:()=>Ge,generateRandomMobilePhone:()=>qe,generateRandomStringFromSource:()=>E,getRandomInt:()=>m,getRandomItem:()=>f,getRandomString:()=>l,getRandomUrl:()=>Be,hasChanged:()=>de,isArray:()=>g,isBoolean:()=>fe,isChineseString:()=>ot,isDate:()=>v,isDateString:()=>te,isDef:()=>le,isEmail:()=>bt,isEmptyString:()=>yt,isEnglishAphabet:()=>Xe,isFloat:()=>it,isFunction:()=>A,isIdCard:()=>ht,isInteger:()=>ct,isLowerCase:()=>tt,isLowerCaseAndNumber:()=>rt,isLowerCaseAndNumberAndChinese:()=>nt,isMap:()=>C,isMobilePhone:()=>dt,isNegativeFloat:()=>mt,isNegativeInteger:()=>gt,isNonNegativeFloat:()=>at,isNonNegativeInteger:()=>ut,isNonPositiveFloat:()=>pt,isNonPositiveInteger:()=>lt,isNull:()=>ue,isNumber:()=>u,isNumberOrNumberString:()=>Ve,isObject:()=>ce,isObjectLike:()=>$,isPlainObject:()=>b,isPositiveFloat:()=>st,isPositiveInteger:()=>ft,isPromise:()=>U,isRegExp:()=>Y,isSet:()=>F,isString:()=>D,isSymbol:()=>I,isURL:()=>xt,isUndef:()=>O,isUndefined:()=>ge,isUpperCase:()=>Qe,isUpperCaseAndNumber:()=>Je,isUpperCaseAndNumberAndChinese:()=>et,objectToString:()=>G,omit:()=>Fe,pick:()=>_,qs:()=>ke,throttle:()=>Ee,throwError:()=>a,throwErrorInvalidTypeMessage:()=>Re,toTypeString:()=>y,toTypeValue:()=>R,validatorChineseOrEnglish:()=>Ne,validatorChineseOrEnglishOrNumber:()=>Pe,validatorUppercaseOrNumbersOrSpecial:()=>De,validatorUppercaseOrNumbersOrUnderline:()=>Ie});module.exports=pe(Ot);function ce(e){let t=typeof e;return e!==null&&(t==="object"||t==="function")}function $(e){return e!==null&&typeof e=="object"}var G=Object.prototype.toString,y=e=>G.call(e),R=e=>y(e).slice(8,-1),D=e=>typeof e=="string",u=e=>typeof e=="number"&&Number.isFinite(e),fe=e=>typeof e=="boolean",ue=e=>e===null,ge=e=>e===void 0,I=e=>typeof e=="symbol",g=Array.isArray,A=e=>typeof e=="function",C=e=>y(e)==="[object Map]",F=e=>y(e)==="[object Set]",v=e=>y(e)==="[object Date]",Y=e=>y(e)==="[object RegExp]",U=e=>$(e)&&A(e?.then)&&A(e?.catch),O=e=>e==null,le=e=>e!=null,de=(e,t)=>e!==t;function b(e){return y(e)==="[object Object]"}function h(e){return g(e)?e:[e]}function xe(e){let t=[],r,n="";for(;e>0;)r=Math.floor(e%2),t.push(r),e=Math.floor(e/2);for(;t.length>0;)n+=t.pop().toString();return n}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function be(e){let t="",r="";for(let o=0;o<e.length;o++)r+=e[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)t+=q[Number.parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=t.length%4;return n!==0&&(t+="=".repeat(4-n)),t}function ye(e){let t="",r="";for(let n=0;n<e.length&&e[n]!=="=";n++)r+=q.indexOf(e[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=Number.parseInt(r.slice(n,n+8),2);o&&(t+=String.fromCharCode(o))}return t}function he(...e){return e.reduce((t,r)=>function(...n){return r(t(...n))})}function Oe(...e){return e.reduce((t,r)=>function(...n){return t(r(...n))})}function we(e,t=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}function w(e){let t=new WeakMap;function r(n){if(!$(n))return n;if(v(n))return new Date(n);if(Y(n))return new RegExp(n);if(U(n))return n;if(t.has(n))return t.get(n);if(C(n)){let s=new Map;return t.set(n,s),n.forEach((c,d)=>s.set(r(d),r(c))),s}if(F(n)){let s=new Set;return t.set(n,s),n.forEach(c=>s.add(r(c))),s}let o=g(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));t.set(n,o);let p=Object.getOwnPropertyDescriptors(n);for(let s of Reflect.ownKeys(p)){let c=p[s];c.get||c.set?Object.defineProperty(o,s,c):Object.defineProperty(o,s,{...c,value:r(c.value)})}return o}return r(e)}function K(e,t,r={}){return V(B(e,r),B(t,r),r)}function V(e,t,r){return g(e)?Ae(e,t,r):$e(e,t,r)}function $e(e,t,r){if(!b(t))return t;let n=Object.getOwnPropertyDescriptors(t);return Reflect.ownKeys(t).forEach(o=>{(b(e[o])||g(e[o]))&&(b(t[o])||g(t[o]))?e[o]=V(e[o],t[o],r):Object.defineProperty(e,o,n[o])}),e}function Ae(e,t,r){let{mergeStrategy:n="replace"}=r;if(g(t))switch(n){case"merge":return e.concat(t);case"replace":return t;default:return t}return t}function B(e,t){let{deepClone:r=!0}=t;return r?w(e):e}var j=class extends Error{constructor(t,r="Utils"){super(t),this.name=r}};function a(e,t){throw new j(`[${e}] ${t}`)}function L(e,t){let r=D(e)?new j(`[${e}] ${t}`,"UtilsWarn"):e;console.warn(r)}var Se=({from:e,replacement:t,version:r,type:n="API"})=>{L(`${n}`,`${e} is about to be deprecated in version ${r}, please use ${t} instead.`)};function Re(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${R(n)} with value ${n}.`;a(e,o)}function je(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${R(n)} with value ${n}.`;L(e,o)}var T=(e,t,...r)=>{if(!t)return;let n=r.length===0?"":r.length===1?r[0]:r;console[e](`[Log] ${t}:`,n)},M=(e,...t)=>{T("info",e,...t)};M.info=(e,...t)=>{T("info",e,...t)};M.error=(e,...t)=>{T("error",e,...t)};M.warn=(e,...t)=>{T("warn",e,...t)};typeof globalThis<"u"&&(globalThis.log=M);function Te(e,t){let{decode:r=!0}=t||{},n={};e.startsWith("?")&&(e=e.slice(1)),e.includes("?")&&(e=e.slice(e.indexOf("?")+1));let o=e.split("&").filter(Boolean);for(let p of o){let[s,c]=p.split("=");n[s]=r?decodeURIComponent(c):c}return n}function X(e,t){let{encode:r=!0}=t||{},n=[];for(let o in e){let p=e[o];n.push(`${o}=${r?encodeURIComponent(p):p}`)}return n.join("&")}function Me(e,t,r){let n=K({encode:!0},{...r}),o=X(t,n);return e.includes("?")?e.endsWith("?")||e.endsWith("&")?`${e}${o}`:`${e}&${o}`:`${e}?${o}`}var ke={parse:Te,stringify:X,appendQueryString:Me};function Ee(e,t=500){let r=null;return function(...n){if(O(r))return r=Date.now(),e.apply(this,n);let o=Date.now();if(o-r>=t)return r=o,e.apply(this,n)}}function Pe(e){return!O(e)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(e)}function Ne(e){return!O(e)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(e)}function De(e){return!O(e)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(e)}function Ie(e){return/^[\dA-Z_]+$/.test(e)}function _(e,t,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:p=!1}=r,s={};return b(e)&&h(t).forEach(d=>{I(d)&&!o||!(n?d in e:Object.hasOwn(e,d))||!p&&(n?Ce(e,d):Object.getOwnPropertyDescriptor(e,d))?.enumerable===!1||(s[d]=w(e[d]))}),s}function Ce(e,t){let r=e;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Fe(e,t){if(!b(e))return{};let r=w(e),n=h(t),o=Object.keys(r).filter(p=>!n.includes(p));return _(r,o)}function ve(e,t){return(!u(e)||e<=0)&&a("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),A(t)||a("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:e}).fill(0).map((r,n)=>t(r,n))}function Ye(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var x=N(require("dayjs"),1),Q=N(require("dayjs/plugin/customParseFormat.js"),1);function f(e){return e[Math.floor(Math.random()*e.length)]}function m(e={}){u(e)&&(e={max:e});let{min:t=1,max:r=f(Ke())}=e;Ue(t,r);let n=Math.ceil(t),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function Ue(e,t){let r=Math.ceil(e),n=Math.floor(t);Number.isSafeInteger(r)||a("getRandomInt",`The minimum value Math.ceil(${e}) should be a safe integer`),Number.isSafeInteger(n)||a("getRandomInt",`The maximum value Math.floor(${t}) should be a safe integer`),n<r&&(t>=e&&a("getRandomInt",`No integer value found between ${e} and ${t}`),a("getRandomInt",`The maximum value ${t} should be greater than the minimum value ${e}`))}function Ke(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((e,t)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,t+1);return Number(r)})}x.default.extend(Q.default);function k(e={}){let{start:t="1800-01-01 00:00:00",end:r=(0,x.default)().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=e;(!(0,x.default)(t).isValid()||!(0,x.default)(r).isValid())&&a("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,x.default)(t).year(),p=(0,x.default)(r).year(),s=m({min:o,max:p}),c=m({min:1,max:12}),d=m({min:1,max:31}),W=m(23),H=m(59),re=m(59),P=(0,x.default)(`${s}-${c}-${d} ${W}:${H}:${re}`);return P.isBefore((0,x.default)(t))||P.isAfter((0,x.default)(r))?k(e):P.format(n)}function l(e={}){let t=_e(e),r=ze(t);We(r);let{length:n}=t;He(n.min,n.max);let o=m(n),p=t.prefix||"";for(let s=0;s<o;s++)p+=r.charAt(Math.floor(Math.random()*r.length));return p+(t.suffix||"")}var Le=16,z=1;function _e(e){let t=u(e);return{lowerCase:!0,upperCase:!0,number:!0,...t?{}:e,length:t?{max:e,min:e}:u(e.length)?{max:e.length,min:e.length}:{max:Le,min:z,...e.length},extra:t?[]:[...new Set(h(e.extra||[]))]}}function ze(e){let t="";return e.lowerCase&&(t+="abcdefghijklmnopqrstuvwxyz"),e.upperCase&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.number&&(t+="0123456789"),t+=h(e.extra).join(""),t}function We(e){e.length===0&&a("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function He(e,t){Number.isInteger(e)||a("getRandomString","min must be an integer"),Number.isInteger(t)||a("getRandomString","max must be an integer"),e<z&&a("getRandomString",`Minimum length cannot be less than ${z}`),t<e&&a("getRandomString","Maximum length cannot be less than minimum length")}function J(){let e=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],t=`${l(1)}${l({length:m({max:30,min:1})})}${l(1)}@${f(e)}`;return/\.{2,}/.test(t)?J():t}function Ze(e={}){u(e)&&(e={max:e});let{min:t=0,max:r=1,fractionDigits:n=2}=e;if(t===r)return t;if(t>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${t}`);return Math.random()*(r-t)+t}function E(e,t){(!u(e)||e<=0)&&a("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(t)||t.length===0)&&a("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<e;n++)r+=f(t);return r}function Ge(){let e=m({min:1e5,max:999999}),t=[0,1,2,3,4,5,6,7,8,9];return[e,k({format:"YYYYMMDD"}),E(3,t),E(1,[...t,"X","x"])].join("")}function qe(){return f(["13","14","15","16","17","18","19"])+m(999999999).toString().padEnd(9,"0")}function Be(){let e=["http://","https://"],t=[".com",".net",".org",".cn",".top"],r=[`?name=${l({length:{min:4,max:8}})}`,`?id=${m()}`,`?page=${l({length:{min:2,max:4}})}`,`?query=${l({length:{min:5,max:6}})}`,`?search=${l({length:{min:1,max:4}})}`,`?token=${l({length:{min:16,max:16}})}`];return`${f(e)}${l({length:{min:5,max:25}})}${f(t)}${f(r)}`}function Ve(e){return/^\d+$/.test(e)}function Xe(e){return/^[A-Z]+$/i.test(e)}function Qe(e){return/^[A-Z]+$/.test(e)}function Je(e){return/^[\dA-Z]+$/.test(e)}function et(e){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(e)}function tt(e){return/^[a-z]+$/.test(e)}function rt(e){return/^[\da-z]+$/.test(e)}function nt(e){return/^[\da-z\u4E00-\u9FA5]+$/.test(e)}function ot(e){return/^[\u4E00-\u9FA5]+$/.test(e)}function it(e){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(e)}function st(e){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function at(e){return/^(?:0|[1-9]\d*)\.\d+$/.test(e)}function mt(e){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function pt(e){return/^-(?:0|[1-9]\d*)\.\d+$/.test(e)}function ct(e){return/^-?(?:0|[1-9]\d*)$/.test(e)}function ft(e){return/^[1-9]\d*$/.test(e)}function ut(e){return/^(?:0|[1-9]\d*)$/.test(e)&&!Object.is(e,-0)}function gt(e){return/^-[1-9]\d*$/.test(e)}function lt(e){return/^-(?:0|[1-9]\d*)$/.test(e)||Object.is(e,-0)}var ee=N(require("dayjs"),1);function dt(e){return/^1[3-9]\d{9}$/.test(e)}function xt(e){return/^https?:\/\/\S+$/i.test(e)}function bt(e){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e)}function yt(e){return e===""}function te(e,t="YYYY-MM-DD HH:mm:ss"){return(0,ee.default)(e,t,!0).isValid()}function ht(e){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(e)&&te(e.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,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,isURL,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var qt=Object.create;var jt=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Jt=Object.getPrototypeOf,Qt=Object.prototype.hasOwnProperty;var te=(t,e)=>()=>(t&&(e=t(t=0)),e);var Yt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ee=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gt(e))!Qt.call(t,s)&&s!==n&&jt(t,s,{get:()=>e[s],enumerable:!(r=Bt(e,s))||r.enumerable});return t};var $t=(t,e,n)=>(n=t!=null?qt(Jt(t)):{},ee(e||!t||!t.__esModule?jt(n,"default",{value:t,enumerable:!0}):n,t));import $e from"path";import{fileURLToPath as we}from"url";var o=te(()=>{"use strict"});var St=Yt((wt,Ot)=>{"use strict";o();(function(t,e){typeof wt=="object"&&typeof Ot<"u"?Ot.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(wt,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",s="second",M="minute",y="hour",w="day",b="week",j="month",G="quarter",_="year",U="date",ut="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|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,A={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(f){var a=["th","st","nd","rd"],i=f%100;return"["+f+(a[(i-20)%10]||a[i]||a[0])+"]"}},S=function(f,a,i){var c=String(f);return!c||c.length>=a?f:""+Array(a+1-c.length).join(i)+f},W={s:S,z:function(f){var a=-f.utcOffset(),i=Math.abs(a),c=Math.floor(i/60),u=i%60;return(a<=0?"+":"-")+S(c,2,"0")+":"+S(u,2,"0")},m:function f(a,i){if(a.date()<i.date())return-f(i,a);var c=12*(i.year()-a.year())+(i.month()-a.month()),u=a.clone().add(c,j),m=i-u<0,p=a.clone().add(c+(m?-1:1),j);return+(-(c+(i-u)/(m?u-p:p-u))||0)},a:function(f){return f<0?Math.ceil(f)||0:Math.floor(f)},p:function(f){return{M:j,y:_,w:b,d:w,D:U,h:y,m:M,s,ms:r,Q:G}[f]||String(f||"").toLowerCase().replace(/s$/,"")},u:function(f){return f===void 0}},E="en",L={};L[E]=A;var X="$isDayjsObject",F=function(f){return f instanceof C||!(!f||!f[X])},P=function f(a,i,c){var u;if(!a)return E;if(typeof a=="string"){var m=a.toLowerCase();L[m]&&(u=m),i&&(L[m]=i,u=m);var p=a.split("-");if(!u&&p.length>1)return f(p[0])}else{var h=a.name;L[h]=a,u=h}return!c&&u&&(E=u),u||!c&&E},O=function(f,a){if(F(f))return f.clone();var i=typeof a=="object"?a:{};return i.date=f,i.args=arguments,new C(i)},x=W;x.l=P,x.i=F,x.w=function(f,a){return O(f,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var C=function(){function f(i){this.$L=P(i.locale,null,!0),this.parse(i),this.$x=this.$x||i.x||{},this[X]=!0}var a=f.prototype;return a.parse=function(i){this.$d=function(c){var u=c.date,m=c.utc;if(u===null)return new Date(NaN);if(x.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var p=u.match(g);if(p){var h=p[2]-1||0,D=(p[7]||"0").substring(0,3);return m?new Date(Date.UTC(p[1],h,p[3]||1,p[4]||0,p[5]||0,p[6]||0,D)):new Date(p[1],h,p[3]||1,p[4]||0,p[5]||0,p[6]||0,D)}}return new Date(u)}(i),this.init()},a.init=function(){var i=this.$d;this.$y=i.getFullYear(),this.$M=i.getMonth(),this.$D=i.getDate(),this.$W=i.getDay(),this.$H=i.getHours(),this.$m=i.getMinutes(),this.$s=i.getSeconds(),this.$ms=i.getMilliseconds()},a.$utils=function(){return x},a.isValid=function(){return this.$d.toString()!==ut},a.isSame=function(i,c){var u=O(i);return this.startOf(c)<=u&&u<=this.endOf(c)},a.isAfter=function(i,c){return O(i)<this.startOf(c)},a.isBefore=function(i,c){return this.endOf(c)<O(i)},a.$g=function(i,c,u){return x.u(i)?this[c]:this.set(u,i)},a.unix=function(){return Math.floor(this.valueOf()/1e3)},a.valueOf=function(){return this.$d.getTime()},a.startOf=function(i,c){var u=this,m=!!x.u(c)||c,p=x.p(i),h=function(q,Y){var H=x.w(u.$u?Date.UTC(u.$y,Y,q):new Date(u.$y,Y,q),u);return m?H:H.endOf(w)},D=function(q,Y){return x.w(u.toDate()[q].apply(u.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(Y)),u)},v=this.$W,k=this.$M,N=this.$D,tt="set"+(this.$u?"UTC":"");switch(p){case _:return m?h(1,0):h(31,11);case j:return m?h(1,k):h(0,k+1);case b:var J=this.$locale().weekStart||0,rt=(v<J?v+7:v)-J;return h(m?N-rt:N+(6-rt),k);case w:case U:return D(tt+"Hours",0);case y:return D(tt+"Minutes",1);case M:return D(tt+"Seconds",2);case s:return D(tt+"Milliseconds",3);default:return this.clone()}},a.endOf=function(i){return this.startOf(i,!1)},a.$set=function(i,c){var u,m=x.p(i),p="set"+(this.$u?"UTC":""),h=(u={},u[w]=p+"Date",u[U]=p+"Date",u[j]=p+"Month",u[_]=p+"FullYear",u[y]=p+"Hours",u[M]=p+"Minutes",u[s]=p+"Seconds",u[r]=p+"Milliseconds",u)[m],D=m===w?this.$D+(c-this.$W):c;if(m===j||m===_){var v=this.clone().set(U,1);v.$d[h](D),v.init(),this.$d=v.set(U,Math.min(this.$D,v.daysInMonth())).$d}else h&&this.$d[h](D);return this.init(),this},a.set=function(i,c){return this.clone().$set(i,c)},a.get=function(i){return this[x.p(i)]()},a.add=function(i,c){var u,m=this;i=Number(i);var p=x.p(c),h=function(k){var N=O(m);return x.w(N.date(N.date()+Math.round(k*i)),m)};if(p===j)return this.set(j,this.$M+i);if(p===_)return this.set(_,this.$y+i);if(p===w)return h(1);if(p===b)return h(7);var D=(u={},u[M]=e,u[y]=n,u[s]=t,u)[p]||1,v=this.$d.getTime()+i*D;return x.w(v,this)},a.subtract=function(i,c){return this.add(-1*i,c)},a.format=function(i){var c=this,u=this.$locale();if(!this.isValid())return u.invalidDate||ut;var m=i||"YYYY-MM-DDTHH:mm:ssZ",p=x.z(this),h=this.$H,D=this.$m,v=this.$M,k=u.weekdays,N=u.months,tt=u.meridiem,J=function(Y,H,Q,et){return Y&&(Y[H]||Y(c,m))||Q[H].slice(0,et)},rt=function(Y){return x.s(h%12||12,Y,"0")},q=tt||function(Y,H,Q){var et=Y<12?"AM":"PM";return Q?et.toLowerCase():et};return m.replace($,function(Y,H){return H||function(Q){switch(Q){case"YY":return String(c.$y).slice(-2);case"YYYY":return x.s(c.$y,4,"0");case"M":return v+1;case"MM":return x.s(v+1,2,"0");case"MMM":return J(u.monthsShort,v,N,3);case"MMMM":return J(N,v);case"D":return c.$D;case"DD":return x.s(c.$D,2,"0");case"d":return String(c.$W);case"dd":return J(u.weekdaysMin,c.$W,k,2);case"ddd":return J(u.weekdaysShort,c.$W,k,3);case"dddd":return k[c.$W];case"H":return String(h);case"HH":return x.s(h,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return q(h,D,!0);case"A":return q(h,D,!1);case"m":return String(D);case"mm":return x.s(D,2,"0");case"s":return String(c.$s);case"ss":return x.s(c.$s,2,"0");case"SSS":return x.s(c.$ms,3,"0");case"Z":return p}return null}(Y)||p.replace(":","")})},a.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},a.diff=function(i,c,u){var m,p=this,h=x.p(c),D=O(i),v=(D.utcOffset()-this.utcOffset())*e,k=this-D,N=function(){return x.m(p,D)};switch(h){case _:m=N()/12;break;case j:m=N();break;case G:m=N()/3;break;case b:m=(k-v)/6048e5;break;case w:m=(k-v)/864e5;break;case y:m=k/n;break;case M:m=k/e;break;case s:m=k/t;break;default:m=k}return u?m:x.a(m)},a.daysInMonth=function(){return this.endOf(j).$D},a.$locale=function(){return L[this.$L]},a.locale=function(i,c){if(!i)return this.$L;var u=this.clone(),m=P(i,c,!0);return m&&(u.$L=m),u},a.clone=function(){return x.w(this.$d,this)},a.toDate=function(){return new Date(this.valueOf())},a.toJSON=function(){return this.isValid()?this.toISOString():null},a.toISOString=function(){return this.$d.toISOString()},a.toString=function(){return this.$d.toUTCString()},f}(),I=C.prototype;return O.prototype=I,[["$ms",r],["$s",s],["$m",M],["$H",y],["$W",w],["$M",j],["$y",_],["$D",U]].forEach(function(f){I[f[1]]=function(a){return this.$g(a,f[0],f[1])}}),O.extend=function(f,a){return f.$i||(f(a,C,O),f.$i=!0),O},O.locale=P,O.isDayjs=F,O.unix=function(f){return O(1e3*f)},O.en=L[E],O.Ls=L,O.p={},O})});var Kt=Yt((Dt,At)=>{"use strict";o();(function(t,e){typeof Dt=="object"&&typeof At<"u"?At.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Dt,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/,s=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,y={},w=function(g){return(g=+g)+(g>68?1900:2e3)},b=function(g){return function($){this[g]=+$}},j=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function($){if(!$||$==="Z")return 0;var A=$.match(/([+-]|\d\d)/g),S=60*A[1]+(+A[2]||0);return S===0?0:A[0]==="+"?-S:S}(g)}],G=function(g){var $=y[g];return $&&($.indexOf?$:$.s.concat($.f))},_=function(g,$){var A,S=y.meridiem;if(S){for(var W=1;W<=24;W+=1)if(g.indexOf(S(W,0,$))>-1){A=W>12;break}}else A=g===($?"pm":"PM");return A},U={A:[M,function(g){this.afternoon=_(g,!1)}],a:[M,function(g){this.afternoon=_(g,!0)}],Q:[n,function(g){this.month=3*(g-1)+1}],S:[n,function(g){this.milliseconds=100*+g}],SS:[r,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,b("seconds")],ss:[s,b("seconds")],m:[s,b("minutes")],mm:[s,b("minutes")],H:[s,b("hours")],h:[s,b("hours")],HH:[s,b("hours")],hh:[s,b("hours")],D:[s,b("day")],DD:[r,b("day")],Do:[M,function(g){var $=y.ordinal,A=g.match(/\d+/);if(this.day=A[0],$)for(var S=1;S<=31;S+=1)$(S).replace(/\[|\]/g,"")===g&&(this.day=S)}],w:[s,b("week")],ww:[r,b("week")],M:[s,b("month")],MM:[r,b("month")],MMM:[M,function(g){var $=G("months"),A=(G("monthsShort")||$.map(function(S){return S.slice(0,3)})).indexOf(g)+1;if(A<1)throw new Error;this.month=A%12||A}],MMMM:[M,function(g){var $=G("months").indexOf(g)+1;if($<1)throw new Error;this.month=$%12||$}],Y:[/[+-]?\d+/,b("year")],YY:[r,function(g){this.year=w(g)}],YYYY:[/\d{4}/,b("year")],Z:j,ZZ:j};function ut(g){var $,A;$=g,A=y&&y.formats;for(var S=(g=$.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,x,C){var I=C&&C.toUpperCase();return x||A[C]||t[C]||A[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,a,i){return a||i.slice(1)})})).match(e),W=S.length,E=0;E<W;E+=1){var L=S[E],X=U[L],F=X&&X[0],P=X&&X[1];S[E]=P?{regex:F,parser:P}:L.replace(/^\[|\]$/g,"")}return function(O){for(var x={},C=0,I=0;C<W;C+=1){var f=S[C];if(typeof f=="string")I+=f.length;else{var a=f.regex,i=f.parser,c=O.slice(I),u=a.exec(c)[0];i.call(x,u),O=O.replace(u,"")}}return function(m){var p=m.afternoon;if(p!==void 0){var h=m.hours;p?h<12&&(m.hours+=12):h===12&&(m.hours=0),delete m.afternoon}}(x),x}}return function(g,$,A){A.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(w=g.parseTwoDigitYear);var S=$.prototype,W=S.parse;S.parse=function(E){var L=E.date,X=E.utc,F=E.args;this.$u=X;var P=F[1];if(typeof P=="string"){var O=F[2]===!0,x=F[3]===!0,C=O||x,I=F[2];x&&(I=F[2]),y=this.$locale(),!O&&I&&(y=A.Ls[I]),this.$d=function(c,u,m,p){try{if(["x","X"].indexOf(u)>-1)return new Date((u==="X"?1e3:1)*c);var h=ut(u)(c),D=h.year,v=h.month,k=h.day,N=h.hours,tt=h.minutes,J=h.seconds,rt=h.milliseconds,q=h.zone,Y=h.week,H=new Date,Q=k||(D||v?1:H.getDate()),et=D||H.getFullYear(),ct=0;D&&!v||(ct=v>0?v-1:H.getMonth());var ft,ht=N||0,yt=tt||0,xt=J||0,bt=rt||0;return q?new Date(Date.UTC(et,ct,Q,ht,yt,xt,bt+60*q.offset*1e3)):m?new Date(Date.UTC(et,ct,Q,ht,yt,xt,bt)):(ft=new Date(et,ct,Q,ht,yt,xt,bt),Y&&(ft=p(ft).week(Y).toDate()),ft)}catch{return new Date("")}}(L,P,X,A),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),C&&L!=this.format(P)&&(this.$d=new Date("")),y={}}else if(P instanceof Array)for(var f=P.length,a=1;a<=f;a+=1){F[1]=P[a-1];var i=A.apply(this,F);if(i.isValid()){this.$d=i.$d,this.$L=i.$L,this.init();break}a===f&&(this.$d=new Date(""))}else W.call(this,E)}}})});o();o();o();o();o();function Se(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}o();function mt(t){return t!==null&&typeof t=="object"}o();o();var ne=Object.prototype.toString,ot=t=>ne.call(t),Mt=t=>ot(t).slice(8,-1),Rt=t=>typeof t=="string",z=t=>typeof t=="number"&&Number.isFinite(t),je=t=>typeof t=="boolean",Ye=t=>t===null,Re=t=>t===void 0,Et=t=>typeof t=="symbol",K=Array.isArray,pt=t=>typeof t=="function",Ct=t=>ot(t)==="[object Map]",Pt=t=>ot(t)==="[object Set]",It=t=>ot(t)==="[object Date]",Nt=t=>ot(t)==="[object RegExp]",_t=t=>mt(t)&&pt(t?.then)&&pt(t?.catch),st=t=>t==null,Ee=t=>t!=null,Ce=(t,e)=>t!==e;function nt(t){return ot(t)==="[object Object]"}function it(t){return K(t)?t:[t]}o();o();o();o();o();function Je(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 Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Qe(t){let e="",n="";for(let s=0;s<t.length;s++)n+=t[s].charCodeAt(0).toString(2).padStart(8,"0");for(let s=0;s<n.length;s+=6)e+=Lt[Number.parseInt(n.slice(s,s+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function tn(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Lt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let s=Number.parseInt(n.slice(r,r+8),2);s&&(e+=String.fromCharCode(s))}return e}o();function rn(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function on(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}o();function un(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}o();function at(t){let e=new WeakMap;function n(r){if(!mt(r))return r;if(It(r))return new Date(r);if(Nt(r))return new RegExp(r);if(_t(r))return r;if(e.has(r))return e.get(r);if(Ct(r)){let y=new Map;return e.set(r,y),r.forEach((w,b)=>y.set(n(b),n(w))),y}if(Pt(r)){let y=new Set;return e.set(r,y),r.forEach(w=>y.add(n(w))),y}let s=K(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,s);let M=Object.getOwnPropertyDescriptors(r);for(let y of Reflect.ownKeys(M)){let w=M[y];w.get||w.set?Object.defineProperty(s,y,w):Object.defineProperty(s,y,{...w,value:n(w.value)})}return s}return n(t)}o();function Ut(t,e,n={}){return Ht(Ft(t,n),Ft(e,n),n)}function Ht(t,e,n){return K(t)?oe(t,e,n):re(t,e,n)}function re(t,e,n){if(!nt(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(s=>{(nt(t[s])||K(t[s]))&&(nt(e[s])||K(e[s]))?t[s]=Ht(t[s],e[s],n):Object.defineProperty(t,s,r[s])}),t}function oe(t,e,n){let{mergeStrategy:r="replace"}=n;if(K(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Ft(t,e){let{deepClone:n=!0}=e;return n?at(t):t}o();var dt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function T(t,e){throw new dt(`[${t}] ${e}`)}function Zt(t,e){let n=Rt(t)?new dt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function bn(...t){console.warn(...t)}function $n(...t){console.error(...t)}var Mn=({from:t,replacement:e,version:n,type:r="API"})=>{Zt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function wn(t,e,n,r){let s=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Mt(r)} with value ${r}.`;T(t,s)}function On(t,e,n,r){let s=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Mt(r)} with value ${r}.`;Zt(t,s)}o();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)};typeof globalThis<"u"&&(globalThis.log=gt);o();function ie(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let s=t.split("&").filter(Boolean);for(let M of s){let[y,w]=M.split("=");r[y]=n?decodeURIComponent(w):w}return r}function Wt(t,e){let{encode:n=!0}=e||{},r=[];for(let s in t){let M=t[s];r.push(`${s}=${n?encodeURIComponent(M):M}`)}return r.join("&")}function se(t,e,n){let r=Ut({encode:!0},{...n}),s=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${s}`:`${t}&${s}`:`${t}?${s}`}var Tn={parse:ie,stringify:Wt,appendQueryString:se};o();function Rn(t,e=500){let n=null;return function(...r){if(st(n))return n=Date.now(),t.apply(this,r);let s=Date.now();if(s-n>=e)return n=s,t.apply(this,r)}}o();function In(t){return!st(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Nn(t){return!st(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function _n(t){return!st(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Ln(t){return/^[\dA-Z_]+$/.test(t)}function zt(t,e,n={}){let{includeProto:r=!1,includeSymbols:s=!0,includeNonEnum:M=!1}=n,y={};return nt(t)&&it(e).forEach(b=>{Et(b)&&!s||!(r?b in t:Object.hasOwn(t,b))||!M&&(r?ae(t,b):Object.getOwnPropertyDescriptor(t,b))?.enumerable===!1||(y[b]=at(t[b]))}),y}function ae(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function cr(t,e){if(!nt(t))return{};let n=at(t),r=it(e),s=Object.keys(n).filter(M=>!r.includes(M));return zt(n,s)}o();o();function xr(t,e){return(!z(t)||t<=0)&&T("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),pt(e)||T("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}o();function Mr(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}o();var B=$t(St(),1),Vt=$t(Kt(),1);o();o();function Z(t){return t[Math.floor(Math.random()*t.length)]}function R(t={}){z(t)&&(t={max:t});let{min:e=1,max:n=Z(ce())}=t;ue(e,n);let r=Math.ceil(e),s=Math.floor(n);return Math.floor(Math.random()*(s-r+1)+r)}function ue(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||T("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||T("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&T("getRandomInt",`No integer value found between ${t} and ${e}`),T("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)})}B.default.extend(Vt.default);function vt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,B.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,B.default)(e).isValid()||!(0,B.default)(n).isValid())&&T("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let s=(0,B.default)(e).year(),M=(0,B.default)(n).year(),y=R({min:s,max:M}),w=R({min:1,max:12}),b=R({min:1,max:31}),j=R(23),G=R(59),_=R(59),U=(0,B.default)(`${y}-${w}-${b} ${j}:${G}:${_}`);return U.isBefore((0,B.default)(e))||U.isAfter((0,B.default)(n))?vt(t):U.format(r)}o();o();function V(t={}){let e=me(t),n=pe(e);de(n);let{length:r}=e;le(r.min,r.max);let s=R(r),M=e.prefix||"";for(let y=0;y<s;y++)M+=n.charAt(Math.floor(Math.random()*n.length));return M+(e.suffix||"")}var fe=16,Tt=1;function me(t){let e=z(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:z(t.length)?{max:t.length,min:t.length}:{max:fe,min:Tt,...t.length},extra:e?[]:[...new Set(it(t.extra||[]))]}}function pe(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=it(t.extra).join(""),e}function de(t){t.length===0&&T("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function le(t,e){Number.isInteger(t)||T("getRandomString","min must be an integer"),Number.isInteger(e)||T("getRandomString","max must be an integer"),t<Tt&&T("getRandomString",`Minimum length cannot be less than ${Tt}`),e<t&&T("getRandomString","Maximum length cannot be less than minimum length")}function ge(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${V(1)}${V({length:R({max:30,min:1})})}${V(1)}@${Z(t)}`;return/\.{2,}/.test(e)?ge():e}o();function qr(t={}){z(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}o();o();function kt(t,e){(!z(t)||t<=0)&&T("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!K(e)||e.length===0)&&T("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=Z(e);return n}function so(){let t=R({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,vt({format:"YYYYMMDD"}),kt(3,e),kt(1,[...e,"X","x"])].join("")}o();function mo(){return Z(["13","14","15","16","17","18","19"])+R(999999999).toString().padEnd(9,"0")}o();function xo(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${V({length:{min:4,max:8}})}`,`?id=${R()}`,`?page=${V({length:{min:2,max:4}})}`,`?query=${V({length:{min:5,max:6}})}`,`?search=${V({length:{min:1,max:4}})}`,`?token=${V({length:{min:16,max:16}})}`];return`${Z(t)}${V({length:{min:5,max:25}})}${Z(e)}${Z(n)}`}o();o();o();o();function _o(t){return/^\d+$/.test(t)}function Lo(t){return/^[A-Z]+$/i.test(t)}function Fo(t){return/^[A-Z]+$/.test(t)}function Uo(t){return/^[\dA-Z]+$/.test(t)}function Ho(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Zo(t){return/^[a-z]+$/.test(t)}function Wo(t){return/^[\da-z]+$/.test(t)}function zo(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Ko(t){return/^[\u4E00-\u9FA5]+$/.test(t)}o();function qo(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function Bo(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function Go(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function Jo(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function Qo(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}o();function ni(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ri(t){return/^[1-9]\d*$/.test(t)}function oi(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function ii(t){return/^-[1-9]\d*$/.test(t)}function si(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}o();var Xt=$t(St(),1);function ci(t){return/^1[3-9]\d{9}$/.test(t)}function fi(t){return/^https?:\/\/\S+$/i.test(t)}function mi(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function pi(t){return t===""}function he(t,e="YYYY-MM-DD HH:mm:ss"){return(0,Xt.default)(t,e,!0).isValid()}function di(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)&&he(t.slice(6,14),"YYYYMMDD")}export{tn as base64Decode,Qe as base64Encode,it as castArray,rn as compose,on as composeRight,un as debounce,Zt as debugWarn,On as debugWarnInvalidTypeMessage,Je as decimalToBinary,at as deepClone,Ut as deepMerge,Mn as deprecated,$n as error,xr as generateRandomArray,Mr as generateRandomColor,vt as generateRandomDate,ge as generateRandomEmail,qr as generateRandomFloat,so as generateRandomIdCard,mo as generateRandomMobilePhone,kt as generateRandomStringFromSource,R as getRandomInt,Z as getRandomItem,V as getRandomString,xo as getRandomUrl,Ce as hasChanged,K as isArray,je as isBoolean,Ko as isChineseString,It as isDate,he as isDateString,Ee as isDef,mi as isEmail,pi as isEmptyString,Lo as isEnglishAphabet,qo as isFloat,pt as isFunction,di as isIdCard,ni as isInteger,Zo as isLowerCase,Wo as isLowerCaseAndNumber,zo as isLowerCaseAndNumberAndChinese,Ct as isMap,ci as isMobilePhone,Jo as isNegativeFloat,ii as isNegativeInteger,Go as isNonNegativeFloat,oi as isNonNegativeInteger,Qo as isNonPositiveFloat,si as isNonPositiveInteger,Ye as isNull,z as isNumber,_o as isNumberOrNumberString,Se as isObject,mt as isObjectLike,nt as isPlainObject,Bo as isPositiveFloat,ri as isPositiveInteger,_t as isPromise,Nt as isRegExp,Pt as isSet,Rt as isString,Et as isSymbol,st as isUndef,Re as isUndefined,Fo as isUpperCase,Uo as isUpperCaseAndNumber,Ho as isUpperCaseAndNumberAndChinese,fi as isUrl,ne as objectToString,cr as omit,zt as pick,Tn as qs,Rn as throttle,T as throwError,wn as throwErrorInvalidTypeMessage,ot as toTypeString,Mt as toTypeValue,Nn as validatorChineseOrEnglish,In as validatorChineseOrEnglishOrNumber,_n as validatorUppercaseOrNumbersOrSpecial,Ln as validatorUppercaseOrNumbersOrUnderline,bn as warn};
|
|
1
|
+
var qt=Object.create;var jt=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Jt=Object.getPrototypeOf,Qt=Object.prototype.hasOwnProperty;var te=(t,e)=>()=>(t&&(e=t(t=0)),e);var Yt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ee=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gt(e))!Qt.call(t,s)&&s!==n&&jt(t,s,{get:()=>e[s],enumerable:!(r=Bt(e,s))||r.enumerable});return t};var $t=(t,e,n)=>(n=t!=null?qt(Jt(t)):{},ee(e||!t||!t.__esModule?jt(n,"default",{value:t,enumerable:!0}):n,t));import $e from"path";import{fileURLToPath as we}from"url";var o=te(()=>{"use strict"});var St=Yt((wt,Ot)=>{"use strict";o();(function(t,e){typeof wt=="object"&&typeof Ot<"u"?Ot.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(wt,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",s="second",M="minute",y="hour",w="day",b="week",j="month",G="quarter",_="year",U="date",ut="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|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,A={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(f){var a=["th","st","nd","rd"],i=f%100;return"["+f+(a[(i-20)%10]||a[i]||a[0])+"]"}},S=function(f,a,i){var c=String(f);return!c||c.length>=a?f:""+Array(a+1-c.length).join(i)+f},W={s:S,z:function(f){var a=-f.utcOffset(),i=Math.abs(a),c=Math.floor(i/60),u=i%60;return(a<=0?"+":"-")+S(c,2,"0")+":"+S(u,2,"0")},m:function f(a,i){if(a.date()<i.date())return-f(i,a);var c=12*(i.year()-a.year())+(i.month()-a.month()),u=a.clone().add(c,j),m=i-u<0,p=a.clone().add(c+(m?-1:1),j);return+(-(c+(i-u)/(m?u-p:p-u))||0)},a:function(f){return f<0?Math.ceil(f)||0:Math.floor(f)},p:function(f){return{M:j,y:_,w:b,d:w,D:U,h:y,m:M,s,ms:r,Q:G}[f]||String(f||"").toLowerCase().replace(/s$/,"")},u:function(f){return f===void 0}},E="en",L={};L[E]=A;var X="$isDayjsObject",F=function(f){return f instanceof C||!(!f||!f[X])},P=function f(a,i,c){var u;if(!a)return E;if(typeof a=="string"){var m=a.toLowerCase();L[m]&&(u=m),i&&(L[m]=i,u=m);var p=a.split("-");if(!u&&p.length>1)return f(p[0])}else{var h=a.name;L[h]=a,u=h}return!c&&u&&(E=u),u||!c&&E},O=function(f,a){if(F(f))return f.clone();var i=typeof a=="object"?a:{};return i.date=f,i.args=arguments,new C(i)},x=W;x.l=P,x.i=F,x.w=function(f,a){return O(f,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var C=function(){function f(i){this.$L=P(i.locale,null,!0),this.parse(i),this.$x=this.$x||i.x||{},this[X]=!0}var a=f.prototype;return a.parse=function(i){this.$d=function(c){var u=c.date,m=c.utc;if(u===null)return new Date(NaN);if(x.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var p=u.match(g);if(p){var h=p[2]-1||0,D=(p[7]||"0").substring(0,3);return m?new Date(Date.UTC(p[1],h,p[3]||1,p[4]||0,p[5]||0,p[6]||0,D)):new Date(p[1],h,p[3]||1,p[4]||0,p[5]||0,p[6]||0,D)}}return new Date(u)}(i),this.init()},a.init=function(){var i=this.$d;this.$y=i.getFullYear(),this.$M=i.getMonth(),this.$D=i.getDate(),this.$W=i.getDay(),this.$H=i.getHours(),this.$m=i.getMinutes(),this.$s=i.getSeconds(),this.$ms=i.getMilliseconds()},a.$utils=function(){return x},a.isValid=function(){return this.$d.toString()!==ut},a.isSame=function(i,c){var u=O(i);return this.startOf(c)<=u&&u<=this.endOf(c)},a.isAfter=function(i,c){return O(i)<this.startOf(c)},a.isBefore=function(i,c){return this.endOf(c)<O(i)},a.$g=function(i,c,u){return x.u(i)?this[c]:this.set(u,i)},a.unix=function(){return Math.floor(this.valueOf()/1e3)},a.valueOf=function(){return this.$d.getTime()},a.startOf=function(i,c){var u=this,m=!!x.u(c)||c,p=x.p(i),h=function(q,Y){var H=x.w(u.$u?Date.UTC(u.$y,Y,q):new Date(u.$y,Y,q),u);return m?H:H.endOf(w)},D=function(q,Y){return x.w(u.toDate()[q].apply(u.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(Y)),u)},v=this.$W,k=this.$M,N=this.$D,tt="set"+(this.$u?"UTC":"");switch(p){case _:return m?h(1,0):h(31,11);case j:return m?h(1,k):h(0,k+1);case b:var J=this.$locale().weekStart||0,rt=(v<J?v+7:v)-J;return h(m?N-rt:N+(6-rt),k);case w:case U:return D(tt+"Hours",0);case y:return D(tt+"Minutes",1);case M:return D(tt+"Seconds",2);case s:return D(tt+"Milliseconds",3);default:return this.clone()}},a.endOf=function(i){return this.startOf(i,!1)},a.$set=function(i,c){var u,m=x.p(i),p="set"+(this.$u?"UTC":""),h=(u={},u[w]=p+"Date",u[U]=p+"Date",u[j]=p+"Month",u[_]=p+"FullYear",u[y]=p+"Hours",u[M]=p+"Minutes",u[s]=p+"Seconds",u[r]=p+"Milliseconds",u)[m],D=m===w?this.$D+(c-this.$W):c;if(m===j||m===_){var v=this.clone().set(U,1);v.$d[h](D),v.init(),this.$d=v.set(U,Math.min(this.$D,v.daysInMonth())).$d}else h&&this.$d[h](D);return this.init(),this},a.set=function(i,c){return this.clone().$set(i,c)},a.get=function(i){return this[x.p(i)]()},a.add=function(i,c){var u,m=this;i=Number(i);var p=x.p(c),h=function(k){var N=O(m);return x.w(N.date(N.date()+Math.round(k*i)),m)};if(p===j)return this.set(j,this.$M+i);if(p===_)return this.set(_,this.$y+i);if(p===w)return h(1);if(p===b)return h(7);var D=(u={},u[M]=e,u[y]=n,u[s]=t,u)[p]||1,v=this.$d.getTime()+i*D;return x.w(v,this)},a.subtract=function(i,c){return this.add(-1*i,c)},a.format=function(i){var c=this,u=this.$locale();if(!this.isValid())return u.invalidDate||ut;var m=i||"YYYY-MM-DDTHH:mm:ssZ",p=x.z(this),h=this.$H,D=this.$m,v=this.$M,k=u.weekdays,N=u.months,tt=u.meridiem,J=function(Y,H,Q,et){return Y&&(Y[H]||Y(c,m))||Q[H].slice(0,et)},rt=function(Y){return x.s(h%12||12,Y,"0")},q=tt||function(Y,H,Q){var et=Y<12?"AM":"PM";return Q?et.toLowerCase():et};return m.replace($,function(Y,H){return H||function(Q){switch(Q){case"YY":return String(c.$y).slice(-2);case"YYYY":return x.s(c.$y,4,"0");case"M":return v+1;case"MM":return x.s(v+1,2,"0");case"MMM":return J(u.monthsShort,v,N,3);case"MMMM":return J(N,v);case"D":return c.$D;case"DD":return x.s(c.$D,2,"0");case"d":return String(c.$W);case"dd":return J(u.weekdaysMin,c.$W,k,2);case"ddd":return J(u.weekdaysShort,c.$W,k,3);case"dddd":return k[c.$W];case"H":return String(h);case"HH":return x.s(h,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return q(h,D,!0);case"A":return q(h,D,!1);case"m":return String(D);case"mm":return x.s(D,2,"0");case"s":return String(c.$s);case"ss":return x.s(c.$s,2,"0");case"SSS":return x.s(c.$ms,3,"0");case"Z":return p}return null}(Y)||p.replace(":","")})},a.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},a.diff=function(i,c,u){var m,p=this,h=x.p(c),D=O(i),v=(D.utcOffset()-this.utcOffset())*e,k=this-D,N=function(){return x.m(p,D)};switch(h){case _:m=N()/12;break;case j:m=N();break;case G:m=N()/3;break;case b:m=(k-v)/6048e5;break;case w:m=(k-v)/864e5;break;case y:m=k/n;break;case M:m=k/e;break;case s:m=k/t;break;default:m=k}return u?m:x.a(m)},a.daysInMonth=function(){return this.endOf(j).$D},a.$locale=function(){return L[this.$L]},a.locale=function(i,c){if(!i)return this.$L;var u=this.clone(),m=P(i,c,!0);return m&&(u.$L=m),u},a.clone=function(){return x.w(this.$d,this)},a.toDate=function(){return new Date(this.valueOf())},a.toJSON=function(){return this.isValid()?this.toISOString():null},a.toISOString=function(){return this.$d.toISOString()},a.toString=function(){return this.$d.toUTCString()},f}(),I=C.prototype;return O.prototype=I,[["$ms",r],["$s",s],["$m",M],["$H",y],["$W",w],["$M",j],["$y",_],["$D",U]].forEach(function(f){I[f[1]]=function(a){return this.$g(a,f[0],f[1])}}),O.extend=function(f,a){return f.$i||(f(a,C,O),f.$i=!0),O},O.locale=P,O.isDayjs=F,O.unix=function(f){return O(1e3*f)},O.en=L[E],O.Ls=L,O.p={},O})});var Kt=Yt((Dt,At)=>{"use strict";o();(function(t,e){typeof Dt=="object"&&typeof At<"u"?At.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Dt,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/,s=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,y={},w=function(g){return(g=+g)+(g>68?1900:2e3)},b=function(g){return function($){this[g]=+$}},j=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function($){if(!$||$==="Z")return 0;var A=$.match(/([+-]|\d\d)/g),S=60*A[1]+(+A[2]||0);return S===0?0:A[0]==="+"?-S:S}(g)}],G=function(g){var $=y[g];return $&&($.indexOf?$:$.s.concat($.f))},_=function(g,$){var A,S=y.meridiem;if(S){for(var W=1;W<=24;W+=1)if(g.indexOf(S(W,0,$))>-1){A=W>12;break}}else A=g===($?"pm":"PM");return A},U={A:[M,function(g){this.afternoon=_(g,!1)}],a:[M,function(g){this.afternoon=_(g,!0)}],Q:[n,function(g){this.month=3*(g-1)+1}],S:[n,function(g){this.milliseconds=100*+g}],SS:[r,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,b("seconds")],ss:[s,b("seconds")],m:[s,b("minutes")],mm:[s,b("minutes")],H:[s,b("hours")],h:[s,b("hours")],HH:[s,b("hours")],hh:[s,b("hours")],D:[s,b("day")],DD:[r,b("day")],Do:[M,function(g){var $=y.ordinal,A=g.match(/\d+/);if(this.day=A[0],$)for(var S=1;S<=31;S+=1)$(S).replace(/\[|\]/g,"")===g&&(this.day=S)}],w:[s,b("week")],ww:[r,b("week")],M:[s,b("month")],MM:[r,b("month")],MMM:[M,function(g){var $=G("months"),A=(G("monthsShort")||$.map(function(S){return S.slice(0,3)})).indexOf(g)+1;if(A<1)throw new Error;this.month=A%12||A}],MMMM:[M,function(g){var $=G("months").indexOf(g)+1;if($<1)throw new Error;this.month=$%12||$}],Y:[/[+-]?\d+/,b("year")],YY:[r,function(g){this.year=w(g)}],YYYY:[/\d{4}/,b("year")],Z:j,ZZ:j};function ut(g){var $,A;$=g,A=y&&y.formats;for(var S=(g=$.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,x,C){var I=C&&C.toUpperCase();return x||A[C]||t[C]||A[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,a,i){return a||i.slice(1)})})).match(e),W=S.length,E=0;E<W;E+=1){var L=S[E],X=U[L],F=X&&X[0],P=X&&X[1];S[E]=P?{regex:F,parser:P}:L.replace(/^\[|\]$/g,"")}return function(O){for(var x={},C=0,I=0;C<W;C+=1){var f=S[C];if(typeof f=="string")I+=f.length;else{var a=f.regex,i=f.parser,c=O.slice(I),u=a.exec(c)[0];i.call(x,u),O=O.replace(u,"")}}return function(m){var p=m.afternoon;if(p!==void 0){var h=m.hours;p?h<12&&(m.hours+=12):h===12&&(m.hours=0),delete m.afternoon}}(x),x}}return function(g,$,A){A.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(w=g.parseTwoDigitYear);var S=$.prototype,W=S.parse;S.parse=function(E){var L=E.date,X=E.utc,F=E.args;this.$u=X;var P=F[1];if(typeof P=="string"){var O=F[2]===!0,x=F[3]===!0,C=O||x,I=F[2];x&&(I=F[2]),y=this.$locale(),!O&&I&&(y=A.Ls[I]),this.$d=function(c,u,m,p){try{if(["x","X"].indexOf(u)>-1)return new Date((u==="X"?1e3:1)*c);var h=ut(u)(c),D=h.year,v=h.month,k=h.day,N=h.hours,tt=h.minutes,J=h.seconds,rt=h.milliseconds,q=h.zone,Y=h.week,H=new Date,Q=k||(D||v?1:H.getDate()),et=D||H.getFullYear(),ct=0;D&&!v||(ct=v>0?v-1:H.getMonth());var ft,ht=N||0,yt=tt||0,xt=J||0,bt=rt||0;return q?new Date(Date.UTC(et,ct,Q,ht,yt,xt,bt+60*q.offset*1e3)):m?new Date(Date.UTC(et,ct,Q,ht,yt,xt,bt)):(ft=new Date(et,ct,Q,ht,yt,xt,bt),Y&&(ft=p(ft).week(Y).toDate()),ft)}catch{return new Date("")}}(L,P,X,A),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),C&&L!=this.format(P)&&(this.$d=new Date("")),y={}}else if(P instanceof Array)for(var f=P.length,a=1;a<=f;a+=1){F[1]=P[a-1];var i=A.apply(this,F);if(i.isValid()){this.$d=i.$d,this.$L=i.$L,this.init();break}a===f&&(this.$d=new Date(""))}else W.call(this,E)}}})});o();o();o();o();o();function Se(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}o();function mt(t){return t!==null&&typeof t=="object"}o();o();var ne=Object.prototype.toString,ot=t=>ne.call(t),Mt=t=>ot(t).slice(8,-1),Rt=t=>typeof t=="string",z=t=>typeof t=="number"&&Number.isFinite(t),je=t=>typeof t=="boolean",Ye=t=>t===null,Re=t=>t===void 0,Et=t=>typeof t=="symbol",K=Array.isArray,pt=t=>typeof t=="function",Ct=t=>ot(t)==="[object Map]",Pt=t=>ot(t)==="[object Set]",It=t=>ot(t)==="[object Date]",Nt=t=>ot(t)==="[object RegExp]",_t=t=>mt(t)&&pt(t?.then)&&pt(t?.catch),st=t=>t==null,Ee=t=>t!=null,Ce=(t,e)=>t!==e;function nt(t){return ot(t)==="[object Object]"}function it(t){return K(t)?t:[t]}o();o();o();o();o();function Je(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 Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Qe(t){let e="",n="";for(let s=0;s<t.length;s++)n+=t[s].charCodeAt(0).toString(2).padStart(8,"0");for(let s=0;s<n.length;s+=6)e+=Lt[Number.parseInt(n.slice(s,s+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function tn(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Lt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let s=Number.parseInt(n.slice(r,r+8),2);s&&(e+=String.fromCharCode(s))}return e}o();function rn(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function on(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}o();function un(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}o();function at(t){let e=new WeakMap;function n(r){if(!mt(r))return r;if(It(r))return new Date(r);if(Nt(r))return new RegExp(r);if(_t(r))return r;if(e.has(r))return e.get(r);if(Ct(r)){let y=new Map;return e.set(r,y),r.forEach((w,b)=>y.set(n(b),n(w))),y}if(Pt(r)){let y=new Set;return e.set(r,y),r.forEach(w=>y.add(n(w))),y}let s=K(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,s);let M=Object.getOwnPropertyDescriptors(r);for(let y of Reflect.ownKeys(M)){let w=M[y];w.get||w.set?Object.defineProperty(s,y,w):Object.defineProperty(s,y,{...w,value:n(w.value)})}return s}return n(t)}o();function Ut(t,e,n={}){return Ht(Ft(t,n),Ft(e,n),n)}function Ht(t,e,n){return K(t)?oe(t,e,n):re(t,e,n)}function re(t,e,n){if(!nt(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(s=>{(nt(t[s])||K(t[s]))&&(nt(e[s])||K(e[s]))?t[s]=Ht(t[s],e[s],n):Object.defineProperty(t,s,r[s])}),t}function oe(t,e,n){let{mergeStrategy:r="replace"}=n;if(K(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Ft(t,e){let{deepClone:n=!0}=e;return n?at(t):t}o();var dt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function T(t,e){throw new dt(`[${t}] ${e}`)}function Zt(t,e){let n=Rt(t)?new dt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}var bn=({from:t,replacement:e,version:n,type:r="API"})=>{Zt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function $n(t,e,n,r){let s=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Mt(r)} with value ${r}.`;T(t,s)}function Mn(t,e,n,r){let s=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Mt(r)} with value ${r}.`;Zt(t,s)}o();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)};typeof globalThis<"u"&&(globalThis.log=gt);o();function ie(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let s=t.split("&").filter(Boolean);for(let M of s){let[y,w]=M.split("=");r[y]=n?decodeURIComponent(w):w}return r}function Wt(t,e){let{encode:n=!0}=e||{},r=[];for(let s in t){let M=t[s];r.push(`${s}=${n?encodeURIComponent(M):M}`)}return r.join("&")}function se(t,e,n){let r=Ut({encode:!0},{...n}),s=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${s}`:`${t}&${s}`:`${t}?${s}`}var An={parse:ie,stringify:Wt,appendQueryString:se};o();function jn(t,e=500){let n=null;return function(...r){if(st(n))return n=Date.now(),t.apply(this,r);let s=Date.now();if(s-n>=e)return n=s,t.apply(this,r)}}o();function Cn(t){return!st(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Pn(t){return!st(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function In(t){return!st(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Nn(t){return/^[\dA-Z_]+$/.test(t)}function zt(t,e,n={}){let{includeProto:r=!1,includeSymbols:s=!0,includeNonEnum:M=!1}=n,y={};return nt(t)&&it(e).forEach(b=>{Et(b)&&!s||!(r?b in t:Object.hasOwn(t,b))||!M&&(r?ae(t,b):Object.getOwnPropertyDescriptor(t,b))?.enumerable===!1||(y[b]=at(t[b]))}),y}function ae(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function ar(t,e){if(!nt(t))return{};let n=at(t),r=it(e),s=Object.keys(n).filter(M=>!r.includes(M));return zt(n,s)}o();o();function hr(t,e){return(!z(t)||t<=0)&&T("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),pt(e)||T("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}o();function br(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}o();var B=$t(St(),1),Vt=$t(Kt(),1);o();o();function Z(t){return t[Math.floor(Math.random()*t.length)]}function R(t={}){z(t)&&(t={max:t});let{min:e=1,max:n=Z(ce())}=t;ue(e,n);let r=Math.ceil(e),s=Math.floor(n);return Math.floor(Math.random()*(s-r+1)+r)}function ue(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||T("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||T("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&T("getRandomInt",`No integer value found between ${t} and ${e}`),T("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)})}B.default.extend(Vt.default);function vt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,B.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,B.default)(e).isValid()||!(0,B.default)(n).isValid())&&T("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let s=(0,B.default)(e).year(),M=(0,B.default)(n).year(),y=R({min:s,max:M}),w=R({min:1,max:12}),b=R({min:1,max:31}),j=R(23),G=R(59),_=R(59),U=(0,B.default)(`${y}-${w}-${b} ${j}:${G}:${_}`);return U.isBefore((0,B.default)(e))||U.isAfter((0,B.default)(n))?vt(t):U.format(r)}o();o();function V(t={}){let e=me(t),n=pe(e);de(n);let{length:r}=e;le(r.min,r.max);let s=R(r),M=e.prefix||"";for(let y=0;y<s;y++)M+=n.charAt(Math.floor(Math.random()*n.length));return M+(e.suffix||"")}var fe=16,Tt=1;function me(t){let e=z(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:z(t.length)?{max:t.length,min:t.length}:{max:fe,min:Tt,...t.length},extra:e?[]:[...new Set(it(t.extra||[]))]}}function pe(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=it(t.extra).join(""),e}function de(t){t.length===0&&T("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function le(t,e){Number.isInteger(t)||T("getRandomString","min must be an integer"),Number.isInteger(e)||T("getRandomString","max must be an integer"),t<Tt&&T("getRandomString",`Minimum length cannot be less than ${Tt}`),e<t&&T("getRandomString","Maximum length cannot be less than minimum length")}function ge(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${V(1)}${V({length:R({max:30,min:1})})}${V(1)}@${Z(t)}`;return/\.{2,}/.test(e)?ge():e}o();function Vr(t={}){z(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}o();o();function kt(t,e){(!z(t)||t<=0)&&T("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!K(e)||e.length===0)&&T("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=Z(e);return n}function oo(){let t=R({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,vt({format:"YYYYMMDD"}),kt(3,e),kt(1,[...e,"X","x"])].join("")}o();function co(){return Z(["13","14","15","16","17","18","19"])+R(999999999).toString().padEnd(9,"0")}o();function ho(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${V({length:{min:4,max:8}})}`,`?id=${R()}`,`?page=${V({length:{min:2,max:4}})}`,`?query=${V({length:{min:5,max:6}})}`,`?search=${V({length:{min:1,max:4}})}`,`?token=${V({length:{min:16,max:16}})}`];return`${Z(t)}${V({length:{min:5,max:25}})}${Z(e)}${Z(n)}`}o();o();o();o();function Io(t){return/^\d+$/.test(t)}function No(t){return/^[A-Z]+$/i.test(t)}function _o(t){return/^[A-Z]+$/.test(t)}function Lo(t){return/^[\dA-Z]+$/.test(t)}function Fo(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Uo(t){return/^[a-z]+$/.test(t)}function Ho(t){return/^[\da-z]+$/.test(t)}function Zo(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Wo(t){return/^[\u4E00-\u9FA5]+$/.test(t)}o();function Vo(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function Xo(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function qo(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function Bo(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function Go(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}o();function ti(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ei(t){return/^[1-9]\d*$/.test(t)}function ni(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function ri(t){return/^-[1-9]\d*$/.test(t)}function oi(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}o();var Xt=$t(St(),1);function ai(t){return/^1[3-9]\d{9}$/.test(t)}function ui(t){return/^https?:\/\/\S+$/i.test(t)}function ci(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function fi(t){return t===""}function he(t,e="YYYY-MM-DD HH:mm:ss"){return(0,Xt.default)(t,e,!0).isValid()}function mi(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)&&he(t.slice(6,14),"YYYYMMDD")}export{tn as base64Decode,Qe as base64Encode,it as castArray,rn as compose,on as composeRight,un as debounce,Zt as debugWarn,Mn as debugWarnInvalidTypeMessage,Je as decimalToBinary,at as deepClone,Ut as deepMerge,bn as deprecated,hr as generateRandomArray,br as generateRandomColor,vt as generateRandomDate,ge as generateRandomEmail,Vr as generateRandomFloat,oo as generateRandomIdCard,co as generateRandomMobilePhone,kt as generateRandomStringFromSource,R as getRandomInt,Z as getRandomItem,V as getRandomString,ho as getRandomUrl,Ce as hasChanged,K as isArray,je as isBoolean,Wo as isChineseString,It as isDate,he as isDateString,Ee as isDef,ci as isEmail,fi as isEmptyString,No as isEnglishAphabet,Vo as isFloat,pt as isFunction,mi as isIdCard,ti as isInteger,Uo as isLowerCase,Ho as isLowerCaseAndNumber,Zo as isLowerCaseAndNumberAndChinese,Ct as isMap,ai as isMobilePhone,Bo as isNegativeFloat,ri as isNegativeInteger,qo as isNonNegativeFloat,ni as isNonNegativeInteger,Go as isNonPositiveFloat,oi as isNonPositiveInteger,Ye as isNull,z as isNumber,Io as isNumberOrNumberString,Se as isObject,mt as isObjectLike,nt as isPlainObject,Xo as isPositiveFloat,ei as isPositiveInteger,_t as isPromise,Nt as isRegExp,Pt as isSet,Rt as isString,Et as isSymbol,ui as isURL,st as isUndef,Re as isUndefined,_o as isUpperCase,Lo as isUpperCaseAndNumber,Fo as isUpperCaseAndNumberAndChinese,ne as objectToString,ar as omit,zt as pick,An as qs,jn as throttle,T as throwError,$n as throwErrorInvalidTypeMessage,ot as toTypeString,Mt as toTypeValue,Pn as validatorChineseOrEnglish,Cn as validatorChineseOrEnglishOrNumber,In as validatorUppercaseOrNumbersOrSpecial,Nn as validatorUppercaseOrNumbersOrUnderline};
|
|
@@ -499,8 +499,6 @@ interface DeepMergeOptions {
|
|
|
499
499
|
declare function throwError(scope: string, message: string): void;
|
|
500
500
|
declare function debugWarn(err: Error): void;
|
|
501
501
|
declare function debugWarn(scope: string, message: string): void;
|
|
502
|
-
declare function warn(...args: any[]): void;
|
|
503
|
-
declare function error(...args: any[]): void;
|
|
504
502
|
declare const deprecated: ({ from, replacement, version, type, }: {
|
|
505
503
|
from: string;
|
|
506
504
|
replacement: string;
|
|
@@ -801,11 +799,11 @@ declare function isMobilePhone(val: string): boolean;
|
|
|
801
799
|
*
|
|
802
800
|
* @example
|
|
803
801
|
*
|
|
804
|
-
*
|
|
802
|
+
* isURL('https://example.com') => true
|
|
805
803
|
*
|
|
806
|
-
*
|
|
804
|
+
* isURL('htt://321') => false
|
|
807
805
|
*/
|
|
808
|
-
declare function
|
|
806
|
+
declare function isURL(val: string): boolean;
|
|
809
807
|
/**
|
|
810
808
|
* Validates whether the value is an email address.
|
|
811
809
|
*
|
|
@@ -832,4 +830,4 @@ declare function isDateString(val: string, format?: string): boolean;
|
|
|
832
830
|
*/
|
|
833
831
|
declare function isIdCard(val: string): boolean;
|
|
834
832
|
|
|
835
|
-
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,
|
|
833
|
+
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, 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, isURL, isUndef, isUndefined, isUpperCase, isUpperCaseAndNumber, isUpperCaseAndNumberAndChinese, objectToString, omit, pick, qs, throttle, throwError, throwErrorInvalidTypeMessage, toTypeString, toTypeValue, validatorChineseOrEnglish, validatorChineseOrEnglishOrNumber, validatorUppercaseOrNumbersOrSpecial, validatorUppercaseOrNumbersOrUnderline };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* @ts-self-types="./esm-bundler.d.ts" */
|
|
2
|
-
function ge(e){let t=typeof e;return e!==null&&(t==="object"||t==="function")}function A(e){return e!==null&&typeof e=="object"}var V=Object.prototype.toString,h=e=>V.call(e),k=e=>h(e).slice(8,-1),C=e=>typeof e=="string",l=e=>typeof e=="number"&&Number.isFinite(e),he=e=>typeof e=="boolean",Oe=e=>e===null,we=e=>e===void 0,F=e=>typeof e=="symbol",d=Array.isArray,S=e=>typeof e=="function",v=e=>h(e)==="[object Map]",Y=e=>h(e)==="[object Set]",U=e=>h(e)==="[object Date]",K=e=>h(e)==="[object RegExp]",_=e=>A(e)&&S(e?.then)&&S(e?.catch),w=e=>e==null,$e=e=>e!=null,Ae=(e,t)=>e!==t;function y(e){return h(e)==="[object Object]"}function O(e){return d(e)?e:[e]}function _e(e){let t=[],r,n="";for(;e>0;)r=Math.floor(e%2),t.push(r),e=Math.floor(e/2);for(;t.length>0;)n+=t.pop().toString();return n}var L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Le(e){let t="",r="";for(let o=0;o<e.length;o++)r+=e[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)t+=L[Number.parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=t.length%4;return n!==0&&(t+="=".repeat(4-n)),t}function ze(e){let t="",r="";for(let n=0;n<e.length&&e[n]!=="=";n++)r+=L.indexOf(e[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=Number.parseInt(r.slice(n,n+8),2);o&&(t+=String.fromCharCode(o))}return t}function Ze(...e){return e.reduce((t,r)=>function(...n){return r(t(...n))})}function Ge(...e){return e.reduce((t,r)=>function(...n){return t(r(...n))})}function Ve(e,t=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}function $(e){let t=new WeakMap;function r(n){if(!A(n))return n;if(U(n))return new Date(n);if(K(n))return new RegExp(n);if(_(n))return n;if(t.has(n))return t.get(n);if(v(n)){let a=new Map;return t.set(n,a),n.forEach((f,g)=>a.set(r(g),r(f))),a}if(Y(n)){let a=new Set;return t.set(n,a),n.forEach(f=>a.add(r(f))),a}let o=d(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));t.set(n,o);let p=Object.getOwnPropertyDescriptors(n);for(let a of Reflect.ownKeys(p)){let f=p[a];f.get||f.set?Object.defineProperty(o,a,f):Object.defineProperty(o,a,{...f,value:r(f.value)})}return o}return r(e)}function W(e,t,r={}){return H(z(e,r),z(t,r),r)}function H(e,t,r){return d(e)?Q(e,t,r):X(e,t,r)}function X(e,t,r){if(!y(t))return t;let n=Object.getOwnPropertyDescriptors(t);return Reflect.ownKeys(t).forEach(o=>{(y(e[o])||d(e[o]))&&(y(t[o])||d(t[o]))?e[o]=H(e[o],t[o],r):Object.defineProperty(e,o,n[o])}),e}function Q(e,t,r){let{mergeStrategy:n="replace"}=r;if(d(t))switch(n){case"merge":return e.concat(t);case"replace":return t;default:return t}return t}function z(e,t){let{deepClone:r=!0}=t;return r?$(e):e}var j=class extends Error{constructor(t,r="Utils"){super(t),this.name=r}};function m(e,t){throw new j(`[${e}] ${t}`)}function Z(e,t){let r=C(e)?new j(`[${e}] ${t}`,"UtilsWarn"):e;console.warn(r)}function at(...e){console.warn(...e)}function mt(...e){console.error(...e)}var ct=({from:e,replacement:t,version:r,type:n="API"})=>{Z(`${n}`,`${e} is about to be deprecated in version ${r}, please use ${t} instead.`)};function pt(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${k(n)} with value ${n}.`;m(e,o)}function ft(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${k(n)} with value ${n}.`;Z(e,o)}var R=(e,t,...r)=>{if(!t)return;let n=r.length===0?"":r.length===1?r[0]:r;console[e](`[Log] ${t}:`,n)},T=(e,...t)=>{R("info",e,...t)};T.info=(e,...t)=>{R("info",e,...t)};T.error=(e,...t)=>{R("error",e,...t)};T.warn=(e,...t)=>{R("warn",e,...t)};typeof globalThis<"u"&&(globalThis.log=T);function J(e,t){let{decode:r=!0}=t||{},n={};e.startsWith("?")&&(e=e.slice(1)),e.includes("?")&&(e=e.slice(e.indexOf("?")+1));let o=e.split("&").filter(Boolean);for(let p of o){let[a,f]=p.split("=");n[a]=r?decodeURIComponent(f):f}return n}function G(e,t){let{encode:r=!0}=t||{},n=[];for(let o in e){let p=e[o];n.push(`${o}=${r?encodeURIComponent(p):p}`)}return n.join("&")}function ee(e,t,r){let n=W({encode:!0},{...r}),o=G(t,n);return e.includes("?")?e.endsWith("?")||e.endsWith("&")?`${e}${o}`:`${e}&${o}`:`${e}?${o}`}var xt={parse:J,stringify:G,appendQueryString:ee};function Ot(e,t=500){let r=null;return function(...n){if(w(r))return r=Date.now(),e.apply(this,n);let o=Date.now();if(o-r>=t)return r=o,e.apply(this,n)}}function St(e){return!w(e)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(e)}function jt(e){return!w(e)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(e)}function Rt(e){return!w(e)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(e)}function Tt(e){return/^[\dA-Z_]+$/.test(e)}function q(e,t,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:p=!1}=r,a={};return y(e)&&O(t).forEach(g=>{F(g)&&!o||!(n?g in e:Object.hasOwn(e,g))||!p&&(n?te(e,g):Object.getOwnPropertyDescriptor(e,g))?.enumerable===!1||(a[g]=$(e[g]))}),a}function te(e,t){let r=e;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Xt(e,t){if(!y(e))return{};let r=$(e),n=O(t),o=Object.keys(r).filter(p=>!n.includes(p));return q(r,o)}function sr(e,t){return(!l(e)||e<=0)&&m("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),S(t)||m("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:e}).fill(0).map((r,n)=>t(r,n))}function cr(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import b from"dayjs";import oe from"dayjs/plugin/customParseFormat.js";function u(e){return e[Math.floor(Math.random()*e.length)]}function c(e={}){l(e)&&(e={max:e});let{min:t=1,max:r=u(ne())}=e;re(t,r);let n=Math.ceil(t),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function re(e,t){let r=Math.ceil(e),n=Math.floor(t);Number.isSafeInteger(r)||m("getRandomInt",`The minimum value Math.ceil(${e}) should be a safe integer`),Number.isSafeInteger(n)||m("getRandomInt",`The maximum value Math.floor(${t}) should be a safe integer`),n<r&&(t>=e&&m("getRandomInt",`No integer value found between ${e} and ${t}`),m("getRandomInt",`The maximum value ${t} should be greater than the minimum value ${e}`))}function ne(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((e,t)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,t+1);return Number(r)})}b.extend(oe);function E(e={}){let{start:t="1800-01-01 00:00:00",end:r=b().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=e;(!b(t).isValid()||!b(r).isValid())&&m("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=b(t).year(),p=b(r).year(),a=c({min:o,max:p}),f=c({min:1,max:12}),g=c({min:1,max:31}),D=c(23),I=c(59),B=c(59),M=b(`${a}-${f}-${g} ${D}:${I}:${B}`);return M.isBefore(b(t))||M.isAfter(b(r))?E(e):M.format(n)}function x(e={}){let t=se(e),r=ae(t);me(r);let{length:n}=t;ce(n.min,n.max);let o=c(n),p=t.prefix||"";for(let a=0;a<o;a++)p+=r.charAt(Math.floor(Math.random()*r.length));return p+(t.suffix||"")}var ie=16,P=1;function se(e){let t=l(e);return{lowerCase:!0,upperCase:!0,number:!0,...t?{}:e,length:t?{max:e,min:e}:l(e.length)?{max:e.length,min:e.length}:{max:ie,min:P,...e.length},extra:t?[]:[...new Set(O(e.extra||[]))]}}function ae(e){let t="";return e.lowerCase&&(t+="abcdefghijklmnopqrstuvwxyz"),e.upperCase&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.number&&(t+="0123456789"),t+=O(e.extra).join(""),t}function me(e){e.length===0&&m("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function ce(e,t){Number.isInteger(e)||m("getRandomString","min must be an integer"),Number.isInteger(t)||m("getRandomString","max must be an integer"),e<P&&m("getRandomString",`Minimum length cannot be less than ${P}`),t<e&&m("getRandomString","Maximum length cannot be less than minimum length")}function pe(){let e=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],t=`${x(1)}${x({length:c({max:30,min:1})})}${x(1)}@${u(e)}`;return/\.{2,}/.test(t)?pe():t}function vr(e={}){l(e)&&(e={max:e});let{min:t=0,max:r=1,fractionDigits:n=2}=e;if(t===r)return t;if(t>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${t}`);return Math.random()*(r-t)+t}function N(e,t){(!l(e)||e<=0)&&m("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!d(t)||t.length===0)&&m("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<e;n++)r+=u(t);return r}function qr(){let e=c({min:1e5,max:999999}),t=[0,1,2,3,4,5,6,7,8,9];return[e,E({format:"YYYYMMDD"}),N(3,t),N(1,[...t,"X","x"])].join("")}function Jr(){return u(["13","14","15","16","17","18","19"])+c(999999999).toString().padEnd(9,"0")}function sn(){let e=["http://","https://"],t=[".com",".net",".org",".cn",".top"],r=[`?name=${x({length:{min:4,max:8}})}`,`?id=${c()}`,`?page=${x({length:{min:2,max:4}})}`,`?query=${x({length:{min:5,max:6}})}`,`?search=${x({length:{min:1,max:4}})}`,`?token=${x({length:{min:16,max:16}})}`];return`${u(e)}${x({length:{min:5,max:25}})}${u(t)}${u(r)}`}function Rn(e){return/^\d+$/.test(e)}function Tn(e){return/^[A-Z]+$/i.test(e)}function Mn(e){return/^[A-Z]+$/.test(e)}function kn(e){return/^[\dA-Z]+$/.test(e)}function En(e){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(e)}function Pn(e){return/^[a-z]+$/.test(e)}function Nn(e){return/^[\da-z]+$/.test(e)}function Dn(e){return/^[\da-z\u4E00-\u9FA5]+$/.test(e)}function In(e){return/^[\u4E00-\u9FA5]+$/.test(e)}function vn(e){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(e)}function Yn(e){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function Un(e){return/^(?:0|[1-9]\d*)\.\d+$/.test(e)}function Kn(e){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function _n(e){return/^-(?:0|[1-9]\d*)\.\d+$/.test(e)}function Wn(e){return/^-?(?:0|[1-9]\d*)$/.test(e)}function Hn(e){return/^[1-9]\d*$/.test(e)}function Zn(e){return/^(?:0|[1-9]\d*)$/.test(e)&&!Object.is(e,-0)}function Gn(e){return/^-[1-9]\d*$/.test(e)}function qn(e){return/^-(?:0|[1-9]\d*)$/.test(e)||Object.is(e,-0)}import fe from"dayjs";function Qn(e){return/^1[3-9]\d{9}$/.test(e)}function Jn(e){return/^https?:\/\/\S+$/i.test(e)}function eo(e){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e)}function to(e){return e===""}function ue(e,t="YYYY-MM-DD HH:mm:ss"){return fe(e,t,!0).isValid()}function ro(e){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(e)&&ue(e.slice(6,14),"YYYYMMDD")}export{ze as base64Decode,Le as base64Encode,O as castArray,Ze as compose,Ge as composeRight,Ve as debounce,Z as debugWarn,ft as debugWarnInvalidTypeMessage,_e as decimalToBinary,$ as deepClone,W as deepMerge,ct as deprecated,mt as error,sr as generateRandomArray,cr as generateRandomColor,E as generateRandomDate,pe as generateRandomEmail,vr as generateRandomFloat,qr as generateRandomIdCard,Jr as generateRandomMobilePhone,N as generateRandomStringFromSource,c as getRandomInt,u as getRandomItem,x as getRandomString,sn as getRandomUrl,Ae as hasChanged,d as isArray,he as isBoolean,In as isChineseString,U as isDate,ue as isDateString,$e as isDef,eo as isEmail,to as isEmptyString,Tn as isEnglishAphabet,vn as isFloat,S as isFunction,ro as isIdCard,Wn as isInteger,Pn as isLowerCase,Nn as isLowerCaseAndNumber,Dn as isLowerCaseAndNumberAndChinese,v as isMap,Qn as isMobilePhone,Kn as isNegativeFloat,Gn as isNegativeInteger,Un as isNonNegativeFloat,Zn as isNonNegativeInteger,_n as isNonPositiveFloat,qn as isNonPositiveInteger,Oe as isNull,l as isNumber,Rn as isNumberOrNumberString,ge as isObject,A as isObjectLike,y as isPlainObject,Yn as isPositiveFloat,Hn as isPositiveInteger,_ as isPromise,K as isRegExp,Y as isSet,C as isString,F as isSymbol,w as isUndef,we as isUndefined,Mn as isUpperCase,kn as isUpperCaseAndNumber,En as isUpperCaseAndNumberAndChinese,Jn as isUrl,V as objectToString,Xt as omit,q as pick,xt as qs,Ot as throttle,m as throwError,pt as throwErrorInvalidTypeMessage,h as toTypeString,k as toTypeValue,jt as validatorChineseOrEnglish,St as validatorChineseOrEnglishOrNumber,Rt as validatorUppercaseOrNumbersOrSpecial,Tt as validatorUppercaseOrNumbersOrUnderline,at as warn};
|
|
2
|
+
function ge(e){let t=typeof e;return e!==null&&(t==="object"||t==="function")}function A(e){return e!==null&&typeof e=="object"}var V=Object.prototype.toString,h=e=>V.call(e),k=e=>h(e).slice(8,-1),C=e=>typeof e=="string",l=e=>typeof e=="number"&&Number.isFinite(e),he=e=>typeof e=="boolean",Oe=e=>e===null,we=e=>e===void 0,F=e=>typeof e=="symbol",d=Array.isArray,S=e=>typeof e=="function",v=e=>h(e)==="[object Map]",Y=e=>h(e)==="[object Set]",U=e=>h(e)==="[object Date]",K=e=>h(e)==="[object RegExp]",L=e=>A(e)&&S(e?.then)&&S(e?.catch),w=e=>e==null,$e=e=>e!=null,Ae=(e,t)=>e!==t;function y(e){return h(e)==="[object Object]"}function O(e){return d(e)?e:[e]}function Le(e){let t=[],r,n="";for(;e>0;)r=Math.floor(e%2),t.push(r),e=Math.floor(e/2);for(;t.length>0;)n+=t.pop().toString();return n}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function _e(e){let t="",r="";for(let o=0;o<e.length;o++)r+=e[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)t+=_[Number.parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=t.length%4;return n!==0&&(t+="=".repeat(4-n)),t}function ze(e){let t="",r="";for(let n=0;n<e.length&&e[n]!=="=";n++)r+=_.indexOf(e[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=Number.parseInt(r.slice(n,n+8),2);o&&(t+=String.fromCharCode(o))}return t}function Ze(...e){return e.reduce((t,r)=>function(...n){return r(t(...n))})}function Ge(...e){return e.reduce((t,r)=>function(...n){return t(r(...n))})}function Ve(e,t=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}function $(e){let t=new WeakMap;function r(n){if(!A(n))return n;if(U(n))return new Date(n);if(K(n))return new RegExp(n);if(L(n))return n;if(t.has(n))return t.get(n);if(v(n)){let a=new Map;return t.set(n,a),n.forEach((f,g)=>a.set(r(g),r(f))),a}if(Y(n)){let a=new Set;return t.set(n,a),n.forEach(f=>a.add(r(f))),a}let o=d(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));t.set(n,o);let c=Object.getOwnPropertyDescriptors(n);for(let a of Reflect.ownKeys(c)){let f=c[a];f.get||f.set?Object.defineProperty(o,a,f):Object.defineProperty(o,a,{...f,value:r(f.value)})}return o}return r(e)}function W(e,t,r={}){return H(z(e,r),z(t,r),r)}function H(e,t,r){return d(e)?Q(e,t,r):X(e,t,r)}function X(e,t,r){if(!y(t))return t;let n=Object.getOwnPropertyDescriptors(t);return Reflect.ownKeys(t).forEach(o=>{(y(e[o])||d(e[o]))&&(y(t[o])||d(t[o]))?e[o]=H(e[o],t[o],r):Object.defineProperty(e,o,n[o])}),e}function Q(e,t,r){let{mergeStrategy:n="replace"}=r;if(d(t))switch(n){case"merge":return e.concat(t);case"replace":return t;default:return t}return t}function z(e,t){let{deepClone:r=!0}=t;return r?$(e):e}var R=class extends Error{constructor(t,r="Utils"){super(t),this.name=r}};function m(e,t){throw new R(`[${e}] ${t}`)}function Z(e,t){let r=C(e)?new R(`[${e}] ${t}`,"UtilsWarn"):e;console.warn(r)}var at=({from:e,replacement:t,version:r,type:n="API"})=>{Z(`${n}`,`${e} is about to be deprecated in version ${r}, please use ${t} instead.`)};function mt(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${k(n)} with value ${n}.`;m(e,o)}function pt(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${k(n)} with value ${n}.`;Z(e,o)}var j=(e,t,...r)=>{if(!t)return;let n=r.length===0?"":r.length===1?r[0]:r;console[e](`[Log] ${t}:`,n)},T=(e,...t)=>{j("info",e,...t)};T.info=(e,...t)=>{j("info",e,...t)};T.error=(e,...t)=>{j("error",e,...t)};T.warn=(e,...t)=>{j("warn",e,...t)};typeof globalThis<"u"&&(globalThis.log=T);function J(e,t){let{decode:r=!0}=t||{},n={};e.startsWith("?")&&(e=e.slice(1)),e.includes("?")&&(e=e.slice(e.indexOf("?")+1));let o=e.split("&").filter(Boolean);for(let c of o){let[a,f]=c.split("=");n[a]=r?decodeURIComponent(f):f}return n}function G(e,t){let{encode:r=!0}=t||{},n=[];for(let o in e){let c=e[o];n.push(`${o}=${r?encodeURIComponent(c):c}`)}return n.join("&")}function ee(e,t,r){let n=W({encode:!0},{...r}),o=G(t,n);return e.includes("?")?e.endsWith("?")||e.endsWith("&")?`${e}${o}`:`${e}&${o}`:`${e}?${o}`}var lt={parse:J,stringify:G,appendQueryString:ee};function yt(e,t=500){let r=null;return function(...n){if(w(r))return r=Date.now(),e.apply(this,n);let o=Date.now();if(o-r>=t)return r=o,e.apply(this,n)}}function $t(e){return!w(e)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(e)}function At(e){return!w(e)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(e)}function St(e){return!w(e)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(e)}function Rt(e){return/^[\dA-Z_]+$/.test(e)}function q(e,t,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:c=!1}=r,a={};return y(e)&&O(t).forEach(g=>{F(g)&&!o||!(n?g in e:Object.hasOwn(e,g))||!c&&(n?te(e,g):Object.getOwnPropertyDescriptor(e,g))?.enumerable===!1||(a[g]=$(e[g]))}),a}function te(e,t){let r=e;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Bt(e,t){if(!y(e))return{};let r=$(e),n=O(t),o=Object.keys(r).filter(c=>!n.includes(c));return q(r,o)}function or(e,t){return(!l(e)||e<=0)&&m("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),S(t)||m("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:e}).fill(0).map((r,n)=>t(r,n))}function ar(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import b from"dayjs";import oe from"dayjs/plugin/customParseFormat.js";function u(e){return e[Math.floor(Math.random()*e.length)]}function p(e={}){l(e)&&(e={max:e});let{min:t=1,max:r=u(ne())}=e;re(t,r);let n=Math.ceil(t),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function re(e,t){let r=Math.ceil(e),n=Math.floor(t);Number.isSafeInteger(r)||m("getRandomInt",`The minimum value Math.ceil(${e}) should be a safe integer`),Number.isSafeInteger(n)||m("getRandomInt",`The maximum value Math.floor(${t}) should be a safe integer`),n<r&&(t>=e&&m("getRandomInt",`No integer value found between ${e} and ${t}`),m("getRandomInt",`The maximum value ${t} should be greater than the minimum value ${e}`))}function ne(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((e,t)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,t+1);return Number(r)})}b.extend(oe);function E(e={}){let{start:t="1800-01-01 00:00:00",end:r=b().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=e;(!b(t).isValid()||!b(r).isValid())&&m("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=b(t).year(),c=b(r).year(),a=p({min:o,max:c}),f=p({min:1,max:12}),g=p({min:1,max:31}),D=p(23),I=p(59),B=p(59),M=b(`${a}-${f}-${g} ${D}:${I}:${B}`);return M.isBefore(b(t))||M.isAfter(b(r))?E(e):M.format(n)}function x(e={}){let t=se(e),r=ae(t);me(r);let{length:n}=t;pe(n.min,n.max);let o=p(n),c=t.prefix||"";for(let a=0;a<o;a++)c+=r.charAt(Math.floor(Math.random()*r.length));return c+(t.suffix||"")}var ie=16,P=1;function se(e){let t=l(e);return{lowerCase:!0,upperCase:!0,number:!0,...t?{}:e,length:t?{max:e,min:e}:l(e.length)?{max:e.length,min:e.length}:{max:ie,min:P,...e.length},extra:t?[]:[...new Set(O(e.extra||[]))]}}function ae(e){let t="";return e.lowerCase&&(t+="abcdefghijklmnopqrstuvwxyz"),e.upperCase&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.number&&(t+="0123456789"),t+=O(e.extra).join(""),t}function me(e){e.length===0&&m("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function pe(e,t){Number.isInteger(e)||m("getRandomString","min must be an integer"),Number.isInteger(t)||m("getRandomString","max must be an integer"),e<P&&m("getRandomString",`Minimum length cannot be less than ${P}`),t<e&&m("getRandomString","Maximum length cannot be less than minimum length")}function ce(){let e=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],t=`${x(1)}${x({length:p({max:30,min:1})})}${x(1)}@${u(e)}`;return/\.{2,}/.test(t)?ce():t}function Cr(e={}){l(e)&&(e={max:e});let{min:t=0,max:r=1,fractionDigits:n=2}=e;if(t===r)return t;if(t>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${t}`);return Math.random()*(r-t)+t}function N(e,t){(!l(e)||e<=0)&&m("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!d(t)||t.length===0)&&m("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<e;n++)r+=u(t);return r}function Zr(){let e=p({min:1e5,max:999999}),t=[0,1,2,3,4,5,6,7,8,9];return[e,E({format:"YYYYMMDD"}),N(3,t),N(1,[...t,"X","x"])].join("")}function Xr(){return u(["13","14","15","16","17","18","19"])+p(999999999).toString().padEnd(9,"0")}function nn(){let e=["http://","https://"],t=[".com",".net",".org",".cn",".top"],r=[`?name=${x({length:{min:4,max:8}})}`,`?id=${p()}`,`?page=${x({length:{min:2,max:4}})}`,`?query=${x({length:{min:5,max:6}})}`,`?search=${x({length:{min:1,max:4}})}`,`?token=${x({length:{min:16,max:16}})}`];return`${u(e)}${x({length:{min:5,max:25}})}${u(t)}${u(r)}`}function Sn(e){return/^\d+$/.test(e)}function Rn(e){return/^[A-Z]+$/i.test(e)}function jn(e){return/^[A-Z]+$/.test(e)}function Tn(e){return/^[\dA-Z]+$/.test(e)}function Mn(e){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(e)}function kn(e){return/^[a-z]+$/.test(e)}function En(e){return/^[\da-z]+$/.test(e)}function Pn(e){return/^[\da-z\u4E00-\u9FA5]+$/.test(e)}function Nn(e){return/^[\u4E00-\u9FA5]+$/.test(e)}function Cn(e){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(e)}function Fn(e){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function vn(e){return/^(?:0|[1-9]\d*)\.\d+$/.test(e)}function Yn(e){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function Un(e){return/^-(?:0|[1-9]\d*)\.\d+$/.test(e)}function _n(e){return/^-?(?:0|[1-9]\d*)$/.test(e)}function zn(e){return/^[1-9]\d*$/.test(e)}function Wn(e){return/^(?:0|[1-9]\d*)$/.test(e)&&!Object.is(e,-0)}function Hn(e){return/^-[1-9]\d*$/.test(e)}function Zn(e){return/^-(?:0|[1-9]\d*)$/.test(e)||Object.is(e,-0)}import fe from"dayjs";function Vn(e){return/^1[3-9]\d{9}$/.test(e)}function Xn(e){return/^https?:\/\/\S+$/i.test(e)}function Qn(e){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e)}function Jn(e){return e===""}function ue(e,t="YYYY-MM-DD HH:mm:ss"){return fe(e,t,!0).isValid()}function eo(e){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(e)&&ue(e.slice(6,14),"YYYYMMDD")}export{ze as base64Decode,_e as base64Encode,O as castArray,Ze as compose,Ge as composeRight,Ve as debounce,Z as debugWarn,pt as debugWarnInvalidTypeMessage,Le as decimalToBinary,$ as deepClone,W as deepMerge,at as deprecated,or as generateRandomArray,ar as generateRandomColor,E as generateRandomDate,ce as generateRandomEmail,Cr as generateRandomFloat,Zr as generateRandomIdCard,Xr as generateRandomMobilePhone,N as generateRandomStringFromSource,p as getRandomInt,u as getRandomItem,x as getRandomString,nn as getRandomUrl,Ae as hasChanged,d as isArray,he as isBoolean,Nn as isChineseString,U as isDate,ue as isDateString,$e as isDef,Qn as isEmail,Jn as isEmptyString,Rn as isEnglishAphabet,Cn as isFloat,S as isFunction,eo as isIdCard,_n as isInteger,kn as isLowerCase,En as isLowerCaseAndNumber,Pn as isLowerCaseAndNumberAndChinese,v as isMap,Vn as isMobilePhone,Yn as isNegativeFloat,Hn as isNegativeInteger,vn as isNonNegativeFloat,Wn as isNonNegativeInteger,Un as isNonPositiveFloat,Zn as isNonPositiveInteger,Oe as isNull,l as isNumber,Sn as isNumberOrNumberString,ge as isObject,A as isObjectLike,y as isPlainObject,Fn as isPositiveFloat,zn as isPositiveInteger,L as isPromise,K as isRegExp,Y as isSet,C as isString,F as isSymbol,Xn as isURL,w as isUndef,we as isUndefined,jn as isUpperCase,Tn as isUpperCaseAndNumber,Mn as isUpperCaseAndNumberAndChinese,V as objectToString,Bt as omit,q as pick,lt as qs,yt as throttle,m as throwError,mt as throwErrorInvalidTypeMessage,h as toTypeString,k as toTypeValue,At as validatorChineseOrEnglish,$t as validatorChineseOrEnglishOrNumber,St as validatorUppercaseOrNumbersOrSpecial,Rt as validatorUppercaseOrNumbersOrUnderline};
|
package/dist/utils.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lntvowUtils=(()=>{var Bt=Object.create;var ft=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Qt=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty;var Lt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ee=(t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})},_t=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jt(e))!te.call(t,i)&&i!==n&&ft(t,i,{get:()=>e[i],enumerable:!(r=Gt(e,i))||r.enumerable});return t};var Mt=(t,e,n)=>(n=t!=null?Bt(Qt(t)):{},_t(e||!t||!t.__esModule?ft(n,"default",{value:t,enumerable:!0}):n,t)),ne=t=>_t(ft({},"__esModule",{value:!0}),t);var Ct=Lt((Rt,Et)=>{"use strict";(function(t,e){typeof Rt=="object"&&typeof Et<"u"?Et.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Rt,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",_="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:_,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",N={};N[j]=O;var z="$isDayjsObject",P=function(c){return c instanceof Y||!(!c||!c[z])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();N[f]&&(a=f),o&&(N[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;N[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(P(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=P,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[z]=!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(K,k){var F=g.w(a.$u?Date.UTC(a.$y,k,K):new Date(a.$y,k,K),a);return f?F:F.endOf(b)},w=function(K,k){return g.w(a.toDate()[K].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(k)),a)},S=this.$W,v=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,v):d(0,v+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),v);case b:case _: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[_]=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(_,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(v){var C=$(f);return g.w(C.date(C.date()+Math.round(v*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,v=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")},K=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,v,2);case"ddd":return q(a.weekdaysShort,u.$W,v,3);case"dddd":return v[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 K(d,w,!0);case"A":return K(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,v=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=(v-S)/6048e5;break;case b:f=(v-S)/864e5;break;case l:f=v/n;break;case y:f=v/e;break;case i:f=v/t;break;default:f=v}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return N[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",_]].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=P,$.unix=function(c){return $(1e3*c)},$.en=N[j],$.Ls=N,$.p={},$})});var zt=Lt((It,Nt)=>{"use strict";(function(t,e){typeof It=="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()})(It,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},_={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 N=M[j],z=_[N],P=z&&z[0],R=z&&z[1];M[j]=R?{regex:P,parser:R}:N.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 N=j.date,z=j.utc,P=j.args;this.$u=z;var R=P[1];if(typeof R=="string"){var $=P[2]===!0,g=P[3]===!0,Y=$||g,E=P[2];g&&(E=P[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,v=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,K=d.zone,k=d.week,F=new Date,B=v||(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 K?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t+60*K.offset*1e3)):f?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t)):(ct=new Date(Q,ut,B,xt,yt,bt,$t),k&&(ct=m(ct).week(k).toDate()),ct)}catch{return new Date("")}}(N,R,z,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&N!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){P[1]=R[s-1];var o=O.apply(this,P);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 hn={};ee(hn,{base64Decode:()=>me,base64Encode:()=>fe,castArray:()=>et,compose:()=>pe,composeRight:()=>de,debounce:()=>le,debugWarn:()=>jt,debugWarnInvalidTypeMessage:()=>Me,decimalToBinary:()=>ce,deepClone:()=>ot,deepMerge:()=>kt,deprecated:()=>be,error:()=>ye,generateRandomArray:()=>Re,generateRandomColor:()=>Ee,generateRandomDate:()=>gt,generateRandomEmail:()=>Vt,generateRandomFloat:()=>He,generateRandomIdCard:()=>Ue,generateRandomMobilePhone:()=>Ze,generateRandomStringFromSource:()=>ht,getRandomInt:()=>A,getRandomItem:()=>L,getRandomString:()=>Z,getRandomUrl:()=>We,hasChanged:()=>ue,isArray:()=>U,isBoolean:()=>oe,isChineseString:()=>Qe,isDate:()=>vt,isDateString:()=>qt,isDef:()=>ae,isEmail:()=>dn,isEmptyString:()=>ln,isEnglishAphabet:()=>Ke,isFloat:()=>tn,isFunction:()=>st,isIdCard:()=>gn,isInteger:()=>sn,isLowerCase:()=>Be,isLowerCaseAndNumber:()=>Ge,isLowerCaseAndNumberAndChinese:()=>Je,isMap:()=>St,isMobilePhone:()=>mn,isNegativeFloat:()=>rn,isNegativeInteger:()=>cn,isNonNegativeFloat:()=>nn,isNonNegativeInteger:()=>un,isNonPositiveFloat:()=>on,isNonPositiveInteger:()=>fn,isNull:()=>ie,isNumber:()=>H,isNumberOrNumberString:()=>ze,isObject:()=>re,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>en,isPositiveInteger:()=>an,isPromise:()=>Tt,isRegExp:()=>At,isSet:()=>Dt,isString:()=>wt,isSymbol:()=>Ot,isUndef:()=>rt,isUndefined:()=>se,isUpperCase:()=>Ve,isUpperCaseAndNumber:()=>Xe,isUpperCaseAndNumberAndChinese:()=>qe,isUrl:()=>pn,objectToString:()=>Ft,omit:()=>Ye,pick:()=>Yt,qs:()=>Se,throttle:()=>De,throwError:()=>D,throwErrorInvalidTypeMessage:()=>$e,toTypeString:()=>tt,toTypeValue:()=>mt,validatorChineseOrEnglish:()=>Ae,validatorChineseOrEnglishOrNumber:()=>ve,validatorUppercaseOrNumbersOrSpecial:()=>Te,validatorUppercaseOrNumbersOrUnderline:()=>ke,warn:()=>xe});function re(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),mt=t=>tt(t).slice(8,-1),wt=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),oe=t=>typeof t=="boolean",ie=t=>t===null,se=t=>t===void 0,Ot=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",St=t=>tt(t)==="[object Map]",Dt=t=>tt(t)==="[object Set]",vt=t=>tt(t)==="[object Date]",At=t=>tt(t)==="[object RegExp]",Tt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,ae=t=>t!=null,ue=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function ce(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 fe(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[Number.parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function me(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=Number.parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function pe(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function de(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function le(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(At(r))return new RegExp(r);if(Tt(r))return r;if(e.has(r))return e.get(r);if(St(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Dt(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 kt(t,e,n={}){return Zt(Ut(t,n),Ut(e,n),n)}function Zt(t,e,n){return U(t)?he(t,e,n):ge(t,e,n)}function ge(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 he(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 pt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new pt(`[${t}] ${e}`)}function jt(t,e){let n=wt(t)?new pt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function xe(...t){console.warn(...t)}function ye(...t){console.error(...t)}var be=({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 $e(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${mt(r)} with value ${r}.`;D(t,i)}function Me(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${mt(r)} with value ${r}.`;jt(t,i)}var dt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},lt=(t,...e)=>{dt("info",t,...e)};lt.info=(t,...e)=>{dt("info",t,...e)};lt.error=(t,...e)=>{dt("error",t,...e)};lt.warn=(t,...e)=>{dt("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=lt);function we(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 Oe(t,e,n){let r=kt({encode:!0},{...n}),i=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var Se={parse:we,stringify:Wt,appendQueryString:Oe};function De(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 Ae(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Te(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function ke(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=>{Ot(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 Re(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 Ee(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var V=Mt(Ct(),1),Kt=Mt(zt(),1);function L(t){return t[Math.floor(Math.random()*t.length)]}function A(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=L(Ie())}=t;Ce(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function Ce(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 Ie(){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)})}V.default.extend(Kt.default);function gt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,V.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,V.default)(e).isValid()||!(0,V.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,V.default)(e).year(),y=(0,V.default)(n).year(),l=A({min:i,max:y}),b=A({min:1,max:12}),h=A({min:1,max:31}),T=A(23),X=A(59),I=A(59),_=(0,V.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return _.isBefore((0,V.default)(e))||_.isAfter((0,V.default)(n))?gt(t):_.format(r)}function Z(t={}){let e=Pe(t),n=Le(e);_e(n);let{length:r}=e;Fe(r.min,r.max);let i=A(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,Pt=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:Ne,min:Pt,...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 _e(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Fe(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Pt&&D("getRandomString",`Minimum length cannot be less than ${Pt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function Vt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:A({max:30,min:1})})}${Z(1)}@${L(t)}`;return/\.{2,}/.test(e)?Vt():e}function He(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 ht(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+=L(e);return n}function Ue(){let t=A({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,gt({format:"YYYYMMDD"}),ht(3,e),ht(1,[...e,"X","x"])].join("")}function Ze(){return L(["13","14","15","16","17","18","19"])+A(999999999).toString().padEnd(9,"0")}function We(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${A()}`,`?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`${L(t)}${Z({length:{min:5,max:25}})}${L(e)}${L(n)}`}function ze(t){return/^\d+$/.test(t)}function Ke(t){return/^[A-Z]+$/i.test(t)}function Ve(t){return/^[A-Z]+$/.test(t)}function Xe(t){return/^[\dA-Z]+$/.test(t)}function qe(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Be(t){return/^[a-z]+$/.test(t)}function Ge(t){return/^[\da-z]+$/.test(t)}function Je(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Qe(t){return/^[\u4E00-\u9FA5]+$/.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 nn(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function rn(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function on(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function sn(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function an(t){return/^[1-9]\d*$/.test(t)}function un(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function cn(t){return/^-[1-9]\d*$/.test(t)}function fn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var Xt=Mt(Ct(),1);function mn(t){return/^1[3-9]\d{9}$/.test(t)}function pn(t){return/^https?:\/\/\S+$/i.test(t)}function dn(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function ln(t){return t===""}function qt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,Xt.default)(t,e,!0).isValid()}function gn(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)&&qt(t.slice(6,14),"YYYYMMDD")}return ne(hn);})();
|
|
1
|
+
"use strict";var lntvowUtils=(()=>{var Bt=Object.create;var ft=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Qt=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty;var Lt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ee=(t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})},_t=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jt(e))!te.call(t,i)&&i!==n&&ft(t,i,{get:()=>e[i],enumerable:!(r=Gt(e,i))||r.enumerable});return t};var Mt=(t,e,n)=>(n=t!=null?Bt(Qt(t)):{},_t(e||!t||!t.__esModule?ft(n,"default",{value:t,enumerable:!0}):n,t)),ne=t=>_t(ft({},"__esModule",{value:!0}),t);var Ct=Lt((Rt,Et)=>{"use strict";(function(t,e){typeof Rt=="object"&&typeof Et<"u"?Et.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Rt,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",_="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:_,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",N={};N[j]=O;var z="$isDayjsObject",P=function(c){return c instanceof Y||!(!c||!c[z])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();N[f]&&(a=f),o&&(N[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;N[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(P(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=P,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[z]=!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(K,k){var F=g.w(a.$u?Date.UTC(a.$y,k,K):new Date(a.$y,k,K),a);return f?F:F.endOf(b)},w=function(K,k){return g.w(a.toDate()[K].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(k)),a)},S=this.$W,v=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,v):d(0,v+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),v);case b:case _: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[_]=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(_,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(v){var C=$(f);return g.w(C.date(C.date()+Math.round(v*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,v=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")},K=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,v,2);case"ddd":return q(a.weekdaysShort,u.$W,v,3);case"dddd":return v[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 K(d,w,!0);case"A":return K(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,v=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=(v-S)/6048e5;break;case b:f=(v-S)/864e5;break;case l:f=v/n;break;case y:f=v/e;break;case i:f=v/t;break;default:f=v}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return N[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",_]].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=P,$.unix=function(c){return $(1e3*c)},$.en=N[j],$.Ls=N,$.p={},$})});var zt=Lt((It,Nt)=>{"use strict";(function(t,e){typeof It=="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()})(It,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},_={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 N=M[j],z=_[N],P=z&&z[0],R=z&&z[1];M[j]=R?{regex:P,parser:R}:N.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 N=j.date,z=j.utc,P=j.args;this.$u=z;var R=P[1];if(typeof R=="string"){var $=P[2]===!0,g=P[3]===!0,Y=$||g,E=P[2];g&&(E=P[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,v=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,K=d.zone,k=d.week,F=new Date,B=v||(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 K?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t+60*K.offset*1e3)):f?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t)):(ct=new Date(Q,ut,B,xt,yt,bt,$t),k&&(ct=m(ct).week(k).toDate()),ct)}catch{return new Date("")}}(N,R,z,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&N!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){P[1]=R[s-1];var o=O.apply(this,P);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 ln={};ee(ln,{base64Decode:()=>me,base64Encode:()=>fe,castArray:()=>et,compose:()=>pe,composeRight:()=>de,debounce:()=>le,debugWarn:()=>jt,debugWarnInvalidTypeMessage:()=>be,decimalToBinary:()=>ce,deepClone:()=>ot,deepMerge:()=>kt,deprecated:()=>xe,generateRandomArray:()=>je,generateRandomColor:()=>Ye,generateRandomDate:()=>gt,generateRandomEmail:()=>Vt,generateRandomFloat:()=>_e,generateRandomIdCard:()=>Fe,generateRandomMobilePhone:()=>He,generateRandomStringFromSource:()=>ht,getRandomInt:()=>A,getRandomItem:()=>L,getRandomString:()=>Z,getRandomUrl:()=>Ue,hasChanged:()=>ue,isArray:()=>U,isBoolean:()=>oe,isChineseString:()=>Ge,isDate:()=>vt,isDateString:()=>qt,isDef:()=>ae,isEmail:()=>mn,isEmptyString:()=>pn,isEnglishAphabet:()=>We,isFloat:()=>Je,isFunction:()=>st,isIdCard:()=>dn,isInteger:()=>rn,isLowerCase:()=>Xe,isLowerCaseAndNumber:()=>qe,isLowerCaseAndNumberAndChinese:()=>Be,isMap:()=>St,isMobilePhone:()=>cn,isNegativeFloat:()=>en,isNegativeInteger:()=>an,isNonNegativeFloat:()=>tn,isNonNegativeInteger:()=>sn,isNonPositiveFloat:()=>nn,isNonPositiveInteger:()=>un,isNull:()=>ie,isNumber:()=>H,isNumberOrNumberString:()=>Ze,isObject:()=>re,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>Qe,isPositiveInteger:()=>on,isPromise:()=>Tt,isRegExp:()=>At,isSet:()=>Dt,isString:()=>wt,isSymbol:()=>Ot,isURL:()=>fn,isUndef:()=>rt,isUndefined:()=>se,isUpperCase:()=>ze,isUpperCaseAndNumber:()=>Ke,isUpperCaseAndNumberAndChinese:()=>Ve,objectToString:()=>Ft,omit:()=>ke,pick:()=>Yt,qs:()=>we,throttle:()=>Oe,throwError:()=>D,throwErrorInvalidTypeMessage:()=>ye,toTypeString:()=>tt,toTypeValue:()=>mt,validatorChineseOrEnglish:()=>De,validatorChineseOrEnglishOrNumber:()=>Se,validatorUppercaseOrNumbersOrSpecial:()=>ve,validatorUppercaseOrNumbersOrUnderline:()=>Ae});function re(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),mt=t=>tt(t).slice(8,-1),wt=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),oe=t=>typeof t=="boolean",ie=t=>t===null,se=t=>t===void 0,Ot=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",St=t=>tt(t)==="[object Map]",Dt=t=>tt(t)==="[object Set]",vt=t=>tt(t)==="[object Date]",At=t=>tt(t)==="[object RegExp]",Tt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,ae=t=>t!=null,ue=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function ce(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 fe(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[Number.parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function me(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=Number.parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function pe(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function de(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function le(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(At(r))return new RegExp(r);if(Tt(r))return r;if(e.has(r))return e.get(r);if(St(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Dt(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 kt(t,e,n={}){return Zt(Ut(t,n),Ut(e,n),n)}function Zt(t,e,n){return U(t)?he(t,e,n):ge(t,e,n)}function ge(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 he(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 pt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new pt(`[${t}] ${e}`)}function jt(t,e){let n=wt(t)?new pt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}var xe=({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 ye(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${mt(r)} with value ${r}.`;D(t,i)}function be(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${mt(r)} with value ${r}.`;jt(t,i)}var dt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},lt=(t,...e)=>{dt("info",t,...e)};lt.info=(t,...e)=>{dt("info",t,...e)};lt.error=(t,...e)=>{dt("error",t,...e)};lt.warn=(t,...e)=>{dt("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=lt);function $e(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 Me(t,e,n){let r=kt({encode:!0},{...n}),i=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var we={parse:$e,stringify:Wt,appendQueryString:Me};function Oe(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 Se(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function De(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ve(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Ae(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=>{Ot(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?Te(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function Te(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function ke(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 je(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 Ye(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var V=Mt(Ct(),1),Kt=Mt(zt(),1);function L(t){return t[Math.floor(Math.random()*t.length)]}function A(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=L(Ee())}=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 Ee(){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)})}V.default.extend(Kt.default);function gt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,V.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,V.default)(e).isValid()||!(0,V.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,V.default)(e).year(),y=(0,V.default)(n).year(),l=A({min:i,max:y}),b=A({min:1,max:12}),h=A({min:1,max:31}),T=A(23),X=A(59),I=A(59),_=(0,V.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return _.isBefore((0,V.default)(e))||_.isAfter((0,V.default)(n))?gt(t):_.format(r)}function Z(t={}){let e=Ie(t),n=Ne(e);Pe(n);let{length:r}=e;Le(r.min,r.max);let i=A(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 Ce=16,Pt=1;function Ie(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:Ce,min:Pt,...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 Pe(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<Pt&&D("getRandomString",`Minimum length cannot be less than ${Pt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function Vt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:A({max:30,min:1})})}${Z(1)}@${L(t)}`;return/\.{2,}/.test(e)?Vt():e}function _e(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 ht(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+=L(e);return n}function Fe(){let t=A({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,gt({format:"YYYYMMDD"}),ht(3,e),ht(1,[...e,"X","x"])].join("")}function He(){return L(["13","14","15","16","17","18","19"])+A(999999999).toString().padEnd(9,"0")}function Ue(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${A()}`,`?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`${L(t)}${Z({length:{min:5,max:25}})}${L(e)}${L(n)}`}function Ze(t){return/^\d+$/.test(t)}function We(t){return/^[A-Z]+$/i.test(t)}function ze(t){return/^[A-Z]+$/.test(t)}function Ke(t){return/^[\dA-Z]+$/.test(t)}function Ve(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.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/^[\u4E00-\u9FA5]+$/.test(t)}function Je(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function Qe(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 nn(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function rn(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function on(t){return/^[1-9]\d*$/.test(t)}function sn(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function an(t){return/^-[1-9]\d*$/.test(t)}function un(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var Xt=Mt(Ct(),1);function cn(t){return/^1[3-9]\d{9}$/.test(t)}function fn(t){return/^https?:\/\/\S+$/i.test(t)}function mn(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function pn(t){return t===""}function qt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,Xt.default)(t,e,!0).isValid()}function dn(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)&&qt(t.slice(6,14),"YYYYMMDD")}return ne(ln);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lntvow/utils",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript utilities",
|
|
6
6
|
"keywords": [
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@commitlint/cli": "^19.8.1",
|
|
33
33
|
"@commitlint/config-conventional": "^19.8.1",
|
|
34
|
-
"@lntvow/eslint-config": "^9.
|
|
34
|
+
"@lntvow/eslint-config": "^9.27.2",
|
|
35
35
|
"@types/node": "^24.0.3",
|
|
36
36
|
"@vitest/coverage-v8": "^3.2.4",
|
|
37
37
|
"@vitest/ui": "^3.2.4",
|
|
38
38
|
"bumpp": "^10.2.0",
|
|
39
39
|
"commitizen": "^4.3.1",
|
|
40
40
|
"cz-conventional-changelog": "^3.3.0",
|
|
41
|
-
"eslint": "^9.
|
|
41
|
+
"eslint": "^9.30.1",
|
|
42
42
|
"lint-staged": "^16.1.2",
|
|
43
43
|
"npm-run-all": "^4.1.5",
|
|
44
|
-
"prettier": "^3.6.
|
|
44
|
+
"prettier": "^3.6.2",
|
|
45
45
|
"simple-git-hooks": "^2.13.0",
|
|
46
46
|
"tsup": "^8.5.0",
|
|
47
47
|
"typescript": "^5.8.3",
|