"use strict";var f=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var S=(a,e)=>{for(var r in e)f(a,r,{get:e[r],enumerable:!0})},w=(a,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of x(e))!T.call(a,t)&&t!==r&&f(a,t,{get:()=>e[t],enumerable:!(s=E(e,t))||s.enumerable});return a};var N=a=>w(f({},"__esModule",{value:!0}),a);var C={};S(C,{SystemModule:()=>I});module.exports=N(C);var k=require("../../internal/module-base");const O=["video","audio","image","text","application"],j=["application/pdf","audio/mpeg","audio/wav","image/png","image/jpeg","image/gif","video/mp4","video/mpeg","text/html"],F=["en","wl","ww"],y={index:"o",slot:"s",mac:"x",pci:"p"},v=["SUN","MON","TUE","WED","THU","FRI","SAT"];class I extends k.ModuleBase{fileName(e={}){const{extensionCount:r=1}=e,s=this.faker.word.words().toLowerCase().replace(/\W/g,"_"),t=this.faker.helpers.multiple(()=>this.fileExt(),{count:r}).join(".");return t.length===0?s:`${s}.${t}`}commonFileName(e){return`${this.fileName({extensionCount:0})}.${e||this.commonFileExt()}`}mimeType(){const e=Object.keys(this.faker.definitions.system.mimeTypes);return this.faker.helpers.arrayElement(e)}commonFileType(){return this.faker.helpers.arrayElement(O)}commonFileExt(){return this.fileExt(this.faker.helpers.arrayElement(j))}fileType(){const e=this.faker.definitions.system.mimeTypes,r=new Set(Object.keys(e).map(s=>s.split("/")[0]));return this.faker.helpers.arrayElement([...r])}fileExt(e){const r=this.faker.definitions.system.mimeTypes;if(typeof e=="string")return this.faker.helpers.arrayElement(r[e].extensions);const s=new Set(Object.values(r).flatMap(({extensions:t})=>t));return this.faker.helpers.arrayElement([...s])}directoryPath(){const e=this.faker.definitions.system.directoryPaths;return this.faker.helpers.arrayElement(e)}filePath(){return`${this.directoryPath()}/${this.fileName()}`}semver(){return[this.faker.number.int(9),this.faker.number.int(9),this.faker.number.int(9)].join(".")}networkInterface(e={}){var o,m,l,h,c;const{interfaceType:r=this.faker.helpers.arrayElement(F),interfaceSchema:s=this.faker.helpers.objectKey(y)}=e;let t,i="";const n=()=>this.faker.string.numeric({allowLeadingZeros:!0});switch(s){case"index":t=n();break;case"slot":t=`${n()}${(o=this.faker.helpers.maybe(()=>`f${n()}`))!=null?o:""}${(m=this.faker.helpers.maybe(()=>`d${n()}`))!=null?m:""}`;break;case"mac":t=this.faker.internet.mac("");break;case"pci":i=(l=this.faker.helpers.maybe(()=>`P${n()}`))!=null?l:"",t=`${n()}s${n()}${(h=this.faker.helpers.maybe(()=>`f${n()}`))!=null?h:""}${(c=this.faker.helpers.maybe(()=>`d${n()}`))!=null?c:""}`;break}return`${i}${r}${y[s]}${t}`}cron(e={}){const{includeYear:r=!1,includeNonStandard:s=!1}=e,t=[this.faker.number.int(59),"*"],i=[this.faker.number.int(23),"*"],n=[this.faker.number.int({min:1,max:31}),"*","?"],o=[this.faker.number.int({min:1,max:12}),"*"],m=[this.faker.number.int(6),this.faker.helpers.arrayElement(v),"*","?"],l=[this.faker.number.int({min:1970,max:2099}),"*"],h=this.faker.helpers.arrayElement(t),c=this.faker.helpers.arrayElement(i),u=this.faker.helpers.arrayElement(n),d=this.faker.helpers.arrayElement(o),b=this.faker.helpers.arrayElement(m),g=this.faker.helpers.arrayElement(l);let p=`${h} ${c} ${u} ${d} ${b}`;r&&(p+=` ${g}`);const $=["@annually","@daily","@hourly","@monthly","@reboot","@weekly","@yearly"];return!s||this.faker.datatype.boolean()?p:this.faker.helpers.arrayElement($)}}0&&(module.exports={SystemModule});
