import{s as src}from"../szjcomo-utils/szjcomo-utils.8c09309c.js";import{c as commonjsGlobal}from"../como-admin-web/como-admin-web.4290f457.js";import{m as main}from"../como-validator/como-validator.c3b2e2bb.js";var dist={},comoUtils={};Object.defineProperty(comoUtils,"__esModule",{value:!0}),comoUtils.ComoTsUtils=void 0;const szjcomo=src;class _ComoTsUtils{constructor(){}static get Ins(){return _ComoTsUtils._instance||(_ComoTsUtils._instance=new _ComoTsUtils),_ComoTsUtils._instance}get szjComoUtils(){return szjcomo}AppResult(t,e,s=!0,r=0){return{data:e,message:t,code:r,error:s}}MtRand(t=0,e=1){return this.szjComoUtils.mt_rand(t,e)}StrMiddenHidden(t,e=0,s=0){let r=t.length-e-s,o="";for(let i=0;i/g,">").replace(/\s/g," ").replace(/\'/g,"'").replace(/\"/g,""")}HtmlUnEscape(t){if(0==t.length)return"";return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ").replace(/'/g,"'").replace(/"/g,'"')}Empty(t){return this.szjComoUtils.empty(t)}IsNumber(t){return this.szjComoUtils.isNumber(t)}IsAlpha(t){return this.szjComoUtils.isAlpha(t)}IsChinese(t){return this.szjComoUtils.isChinese(t)}IsAlphaNumber(t){return this.szjComoUtils.isAlphaNumber(t)}IsPhone(t){return this.szjComoUtils.isPhone(t)}IsObject(t){return this.szjComoUtils.isObject(t)}IsTel(t){return this.szjComoUtils.isTel(t)}IsQQ(t){return this.szjComoUtils.isQQ(t)}IsEmail(t){return this.szjComoUtils.isEmail(t)}IsURL(t){return this.szjComoUtils.isURL(t)}IsArray(t){return this.szjComoUtils.isArray(t)}InArray(t,e){return this.szjComoUtils.inArray(t,e)}IsFunction(t){return this.szjComoUtils.isFunction(t)}ArrayAvg(t){return this.szjComoUtils.arrayAvg(t)}ArraySum(t){return this.szjComoUtils.arraySum(t)}ArrayMin(t){return this.szjComoUtils.arrayMin(t)}ArrayMax(t){return this.szjComoUtils.arrayMax(t)}ArrayRemove(t,e){return this.szjComoUtils.arrayRemove(t,e)}ArrayUnique(t){return this.szjComoUtils.arrayUnique(t)}ArraySort(t){return this.szjComoUtils.arraySort(t)}ArrayMerge(t,e){return this.szjComoUtils.arrayMerge(t,e)}ArrayPop(t){return this.szjComoUtils.arrayPop(t)}ArrayRand(t){return this.szjComoUtils.arrayRand(t)}ArrayRecursion(t,e=0,s="pid",r="id",o="children"){return this.szjComoUtils.arrayRecursion(t,e,s,r,o)}ArrayRecursiveBack(t,e="children"){return this.szjComoUtils.arrayRecursiveBack(t,e)}ComoEncode(t,e="0l23456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"){let s,r,o,i,a=e.length,n=e.split(""),l="";for(let u=0;u{if(!(-1!=s.search(new RegExp("^[a-zA-Z一-龥]+$"))))throw new ComoValidatorError(null!=t?t:"只能是字母或中文或字母和中文的组合")})),this}IsLettersOrNumber(t){return this.validatorRules.extend(((e,s,r)=>{if(!/^[a-zA-Z0-9_]{1,}$/.test(s))throw new ComoValidatorError(null!=t?t:"字母或数字或下划线")})),this}IsPhone(t){return this.validatorRules.phone(t),this}IsObject(t){return this.validatorRules.object(t),this}IsArray(t){return this.validatorRules.isArray(t),this}IsQQ(t){return this.validatorRules.qq(t),this}IsURL(t){return this.validatorRules.url(t),this}InArray(t,e){return this.validatorRules.inArray(t,e),this}IsIp(t){return this.validatorRules.ip(t),this}Ref(t,e){return this.validatorRules.ref(t,e),this}IsIdCard(t){return this.validatorRules.idCard(t),this}IsIdentityNumber(t){return this.validatorRules.extend(((e,s,r)=>{try{comoUtils_1.ComoTsUtils.Ins.IsIdentityNumber(s.toString())}catch(o){throw t?new ComoValidatorError(t):o}})),this}HtmlEscape(t){return this.validatorRules.extend(((t,e,s)=>{let r=comoUtils_1.ComoTsUtils.Ins.HtmlEscape(e);s[t]=r})),this}Rules(){return this.validatorRules}static get Ins(){return new this}}comoRule.ComoTsRuleUtil=ComoTsRuleUtil;const ComoTsValidate=function(t,e){return __awaiter(this,void 0,void 0,(function*(){return yield validate(t,e)}))};comoRule.ComoTsValidate=ComoTsValidate,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ComoTsValidate=t.ComoTsRuleUtil=t.ComoTsUtils=void 0;const e=comoUtils;Object.defineProperty(t,"ComoTsUtils",{enumerable:!0,get:function(){return e.ComoTsUtils}});const s=comoRule;Object.defineProperty(t,"ComoTsRuleUtil",{enumerable:!0,get:function(){return s.ComoTsRuleUtil}}),Object.defineProperty(t,"ComoTsValidate",{enumerable:!0,get:function(){return s.ComoTsValidate}})}(dist);export{dist as d};