import"./index-sxX6oYqj.js";/* empty css                  */import{o as f,B as m}from"./element-plus-xvP3-5Ws.js";const x=(e,o)=>f(e,o),E=(e,o)=>m({title:"提示",confirmButtonText:"确定",showCancelButton:!0,cancelButtonText:"取消",center:!0,...e},o),h=e=>d(e)&&/^1[3-9]\d{9,9}$/.test(e),d=e=>typeof e=="string",u=e=>d(e)&&/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(e),S=e=>!!e&&/^.{8}-.{4}-.{4}-.{4}-.{12}$/.test(e);var g;(e=>{e.require={required:!0,message:()=>"输入不能为空！",trigger:"blur"},e.nonNullStr={validator(o,t,r,n,i){typeof t=="string"&&t.length&&!t.trim()?r(new Error("输入不能为空字符串")):r()},trigger:"change"},e.numberStr={validator(o,t,r,n,i){if(!t){r();return}typeof t=="string"&&!/^\d*$/.test(t)?r(new Error("请输入整数")):r()},trigger:"change"},e.floatStr={validator(o,t,r,n,i){if(!t){r();return}if(typeof t!="string"){r();return}const s=new Error("请输入正确格式，如：1.1");/(^\.)|(\.$)/.test(t)?r(s):/^[\d\.]*$/.test(t)?r():r(s)},trigger:"change"},e.requireChange={required:!0,message:()=>"输入不能为空！",trigger:"change"},e.requireChangeFactory=o=>({required:!0,message:()=>o,trigger:"change"}),e.phone=[e.require,{validator(o,t,r,n,i){if(!t){r();return}h(t)?r():r(new Error("格式：1[3-9] + 八位0-9数字"))},trigger:"change"}],e.email=[e.require,{validator(o,t,r,n,i){if(!t){r();return}u(t)?r():r(new Error("邮箱格式：xx@xx.xx"))},trigger:"change"}],e.date=[{type:"date",required:!0,message:"请选择日期！",trigger:"change"}],e.array=[{type:"array",required:!0,message:"请至少选择一个！",trigger:"change"}],e.check={validator(o,t,r,n,i){t===void 0?r(new Error("请选择！")):r()},trigger:"blur"},e.columnLabel={validator(o,t,r,n,i){typeof t=="string"&&t.length?/\s/.test(t)?r(new Error("输入不能包含空格")):/=/.test(t)?r(new Error("输入不能包含特殊字符：=")):/\$/.test(t)?r(new Error("输入不能包含特殊字符：$")):r():r()},trigger:"change"},e.limitHttpProtocol={validator(o,t,r,n,i){typeof t=="string"&&t.length?/^https?:\/\//.test(t)?r():r(new Error("请输入http://或https://开头的网址！")):r()},trigger:"change"}})(g||(g={}));var p;(e=>{e.trueAndFalse=(o,t,r,n)=>r===""||r===void 0?"":r?"是":"否",e.timeStrSplit=(o,t,r,n)=>{let i=typeof r=="string"&&r.split(" ");return i&&i[0]||""},e.timeToDate=(o,t,r,n)=>{if(!r||typeof r!="number")return"";let i=new Date(r),s={year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate(),hours:i.getHours(),min:i.getMinutes(),seconds:i.getSeconds()};return`${s.year}-${s.month.toString().padStart(2,"0")}-${s.day.toString().padStart(2,"0")}`}})(p||(p={}));const q=e=>typeof e!="string"?e:e.trim();export{p as F,g as R,x as a,S as i,E as m,q as t};
