import{A as t}from"./Bgmy51Qv.js";const l={computed:{maxImageSize(){const{media:e}=t();return e.image},maxExcelSize(){const{media:e}=t();return e.file},maxVideoSize(){const{media:e}=t();return e.video}},data(){return{allowedImageExtensions:/(\.jpg|\.jpeg|\.png|\.svg|\.webp|\.gif)$/i,allowedVideoExtensions:/(\.mp4)$/i,allowedExcelExtensions:/(\.xlsx)$/i,allowedZipExtensions:/(\.zip)$/i,passwordLength:6,reg:/^(([^<>()\]\\.,;:\s@"]+(\.[^<>()\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,24}))$/}},methods:{isValidExcel(e,i=this.maxExcelSize){return e.size>i*1024?this.$t("util.fSize",{size:i}):this.allowedExcelExtensions.exec(e.name)?null:this.$t("util.invFile")},isValidZip(e,i=this.maxExcelSize){return e.size>i*1024?this.$t("util.fSize",{size:i}):this.allowedZipExtensions.exec(e.name)?null:this.$t("util.invFile")},isValidImage(e,i=this.maxImageSize,s=!0){return e.size>i*1024?this.$t("util.fSize",{size:i}):s&&!this.allowedImageExtensions.exec(e.name)?this.$t("util.invFile"):!s&&!this.allowedVideoExtensions.exec(e.name)?this.$t("util.invFile"):null},isValidEmail(e){return this.reg.test(e)},isValidLength(e){return e&&e.length>=this.passwordLength||!1}}};export{l as v};
