easy-soft-utility 2.3.12 → 2.4.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.
- package/es/index.js +1 -1
- package/es/utils/checkAssist.d.ts +1 -1
- package/es/utils/common.d.ts +15 -0
- package/es/utils/constants.d.ts +1 -0
- package/es/utils/convertAssist.d.ts +2 -0
- package/es/utils/localStorageAssist.d.ts +4 -4
- package/es/utils/loggerAssist.d.ts +7 -0
- package/es/utils/meta.d.ts +1 -0
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"node-cache";import e from"lodash/isBoolean";import n from"lodash/isDate";import r from"lodash/isEqual";import o from"lodash/isFunction";import a from"lodash/isNull";import i from"lodash/isNumber";import u from"lodash/isObject";import c from"lodash/isString";import l from"lodash/isUndefined";import s from"lodash/replace";import f from"lodash/assign";import d from"lodash/assignWith";import h from"lodash/difference";import m from"lodash/dropRight";import g from"lodash/endsWith";import v from"lodash/filter";import p from"lodash/find";import y from"lodash/findIndex";import w from"lodash/first";import b from"lodash/floor";import x from"lodash/forEach";import A from"lodash/get";import S from"lodash/gte";import M from"lodash/map";import D from"lodash/memoize";import C from"lodash/remove";import E from"lodash/reverse";import I from"lodash/round";import O from"lodash/set";import j from"lodash/size";import k from"lodash/sortBy";import N from"lodash/sortedUniq";import T from"lodash/split";import P from"lodash/startsWith";import F from"lodash/trim";import Y from"lodash/uniqBy";import B from"lodash/toNumber";import H from"lodash/toString";import U from"object-hash";import W from"dayjs";import{stringify as L,parse as R}from"qs";var K,Q="function"==typeof atob,G="function"==typeof btoa,J="function"==typeof Buffer,V="function"==typeof TextDecoder?new TextDecoder:void 0,z="function"==typeof TextEncoder?new TextEncoder:void 0,q=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Z=(K={},q.forEach((function(t,e){return K[t]=e})),K),$=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,X=String.fromCharCode.bind(String),_="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t};return new Uint8Array(Array.prototype.slice.call(t,0).map(e))},tt=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},et=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},nt=G?function(t){return btoa(t)}:J?function(t){return Buffer.from(t,"binary").toString("base64")}:function(t){for(var e,n,r,o,a="",i=t.length%3,u=0;u<t.length;){if((n=t.charCodeAt(u++))>255||(r=t.charCodeAt(u++))>255||(o=t.charCodeAt(u++))>255)throw new TypeError("invalid character found");a+=q[(e=n<<16|r<<8|o)>>18&63]+q[e>>12&63]+q[e>>6&63]+q[63&e]}return i?a.slice(0,i-3)+"===".substring(i):a},rt=J?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=[],n=0,r=t.length;n<r;n+=4096)e.push(X.apply(null,t.subarray(n,n+4096)));return nt(e.join(""))},ot=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?X(192|e>>>6)+X(128|63&e):X(224|e>>>12&15)+X(128|e>>>6&63)+X(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return X(240|e>>>18&7)+X(128|e>>>12&63)+X(128|e>>>6&63)+X(128|63&e)},at=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,it=J?function(t){return Buffer.from(t,"utf8").toString("base64")}:z?function(t){return rt(z.encode(t))}:function(t){return nt(t.replace(at,ot))},ut=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ct=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return X(55296+(e>>>10))+X(56320+(1023&e));case 3:return X((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return X((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},lt=Q?function(t){return atob(et(t))}:J?function(t){return Buffer.from(t,"base64").toString("binary")}:function(t){if(t=t.replace(/\s+/g,""),!$.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,r,o="",a=0;a<t.length;)e=Z[t.charAt(a++)]<<18|Z[t.charAt(a++)]<<12|(n=Z[t.charAt(a++)])<<6|(r=Z[t.charAt(a++)]),o+=64===n?X(e>>16&255):64===r?X(e>>16&255,e>>8&255):X(e>>16&255,e>>8&255,255&e);return o},st=J?function(t){return _(Buffer.from(t,"base64"))}:function(t){return _(lt(t),(function(t){return t.charCodeAt(0)}))},ft=J?function(t){return Buffer.from(t,"base64").toString("utf8")}:V?function(t){return V.decode(st(t))}:function(t){return lt(t).replace(ut,ct)},dt=function(t){return ft(et(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"}))))};function ht(t){return dt(t)}function mt(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?tt(it(t)):it(t)}(t)}function gt(t){return 1*t<10?"0".concat(t):t}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function pt(t){var e=function(t,e){if("object"!==vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vt(e)?e:String(e)}function yt(t,e,n){return(e=pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return A(t,e,n)}function At(t,e){return I(t,e)}function St(t,e,n){return g(t,e,n)}function Mt(t){return N(t)}function Dt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return T(t,e,n)}function Ct(t,e){return f(t,e)}function Et(t,e,n){return d(t,e,n)}function It(t){return E(t)}function Ot(t,e){return x(t,e)}function jt(t,e){return S(t,e)}function kt(t){return D(t)}function Nt(t,e){return b(t,e)}function Tt(t){return w(t)}function Pt(t,e){return P(t,e)}function Ft(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return m(t,e)}function Yt(t,e){return Y(t,e)}function Bt(t){return F(t)}function Ht(t,e,n){return s(t,e,n)}function Ut(t,e){return C(t,e)}function Wt(t,e){return M(t,e)}function Lt(t,e,n){return O(t,e,n)}function Rt(t){return j(t)}function Kt(t,e){return h(t,e)}function Qt(t,e){return v(t,e)}function Gt(t,e){return k(t,e)}function Jt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return y(t,e,n)}function Vt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t,e,n)}function zt(t){return ne(t)}function qt(t){var e="".concat(ne(t)?null:t).match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(null==e)return!1;var n=new Date(e[1],e[3]-1,e[4]);return n.getFullYear()===parseInt(e[1],10)&&n.getMonth()+1===parseInt(e[3],10)&&n.getDate()===parseInt(e[4],10)}function Zt(t){return i(t)}function $t(t){var e="".concat(ne(t)?null:t);if(""===e)return!1;return new RegExp(/^([1-9][\d]{0,15}|0)(\.[\d]{1,2})?$/).test(e)}function Xt(t,e){return r(t,e)}function _t(t,e){return JSON.stringify(t||{})===JSON.stringify(e||{})}function te(t){return o(t)}function ee(t){return e(t)}function ne(t){return l(t)}function re(t){return a(t)}function oe(t){return n(t)}function ae(t){return c(t)}function ie(t){return Array.isArray(t)}function ue(t){return u(t)}function ce(t){return null!==t&&"object"===vt(t)&&!ie(t)}function le(t){return ce(t)&&te(t.then)&&te(t.catch)}function se(t){return new RegExp(/(http|https):\/\/([\w.]+\/?)\S*/).test(t)}function fe(t){return new RegExp(/(data):image\/([\w.]+\/?)\S*/).test(t)}function de(t){return""===Bt(s(t||""," ",""))}function he(t,e){var n=!1;return ie(t)?(t.some((function(t){return t===e&&(n=!0,!0)})),n):n}var me="easy-soft-utility",ge={WEAPP:"WEAPP",WEB:"WEB",RN:"RN",SWAN:"SWAN",ALIPAY:"ALIPAY",TT:"TT",QQ:"QQ",JD:"JD",UNKNOWN:"UNKNOWN"},ve={loadApiPath:"",firstLoadSuccess:!1,loadSuccess:!1,registering:!1,dataLoading:!1,reloading:!1,searching:!1,refreshing:!1,paging:!1,processing:!1,dispatchComplete:!0,metaData:null,metaExtra:null,metaListData:[],metaOriginalData:null,urlParams:null,externalData:null},pe={dataLoading:!0},ye={get:"GET",post:"POST",put:"PUT",delete:"DELETE",trace:"TRACE",connect:"CONNECT"},we="0",be=0,xe="1970-01-01 00:00",Ae={number:"number",datetime:"datetime",string:"string",moment:"moment",money:"money",array:"array",boolean:"boolean"},Se={money:"money",datetime:"datetime",chineseMoney:"chineseMoney",percentage:"percentage"},Me={yearMonthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",yearMonthDayHourMinute:"YYYY-MM-DD HH:mm",yearMonthDay:"YYYY-MM-DD",yearMonth:"YYYY-MM",year:"YYYY",monthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",monthDayHourMinute:"MM-DD HH:mm",monthDay:"MM-DD",hourMinute:"HH:mm",hourMinuteSecond:"HH:mm:ss",month:"MM",day:"DD",hour:"HH",minute:"mm",second:"ss"},De={moveUp:"moveUp",moveDown:"moveDown"},Ce={no:"0",yes:"1"},Ee={no:0,yes:1},Ie={trace:"trace",debug:"debug",warn:"warn",error:"error",exception:"exception",info:"info",config:"config",execute:"execute"},Oe={auto:"auto",text:"text",object:"object"},je={success:"success",error:"error",info:"info",warning:"warning",warn:"warn",open:"open"},ke=bt({},je),Ne=bt({},je),Te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAYAAACGGCK3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cExAQAAAMKg9U9tDQ8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA3NXV7AAHfw7zWAAAAAElFTkSuQmCC",Pe=Te;function Fe(t){return U(t,{algorithm:"sha1"})}function Ye(t){return U(t,{algorithm:"md5"})}function Be(t,e){var n=Math.pow(10,e+1),r=Math.floor(He(t)*n);return 10*Math.round(r/10)/n}function He(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=B(t),r=Number.isNaN(n)?0:n;return null==(e||null)?r:Be(r,e)}function Ue(t,e,n){if(!Zt(t))throw new Error("value must be number value");var r=He(t);return void 0!==e&&(r=Math.max(t,e)),void 0!==n&&(r=Math.min(r,n)),r}function We(t){return $t(t)?parseFloat(t,10):0}function Le(t){return"".concat(We(1e3*He(t)/10),"%")}function Re(t){return H(t)}function Ke(t){return!!t}function Qe(t){return Re(t).toUpperCase()}function Ge(t){return Re(t).toLowerCase()}function Je(t){if(null==(t||null))return null;if(oe(t))return t;if(ae(t)&&t.indexOf("T")<0){var e=t.replace(/\-/g,"/");return new Date(e)}return new Date(t)}function Ve(t){return le(t)?t:Promise.resolve(t)}function ze(t,e){return At(t,e)}function qe(t){var e=t.target,n=t.convert;if(te(n))return n(e);if(ae(n))switch(n){case Ae.number:return He(e);case Ae.datetime:return Je(e);case Ae.string:return Re(e);case Ae.money:return We(e);case Ae.array:return null==(e||null)?[]:ie(e)?e:[e];default:return e}return e}function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $e(t,e){if(t){if("string"==typeof t)return Ze(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(t,e):void 0}}function Xe(t){return function(t){if(Array.isArray(t))return Ze(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(t){return new Function("return ".concat(t))()}function tn(){var t=navigator.userAgent;return{trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")}}function en(){var t;return{versions:tn(),language:(null!==(t=navigator.browserLanguage||navigator.language)&&void 0!==t?t:"").toLowerCase()}}function nn(t){var e=t.seed,n=t.min||0;return n+(9301*e+49297)%233280/233280*((t.max||1)-n)}function rn(t){return null==t?null:JSON.parse(JSON.stringify(t))}function on(t,e,n){var r=[];return null!=t&&(r=Xe(t)),null!=n&&(r=[].concat(Xe(r),Xe(n))),null!=e&&(r=[e].concat(Xe(r))),r}function an(t,e,n,r,o){var a=r,i=void 0===n?null:n;return null!=e&&("function"==typeof convertValue?a.initialValue=o(t)||i:a.initialValue=t||i),a}function un(t,e,n){var r=null;return null==e||(n||[]).forEach((function(n){n[t]===e&&(r=n)})),r}function cn(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[],a=0;if(n=n||r.length,e)for(a=0;a<e;a++)o[a]=r[0|Math.random()*n];else for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",a=0;a<36;a++)o[a]||(t=0|16*Math.random(),o[a]=r[19===a?3&t|8:t]);return o.join("")}function ln(t){var e=t.pageNo,n=t.pageSize,r=t.total;return!((r||0)<=0)&&(e||0)*(n||0)<(r||0)}function sn(){return"development"===process.env.NODE_ENV}function fn(t){return Object.keys(t).map((function(e){return t[e]})).join(",")}function dn(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[t].concat(r).filter((function(t){return ae(t)&&!de(t)}));return"".concat(a.join("::"),"::").concat(de(e)?"":e)}var hn="loggerAssist",mn={loggerDisplaySwitchPromptSetInformationComplete:!1,loggerDisplaySwitchSetComplete:!1,display:!1},gn={config:"#F8C471",execute:"#C39BD3",info:"#89CA78",warn:"#F16F17",debug:"#00768F",trace:"#596032",error:"#E33F3E",exception:"#DC428E"};function vn(t){var e=t.text,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation,u=void 0===i?"":i,c=function(t,e){return"".concat(Re(t)).concat(de(e)?"":" -> ".concat(e))}(ae(e)?e:JSON.stringify(e),u);de(vn)||console.log("%c%s","color:".concat(r,";"),"".concat(de(a)?"":"[".concat(Qe(a),"] ")).concat(c))}function pn(t){var e=t.data,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation;vn({text:"check the following object data",color:r,dataDescription:a,ancillaryInformation:void 0===i?"":i}),console.log(e)}function yn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe.auto,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ie.debug,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=On();if(!mn.loggerDisplaySwitchSetComplete&&!mn.loggerDisplaySwitchPromptSetInformationComplete){var a=dn(me,"logData -> logger display switch default is false, if want to display log, please set it before first log, use setLoggerDisplaySwitch to set it, this message only show once",hn);vn({text:a,color:"#08BBEE",dataDescription:"hint",ancillaryInformation:""});try{throw new Error("please set use setLoggerDisplaySwitch")}catch(t){console.error(t)}mn.loggerDisplaySwitchPromptSetInformationComplete=!0}if(o||n===Ie.exception){var i=null==(e||null)||de(e)?Oe.auto:e;if(!he([Oe.auto,Oe.text,Oe.object],i))throw new Error("Invalid log display mode -> ".concat(i));if(i===Oe.auto&&(i=ae(t)?Oe.text:Oe.object),n!==Ie.exception)o&&(n===Ie.trace&&(i===Oe.text&&vn({text:t,color:gn.trace,dataDescription:"trace",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.trace,dataDescription:"trace",ancillaryInformation:r})),n===Ie.debug&&(i===Oe.text&&vn({text:t,color:gn.debug,dataDescription:"debug",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.debug,dataDescription:"debug",ancillaryInformation:r})),n===Ie.warn&&(i===Oe.text&&vn({text:t,color:gn.warn,dataDescription:"warn",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.warn,dataDescription:"warn",ancillaryInformation:r})),n===Ie.info&&(i===Oe.text&&vn({text:t,color:gn.info,dataDescription:"info",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.info,dataDescription:"info",ancillaryInformation:r})),n===Ie.execute&&(i===Oe.text&&vn({text:t,color:gn.execute,dataDescription:"execute",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.execute,dataDescription:"execute",ancillaryInformation:r})),n===Ie.config&&(i===Oe.text&&vn({text:t,color:gn.config,dataDescription:"config",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.config,dataDescription:"config",ancillaryInformation:r})),n===Ie.error&&(i===Oe.text&&vn({text:t,color:gn.error,dataDescription:"error",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.error,dataDescription:"error",ancillaryInformation:r})));else{i===Oe.text&&vn({text:t,color:gn.exception,dataDescription:"exception",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.exception,dataDescription:"exception",ancillaryInformation:r});try{throw new Error("an error occur, check the above error message, the stack information is as follows")}catch(t){console.error(t)}}}}function wn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.warn,e):In(t,Ie.warn,e)}function bn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.info,e):In(t,Ie.info,e)}function xn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.config,e):In(t,Ie.config,e)}function An(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.trace,e):In(t,Ie.trace,e)}function Sn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.debug,e):In(t,Ie.debug,e)}function Mn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.execute,e):In(t,Ie.execute,e)}function Dn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.error,e):In(t,Ie.error,e)}function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.exception,e):In(t,Ie.exception,e)}function En(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";yn(t,Oe.text,e,n)}function In(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";yn(t,Oe.object,e,n)}function On(){return Ke(mn.display)}function jn(t){sn()&&vn({text:"setLoggerDisplaySwitch",color:gn.execute,dataDescription:"execute",ancillaryInformation:""}),mn.display=Ke(t),mn.loggerDisplaySwitchSetComplete=!0}var kn={mountComplete:!1,target:null};function Nn(e){if(Mn("setCacheMount"),!ue(e))throw Sn(e),new Error(dn(me,"setCacheMount -> cache mount target must be a object, current type is ".concat(vt(e)),"cacheAssist"));null==(e.localRuntimeCache||null)&&(e.localRuntimeCache=new t),kn.target=e,kn.mountComplete=!0,bn("setCacheMount -> cache mount success.")}function Tn(t){return de(t)?(Cn("checkKey -> cache key is null or empty"),!1):!(!ae(t)&&!Zt(t))||(Cn("cache key must be string or number, current type id ".concat(vt(t))),!1)}function Pn(){if(!kn.mountComplete||!kn.target||!kn.target.localRuntimeCache)throw new Error("getCachePool -> please use setCacheMount function to set cache mount target before get it.");return kn.target.localRuntimeCache}function Fn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.has(e)}function Yn(t){var e=t.key,n=t.value,r=t.expiration,o=void 0===r?0:r;if(Tn(e)){var a=Pn();if(null==a)throw new Error("cache pool not exist");return a.set(e,n,o)}}function Bn(t){if(!ie(t))throw new Error("setMultiCache: list must be array");if(t.length<=0)return!0;var e=[];if(t.forEach((function(t){var n=bt(bt({},{key:"",value:"",expiration:0}),t),r=n.key,o=n.value,a=n.expiration;if(!de(r)){if(!Tn(r))return;e.push({key:r,value:o,ttl:a})}})),e.length<=0)return!1;var n=Pn();if(null==n)throw new Error("cache pool not exist");return n.mset(e)}function Hn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.getTtl(e)}function Un(t){var e=t.key,n=t.expiration,r=Pn();if(null==r)throw new Error("cache pool not exist");return r.ttl(e,n)}function Wn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.get(e)}function Ln(){var t=Pn();if(null==t)throw new Error("cache pool not exist");return t.keys()}function Rn(t){if(!ie(t))throw new Error("getMultiCache: list must be array");var e=Pn();if(null==e)throw new Error("cache pool not exist");return e.mget(t)}function Kn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.take(e)}function Qn(t){var e=t.key;if(Tn(e)){var n=Pn();if(null==n)throw new Error("cache pool not exist");return n.del(e)}}function Gn(t){if(!ie(t))throw new Error("deleteMultiCache: list must be array");var e=Pn();if(null==e)throw new Error("cache pool not exist");return e.del(t)}function Jn(){var t=Pn();if(null==t)throw new Error("cache pool not exist");return t.flushAll()}function Vn(){var t=Pn();if(null==t)throw new Error("cache pool not exist");return t.getStats()}function zn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,u=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||$e(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qn(t){var e=t.seed;return"#".concat("00000".concat((16777216*nn({seed:e})<<0).toString(16)).substring(-6))}function Zn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"RGB",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,o=(null!=t?t:"").toLowerCase();if(r.test(o)){if(4===o.length){for(var a="#",i=1;i<4;i+=1)a+=o.slice(i,i+1).concat(o.slice(i,i+1));o=a}for(var u=[],c=1;c<7;c+=2)u.push(parseInt("0x"+o.slice(c,c+2)));return e?"".concat(e,"(").concat(u.join(","),")"):n?u:u.join(",")}return Cn("Invalid hex color -> ".concat(t)),o}function $n(t){var e=t.progress,n=t.startColor,r=t.endColor,o=Zn(n,null,!0),a=Zn(r,null,!0),i=zn(o,3),u=i[0],c=i[1],l=i[2],s=zn(a,3),f=s[0],d=s[1],h=s[2],m=[(u+Math.round((f-u)*e)).toString(16),(c+Math.round((d-c)*e)).toString(16),(l+Math.round((h-l)*e)).toString(16)];return"#".concat(m.join("").toUpperCase())}function Xn(t){var e=t.direct,n=t.list,r=void 0===n?[]:n,o=Zt(e)?"".concat(e,"deg"):e;return"linear-gradient(".concat(o,", ").concat(r.join(),")")}function _n(t,e){var n=Je(t);return n.setHours(n.getHours()+e)}function tr(t,e){var n=Je(t);return n.setMinutes(n.getMinutes()+e)}function er(t,e){var n=Je(t);return n.setSeconds(n.getSeconds()+e)}function nr(){return new Date}function rr(t,e){var n=t.getTime(),r=(e.getTime()-n)/1e3,o=parseInt(r/86400),a=parseInt((r-24*o*60*60)/3600),i=parseInt((r-24*o*60*60-60*a*60)/60);return{day:o,hour:a,minute:i,second:r-24*o*60*60-60*a*60-60*i}}var or=function(t,e,n){var r=Je(t),o=e?Je(e):new Date,a=o.getTime()-r.getTime();return"second"===n&&a/1e3||"minute"===n&&a/1e3/60||"hour"===n&&a/1e3/60/60||"day"===n&&a/1e3/60/60/24||"week"===n&&a/1e3/60/60/24/7||"month"===n&&ar(r,o)||"quarter"===n&&ar(r,o)/3||"year"===n&&ar(r,o)/12||a},ar=function(t,e){var n=Je(t),r=Je(e);return 12*(n.getFullYear()-r.getFullYear())+n.getMonth()-r.getMonth()};function ir(t){var e=t.data;return W(e).day()}function ur(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=W().day();if(!t)return e;var n="";switch(He(e)){case 0:n="日";break;case 1:n="一";break;case 2:n="二";break;case 3:n="三";break;case 4:n="四";break;case 5:n="五";break;case 6:n="六";break;default:n=""}return de(n)?"":"星期".concat(n)}function cr(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.thousand,a=void 0===o?",":o,i=t.decimal;return lr({data:e,places:r,symbol:"",thousand:a,decimal:void 0===i?".":i})}function lr(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.symbol,a=void 0===o?"¥":o,i=t.thousand,u=void 0===i?",":i,c=t.decimal,l=void 0===c?".":c,s=e||0,f=isNaN(r=Math.abs(r))?2:r,d=void 0!==a?a:"¥",h=u||",",m=l||".",g=s<0?"-":"",v=parseInt(s=Math.abs(+s||0).toFixed(f),10)+"",p=v.length;return d+g+((p=p>3?p%3:0)?v.substr(0,p)+h:"")+v.substr(p).replace(/(\d{3})(?=\d)/g,a+"1"+h)+(f?m+Math.abs(s-He(v)).toFixed(f).slice(2):"")}function sr(t){var e,n,r,o=t.target,a=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],i=["","拾","佰","仟"],u=["","万","亿","兆"],c=["角","分","毫","厘"],l="";if(""===o)return"";if((o=parseFloat(o))>=1e15)return"超出最大处理数字";if(0===o)return l=a[0]+"元";if(-1===(o=o.toString()).indexOf("."))e=o,n="";else{var s=zn(r=o.split("."),2);e=s[0],n=s[1],n=r[1].substr(0,4)}if(parseInt(e,10)>0){for(var f=0,d=e.length,h=0;h<d;h+=1){var m=e.substr(h,1),g=d-h-1,v=g/4,p=g%4;"0"===m?f+=1:(f>0&&(l+=a[0]),f=0,l+=a[parseInt(m,10)]+i[p]),0===p&&f<4&&(l+=u[v])}l+="元"}if(""!==n)for(var y=n.length,w=0;w<y;w+=1){var b=n.substr(w,1);"0"!==b&&(l+=a[Number(b)]+c[w])}return""===l&&(l+=a[0]+"元"),l}function fr(t){var e=t.data,n=t.fmt,r=void 0===n?Me.yearMonthDayHourMinuteSecond:n;return null==(e||null)?"":W(e).format(r)}function dr(t){var e=t.target,n=t.format,r=t.option,o=void 0===r?{}:r;if(te(n))return n(e);if(ae(n))switch(n){case Se.money:return lr({data:e});case Se.datetime:return fr({data:e});case Se.chineseMoney:return sr({target:e,option:o});case Se.percentage:return"".concat(ze(100*e,1),"%");default:return e}return e}function hr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=bt(bt({},{second:["刚刚","片刻后"],seconds:["%d 秒前","%d 秒后"],minute:["大约 1 分钟前","大约 1 分钟后"],minutes:["%d 分钟前","%d 分钟后"],hour:["大约 1 小时前","大约 1 小时后"],hours:["%d 小时前","%d 小时后"],day:["1 天前","1 天后"],days:["%d 天前","%d 天后"],month:["大约 1 个月前","大约 1 个月后"],months:["%d 月前","%d 月后"],year:["大约 1 年前","大约 1 年后"],years:["%d 年前","%d 年后"]}),n||{}),o=or(t,e),a=o<0?1:0,i=Math.abs(o)/1e3,u=i/60,c=u/60,l=c/24,s=l/365,f=function(t,e){return t.replace(/%d/i,e)};return i<10&&f(r.second[a],parseInt(i))||i<45&&f(r.seconds[a],parseInt(i))||i<90&&f(r.minute[a],1)||u<45&&f(r.minutes[a],parseInt(u))||u<90&&f(r.hour[a],1)||c<24&&f(r.hours[a],parseInt(c))||c<42&&f(r.day[a],1)||l<30&&f(r.days[a],parseInt(l))||l<45&&f(r.month[a],1)||l<365&&f(r.months[a],parseInt(l/30))||s<1.5&&f(r.year[a],1)||f(r.years[a],parseInt(s))}function mr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return hr(t,nr(),e)}function gr(t){return de(t.text||null)&&wn(dn(me,"checkMessagePromptData option text disallow empty","loggerAssist")),!0}var vr={showOpenMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showInfoMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showSuccessMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showWarnMessage:function(t){var e=t.text;t.duration,t.onClose,wn(e)},showWarningMessage:function(t){var e=t.text;t.duration,t.onClose,wn(e)},showErrorMessage:function(t){var e=t.text;t.duration,t.onClose,Dn(e)},setErrorMessageDisplayMonitorComplete:!1};function pr(t){vr.showOpenMessage=t}function yr(t){vr.showInfoMessage=t}function wr(t){vr.showSuccessMessage=t}function br(t){vr.showWarnMessage=t}function xr(t){vr.showWarningMessage=t}function Ar(t){vr.showErrorMessage=t,vr.setErrorMessageDisplayMonitorComplete=!0}function Sr(t){Mr({text:t})}function Mr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showOpenMessage)&&(gr({text:e}),vr.showOpenMessage({text:e,duration:r,onClose:a}))}function Dr(t){Cr({text:t})}function Cr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showInfoMessage)&&(gr({text:e}),vr.showInfoMessage({text:e,duration:r,onClose:a}))}function Er(t){Ir({text:t})}function Ir(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showSuccessMessage)&&(gr({text:e}),vr.showSuccessMessage({text:e,duration:r,onClose:a}))}function Or(t){jr({text:t})}function jr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showWarnMessage)&&(gr({text:e}),vr.showWarnMessage({text:e,duration:r,onClose:a}))}function kr(t){Nr({text:t})}function Nr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showWarningMessage)&&(gr({text:e}),vr.showWarningMessage({text:e,duration:r,onClose:a}))}function Tr(t){Pr({text:t})}function Pr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showErrorMessage)&&(gr({text:e}),vr.showErrorMessage({text:e,duration:r,onClose:a}))}function Fr(t){Yr({text:t})}function Yr(t){var e=t.text;de(e||"")||(vr.setErrorMessageDisplayMonitorComplete&&Pr({text:e}),Cn({text:e}))}function Br(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t&&t.length>e?"".concat(Re(t).substring(0,e)).concat(n):Re(t)}function Hr(t,e,n,r){var o=Re(t),a=(t||"").length;a>0&&(n>=0||r>=0)&&(o=n>=a||r>=a||(n||0)+(r||0)>=a?t:t.substr(0,n)+e+t.substr(a-r,r));return o||""}function Ur(t,e){for(var n=(new Date).getTime();!((new Date).getTime()-n>t););te(e)&&e()}function Wr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(ne(t))return n;if(null==t)return n;if(!ae(e)){var r="getPathValue Function param path must be string";return Yr({message:r}),null}var o=xt(t,e,n);return ne(n)||re(n)?o:o||n}function Lr(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string target");if(!ae(e))throw new Error("removeEndMatch only use for string match");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0&&t.length===n+e.length?t.substr(n,e.length):t}function Rr(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string source");if(!ae(e))throw new Error("removeEndMatch only use for string target");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0?t.substr(n,e.length):t}function Kr(t){var e=t.data,n=t.key,r=t.defaultValue,o=void 0===r?null:r,a=t.convert,i=void 0===a?null:a,u=t.convertBuilder,c=void 0===u?null:u,l=t.format,s=void 0===l?null:l,f=t.formatBuilder,d=void 0===f?null:f,h=Wr(e,n,o),m=h;return null==(c||null)&&null==(i||null)||(m=te(c)?qe({target:h,convert:c}):qe({target:h,convert:i})),null==(d||null)&&null==(s||null)||(m=te(d)?dr({target:m,format:d}):dr({target:m,format:s})),m}function Qr(t){var e=t.operate,n=t.item,r=t.list,o=t.key,a=t.sortInitialValue,i=void 0===a?0:a;if(null==(n||null))return r;var u=[],c=[],l=[];if((r||[]).length<=1){return jr({message:"无需排序!"}),r}var s=Kr({data:n,key:o,convert:Ae.number});switch((r||[]).forEach((function(t){var e=Kr({data:t,key:o,convert:Ae.number});e<s&&u.push(t),e>s&&c.push(t)})),e){case De.moveUp:if(s===i){return jr({message:"已经排在首位!"}),r}(u||[]).forEach((function(t,e){if(e<u.length-1)l.push(t);else{var r=n;r[o]-=1,l.push(r);var a=t;a[o]+=1,l.push(a)}})),l=l.concat(c);break;case De.moveDown:if(s===(r||[]).length+i-1){return jr({message:"已经排在末位!"}),r}l=l.concat(u),(c||[]).forEach((function(t,e){if(0===e){var r=t;r[o]-=1,l.push(r);var a=n;a[o]+=1,l.push(a)}else l.push(t)}));break;default:jr({message:"不符合的操作, 允许的操作为['".concat(De.moveUp,"','").concat(De.moveDown,"']!")})}return l}function Gr(t){var e=t.list,n=void 0===e?[]:e,r=t.convert,o=void 0===r?null:r,a=t.recursiveKey,i=void 0===a?"children":a;return(ie(n)?n:[n]).map((function(t){return Jr({data:t,convert:o,target:i})}))}function Jr(t){var e=t.data,n=t.convert,r=void 0===n?null:n,o=t.recursiveKey,a=void 0===o?"children":o;if(!te(r))return e;var i=r(e),u=e[a],c=[];return ie(u)&&(c=u.map((function(t){return Jr({data:t,convert:r,target:a})}))),i[a]=c,i}function Vr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Vt(t,e,n);return!ne(r)}function zr(){function t(t,e){return ne(e)?t:e}for(var e=Ct({},arguments.length<=0?void 0:arguments[0]),n=1;n<arguments.length;n++)e=Et(e,n<0||arguments.length<=n?void 0:arguments[n],t);return e}function qr(t){if(t&&"object"===vt(t)){var e="";return Object.keys(t).forEach((function(n){var r,o=(null!==(r=n.replace(/([A-Z])/g,"-$1"))&&void 0!==r?r:"").toLowerCase();e+="".concat(o,":").concat(t[n],";")})),e}return t&&"string"==typeof t?t:""}function Zr(t,e){return t&&"object"===vt(t)&&e&&"object"===vt(e)?Object.assign({},t,e):qr(t)+qr(e)}function $r(t,e){var n=t;for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n}var Xr="htmlAssist";function _r(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!Zt(t))return t;if(!Zt(e)||e<=0)throw new Error(dn(me,"pxToRem -> root value must be number and greater than 0, current root value [".concat(e,"] is invalid"),Xr));var o=parseFloat(t);if(o<r)return t;var a=He(o/e,n);return 0===a?"0":a+"rem"}var to="localStorageAssist",eo={getStorage:function(t){Cn(dn(me,"setStorageGetter need config, use setStorageGetter to set it",to))},setStorage:function(t,e){Cn(dn(me,"setStorageSetter need config, use setStorageSetter to set it",to))},removeStorage:function(t){Cn(dn(me,"setStorageRemover need config, use setStorageRemover to set it",to))},flushStorage:function(){Cn(dn(me,"setStorageFlusher need config, use setStorageFlusher to set it",to))}};function no(t){eo.getStorage=t}function ro(t){eo.setStorage=t}function oo(t){eo.removeStorage=t}function ao(t){eo.flushStorage=t}function io(t){try{return eo.getStorage(t)}catch(e){throw Cn({key:t,e:e}),e}}function uo(t){var e=io(t);return de(e)?null:JSON.parse(e||"{}")}function co(t,e){eo.setStorage(t,e)}function lo(t,e){eo.setStorage(t,JSON.stringify(e||{}))}function so(t){eo.removeStorage(t)}function fo(){eo.flushStorage()}var ho=function(t){var e=t.text;t.duration,t.onClose,bn({text:e})};var mo="nearestLocalhostNotify";function go(){var t=uo(mo);return null==(t||null)||null==(t.nearestTime||null)?null:t||null}function vo(){return lo(mo,{nearestTime:parseInt((new Date).getTime()/1e3,10)})}function po(){so(mo)}function yo(t){var e=t.text,n=!1,r=0,o=go()||null;null==o?n=!0:r=o.nearestTime||0;var a=parseInt((new Date).getTime()/1e3,10);try{if(r+30<a&&(n=!0),n){var i="当前接口域名: ".concat(e,". ");!function(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(ho)&&ho({text:e,duration:r,onClose:a})}({text:i}),En({message:i}),vo()}}catch(t){yn(t)}}function wo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=L(t);if(de(e))return n;if(de(n))return e;var r=e.lastIndexOf("?")>=0?"&":"?";return"".concat(e).concat(r).concat(n)}function bo(t){return R(t)}function xo(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"请".concat(e||"输入").concat(t).concat(de(n)?"":",".concat(n))}function Ao(t){var e=t.label,n=t.name,r=t.helper,o="",a="",i="";if(ae(e))o=e;else{wn({label:e,name:n,helper:r}),Yr({message:"label必须为文本"})}if(ae(n))a=n;else{wn({label:e,name:n,helper:r}),Yr({message:"name必须为文本"})}if(ae(r))i=r;else{wn({label:e,name:n,helper:r}),Yr({message:"helper必须为文本"})}return{label:o,name:a,helper:i}}function So(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"注: ";return"".concat(e).concat(t,". ")}export{_n as addHour,tr as addMinute,er as addSecond,Ct as assign,Et as assignWith,$r as attachPropertiesToComponent,xo as buildFieldDescription,So as buildFieldHelper,$n as buildHexColor,Xn as buildLinearGradient,dn as buildPromptModuleInfo,wo as buildQueryStringify,Zn as buildRGBColorFromHexColor,qn as buildRandomHexColor,qr as buildStringStyle,kn as cacheMountTarget,or as calculateDateInterval,ar as calculateMonthInterval,rr as calculateTimeInterval,Vr as checkExist,Ao as checkFromConfig,ln as checkHasMore,he as checkInCollection,gr as checkMessagePromptData,de as checkStringIsNullOrWhiteSpace,sn as checkWhetherDevelopmentEnvironment,rn as cloneWithoutMethod,Ae as convertCollection,_r as convertPixelToRem,Me as datetimeFormat,ht as decodeBase64,Qn as deleteCache,Gn as deleteMultiCache,Kt as difference,pn as displayObjectMessage,vn as displayTextMessage,Ft as dropRight,Br as ellipsis,xe as emptyDatetime,mt as encodeBase64,St as endsWith,ge as envCollection,Pe as errorImage,_e as evil,Qt as filter,Vt as find,Jt as findIndex,Tt as first,gt as fixedZero,Nt as floor,Jn as flushAllCache,fo as flushLocalStorage,Ot as forEach,Se as formatCollection,hr as formatDateInterval,mr as formatDateIntervalWithNow,fr as formatDatetime,cr as formatDecimal,lr as formatMoney,sr as formatMoneyToChinese,dr as formatTarget,xt as get,en as getBrowserInfo,tn as getBrowserVersion,Wn as getCache,Pn as getCachePool,ir as getDayOfWeek,Hn as getExpiration,cn as getGuid,uo as getJsonFromLocalStorage,On as getLoggerDisplaySwitch,Rn as getMultiCache,go as getNearestLocalhostNotifyCache,nr as getNow,Wr as getPathValue,io as getStringFromLocalStorage,ur as getTodayOfWeek,fn as getValue,Kr as getValueByKey,jt as gte,Fn as hasCache,ie as isArray,ee as isBoolean,oe as isDate,qt as isDatetime,Xt as isEqual,_t as isEqualBySerialize,te as isFunction,fe as isImageBase4,zt as isInvalid,$t as isMoney,re as isNull,Zt as isNumber,ue as isObject,ce as isPlainObject,le as isPromise,ae as isString,ne as isUndefined,se as isUrl,Ln as keys,eo as localStorageAssist,gn as logColorCollection,xn as logConfig,yn as logData,Sn as logDebug,Oe as logDisplay,Dn as logError,Cn as logException,Mn as logExecute,bn as logInfo,Ie as logLevel,In as logObject,En as logText,An as logTrace,wn as logWarn,mn as loggerSwitch,Wt as map,kt as memoize,zr as mergeProps,Zr as mergeStyle,vr as messagePromptAssist,Ne as messageTypeCollection,ke as notificationTypeCollection,bo as parseQueryString,on as refitCommonData,an as refitFieldDecoratorOption,Lr as removeEndMatch,Ut as removeFromArray,Rr as removeLastMatch,so as removeLocalStorage,po as removeNearestLocalhostNotifyCache,Ht as replace,Hr as replaceWithKeep,ye as requestMethod,It as reverse,At as round,lo as saveJsonToLocalStorage,co as saveStringToLocalStorage,un as searchFromList,nn as seededRandom,Lt as set,Yn as setCache,Nn as setCacheMount,Ar as setErrorMessageDisplayMonitor,Un as setExpiration,yr as setInfoMessageDisplayMonitor,jn as setLoggerDisplaySwitch,Bn as setMultiCache,vo as setNearestLocalhostNotifyCache,pr as setOpenMessageDisplayMonitor,ao as setStorageFlusher,no as setStorageGetter,oo as setStorageRemover,ro as setStorageSetter,wr as setSuccessMessageDisplayMonitor,br as setWarnMessageDisplayMonitor,xr as setWarningMessageDisplayMonitor,Pr as showErrorMessage,Cr as showInfoMessage,Mr as showOpenMessage,Yr as showRuntimeError,Tr as showSimpleErrorMessage,Dr as showSimpleInfoMessage,Sr as showSimpleOpenMessage,Fr as showSimpleRuntimeError,Er as showSimpleSuccessMessage,Or as showSimpleWarnMessage,kr as showSimpleWarningMessage,Ir as showSuccessMessage,jr as showWarnMessage,Nr as showWarningMessage,Rt as size,Ur as sleep,Gt as sortBy,Qr as sortCollectionByKey,De as sortOperate,Mt as sortedUnique,Dt as split,Pt as startsWith,Vn as statisticsCache,Kn as takeCache,qe as to,Ke as toBoolean,Ue as toBoundary,Je as toDatetime,Ge as toLower,Ye as toMd5,We as toMoney,He as toNumber,Le as toPercentage,Ve as toPromise,ze as toRound,Fe as toSha1,Re as toString,Qe as toUpper,Jr as transformData,Gr as transformListData,Te as transparentImage,Bt as trim,yo as trySendNearestLocalhostNotify,pe as underlyingExtensionState,ve as underlyingState,Yt as uniqBy,Ee as whetherNumber,Ce as whetherString,be as zeroInt,we as zeroString};
|
|
1
|
+
import t from"node-cache";import e from"lodash/isBoolean";import n from"lodash/isDate";import r from"lodash/isEqual";import o from"lodash/isFunction";import a from"lodash/isNull";import i from"lodash/isNumber";import u from"lodash/isObject";import c from"lodash/isString";import l from"lodash/isUndefined";import f from"lodash/replace";import s from"lodash/assign";import d from"lodash/assignWith";import h from"lodash/difference";import g from"lodash/dropRight";import m from"lodash/endsWith";import v from"lodash/filter";import p from"lodash/find";import y from"lodash/findIndex";import w from"lodash/first";import b from"lodash/floor";import x from"lodash/forEach";import A from"lodash/get";import S from"lodash/gte";import D from"lodash/map";import M from"lodash/memoize";import E from"lodash/remove";import C from"lodash/reverse";import O from"lodash/round";import j from"lodash/set";import I from"lodash/size";import k from"lodash/sortBy";import T from"lodash/sortedUniq";import N from"lodash/split";import P from"lodash/startsWith";import F from"lodash/trim";import Y from"lodash/uniqBy";import B from"lodash/toNumber";import H from"lodash/toString";import U from"object-hash";import W from"dayjs";import{stringify as R,parse as L}from"qs";var K,Q="function"==typeof atob,V="function"==typeof btoa,G="function"==typeof Buffer,J="function"==typeof TextDecoder?new TextDecoder:void 0,z="function"==typeof TextEncoder?new TextEncoder:void 0,q=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Z=(K={},q.forEach((function(t,e){return K[t]=e})),K),$=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,X=String.fromCharCode.bind(String),_="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t};return new Uint8Array(Array.prototype.slice.call(t,0).map(e))},tt=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},et=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},nt=V?function(t){return btoa(t)}:G?function(t){return Buffer.from(t,"binary").toString("base64")}:function(t){for(var e,n,r,o,a="",i=t.length%3,u=0;u<t.length;){if((n=t.charCodeAt(u++))>255||(r=t.charCodeAt(u++))>255||(o=t.charCodeAt(u++))>255)throw new TypeError("invalid character found");a+=q[(e=n<<16|r<<8|o)>>18&63]+q[e>>12&63]+q[e>>6&63]+q[63&e]}return i?a.slice(0,i-3)+"===".substring(i):a},rt=G?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=[],n=0,r=t.length;n<r;n+=4096)e.push(X.apply(null,t.subarray(n,n+4096)));return nt(e.join(""))},ot=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?X(192|e>>>6)+X(128|63&e):X(224|e>>>12&15)+X(128|e>>>6&63)+X(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return X(240|e>>>18&7)+X(128|e>>>12&63)+X(128|e>>>6&63)+X(128|63&e)},at=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,it=G?function(t){return Buffer.from(t,"utf8").toString("base64")}:z?function(t){return rt(z.encode(t))}:function(t){return nt(t.replace(at,ot))},ut=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ct=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return X(55296+(e>>>10))+X(56320+(1023&e));case 3:return X((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return X((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},lt=Q?function(t){return atob(et(t))}:G?function(t){return Buffer.from(t,"base64").toString("binary")}:function(t){if(t=t.replace(/\s+/g,""),!$.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,r,o="",a=0;a<t.length;)e=Z[t.charAt(a++)]<<18|Z[t.charAt(a++)]<<12|(n=Z[t.charAt(a++)])<<6|(r=Z[t.charAt(a++)]),o+=64===n?X(e>>16&255):64===r?X(e>>16&255,e>>8&255):X(e>>16&255,e>>8&255,255&e);return o},ft=G?function(t){return _(Buffer.from(t,"base64"))}:function(t){return _(lt(t),(function(t){return t.charCodeAt(0)}))},st=G?function(t){return Buffer.from(t,"base64").toString("utf8")}:J?function(t){return J.decode(ft(t))}:function(t){return lt(t).replace(ut,ct)},dt=function(t){return st(et(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"}))))};function ht(t){return dt(t)}function gt(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?tt(it(t)):it(t)}(t)}function mt(t){return 1*t<10?"0".concat(t):t}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function pt(t){var e=function(t,e){if("object"!==vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vt(e)?e:String(e)}function yt(t,e,n){return(e=pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return A(t,e,n)}function At(t,e){return O(t,e)}function St(t,e,n){return m(t,e,n)}function Dt(t){return T(t)}function Mt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return N(t,e,n)}function Et(t,e){return s(t,e)}function Ct(t,e,n){return d(t,e,n)}function Ot(t){return C(t)}function jt(t,e){return x(t,e)}function It(t,e){return S(t,e)}function kt(t){return M(t)}function Tt(t,e){return b(t,e)}function Nt(t){return w(t)}function Pt(t,e){return P(t,e)}function Ft(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return g(t,e)}function Yt(t,e){return Y(t,e)}function Bt(t){return F(t)}function Ht(t,e,n){return f(t,e,n)}function Ut(t,e){return E(t,e)}function Wt(t,e){return D(t,e)}function Rt(t,e,n){return j(t,e,n)}function Lt(t){return I(t)}function Kt(t,e){return h(t,e)}function Qt(t,e){return v(t,e)}function Vt(t,e){return k(t,e)}function Gt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return y(t,e,n)}function Jt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t,e,n)}function zt(t){return ne(t)}function qt(t){var e="".concat(ne(t)?null:t).match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(null==e)return!1;var n=new Date(e[1],e[3]-1,e[4]);return n.getFullYear()===parseInt(e[1],10)&&n.getMonth()+1===parseInt(e[3],10)&&n.getDate()===parseInt(e[4],10)}function Zt(t){return i(t)}function $t(t){var e="".concat(ne(t)?null:t);if(""===e)return!1;return new RegExp(/^([1-9][\d]{0,15}|0)(\.[\d]{1,2})?$/).test(e)}function Xt(t,e){return r(t,e)}function _t(t,e){return JSON.stringify(t||{})===JSON.stringify(e||{})}function te(t){return o(t)}function ee(t){return e(t)}function ne(t){return l(t)}function re(t){return a(t)}function oe(t){return n(t)}function ae(t){return c(t)}function ie(t){return Array.isArray(t)}function ue(t){return u(t)}function ce(t){return null!==t&&"object"===vt(t)&&!ie(t)}function le(t){return ce(t)&&te(t.then)&&te(t.catch)}function fe(t){return new RegExp(/(http|https):\/\/([\w.]+\/?)\S*/).test(t)}function se(t){return new RegExp(/(data):image\/([\w.]+\/?)\S*/).test(t)}function de(t){return""===Bt(f(t||""," ",""))}function he(t,e){var n=!1;return ie(t)?(t.some((function(t){return t===e&&(n=!0,!0)})),n):n}var ge="easy-soft-utility",me={WEAPP:"WEAPP",WEB:"WEB",RN:"RN",SWAN:"SWAN",ALIPAY:"ALIPAY",TT:"TT",QQ:"QQ",JD:"JD",UNKNOWN:"UNKNOWN"},ve={loadApiPath:"",firstLoadSuccess:!1,loadSuccess:!1,registering:!1,dataLoading:!1,reloading:!1,searching:!1,refreshing:!1,paging:!1,processing:!1,dispatchComplete:!0,metaData:null,metaExtra:null,metaListData:[],metaOriginalData:null,urlParams:null,externalData:null},pe={dataLoading:!0},ye={get:"GET",post:"POST",put:"PUT",delete:"DELETE",trace:"TRACE",connect:"CONNECT"},we="0",be=0,xe="1970-01-01 00:00",Ae={number:"number",datetime:"datetime",string:"string",moment:"moment",money:"money",array:"array",boolean:"boolean"},Se={money:"money",datetime:"datetime",chineseMoney:"chineseMoney",percentage:"percentage"},De={yearMonthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",yearMonthDayHourMinute:"YYYY-MM-DD HH:mm",yearMonthDay:"YYYY-MM-DD",yearMonth:"YYYY-MM",year:"YYYY",monthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",monthDayHourMinute:"MM-DD HH:mm",monthDay:"MM-DD",hourMinute:"HH:mm",hourMinuteSecond:"HH:mm:ss",month:"MM",day:"DD",hour:"HH",minute:"mm",second:"ss"},Me={moveUp:"moveUp",moveDown:"moveDown"},Ee={no:"0",yes:"1"},Ce={no:0,yes:1},Oe={trace:"trace",debug:"debug",warn:"warn",error:"error",exception:"exception",info:"info",config:"config",execute:"execute",stack:"stack"},je={auto:"auto",text:"text",object:"object"},Ie={success:"success",error:"error",info:"info",warning:"warning",warn:"warn",open:"open"},ke=bt({},Ie),Te=bt({},Ie),Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAYAAACGGCK3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cExAQAAAMKg9U9tDQ8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA3NXV7AAHfw7zWAAAAAElFTkSuQmCC",Pe=Ne,Fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var Ye=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(o);++r<o;)a[r]=t[r+e];return a};var Be=function(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Ye(t,e,n)},He=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Ue=function(t){return He.test(t)};var We=function(t){return t.split("")},Re="\\ud800-\\udfff",Le="["+Re+"]",Ke="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Qe="\\ud83c[\\udffb-\\udfff]",Ve="[^"+Re+"]",Ge="(?:\\ud83c[\\udde6-\\uddff]){2}",Je="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="(?:"+Ke+"|"+Qe+")"+"?",qe="[\\ufe0e\\ufe0f]?",Ze=qe+ze+("(?:\\u200d(?:"+[Ve,Ge,Je].join("|")+")"+qe+ze+")*"),$e="(?:"+[Ve+Ke+"?",Ke,Ge,Je,Le].join("|")+")",Xe=RegExp(Qe+"(?="+Qe+")|"+$e+Ze,"g");var _e=We,tn=Ue,en=function(t){return t.match(Xe)||[]};var nn=function(t){return tn(t)?en(t):_e(t)},rn="object"==vt(Fe)&&Fe&&Fe.Object===Object&&Fe,on="object"==("undefined"==typeof self?"undefined":vt(self))&&self&&self.Object===Object&&self,an=(rn||on||Function("return this")()).Symbol;var un=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},cn=Array.isArray,ln=an,fn=Object.prototype,sn=fn.hasOwnProperty,dn=fn.toString,hn=ln?ln.toStringTag:void 0;var gn=function(t){var e=sn.call(t,hn),n=t[hn];try{t[hn]=void 0;var r=!0}catch(t){}var o=dn.call(t);return r&&(e?t[hn]=n:delete t[hn]),o},mn=Object.prototype.toString;var vn=gn,pn=function(t){return mn.call(t)},yn=an?an.toStringTag:void 0;var wn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":yn&&yn in Object(t)?vn(t):pn(t)},bn=function(t){return null!=t&&"object"==vt(t)};var xn=un,An=cn,Sn=function(t){return"symbol"==vt(t)||bn(t)&&"[object Symbol]"==wn(t)},Dn=an?an.prototype:void 0,Mn=Dn?Dn.toString:void 0;var En=function t(e){if("string"==typeof e)return e;if(An(e))return xn(e,t)+"";if(Sn(e))return Mn?Mn.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},Cn=En;var On=Be,jn=Ue,In=nn,kn=function(t){return null==t?"":Cn(t)};var Tn=function(t){return function(e){e=kn(e);var n=jn(e)?In(e):void 0,r=n?n[0]:e.charAt(0),o=n?On(n,1).join(""):e.slice(1);return r[t]()+o}},Nn=Tn("toLowerCase"),Pn=Tn("toUpperCase");function Fn(t){return U(t,{algorithm:"sha1"})}function Yn(t){return U(t,{algorithm:"md5"})}function Bn(t,e){var n=Math.pow(10,e+1),r=Math.floor(Hn(t)*n);return 10*Math.round(r/10)/n}function Hn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=B(t),r=Number.isNaN(n)?0:n;return null==(e||null)?r:Bn(r,e)}function Un(t,e,n){if(!Zt(t))throw new Error("value must be number value");var r=Hn(t);return void 0!==e&&(r=Math.max(t,e)),void 0!==n&&(r=Math.min(r,n)),r}function Wn(t){return $t(t)?parseFloat(t,10):0}function Rn(t){return"".concat(Wn(1e3*Hn(t)/10),"%")}function Ln(t){return H(t)}function Kn(t){return!!t}function Qn(t){return Ln(t).toUpperCase()}function Vn(t){return Pn(t)}function Gn(t){return Ln(t).toLowerCase()}function Jn(t){return Nn(t)}function zn(t){if(null==(t||null))return null;if(oe(t))return t;if(ae(t)&&t.indexOf("T")<0){var e=t.replace(/\-/g,"/");return new Date(e)}return new Date(t)}function qn(t){return le(t)?t:Promise.resolve(t)}function Zn(t,e){return At(t,e)}function $n(t){var e=t.target,n=t.convert;if(te(n))return n(e);if(ae(n))switch(n){case Ae.number:return Hn(e);case Ae.datetime:return zn(e);case Ae.string:return Ln(e);case Ae.money:return Wn(e);case Ae.array:return null==(e||null)?[]:ie(e)?e:[e];default:return e}return e}function Xn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _n(t,e){if(t){if("string"==typeof t)return Xn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(t,e):void 0}}function tr(t){return function(t){if(Array.isArray(t))return Xn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(t){return new Function("return ".concat(t))()}function nr(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function rr(){var t=navigator.userAgent;return{trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")}}function or(){var t;return{versions:rr(),language:(null!==(t=navigator.browserLanguage||navigator.language)&&void 0!==t?t:"").toLowerCase()}}function ar(t){var e=t.seed,n=t.min||0;return n+(9301*e+49297)%233280/233280*((t.max||1)-n)}function ir(t){return null==t?null:JSON.parse(JSON.stringify(t))}function ur(t,e,n){var r=[];return null!=t&&(r=tr(t)),null!=n&&(r=[].concat(tr(r),tr(n))),null!=e&&(r=[e].concat(tr(r))),r}function cr(t,e,n,r,o){var a=r,i=void 0===n?null:n;return null!=e&&("function"==typeof convertValue?a.initialValue=o(t)||i:a.initialValue=t||i),a}function lr(t,e,n){var r=null;return null==e||(n||[]).forEach((function(n){n[t]===e&&(r=n)})),r}function fr(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[],a=0;if(n=n||r.length,e)for(a=0;a<e;a++)o[a]=r[0|Math.random()*n];else for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",a=0;a<36;a++)o[a]||(t=0|16*Math.random(),o[a]=r[19===a?3&t|8:t]);return o.join("")}function sr(t){var e=t.pageNo,n=t.pageSize,r=t.total;return!((r||0)<=0)&&(e||0)*(n||0)<(r||0)}function dr(){return"development"===process.env.NODE_ENV}function hr(t){return Object.keys(t).map((function(e){return t[e]})).join(",")}function gr(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[t].concat(r).filter((function(t){return ae(t)&&!de(t)}));return"".concat(a.join("::"),"::").concat(de(e)?"":e)}var mr="loggerAssist",vr={loggerDisplaySwitchPromptSetInformationComplete:!1,loggerDisplaySwitchSetComplete:!1,display:!1},pr={config:"#F8C471",execute:"#C39BD3",info:"#89CA78",warn:"#F16F17",debug:"#00768F",trace:"#596032",error:"#E33F3E",exception:"#DC428E",stack:"#81977c"};function yr(t){var e=t.text,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation,u=void 0===i?"":i,c=function(t,e){return"".concat(Ln(t)).concat(de(e)?"":" -> ".concat(e))}(ae(e)?e:JSON.stringify(e),u);de(yr)||console.log("%c%s","color:".concat(r,";"),"".concat(de(a)?"":"[".concat(Qn(a),"] ")).concat(c))}function wr(t){var e=t.data,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation;yr({text:"check the following object data",color:r,dataDescription:a,ancillaryInformation:void 0===i?"":i}),console.log(e)}function br(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:je.auto,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Oe.debug,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=Tr();if(!vr.loggerDisplaySwitchSetComplete&&!vr.loggerDisplaySwitchPromptSetInformationComplete){var a=gr(ge,"logData -> logger display switch default is false, if want to display log, please set it before first log, use setLoggerDisplaySwitch to set it, this message only show once",mr);yr({text:a,color:"#08BBEE",dataDescription:"hint",ancillaryInformation:""});try{throw new Error("please set use setLoggerDisplaySwitch")}catch(t){console.error(t)}vr.loggerDisplaySwitchPromptSetInformationComplete=!0}if(o||n===Oe.exception){var i=null==(e||null)||de(e)?je.auto:e;if(!he([je.auto,je.text,je.object],i))throw new Error("Invalid log display mode -> ".concat(i));if(i===je.auto&&(i=ae(t)?je.text:je.object),n!==Oe.exception){if(o){if(n===Oe.trace&&(i===je.text&&yr({text:t,color:pr.trace,dataDescription:"trace",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.trace,dataDescription:"trace",ancillaryInformation:r})),n===Oe.debug&&(i===je.text&&yr({text:t,color:pr.debug,dataDescription:"debug",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.debug,dataDescription:"debug",ancillaryInformation:r})),n===Oe.warn&&(i===je.text&&yr({text:t,color:pr.warn,dataDescription:"warn",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.warn,dataDescription:"warn",ancillaryInformation:r})),n===Oe.info&&(i===je.text&&yr({text:t,color:pr.info,dataDescription:"info",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.info,dataDescription:"info",ancillaryInformation:r})),n===Oe.execute&&(i===je.text&&yr({text:t,color:pr.execute,dataDescription:"execute",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.execute,dataDescription:"execute",ancillaryInformation:r})),n===Oe.config&&(i===je.text&&yr({text:t,color:pr.config,dataDescription:"config",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.config,dataDescription:"config",ancillaryInformation:r})),n===Oe.stack){i===je.text&&yr({text:t,color:pr.stack,dataDescription:"stack",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.stack,dataDescription:"stack",ancillaryInformation:r});try{throw new Error("stack call trace as bellow")}catch(t){var u=t.stack;console.log(Ht(u,"Error:","Stack:"))}}n===Oe.error&&(i===je.text&&yr({text:t,color:pr.error,dataDescription:"error",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.error,dataDescription:"error",ancillaryInformation:r}))}}else{i===je.text&&yr({text:t,color:pr.exception,dataDescription:"exception",ancillaryInformation:r}),i===je.object&&wr({data:t,color:pr.exception,dataDescription:"exception",ancillaryInformation:r});try{throw new Error("an error occur, check the above error message, the stack information is as follows")}catch(t){console.error(t)}}}}function xr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.warn,e):kr(t,Oe.warn,e)}function Ar(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.info,e):kr(t,Oe.info,e)}function Sr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.config,e):kr(t,Oe.config,e)}function Dr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.stack,e):kr(t,Oe.stack,e)}function Mr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.trace,e):kr(t,Oe.trace,e)}function Er(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.debug,e):kr(t,Oe.debug,e)}function Cr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.execute,e):kr(t,Oe.execute,e)}function Or(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.error,e):kr(t,Oe.error,e)}function jr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?Ir(t,Oe.exception,e):kr(t,Oe.exception,e)}function Ir(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";br(t,je.text,e,n)}function kr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";br(t,je.object,e,n)}function Tr(){return Kn(vr.display)}function Nr(t){dr()&&yr({text:"setLoggerDisplaySwitch",color:pr.execute,dataDescription:"execute",ancillaryInformation:""}),vr.display=Kn(t),vr.loggerDisplaySwitchSetComplete=!0}var Pr={mountComplete:!1,target:null};function Fr(e){if(Cr("setCacheMount"),!ue(e))throw Er(e),new Error(gr(ge,"setCacheMount -> cache mount target must be a object, current type is ".concat(vt(e)),"cacheAssist"));null==(e.localRuntimeCache||null)&&(e.localRuntimeCache=new t),Pr.target=e,Pr.mountComplete=!0,Ar("setCacheMount -> cache mount success.")}function Yr(t){return de(t)?(jr("checkKey -> cache key is null or empty"),!1):!(!ae(t)&&!Zt(t))||(jr("cache key must be string or number, current type id ".concat(vt(t))),!1)}function Br(){if(!Pr.mountComplete||!Pr.target||!Pr.target.localRuntimeCache)throw new Error("getCachePool -> please use setCacheMount function to set cache mount target before get it.");return Pr.target.localRuntimeCache}function Hr(t){var e=t.key,n=Br();if(null==n)throw new Error("cache pool not exist");return n.has(e)}function Ur(t){var e=t.key,n=t.value,r=t.expiration,o=void 0===r?0:r;if(Yr(e)){var a=Br();if(null==a)throw new Error("cache pool not exist");return a.set(e,n,o)}}function Wr(t){if(!ie(t))throw new Error("setMultiCache: list must be array");if(t.length<=0)return!0;var e=[];if(t.forEach((function(t){var n=bt(bt({},{key:"",value:"",expiration:0}),t),r=n.key,o=n.value,a=n.expiration;if(!de(r)){if(!Yr(r))return;e.push({key:r,value:o,ttl:a})}})),e.length<=0)return!1;var n=Br();if(null==n)throw new Error("cache pool not exist");return n.mset(e)}function Rr(t){var e=t.key,n=Br();if(null==n)throw new Error("cache pool not exist");return n.getTtl(e)}function Lr(t){var e=t.key,n=t.expiration,r=Br();if(null==r)throw new Error("cache pool not exist");return r.ttl(e,n)}function Kr(t){var e=t.key,n=Br();if(null==n)throw new Error("cache pool not exist");return n.get(e)}function Qr(){var t=Br();if(null==t)throw new Error("cache pool not exist");return t.keys()}function Vr(t){if(!ie(t))throw new Error("getMultiCache: list must be array");var e=Br();if(null==e)throw new Error("cache pool not exist");return e.mget(t)}function Gr(t){var e=t.key,n=Br();if(null==n)throw new Error("cache pool not exist");return n.take(e)}function Jr(t){var e=t.key;if(Yr(e)){var n=Br();if(null==n)throw new Error("cache pool not exist");return n.del(e)}}function zr(t){if(!ie(t))throw new Error("deleteMultiCache: list must be array");var e=Br();if(null==e)throw new Error("cache pool not exist");return e.del(t)}function qr(){var t=Br();if(null==t)throw new Error("cache pool not exist");return t.flushAll()}function Zr(){var t=Br();if(null==t)throw new Error("cache pool not exist");return t.getStats()}function $r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,u=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||_n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xr(t){var e=t.seed;return"#".concat("00000".concat((16777216*ar({seed:e})<<0).toString(16)).substring(-6))}function _r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"RGB",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,o=(null!=t?t:"").toLowerCase();if(r.test(o)){if(4===o.length){for(var a="#",i=1;i<4;i+=1)a+=o.slice(i,i+1).concat(o.slice(i,i+1));o=a}for(var u=[],c=1;c<7;c+=2)u.push(parseInt("0x"+o.slice(c,c+2)));return e?"".concat(e,"(").concat(u.join(","),")"):n?u:u.join(",")}return jr("Invalid hex color -> ".concat(t)),o}function to(t){var e=t.progress,n=t.startColor,r=t.endColor,o=_r(n,null,!0),a=_r(r,null,!0),i=$r(o,3),u=i[0],c=i[1],l=i[2],f=$r(a,3),s=f[0],d=f[1],h=f[2],g=[(u+Math.round((s-u)*e)).toString(16),(c+Math.round((d-c)*e)).toString(16),(l+Math.round((h-l)*e)).toString(16)];return"#".concat(g.join("").toUpperCase())}function eo(t){var e=t.direct,n=t.list,r=void 0===n?[]:n,o=Zt(e)?"".concat(e,"deg"):e;return"linear-gradient(".concat(o,", ").concat(r.join(),")")}function no(t,e){var n=zn(t);return n.setHours(n.getHours()+e)}function ro(t,e){var n=zn(t);return n.setMinutes(n.getMinutes()+e)}function oo(t,e){var n=zn(t);return n.setSeconds(n.getSeconds()+e)}function ao(){return new Date}function io(t,e){var n=t.getTime(),r=(e.getTime()-n)/1e3,o=parseInt(r/86400),a=parseInt((r-24*o*60*60)/3600),i=parseInt((r-24*o*60*60-60*a*60)/60);return{day:o,hour:a,minute:i,second:r-24*o*60*60-60*a*60-60*i}}var uo=function(t,e,n){var r=zn(t),o=e?zn(e):new Date,a=o.getTime()-r.getTime();return"second"===n&&a/1e3||"minute"===n&&a/1e3/60||"hour"===n&&a/1e3/60/60||"day"===n&&a/1e3/60/60/24||"week"===n&&a/1e3/60/60/24/7||"month"===n&&co(r,o)||"quarter"===n&&co(r,o)/3||"year"===n&&co(r,o)/12||a},co=function(t,e){var n=zn(t),r=zn(e);return 12*(n.getFullYear()-r.getFullYear())+n.getMonth()-r.getMonth()};function lo(t){var e=t.data;return W(e).day()}function fo(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=W().day();if(!t)return e;var n="";switch(Hn(e)){case 0:n="日";break;case 1:n="一";break;case 2:n="二";break;case 3:n="三";break;case 4:n="四";break;case 5:n="五";break;case 6:n="六";break;default:n=""}return de(n)?"":"星期".concat(n)}function so(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.thousand,a=void 0===o?",":o,i=t.decimal;return ho({data:e,places:r,symbol:"",thousand:a,decimal:void 0===i?".":i})}function ho(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.symbol,a=void 0===o?"¥":o,i=t.thousand,u=void 0===i?",":i,c=t.decimal,l=void 0===c?".":c,f=e||0,s=isNaN(r=Math.abs(r))?2:r,d=void 0!==a?a:"¥",h=u||",",g=l||".",m=f<0?"-":"",v=parseInt(f=Math.abs(+f||0).toFixed(s),10)+"",p=v.length;return d+m+((p=p>3?p%3:0)?v.substr(0,p)+h:"")+v.substr(p).replace(/(\d{3})(?=\d)/g,a+"1"+h)+(s?g+Math.abs(f-Hn(v)).toFixed(s).slice(2):"")}function go(t){var e,n,r,o=t.target,a=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],i=["","拾","佰","仟"],u=["","万","亿","兆"],c=["角","分","毫","厘"],l="";if(""===o)return"";if((o=parseFloat(o))>=1e15)return"超出最大处理数字";if(0===o)return l=a[0]+"元";if(-1===(o=o.toString()).indexOf("."))e=o,n="";else{var f=$r(r=o.split("."),2);e=f[0],n=f[1],n=r[1].substr(0,4)}if(parseInt(e,10)>0){for(var s=0,d=e.length,h=0;h<d;h+=1){var g=e.substr(h,1),m=d-h-1,v=m/4,p=m%4;"0"===g?s+=1:(s>0&&(l+=a[0]),s=0,l+=a[parseInt(g,10)]+i[p]),0===p&&s<4&&(l+=u[v])}l+="元"}if(""!==n)for(var y=n.length,w=0;w<y;w+=1){var b=n.substr(w,1);"0"!==b&&(l+=a[Number(b)]+c[w])}return""===l&&(l+=a[0]+"元"),l}function mo(t){var e=t.data,n=t.fmt,r=void 0===n?De.yearMonthDayHourMinuteSecond:n;return null==(e||null)?"":W(e).format(r)}function vo(t){var e=t.target,n=t.format,r=t.option,o=void 0===r?{}:r;if(te(n))return n(e);if(ae(n))switch(n){case Se.money:return ho({data:e});case Se.datetime:return mo({data:e});case Se.chineseMoney:return go({target:e,option:o});case Se.percentage:return"".concat(Zn(100*e,1),"%");default:return e}return e}function po(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=bt(bt({},{second:["刚刚","片刻后"],seconds:["%d 秒前","%d 秒后"],minute:["大约 1 分钟前","大约 1 分钟后"],minutes:["%d 分钟前","%d 分钟后"],hour:["大约 1 小时前","大约 1 小时后"],hours:["%d 小时前","%d 小时后"],day:["1 天前","1 天后"],days:["%d 天前","%d 天后"],month:["大约 1 个月前","大约 1 个月后"],months:["%d 月前","%d 月后"],year:["大约 1 年前","大约 1 年后"],years:["%d 年前","%d 年后"]}),n||{}),o=uo(t,e),a=o<0?1:0,i=Math.abs(o)/1e3,u=i/60,c=u/60,l=c/24,f=l/365,s=function(t,e){return t.replace(/%d/i,e)};return i<10&&s(r.second[a],parseInt(i))||i<45&&s(r.seconds[a],parseInt(i))||i<90&&s(r.minute[a],1)||u<45&&s(r.minutes[a],parseInt(u))||u<90&&s(r.hour[a],1)||c<24&&s(r.hours[a],parseInt(c))||c<42&&s(r.day[a],1)||l<30&&s(r.days[a],parseInt(l))||l<45&&s(r.month[a],1)||l<365&&s(r.months[a],parseInt(l/30))||f<1.5&&s(r.year[a],1)||s(r.years[a],parseInt(f))}function yo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return po(t,ao(),e)}function wo(t){return de(t.text||null)&&xr(gr(ge,"checkMessagePromptData option text disallow empty","loggerAssist")),!0}var bo={showOpenMessage:function(t){var e=t.text;t.duration,t.onClose,Ar({text:e})},showInfoMessage:function(t){var e=t.text;t.duration,t.onClose,Ar({text:e})},showSuccessMessage:function(t){var e=t.text;t.duration,t.onClose,Ar({text:e})},showWarnMessage:function(t){var e=t.text;t.duration,t.onClose,xr(e)},showWarningMessage:function(t){var e=t.text;t.duration,t.onClose,xr(e)},showErrorMessage:function(t){var e=t.text;t.duration,t.onClose,Or(e)},setErrorMessageDisplayMonitorComplete:!1};function xo(t){bo.showOpenMessage=t}function Ao(t){bo.showInfoMessage=t}function So(t){bo.showSuccessMessage=t}function Do(t){bo.showWarnMessage=t}function Mo(t){bo.showWarningMessage=t}function Eo(t){bo.showErrorMessage=t,bo.setErrorMessageDisplayMonitorComplete=!0}function Co(t){Oo({text:t})}function Oo(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(bo.showOpenMessage)&&(wo({text:e}),bo.showOpenMessage({text:e,duration:r,onClose:a}))}function jo(t){Io({text:t})}function Io(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(bo.showInfoMessage)&&(wo({text:e}),bo.showInfoMessage({text:e,duration:r,onClose:a}))}function ko(t){To({text:t})}function To(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(bo.showSuccessMessage)&&(wo({text:e}),bo.showSuccessMessage({text:e,duration:r,onClose:a}))}function No(t){Po({text:t})}function Po(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(bo.showWarnMessage)&&(wo({text:e}),bo.showWarnMessage({text:e,duration:r,onClose:a}))}function Fo(t){Yo({text:t})}function Yo(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(bo.showWarningMessage)&&(wo({text:e}),bo.showWarningMessage({text:e,duration:r,onClose:a}))}function Bo(t){Ho({text:t})}function Ho(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(bo.showErrorMessage)&&(wo({text:e}),bo.showErrorMessage({text:e,duration:r,onClose:a}))}function Uo(t){Wo({text:t})}function Wo(t){var e=t.text;de(e||"")||(bo.setErrorMessageDisplayMonitorComplete&&Ho({text:e}),jr({text:e}))}function Ro(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t&&t.length>e?"".concat(Ln(t).substring(0,e)).concat(n):Ln(t)}function Lo(t,e,n,r){var o=Ln(t),a=(t||"").length;a>0&&(n>=0||r>=0)&&(o=n>=a||r>=a||(n||0)+(r||0)>=a?t:t.substr(0,n)+e+t.substr(a-r,r));return o||""}function Ko(t,e){for(var n=(new Date).getTime();!((new Date).getTime()-n>t););te(e)&&e()}function Qo(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(ne(t))return n;if(null==t)return n;if(!ae(e)){var r="getPathValue Function param path must be string";return Wo({message:r}),null}var o=xt(t,e,n);return ne(n)||re(n)?o:o||n}function Vo(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string target");if(!ae(e))throw new Error("removeEndMatch only use for string match");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0&&t.length===n+e.length?t.substr(n,e.length):t}function Go(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string source");if(!ae(e))throw new Error("removeEndMatch only use for string target");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0?t.substr(n,e.length):t}function Jo(t){var e=t.data,n=t.key,r=t.defaultValue,o=void 0===r?null:r,a=t.convert,i=void 0===a?null:a,u=t.convertBuilder,c=void 0===u?null:u,l=t.format,f=void 0===l?null:l,s=t.formatBuilder,d=void 0===s?null:s,h=Qo(e,n,o),g=h;return null==(c||null)&&null==(i||null)||(g=te(c)?$n({target:h,convert:c}):$n({target:h,convert:i})),null==(d||null)&&null==(f||null)||(g=te(d)?vo({target:g,format:d}):vo({target:g,format:f})),g}function zo(t){var e=t.operate,n=t.item,r=t.list,o=t.key,a=t.sortInitialValue,i=void 0===a?0:a;if(null==(n||null))return r;var u=[],c=[],l=[];if((r||[]).length<=1){return Po({message:"无需排序!"}),r}var f=Jo({data:n,key:o,convert:Ae.number});switch((r||[]).forEach((function(t){var e=Jo({data:t,key:o,convert:Ae.number});e<f&&u.push(t),e>f&&c.push(t)})),e){case Me.moveUp:if(f===i){return Po({message:"已经排在首位!"}),r}(u||[]).forEach((function(t,e){if(e<u.length-1)l.push(t);else{var r=n;r[o]-=1,l.push(r);var a=t;a[o]+=1,l.push(a)}})),l=l.concat(c);break;case Me.moveDown:if(f===(r||[]).length+i-1){return Po({message:"已经排在末位!"}),r}l=l.concat(u),(c||[]).forEach((function(t,e){if(0===e){var r=t;r[o]-=1,l.push(r);var a=n;a[o]+=1,l.push(a)}else l.push(t)}));break;default:Po({message:"不符合的操作, 允许的操作为['".concat(Me.moveUp,"','").concat(Me.moveDown,"']!")})}return l}function qo(t){var e=t.list,n=void 0===e?[]:e,r=t.convert,o=void 0===r?null:r,a=t.recursiveKey,i=void 0===a?"children":a;return(ie(n)?n:[n]).map((function(t){return Zo({data:t,convert:o,target:i})}))}function Zo(t){var e=t.data,n=t.convert,r=void 0===n?null:n,o=t.recursiveKey,a=void 0===o?"children":o;if(!te(r))return e;var i=r(e),u=e[a],c=[];return ie(u)&&(c=u.map((function(t){return Zo({data:t,convert:r,target:a})}))),i[a]=c,i}function $o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Jt(t,e,n);return!ne(r)}function Xo(t){var e=t.target,n=t.value,r=t.compareValueHandler,o=t.handler;if(null==(e||null))throw new Error("handleItem: target not allow null");if(null==(e.state||null))throw new Error("handleItem: target.state not allow null");var a=e.state.metaOriginalData;if(null==(a||null))throw new Error("handleItem: target.state.metaOriginalData not allow null");var i=-1;if(te(r))if(te(o)){if(null==(a.list||null))throw new Error("handleItem: target.state.metaOriginalData.list must be array");a.list.forEach((function(t,e){r(t)===n&&(i=e)})),i>=0&&(a.list[i]=o(a.list[i]),e.setState({metaOriginalData:a}))}else{Wo({message:"handler mast be function"})}else{Wo({message:"compareDataIdHandler mast be function"})}}function _o(){function t(t,e){return ne(e)?t:e}for(var e=Et({},arguments.length<=0?void 0:arguments[0]),n=1;n<arguments.length;n++)e=Ct(e,n<0||arguments.length<=n?void 0:arguments[n],t);return e}function ta(t){if(t&&"object"===vt(t)){var e="";return Object.keys(t).forEach((function(n){var r,o=(null!==(r=n.replace(/([A-Z])/g,"-$1"))&&void 0!==r?r:"").toLowerCase();e+="".concat(o,":").concat(t[n],";")})),e}return t&&"string"==typeof t?t:""}function ea(t,e){return t&&"object"===vt(t)&&e&&"object"===vt(e)?Object.assign({},t,e):ta(t)+ta(e)}function na(t,e){var n=t;for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n}var ra="htmlAssist";function oa(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!Zt(t))return t;if(!Zt(e)||e<=0)throw new Error(gr(ge,"pxToRem -> root value must be number and greater than 0, current root value [".concat(e,"] is invalid"),ra));var o=parseFloat(t);if(o<r)return t;var a=Hn(o/e,n);return 0===a?"0":a+"rem"}var aa="localStorageAssist",ia={getStorage:function(t){jr(gr(ge,"setStorageGetter need config, use setStorageGetter to set it",aa))},setStorage:function(t,e){jr(gr(ge,"setStorageSetter need config, use setStorageSetter to set it",aa))},removeStorage:function(t){jr(gr(ge,"setStorageRemover need config, use setStorageRemover to set it",aa))},flushStorage:function(){jr(gr(ge,"setStorageFlusher need config, use setStorageFlusher to set it",aa))}};function ua(t){ia.getStorage=t}function ca(t){ia.setStorage=t}function la(t){ia.removeStorage=t}function fa(t){ia.flushStorage=t}function sa(t){try{return ia.getStorage(t)}catch(e){throw jr({key:t,e:e}),e}}function da(t){var e=sa(t);return de(e)?null:JSON.parse(e||"{}")}function ha(t,e){ia.setStorage(t,e)}function ga(t,e){ia.setStorage(t,JSON.stringify(e||{}))}function ma(t){ia.removeStorage(t)}function va(){ia.flushStorage()}var pa=function(t){var e=t.text;t.duration,t.onClose,Ar({text:e})};var ya="nearestLocalhostNotify";function wa(){var t=da(ya);return null==(t||null)||null==(t.nearestTime||null)?null:t||null}function ba(){return ga(ya,{nearestTime:parseInt((new Date).getTime()/1e3,10)})}function xa(){ma(ya)}function Aa(t){var e=t.text,n=!1,r=0,o=wa()||null;null==o?n=!0:r=o.nearestTime||0;var a=parseInt((new Date).getTime()/1e3,10);try{if(r+30<a&&(n=!0),n){var i="当前接口域名: ".concat(e,". ");!function(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(pa)&&pa({text:e,duration:r,onClose:a})}({text:i}),Ir({message:i}),ba()}}catch(t){br(t)}}function Sa(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=R(t);if(de(e))return n;if(de(n))return e;var r=e.lastIndexOf("?")>=0?"&":"?";return"".concat(e).concat(r).concat(n)}function Da(t){return L(t)}function Ma(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"请".concat(e||"输入").concat(t).concat(de(n)?"":",".concat(n))}function Ea(t){var e=t.label,n=t.name,r=t.helper,o="",a="",i="";if(ae(e))o=e;else{xr({label:e,name:n,helper:r}),Wo({message:"label必须为文本"})}if(ae(n))a=n;else{xr({label:e,name:n,helper:r}),Wo({message:"name必须为文本"})}if(ae(r))i=r;else{xr({label:e,name:n,helper:r}),Wo({message:"helper必须为文本"})}return{label:o,name:a,helper:i}}function Ca(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"注: ";return"".concat(e).concat(t,". ")}export{no as addHour,ro as addMinute,oo as addSecond,Et as assign,Ct as assignWith,na as attachPropertiesToComponent,Ma as buildFieldDescription,Ca as buildFieldHelper,to as buildHexColor,eo as buildLinearGradient,gr as buildPromptModuleInfo,Sa as buildQueryStringify,_r as buildRGBColorFromHexColor,Xr as buildRandomHexColor,ta as buildStringStyle,Pr as cacheMountTarget,uo as calculateDateInterval,co as calculateMonthInterval,io as calculateTimeInterval,$o as checkExist,Ea as checkFromConfig,sr as checkHasMore,he as checkInCollection,wo as checkMessagePromptData,de as checkStringIsNullOrWhiteSpace,dr as checkWhetherDevelopmentEnvironment,ir as cloneWithoutMethod,Ae as convertCollection,oa as convertPixelToRem,De as datetimeFormat,ht as decodeBase64,Jr as deleteCache,zr as deleteMultiCache,Kt as difference,wr as displayObjectMessage,yr as displayTextMessage,Ft as dropRight,Ro as ellipsis,xe as emptyDatetime,gt as encodeBase64,St as endsWith,me as envCollection,Pe as errorImage,er as evil,Qt as filter,Jt as find,Gt as findIndex,Nt as first,mt as fixedZero,Tt as floor,qr as flushAllCache,va as flushLocalStorage,jt as forEach,Se as formatCollection,po as formatDateInterval,yo as formatDateIntervalWithNow,mo as formatDatetime,so as formatDecimal,ho as formatMoney,go as formatMoneyToChinese,vo as formatTarget,xt as get,or as getBrowserInfo,rr as getBrowserVersion,Kr as getCache,Br as getCachePool,lo as getDayOfWeek,Rr as getExpiration,fr as getGuid,da as getJsonFromLocalStorage,Tr as getLoggerDisplaySwitch,Vr as getMultiCache,wa as getNearestLocalhostNotifyCache,ao as getNow,Qo as getPathValue,sa as getStringFromLocalStorage,fo as getTodayOfWeek,hr as getValue,Jo as getValueByKey,It as gte,Xo as handleItem,Hr as hasCache,ie as isArray,ee as isBoolean,nr as isBrowser,oe as isDate,qt as isDatetime,Xt as isEqual,_t as isEqualBySerialize,te as isFunction,se as isImageBase4,zt as isInvalid,$t as isMoney,re as isNull,Zt as isNumber,ue as isObject,ce as isPlainObject,le as isPromise,ae as isString,ne as isUndefined,fe as isUrl,Qr as keys,ia as localStorageAssist,pr as logColorCollection,Sr as logConfig,br as logData,Er as logDebug,je as logDisplay,Or as logError,jr as logException,Cr as logExecute,Ar as logInfo,Oe as logLevel,kr as logObject,Dr as logStack,Ir as logText,Mr as logTrace,xr as logWarn,vr as loggerSwitch,Wt as map,kt as memoize,_o as mergeProps,ea as mergeStyle,bo as messagePromptAssist,Te as messageTypeCollection,ke as notificationTypeCollection,Da as parseQueryString,ur as refitCommonData,cr as refitFieldDecoratorOption,Vo as removeEndMatch,Ut as removeFromArray,Go as removeLastMatch,ma as removeLocalStorage,xa as removeNearestLocalhostNotifyCache,Ht as replace,Lo as replaceWithKeep,ye as requestMethod,Ot as reverse,At as round,ga as saveJsonToLocalStorage,ha as saveStringToLocalStorage,lr as searchFromList,ar as seededRandom,Rt as set,Ur as setCache,Fr as setCacheMount,Eo as setErrorMessageDisplayMonitor,Lr as setExpiration,Ao as setInfoMessageDisplayMonitor,fa as setLocalStorageFlusher,ua as setLocalStorageGetter,la as setLocalStorageRemover,ca as setLocalStorageSetter,Nr as setLoggerDisplaySwitch,Wr as setMultiCache,ba as setNearestLocalhostNotifyCache,xo as setOpenMessageDisplayMonitor,So as setSuccessMessageDisplayMonitor,Do as setWarnMessageDisplayMonitor,Mo as setWarningMessageDisplayMonitor,Ho as showErrorMessage,Io as showInfoMessage,Oo as showOpenMessage,Wo as showRuntimeError,Bo as showSimpleErrorMessage,jo as showSimpleInfoMessage,Co as showSimpleOpenMessage,Uo as showSimpleRuntimeError,ko as showSimpleSuccessMessage,No as showSimpleWarnMessage,Fo as showSimpleWarningMessage,To as showSuccessMessage,Po as showWarnMessage,Yo as showWarningMessage,Lt as size,Ko as sleep,Vt as sortBy,zo as sortCollectionByKey,Me as sortOperate,Dt as sortedUnique,Mt as split,Pt as startsWith,Zr as statisticsCache,Gr as takeCache,$n as to,Kn as toBoolean,Un as toBoundary,zn as toDatetime,Gn as toLower,Jn as toLowerFirst,Yn as toMd5,Wn as toMoney,Hn as toNumber,Rn as toPercentage,qn as toPromise,Zn as toRound,Fn as toSha1,Ln as toString,Qn as toUpper,Vn as toUpperFirst,Zo as transformData,qo as transformListData,Ne as transparentImage,Bt as trim,Aa as trySendNearestLocalhostNotify,pe as underlyingExtensionState,ve as underlyingState,Yt as uniqBy,Ce as whetherNumber,Ee as whetherString,be as zeroInt,we as zeroString};
|
|
@@ -26,7 +26,7 @@ export function isEqualBySerialize(target: any, compareData: any): boolean;
|
|
|
26
26
|
* Check target is function
|
|
27
27
|
*/
|
|
28
28
|
export function isFunction(target: any): boolean;
|
|
29
|
-
/**
|
|
29
|
+
/**isDateLodash
|
|
30
30
|
* Check target is boolean
|
|
31
31
|
*/
|
|
32
32
|
export function isBoolean(target: any): boolean;
|
package/es/utils/common.d.ts
CHANGED
|
@@ -61,3 +61,18 @@ export function transformData({ data, convert, recursiveKey, }: {
|
|
|
61
61
|
recursiveKey?: string | undefined;
|
|
62
62
|
}): any;
|
|
63
63
|
export function checkExist(array: any, predicateFunction: any, fromIndex?: number): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 处理已存储的远程接口列表数据中的指定键数据
|
|
66
|
+
* @param {Object} options 配置参数
|
|
67
|
+
* @param {Object} options.target 目标调用对象, 需要具备 state 以及 setState
|
|
68
|
+
* @param {String} options.value 目标对比值
|
|
69
|
+
* @param {Function} options.compareValueHandler 解析处列表项键值数据进行对比, 需返回待对比数据
|
|
70
|
+
* @param {Function} options.handler 处理对比命中的项的函数, 处理结果将被替换进列表
|
|
71
|
+
* @returns
|
|
72
|
+
*/
|
|
73
|
+
export function handleItem({ target, value, compareValueHandler, handler }: {
|
|
74
|
+
target: Object;
|
|
75
|
+
value: string;
|
|
76
|
+
compareValueHandler: Function;
|
|
77
|
+
handler: Function;
|
|
78
|
+
}): void;
|
package/es/utils/constants.d.ts
CHANGED
|
@@ -31,10 +31,12 @@ export function toBoolean(target: any): boolean;
|
|
|
31
31
|
* Convert to upper
|
|
32
32
|
*/
|
|
33
33
|
export function toUpper(target: any): string;
|
|
34
|
+
export function toUpperFirst(source: any): string;
|
|
34
35
|
/**
|
|
35
36
|
* Convert to lower
|
|
36
37
|
*/
|
|
37
38
|
export function toLower(target: any): string;
|
|
39
|
+
export function toLowerFirst(target: any): string;
|
|
38
40
|
/**
|
|
39
41
|
* Convert to datetime
|
|
40
42
|
*/
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Set local storage getter
|
|
3
3
|
*/
|
|
4
|
-
export function
|
|
4
|
+
export function setLocalStorageGetter(handler: any): void;
|
|
5
5
|
/**
|
|
6
6
|
* Set local storage setter
|
|
7
7
|
*/
|
|
8
|
-
export function
|
|
8
|
+
export function setLocalStorageSetter(handler: any): void;
|
|
9
9
|
/**
|
|
10
10
|
* Set local storage remover
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
12
|
+
export function setLocalStorageRemover(handler: any): void;
|
|
13
13
|
/**
|
|
14
14
|
* Set local storage remover
|
|
15
15
|
*/
|
|
16
|
-
export function
|
|
16
|
+
export function setLocalStorageFlusher(handler: any): void;
|
|
17
17
|
/**
|
|
18
18
|
* Get text to local storage with key
|
|
19
19
|
*/
|
|
@@ -52,6 +52,12 @@ export function logInfo(data: string | Object, ancillaryInformation?: string): v
|
|
|
52
52
|
* @param {String} ancillaryInformation when ancillary Information not empty, it will be display
|
|
53
53
|
*/
|
|
54
54
|
export function logConfig(data: string | Object, ancillaryInformation?: string): void;
|
|
55
|
+
/**
|
|
56
|
+
* Log stack message, default ancillaryInformation is empty string
|
|
57
|
+
* @param {String|Object} data the data will be display
|
|
58
|
+
* @param {String} ancillaryInformation when ancillary Information not empty, it will be display
|
|
59
|
+
*/
|
|
60
|
+
export function logStack(data: string | Object, ancillaryInformation?: string): void;
|
|
55
61
|
/**
|
|
56
62
|
* Log trace message, default ancillaryInformation is empty string
|
|
57
63
|
* @param {String|Object} data the data will be display
|
|
@@ -119,4 +125,5 @@ export namespace logColorCollection {
|
|
|
119
125
|
const trace: string;
|
|
120
126
|
const error: string;
|
|
121
127
|
const exception: string;
|
|
128
|
+
const stack: string;
|
|
122
129
|
}
|
package/es/utils/meta.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-soft-utility",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "easy-soft-utility",
|
|
6
6
|
"keywords": [
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"stylelint-declaration-block-no-ignored-properties": "^2.6.0",
|
|
124
124
|
"webpack": "^5.75.0"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "d3054cb1a628e29e68454c8d98678934854eae23"
|
|
127
127
|
}
|