@vielzeug/illusionist 2.3.2 → 26.10.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.
Files changed (159) hide show
  1. package/README.md +2 -50
  2. package/dist/_helpers/boolean.cjs +1 -1
  3. package/dist/_helpers/boolean.cjs.map +1 -1
  4. package/dist/_helpers/boolean.d.ts +1 -1
  5. package/dist/_helpers/boolean.d.ts.map +1 -1
  6. package/dist/_helpers/boolean.js +1 -8
  7. package/dist/_helpers/boolean.js.map +1 -1
  8. package/dist/_helpers/float.cjs +1 -1
  9. package/dist/_helpers/float.cjs.map +1 -1
  10. package/dist/_helpers/float.d.ts +1 -1
  11. package/dist/_helpers/float.d.ts.map +1 -1
  12. package/dist/_helpers/float.js +1 -12
  13. package/dist/_helpers/float.js.map +1 -1
  14. package/dist/_helpers/int.cjs +1 -1
  15. package/dist/_helpers/int.cjs.map +1 -1
  16. package/dist/_helpers/int.d.ts +1 -1
  17. package/dist/_helpers/int.d.ts.map +1 -1
  18. package/dist/_helpers/int.js +1 -8
  19. package/dist/_helpers/int.js.map +1 -1
  20. package/dist/_helpers/next-float.d.ts +1 -3
  21. package/dist/_helpers/next-float.d.ts.map +1 -1
  22. package/dist/_helpers/next-float.js +1 -8
  23. package/dist/_helpers/string.cjs +1 -1
  24. package/dist/_helpers/string.cjs.map +1 -1
  25. package/dist/_helpers/string.d.ts +1 -1
  26. package/dist/_helpers/string.d.ts.map +1 -1
  27. package/dist/_helpers/string.js +1 -28
  28. package/dist/_helpers/string.js.map +1 -1
  29. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  30. package/dist/_virtual/_rolldown/runtime.js +1 -11
  31. package/dist/commerce/commerce.cjs +1 -1
  32. package/dist/commerce/commerce.cjs.map +1 -1
  33. package/dist/commerce/commerce.js +1 -50
  34. package/dist/commerce/commerce.js.map +1 -1
  35. package/dist/commerce/data.js +1 -82
  36. package/dist/commerce/data.js.map +1 -1
  37. package/dist/date/date.cjs +1 -1
  38. package/dist/date/date.cjs.map +1 -1
  39. package/dist/date/date.d.ts.map +1 -1
  40. package/dist/date/date.js +1 -92
  41. package/dist/date/date.js.map +1 -1
  42. package/dist/errors.cjs +1 -1
  43. package/dist/errors.cjs.map +1 -1
  44. package/dist/errors.js +1 -9
  45. package/dist/errors.js.map +1 -1
  46. package/dist/factory.cjs +1 -1
  47. package/dist/factory.cjs.map +1 -1
  48. package/dist/factory.d.ts +0 -5
  49. package/dist/factory.d.ts.map +1 -1
  50. package/dist/factory.js +1 -45
  51. package/dist/factory.js.map +1 -1
  52. package/dist/finance/data.js +1 -59
  53. package/dist/finance/data.js.map +1 -1
  54. package/dist/finance/finance.cjs +1 -1
  55. package/dist/finance/finance.cjs.map +1 -1
  56. package/dist/finance/finance.js +1 -89
  57. package/dist/finance/finance.js.map +1 -1
  58. package/dist/illusionist.cjs +3 -3
  59. package/dist/illusionist.cjs.map +1 -1
  60. package/dist/illusionist.iife.js +3 -3
  61. package/dist/illusionist.iife.js.map +1 -1
  62. package/dist/illusionist.js +3 -3
  63. package/dist/illusionist.js.map +1 -1
  64. package/dist/index.cjs +1 -1
  65. package/dist/index.js +1 -12
  66. package/dist/internet/data.js +1 -83
  67. package/dist/internet/data.js.map +1 -1
  68. package/dist/internet/internet.cjs +1 -1
  69. package/dist/internet/internet.cjs.map +1 -1
  70. package/dist/internet/internet.js +1 -120
  71. package/dist/internet/internet.js.map +1 -1
  72. package/dist/locales/de.js +1 -11
  73. package/dist/locales/de.js.map +1 -1
  74. package/dist/locales/en.js +1 -11
  75. package/dist/locales/en.js.map +1 -1
  76. package/dist/locales/index.js +1 -3
  77. package/dist/location/data/de.js +1 -81
  78. package/dist/location/data/de.js.map +1 -1
  79. package/dist/location/data/en.js +1 -64
  80. package/dist/location/data/en.js.map +1 -1
  81. package/dist/location/location.cjs +1 -1
  82. package/dist/location/location.cjs.map +1 -1
  83. package/dist/location/location.js +1 -56
  84. package/dist/location/location.js.map +1 -1
  85. package/dist/lorem/data.js +1 -5
  86. package/dist/lorem/data.js.map +1 -1
  87. package/dist/lorem/lorem.cjs +3 -3
  88. package/dist/lorem/lorem.cjs.map +1 -1
  89. package/dist/lorem/lorem.js +3 -53
  90. package/dist/lorem/lorem.js.map +1 -1
  91. package/dist/person/data/de.js +1 -61
  92. package/dist/person/data/de.js.map +1 -1
  93. package/dist/person/data/en.js +1 -69
  94. package/dist/person/data/en.js.map +1 -1
  95. package/dist/person/person.cjs +1 -1
  96. package/dist/person/person.cjs.map +1 -1
  97. package/dist/person/person.js +1 -43
  98. package/dist/person/person.js.map +1 -1
  99. package/dist/seed/create-seed.cjs +1 -1
  100. package/dist/seed/create-seed.cjs.map +1 -1
  101. package/dist/seed/create-seed.d.ts +2 -2
  102. package/dist/seed/create-seed.d.ts.map +1 -1
  103. package/dist/seed/create-seed.js +1 -22
  104. package/dist/seed/create-seed.js.map +1 -1
  105. package/dist/seed/mulberry32.cjs +1 -1
  106. package/dist/seed/mulberry32.cjs.map +1 -1
  107. package/dist/seed/mulberry32.d.ts +1 -1
  108. package/dist/seed/mulberry32.d.ts.map +1 -1
  109. package/dist/seed/mulberry32.js +1 -12
  110. package/dist/seed/mulberry32.js.map +1 -1
  111. package/dist/system/data.js +1 -75
  112. package/dist/system/data.js.map +1 -1
  113. package/dist/system/system.cjs +1 -1
  114. package/dist/system/system.cjs.map +1 -1
  115. package/dist/system/system.d.ts.map +1 -1
  116. package/dist/system/system.js +1 -69
  117. package/dist/system/system.js.map +1 -1
  118. package/dist/types.d.ts +2 -3
  119. package/dist/types.d.ts.map +1 -1
  120. package/package.json +10 -82
  121. package/dist/_helpers/next-float.cjs +0 -2
  122. package/dist/_helpers/next-float.cjs.map +0 -1
  123. package/dist/_helpers/next-float.js.map +0 -1
  124. package/dist/commerce/index.cjs +0 -1
  125. package/dist/commerce/index.d.ts +0 -2
  126. package/dist/commerce/index.d.ts.map +0 -1
  127. package/dist/commerce/index.js +0 -2
  128. package/dist/date/index.cjs +0 -1
  129. package/dist/date/index.d.ts +0 -2
  130. package/dist/date/index.d.ts.map +0 -1
  131. package/dist/date/index.js +0 -2
  132. package/dist/finance/index.cjs +0 -1
  133. package/dist/finance/index.d.ts +0 -2
  134. package/dist/finance/index.d.ts.map +0 -1
  135. package/dist/finance/index.js +0 -2
  136. package/dist/internet/index.cjs +0 -1
  137. package/dist/internet/index.d.ts +0 -2
  138. package/dist/internet/index.d.ts.map +0 -1
  139. package/dist/internet/index.js +0 -2
  140. package/dist/location/index.cjs +0 -1
  141. package/dist/location/index.d.ts +0 -2
  142. package/dist/location/index.d.ts.map +0 -1
  143. package/dist/location/index.js +0 -2
  144. package/dist/lorem/index.cjs +0 -1
  145. package/dist/lorem/index.d.ts +0 -2
  146. package/dist/lorem/index.d.ts.map +0 -1
  147. package/dist/lorem/index.js +0 -2
  148. package/dist/person/index.cjs +0 -1
  149. package/dist/person/index.d.ts +0 -2
  150. package/dist/person/index.d.ts.map +0 -1
  151. package/dist/person/index.js +0 -2
  152. package/dist/seed/index.cjs +0 -1
  153. package/dist/seed/index.d.ts +0 -3
  154. package/dist/seed/index.d.ts.map +0 -1
  155. package/dist/seed/index.js +0 -3
  156. package/dist/system/index.cjs +0 -1
  157. package/dist/system/index.d.ts +0 -2
  158. package/dist/system/index.d.ts.map +0 -1
  159. package/dist/system/index.js +0 -2
@@ -1,84 +1,2 @@
1
- //#region src/internet/data.ts
2
- var e = {
3
- domains: [
4
- "example",
5
- "test",
6
- "demo",
7
- "mail",
8
- "web",
9
- "tech",
10
- "app",
11
- "cloud",
12
- "dev",
13
- "info"
14
- ],
15
- httpMethods: [
16
- "GET",
17
- "POST",
18
- "PUT",
19
- "PATCH",
20
- "DELETE",
21
- "HEAD",
22
- "OPTIONS"
23
- ],
24
- mimeTypes: [
25
- "text/plain",
26
- "text/html",
27
- "application/json",
28
- "application/xml",
29
- "application/octet-stream",
30
- "image/png",
31
- "image/jpeg",
32
- "image/gif",
33
- "image/svg+xml",
34
- "application/pdf",
35
- "audio/mpeg",
36
- "video/mp4"
37
- ],
38
- protocols: ["https", "http"],
39
- statusCodes: [
40
- 200,
41
- 201,
42
- 204,
43
- 301,
44
- 302,
45
- 304,
46
- 400,
47
- 401,
48
- 403,
49
- 404,
50
- 405,
51
- 409,
52
- 418,
53
- 422,
54
- 429,
55
- 500,
56
- 502,
57
- 503
58
- ],
59
- tlds: [
60
- "com",
61
- "org",
62
- "net",
63
- "io",
64
- "dev",
65
- "co",
66
- "app",
67
- "tech",
68
- "cloud",
69
- "ai"
70
- ],
71
- userAgents: [
72
- "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
73
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
74
- "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
75
- "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0",
76
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15",
77
- "Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1",
78
- "Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36"
79
- ]
80
- };
81
- //#endregion
82
- export { e as INTERNET_DATA };
83
-
1
+ var e={domains:[`example`,`test`,`demo`,`mail`,`web`,`tech`,`app`,`cloud`,`dev`,`info`],httpMethods:[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`,`OPTIONS`],mimeTypes:[`text/plain`,`text/html`,`application/json`,`application/xml`,`application/octet-stream`,`image/png`,`image/jpeg`,`image/gif`,`image/svg+xml`,`application/pdf`,`audio/mpeg`,`video/mp4`],protocols:[`https`,`http`],statusCodes:[200,201,204,301,302,304,400,401,403,404,405,409,418,422,429,500,502,503],tlds:[`com`,`org`,`net`,`io`,`dev`,`co`,`app`,`tech`,`cloud`,`ai`],userAgents:[`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0`,`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15`,`Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1`,`Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36`]};export{e as INTERNET_DATA};
84
2
  //# sourceMappingURL=data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","names":[],"sources":["../../src/internet/data.ts"],"sourcesContent":["export const INTERNET_DATA = {\n domains: ['example', 'test', 'demo', 'mail', 'web', 'tech', 'app', 'cloud', 'dev', 'info'],\n httpMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'],\n mimeTypes: [\n 'text/plain',\n 'text/html',\n 'application/json',\n 'application/xml',\n 'application/octet-stream',\n 'image/png',\n 'image/jpeg',\n 'image/gif',\n 'image/svg+xml',\n 'application/pdf',\n 'audio/mpeg',\n 'video/mp4',\n ],\n protocols: ['https', 'http'],\n statusCodes: [200, 201, 204, 301, 302, 304, 400, 401, 403, 404, 405, 409, 418, 422, 429, 500, 502, 503],\n tlds: ['com', 'org', 'net', 'io', 'dev', 'co', 'app', 'tech', 'cloud', 'ai'],\n userAgents: [\n 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',\n 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',\n 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',\n 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0',\n 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15',\n 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1',\n 'Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36',\n ],\n} as const;\n"],"mappings":";AAAA,IAAa,IAAgB;CAC3B,SAAS;EAAC;EAAW;EAAQ;EAAQ;EAAQ;EAAO;EAAQ;EAAO;EAAS;EAAO;CAAM;CACzF,aAAa;EAAC;EAAO;EAAQ;EAAO;EAAS;EAAU;EAAQ;CAAS;CACxE,WAAW;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,WAAW,CAAC,SAAS,MAAM;CAC3B,aAAa;EAAC;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;CAAG;CACtG,MAAM;EAAC;EAAO;EAAO;EAAO;EAAM;EAAO;EAAM;EAAO;EAAQ;EAAS;CAAI;CAC3E,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"data.js","names":[],"sources":["../../src/internet/data.ts"],"sourcesContent":["export const INTERNET_DATA = {\n domains: ['example', 'test', 'demo', 'mail', 'web', 'tech', 'app', 'cloud', 'dev', 'info'],\n httpMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'],\n mimeTypes: [\n 'text/plain',\n 'text/html',\n 'application/json',\n 'application/xml',\n 'application/octet-stream',\n 'image/png',\n 'image/jpeg',\n 'image/gif',\n 'image/svg+xml',\n 'application/pdf',\n 'audio/mpeg',\n 'video/mp4',\n ],\n protocols: ['https', 'http'],\n statusCodes: [200, 201, 204, 301, 302, 304, 400, 401, 403, 404, 405, 409, 418, 422, 429, 500, 502, 503],\n tlds: ['com', 'org', 'net', 'io', 'dev', 'co', 'app', 'tech', 'cloud', 'ai'],\n userAgents: [\n 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',\n 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',\n 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',\n 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0',\n 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15',\n 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1',\n 'Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36',\n ],\n} as const;\n"],"mappings":"AAAA,IAAa,EAAgB,CAC3B,QAAS,CAAC,UAAW,OAAQ,OAAQ,OAAQ,MAAO,OAAQ,MAAO,QAAS,MAAO,MAAM,EACzF,YAAa,CAAC,MAAO,OAAQ,MAAO,QAAS,SAAU,OAAQ,SAAS,EACxE,UAAW,CACT,aACA,YACA,mBACA,kBACA,2BACA,YACA,aACA,YACA,gBACA,kBACA,aACA,WACF,EACA,UAAW,CAAC,QAAS,MAAM,EAC3B,YAAa,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EACtG,KAAM,CAAC,MAAO,MAAO,MAAO,KAAM,MAAO,KAAM,MAAO,OAAQ,QAAS,IAAI,EAC3E,WAAY,CACV,kHACA,wHACA,wGACA,mFACA,wHACA,0IACA,uHACF,CACF"}
@@ -1,2 +1,2 @@
1
- const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/int.cjs"),n=require("../_helpers/string.cjs"),r=require("./data.cjs");var i=e.__exportAll({domainName:()=>d,email:()=>s,httpMethod:()=>h,ip:()=>f,mac:()=>p,mimeType:()=>_,password:()=>l,statusCode:()=>g,url:()=>u,userAgent:()=>m,username:()=>c}),a=`!@#$%^&*()_+-=[]{}|;:,.<>?`,o=[`api`,`v1`,`v2`,`users`,`posts`,`comments`,`articles`,`products`,`orders`,`items`,`search`,`auth`,`login`,`logout`,`profile`,`settings`,`dashboard`,`files`,`images`,`assets`,`static`,`public`,`private`,`admin`,`reports`];function s(e){return`${(n.pick(e.locale.person.firstNameFemale,e.source)??n.pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(n.pick(e.locale.person.lastName,e.source)??`name`).toLowerCase()}@${n.pick(r.INTERNET_DATA.domains,e.source)??`example`}.${n.pick(r.INTERNET_DATA.tlds,e.source)??`com`}`}function c(e){return t.int(0,1,e.source)===0?n.alphanumeric(t.int(6,12,e.source),e.source):`${(n.pick(e.locale.person.firstNameFemale,e.source)??n.pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(n.pick(e.locale.person.lastName,e.source)??`name`).toLowerCase()}`}function l(e,r={}){let i=r.length??12;if(r.memorable){let r=(n.pick(e.locale.person.firstNameFemale,e.source)??n.pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase(),o=(n.pick(e.locale.person.lastName,e.source)??`name`).toLowerCase(),s=String(t.int(10,99,e.source)),c=n.pick(a.split(``),e.source)??`!`,l=`${r}${o}${s}${c}`;if(l.length<=i)return l+n.alphanumeric(i-l.length,e.source);let u=`${s}${c}`,d=i-u.length,f=u+(d>0?(r+o).slice(0,d):``);return f.length<i?f+n.alphanumeric(i-f.length,e.source):f.slice(0,i)}let o=[`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,`abcdefghijklmnopqrstuvwxyz`,`0123456789`,a],s=[];for(let t of o)s.push(n.pick(t.split(``),e.source));for(;s.length<i;)s.push(n.pick(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?`.split(``),e.source));for(let n=s.length-1;n>0;n--){let r=t.int(0,n,e.source);[s[n],s[r]]=[s[r],s[n]]}return s.slice(0,i).join(``)}function u(e){let i=n.pick(r.INTERNET_DATA.protocols,e.source)??`https`,a=`${n.pick([`www`,`api`,`app`,`mail`,`static`,`cdn`],e.source)??`www`}.${n.pick(r.INTERNET_DATA.domains,e.source)??`example`}.${n.pick(r.INTERNET_DATA.tlds,e.source)??`com`}`,s=t.int(1,4,e.source),c=[];for(let r=0;r<s;r++){let r=n.pick(o,e.source)??`api`;t.int(0,2,e.source)===0?c.push(`${r}-${n.alphanumeric(t.int(2,5),e.source).toLowerCase()}`):c.push(r)}return`${i}://${a}/${c.join(`/`)}`}function d(e){return`${n.pick(r.INTERNET_DATA.domains,e.source)??`example`}.${n.pick(r.INTERNET_DATA.tlds,e.source)??`com`}`}function f(e,r=4){if(r===6){let t=[];for(let r=0;r<8;r++)t.push(n.hexString(4,e.source));return t.join(`:`)}let i=[];for(let n=0;n<4;n++)i.push(t.int(0,255,e.source));return i.join(`.`)}function p(e){let t=[];for(let r=0;r<6;r++)t.push(n.hexString(2,e.source));return t.join(`:`)}function m(e){return n.pick(r.INTERNET_DATA.userAgents,e.source)??r.INTERNET_DATA.userAgents[0]}function h(e){return n.pick(r.INTERNET_DATA.httpMethods,e.source)??`GET`}function g(e){return n.pick(r.INTERNET_DATA.statusCodes,e.source)??200}function _(e){return n.pick(r.INTERNET_DATA.mimeTypes,e.source)??`text/plain`}exports.domainName=d,exports.email=s,exports.httpMethod=h,Object.defineProperty(exports,"internet_exports",{enumerable:!0,get:function(){return i}}),exports.ip=f,exports.mac=p,exports.mimeType=_,exports.password=l,exports.statusCode=g,exports.url=u,exports.userAgent=m,exports.username=c;
1
+ const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/int.cjs"),n=require("../_helpers/string.cjs"),r=require("./data.cjs");var i=e.__exportAll({domainName:()=>domainName,email:()=>email,httpMethod:()=>httpMethod,ip:()=>ip,mac:()=>mac,mimeType:()=>mimeType,password:()=>password,statusCode:()=>statusCode,url:()=>url,userAgent:()=>userAgent,username:()=>username}),a=`!@#$%^&*()_+-=[]{}|;:,.<>?`,o=[`api`,`v1`,`v2`,`users`,`posts`,`comments`,`articles`,`products`,`orders`,`items`,`search`,`auth`,`login`,`logout`,`profile`,`settings`,`dashboard`,`files`,`images`,`assets`,`static`,`public`,`private`,`admin`,`reports`];function email(e){return`${(n.pick(e.locale.person.firstNameFemale,e.source)??n.pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(n.pick(e.locale.person.lastName,e.source)??`name`).toLowerCase()}@${n.pick(r.INTERNET_DATA.domains,e.source)??`example`}.${n.pick(r.INTERNET_DATA.tlds,e.source)??`com`}`}function username(e){return t.int(0,1,e.source)===0?n.alphanumeric(t.int(6,12,e.source),e.source):`${(n.pick(e.locale.person.firstNameFemale,e.source)??n.pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(n.pick(e.locale.person.lastName,e.source)??`name`).toLowerCase()}`}function password(e,r={}){let i=r.length??12;if(r.memorable){let r=(n.pick(e.locale.person.firstNameFemale,e.source)??n.pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase(),o=(n.pick(e.locale.person.lastName,e.source)??`name`).toLowerCase(),s=String(t.int(10,99,e.source)),c=n.pick(a.split(``),e.source)??`!`,l=`${r}${o}${s}${c}`;if(l.length<=i)return l+n.alphanumeric(i-l.length,e.source);let u=`${s}${c}`,d=i-u.length,f=u+(d>0?(r+o).slice(0,d):``);return f.length<i?f+n.alphanumeric(i-f.length,e.source):f.slice(0,i)}let o=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,s=`abcdefghijklmnopqrstuvwxyz`,c=`0123456789`,l=[o,s,c,a],u=[];for(let t of l)u.push(n.pick(t.split(``),e.source));let d=o+s+c+a;for(;u.length<i;)u.push(n.pick(d.split(``),e.source));for(let n=u.length-1;n>0;n--){let r=t.int(0,n,e.source);[u[n],u[r]]=[u[r],u[n]]}return u.slice(0,i).join(``)}function url(e){let i=n.pick(r.INTERNET_DATA.protocols,e.source)??`https`,a=`${n.pick([`www`,`api`,`app`,`mail`,`static`,`cdn`],e.source)??`www`}.${n.pick(r.INTERNET_DATA.domains,e.source)??`example`}.${n.pick(r.INTERNET_DATA.tlds,e.source)??`com`}`,s=t.int(1,4,e.source),c=[];for(let r=0;r<s;r++){let r=n.pick(o,e.source)??`api`;t.int(0,2,e.source)===0?c.push(`${r}-${n.alphanumeric(t.int(2,5),e.source).toLowerCase()}`):c.push(r)}return`${i}://${a}/${c.join(`/`)}`}function domainName(e){return`${n.pick(r.INTERNET_DATA.domains,e.source)??`example`}.${n.pick(r.INTERNET_DATA.tlds,e.source)??`com`}`}function ip(e,r=4){if(r===6){let t=[];for(let r=0;r<8;r++)t.push(n.hexString(4,e.source));return t.join(`:`)}let i=[];for(let n=0;n<4;n++)i.push(t.int(0,255,e.source));return i.join(`.`)}function mac(e){let t=[];for(let r=0;r<6;r++)t.push(n.hexString(2,e.source));return t.join(`:`)}function userAgent(e){return n.pick(r.INTERNET_DATA.userAgents,e.source)??r.INTERNET_DATA.userAgents[0]}function httpMethod(e){return n.pick(r.INTERNET_DATA.httpMethods,e.source)??`GET`}function statusCode(e){return n.pick(r.INTERNET_DATA.statusCodes,e.source)??200}function mimeType(e){return n.pick(r.INTERNET_DATA.mimeTypes,e.source)??`text/plain`}exports.domainName=domainName,exports.email=email,exports.httpMethod=httpMethod,Object.defineProperty(exports,"internet_exports",{enumerable:!0,get:function(){return i}}),exports.ip=ip,exports.mac=mac,exports.mimeType=mimeType,exports.password=password,exports.statusCode=statusCode,exports.url=url,exports.userAgent=userAgent,exports.username=username;
2
2
  //# sourceMappingURL=internet.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"internet.cjs","names":[],"sources":["../../src/internet/internet.ts"],"sourcesContent":["import { int } from '../_helpers/int';\nimport { alphanumeric, hexString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { INTERNET_DATA } from './data';\n\nconst SPECIAL_CHARS = '!@#$%^&*()_+-=[]{}|;:,.<>?';\n\nconst URL_PATH_WORDS = [\n 'api',\n 'v1',\n 'v2',\n 'users',\n 'posts',\n 'comments',\n 'articles',\n 'products',\n 'orders',\n 'items',\n 'search',\n 'auth',\n 'login',\n 'logout',\n 'profile',\n 'settings',\n 'dashboard',\n 'files',\n 'images',\n 'assets',\n 'static',\n 'public',\n 'private',\n 'admin',\n 'reports',\n];\n\n/** Generates an email address of the form `firstname.lastname@domain.tld`. */\nexport function email(ctx: IllusionistContext): string {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${first}.${last}@${domain}.${tld}`;\n}\n\n/** Generates a username: either a random alphanumeric string or a `firstname.lastname` pattern. */\nexport function username(ctx: IllusionistContext): string {\n if (int(0, 1, ctx.source) === 0) {\n return alphanumeric(int(6, 12, ctx.source), ctx.source);\n }\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n return `${first}.${last}`;\n}\n\n/** Options for {@link password}. */\nexport type PasswordOptions = {\n /** Password length. Defaults to `12`. */\n length?: number;\n /** When `true`, builds a memorable password from name fragments and digits. */\n memorable?: boolean;\n};\n\n/** Generates a password mixing upper/lowercase letters, digits, and special characters. */\nexport function password(ctx: IllusionistContext, opts: PasswordOptions = {}): string {\n const length = opts.length ?? 12;\n\n if (opts.memorable) {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const num = String(int(10, 99, ctx.source));\n const special = pick(SPECIAL_CHARS.split(''), ctx.source) ?? '!';\n const base = `${first}${last}${num}${special}`;\n if (base.length <= length) return base + alphanumeric(length - base.length, ctx.source);\n // Truncation would cut the special char/number — put them first, then fill from the name.\n const essential = `${num}${special}`;\n const remaining = length - essential.length;\n const namePart = remaining > 0 ? (first + last).slice(0, remaining) : '';\n const result = essential + namePart;\n\n return result.length < length ? result + alphanumeric(length - result.length, ctx.source) : result.slice(0, length);\n }\n\n const upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n const lower = 'abcdefghijklmnopqrstuvwxyz';\n const digits = '0123456789';\n const pools = [upper, lower, digits, SPECIAL_CHARS];\n\n // Guarantee at least one char from each pool, then fill the rest randomly.\n const chars: string[] = [];\n for (const pool of pools) {\n chars.push(pick(pool.split(''), ctx.source)!);\n }\n const all = upper + lower + digits + SPECIAL_CHARS;\n while (chars.length < length) {\n chars.push(pick(all.split(''), ctx.source)!);\n }\n\n // Shuffle via Fisher-Yates using ctx.source.\n for (let i = chars.length - 1; i > 0; i--) {\n const j = int(0, i, ctx.source);\n [chars[i], chars[j]] = [chars[j]!, chars[i]!];\n }\n\n return chars.slice(0, length).join('');\n}\n\n/** Generates a URL of the form `protocol://sub.domain.tld/path/...`. */\nexport function url(ctx: IllusionistContext): string {\n const protocol = pick(INTERNET_DATA.protocols, ctx.source) ?? 'https';\n const sub = pick(['www', 'api', 'app', 'mail', 'static', 'cdn'], ctx.source) ?? 'www';\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n const host = `${sub}.${domain}.${tld}`;\n\n const segmentCount = int(1, 4, ctx.source);\n const segments: string[] = [];\n for (let i = 0; i < segmentCount; i++) {\n const word = pick(URL_PATH_WORDS, ctx.source) ?? 'api';\n // Occasionally append a numeric or short alphanumeric suffix to a segment.\n if (int(0, 2, ctx.source) === 0) {\n segments.push(`${word}-${alphanumeric(int(2, 5), ctx.source).toLowerCase()}`);\n } else {\n segments.push(word);\n }\n }\n\n return `${protocol}://${host}/${segments.join('/')}`;\n}\n\n/** Generates a domain name of the form `domain.tld`. */\nexport function domainName(ctx: IllusionistContext): string {\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${domain}.${tld}`;\n}\n\n/** Generates an IPv4 or IPv6 address. Defaults to IPv4. */\nexport function ip(ctx: IllusionistContext, version: 4 | 6 = 4): string {\n if (version === 6) {\n const groups: string[] = [];\n for (let i = 0; i < 8; i++) {\n groups.push(hexString(4, ctx.source));\n }\n return groups.join(':');\n }\n const octets: number[] = [];\n for (let i = 0; i < 4; i++) {\n octets.push(int(0, 255, ctx.source));\n }\n return octets.join('.');\n}\n\n/** Generates a MAC address of the form `XX:XX:XX:XX:XX:XX`. */\nexport function mac(ctx: IllusionistContext): string {\n const parts: string[] = [];\n for (let i = 0; i < 6; i++) {\n parts.push(hexString(2, ctx.source));\n }\n return parts.join(':');\n}\n\n/** Picks a random user agent string. */\nexport function userAgent(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.userAgents, ctx.source) ?? INTERNET_DATA.userAgents[0]!;\n}\n\n/** Picks a random HTTP method. */\nexport function httpMethod(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.httpMethods, ctx.source) ?? 'GET';\n}\n\n/** Picks a random HTTP status code. */\nexport function statusCode(ctx: IllusionistContext): number {\n return pick(INTERNET_DATA.statusCodes, ctx.source) ?? 200;\n}\n\n/** Picks a random MIME type. */\nexport function mimeType(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.mimeTypes, ctx.source) ?? 'text/plain';\n}\n"],"mappings":"kUAKM,EAAgB,6BAEhB,EAAiB,CACrB,MACA,KACA,KACA,QACA,QACA,WACA,WACA,WACA,SACA,QACA,SACA,OACA,QACA,SACA,UACA,WACA,YACA,QACA,SACA,SACA,SACA,SACA,UACA,QACA,SACF,EAGA,SAAgB,EAAM,EAAiC,CASrD,MAAO,IAPL,EAAA,KAAK,EAAI,OAAO,OAAO,gBAAiB,EAAI,MAAM,GAClD,EAAA,KAAK,EAAI,OAAO,OAAO,cAAe,EAAI,MAAM,GAChD,OAAA,CACA,YAIQ,EAAM,IAHF,EAAA,KAAK,EAAI,OAAO,OAAO,SAAU,EAAI,MAAM,GAAK,OAAA,CAAQ,YAGnD,EAAK,GAFT,EAAA,KAAK,EAAA,cAAc,QAAS,EAAI,MAAM,GAA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3,"file":"internet.cjs","names":[],"sources":["../../src/internet/internet.ts"],"sourcesContent":["import { int } from '../_helpers/int';\nimport { alphanumeric, hexString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { INTERNET_DATA } from './data';\n\nconst SPECIAL_CHARS = '!@#$%^&*()_+-=[]{}|;:,.<>?';\n\nconst URL_PATH_WORDS = [\n 'api',\n 'v1',\n 'v2',\n 'users',\n 'posts',\n 'comments',\n 'articles',\n 'products',\n 'orders',\n 'items',\n 'search',\n 'auth',\n 'login',\n 'logout',\n 'profile',\n 'settings',\n 'dashboard',\n 'files',\n 'images',\n 'assets',\n 'static',\n 'public',\n 'private',\n 'admin',\n 'reports',\n];\n\n/** Generates an email address of the form `firstname.lastname@domain.tld`. */\nexport function email(ctx: IllusionistContext): string {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${first}.${last}@${domain}.${tld}`;\n}\n\n/** Generates a username: either a random alphanumeric string or a `firstname.lastname` pattern. */\nexport function username(ctx: IllusionistContext): string {\n if (int(0, 1, ctx.source) === 0) {\n return alphanumeric(int(6, 12, ctx.source), ctx.source);\n }\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n return `${first}.${last}`;\n}\n\n/** Options for {@link password}. */\nexport type PasswordOptions = {\n /** Password length. Defaults to `12`. */\n length?: number;\n /** When `true`, builds a memorable password from name fragments and digits. */\n memorable?: boolean;\n};\n\n/** Generates a password mixing upper/lowercase letters, digits, and special characters. */\nexport function password(ctx: IllusionistContext, opts: PasswordOptions = {}): string {\n const length = opts.length ?? 12;\n\n if (opts.memorable) {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const num = String(int(10, 99, ctx.source));\n const special = pick(SPECIAL_CHARS.split(''), ctx.source) ?? '!';\n const base = `${first}${last}${num}${special}`;\n if (base.length <= length) return base + alphanumeric(length - base.length, ctx.source);\n // Truncation would cut the special char/number — put them first, then fill from the name.\n const essential = `${num}${special}`;\n const remaining = length - essential.length;\n const namePart = remaining > 0 ? (first + last).slice(0, remaining) : '';\n const result = essential + namePart;\n\n return result.length < length ? result + alphanumeric(length - result.length, ctx.source) : result.slice(0, length);\n }\n\n const upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n const lower = 'abcdefghijklmnopqrstuvwxyz';\n const digits = '0123456789';\n const pools = [upper, lower, digits, SPECIAL_CHARS];\n\n // Guarantee at least one char from each pool, then fill the rest randomly.\n const chars: string[] = [];\n for (const pool of pools) {\n chars.push(pick(pool.split(''), ctx.source)!);\n }\n const all = upper + lower + digits + SPECIAL_CHARS;\n while (chars.length < length) {\n chars.push(pick(all.split(''), ctx.source)!);\n }\n\n // Shuffle via Fisher-Yates using ctx.source.\n for (let i = chars.length - 1; i > 0; i--) {\n const j = int(0, i, ctx.source);\n [chars[i], chars[j]] = [chars[j]!, chars[i]!];\n }\n\n return chars.slice(0, length).join('');\n}\n\n/** Generates a URL of the form `protocol://sub.domain.tld/path/...`. */\nexport function url(ctx: IllusionistContext): string {\n const protocol = pick(INTERNET_DATA.protocols, ctx.source) ?? 'https';\n const sub = pick(['www', 'api', 'app', 'mail', 'static', 'cdn'], ctx.source) ?? 'www';\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n const host = `${sub}.${domain}.${tld}`;\n\n const segmentCount = int(1, 4, ctx.source);\n const segments: string[] = [];\n for (let i = 0; i < segmentCount; i++) {\n const word = pick(URL_PATH_WORDS, ctx.source) ?? 'api';\n // Occasionally append a numeric or short alphanumeric suffix to a segment.\n if (int(0, 2, ctx.source) === 0) {\n segments.push(`${word}-${alphanumeric(int(2, 5), ctx.source).toLowerCase()}`);\n } else {\n segments.push(word);\n }\n }\n\n return `${protocol}://${host}/${segments.join('/')}`;\n}\n\n/** Generates a domain name of the form `domain.tld`. */\nexport function domainName(ctx: IllusionistContext): string {\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${domain}.${tld}`;\n}\n\n/** Generates an IPv4 or IPv6 address. Defaults to IPv4. */\nexport function ip(ctx: IllusionistContext, version: 4 | 6 = 4): string {\n if (version === 6) {\n const groups: string[] = [];\n for (let i = 0; i < 8; i++) {\n groups.push(hexString(4, ctx.source));\n }\n return groups.join(':');\n }\n const octets: number[] = [];\n for (let i = 0; i < 4; i++) {\n octets.push(int(0, 255, ctx.source));\n }\n return octets.join('.');\n}\n\n/** Generates a MAC address of the form `XX:XX:XX:XX:XX:XX`. */\nexport function mac(ctx: IllusionistContext): string {\n const parts: string[] = [];\n for (let i = 0; i < 6; i++) {\n parts.push(hexString(2, ctx.source));\n }\n return parts.join(':');\n}\n\n/** Picks a random user agent string. */\nexport function userAgent(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.userAgents, ctx.source) ?? INTERNET_DATA.userAgents[0]!;\n}\n\n/** Picks a random HTTP method. */\nexport function httpMethod(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.httpMethods, ctx.source) ?? 'GET';\n}\n\n/** Picks a random HTTP status code. */\nexport function statusCode(ctx: IllusionistContext): number {\n return pick(INTERNET_DATA.statusCodes, ctx.source) ?? 200;\n}\n\n/** Picks a random MIME type. */\nexport function mimeType(ctx: IllusionistContext): string {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AO,KAAK,GAAG,CACxB,CAGA,SAAgB,IAAI,EAAiC,CACnD,IAAM,EAAkB,CAAC,EACzB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAG,IACrB,EAAM,KAAK,EAAA,UAAU,EAAG,EAAI,MAAM,CAAC,EAErC,OAAO,EAAM,KAAK,GAAG,CACvB,CAGA,SAAgB,UAAU,EAAiC,CACzD,OAAO,EAAA,KAAK,EAAA,cAAc,WAAY,EAAI,MAAM,GAAK,EAAA,cAAc,WAAW,EAChF,CAGA,SAAgB,WAAW,EAAiC,CAC1D,OAAO,EAAA,KAAK,EAAA,cAAc,YAAa,EAAI,MAAM,GAAK,KACxD,CAGA,SAAgB,WAAW,EAAiC,CAC1D,OAAO,EAAA,KAAK,EAAA,cAAc,YAAa,EAAI,MAAM,GAAK,GACxD,CAGA,SAAgB,SAAS,EAAiC,CACxD,OAAO,EAAA,KAAK,EAAA,cAAc,UAAW,EAAI,MAAM,GAAK,YACtD"}
@@ -1,121 +1,2 @@
1
- import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
- import { int as t } from "../_helpers/int.js";
3
- import { alphanumeric as n, hexString as r, pick as i } from "../_helpers/string.js";
4
- import { INTERNET_DATA as a } from "./data.js";
5
- //#region src/internet/internet.ts
6
- var o = /* @__PURE__ */ e({
7
- domainName: () => p,
8
- email: () => l,
9
- httpMethod: () => _,
10
- ip: () => m,
11
- mac: () => h,
12
- mimeType: () => y,
13
- password: () => d,
14
- statusCode: () => v,
15
- url: () => f,
16
- userAgent: () => g,
17
- username: () => u
18
- }), s = "!@#$%^&*()_+-=[]{}|;:,.<>?", c = [
19
- "api",
20
- "v1",
21
- "v2",
22
- "users",
23
- "posts",
24
- "comments",
25
- "articles",
26
- "products",
27
- "orders",
28
- "items",
29
- "search",
30
- "auth",
31
- "login",
32
- "logout",
33
- "profile",
34
- "settings",
35
- "dashboard",
36
- "files",
37
- "images",
38
- "assets",
39
- "static",
40
- "public",
41
- "private",
42
- "admin",
43
- "reports"
44
- ];
45
- function l(e) {
46
- return `${(i(e.locale.person.firstNameFemale, e.source) ?? i(e.locale.person.firstNameMale, e.source) ?? "user").toLowerCase()}.${(i(e.locale.person.lastName, e.source) ?? "name").toLowerCase()}@${i(a.domains, e.source) ?? "example"}.${i(a.tlds, e.source) ?? "com"}`;
47
- }
48
- function u(e) {
49
- return t(0, 1, e.source) === 0 ? n(t(6, 12, e.source), e.source) : `${(i(e.locale.person.firstNameFemale, e.source) ?? i(e.locale.person.firstNameMale, e.source) ?? "user").toLowerCase()}.${(i(e.locale.person.lastName, e.source) ?? "name").toLowerCase()}`;
50
- }
51
- function d(e, r = {}) {
52
- let a = r.length ?? 12;
53
- if (r.memorable) {
54
- let r = (i(e.locale.person.firstNameFemale, e.source) ?? i(e.locale.person.firstNameMale, e.source) ?? "user").toLowerCase(), o = (i(e.locale.person.lastName, e.source) ?? "name").toLowerCase(), c = String(t(10, 99, e.source)), l = i(s.split(""), e.source) ?? "!", u = `${r}${o}${c}${l}`;
55
- if (u.length <= a) return u + n(a - u.length, e.source);
56
- let d = `${c}${l}`, f = a - d.length, p = d + (f > 0 ? (r + o).slice(0, f) : "");
57
- return p.length < a ? p + n(a - p.length, e.source) : p.slice(0, a);
58
- }
59
- let o = [
60
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
61
- "abcdefghijklmnopqrstuvwxyz",
62
- "0123456789",
63
- s
64
- ], c = [];
65
- for (let t of o) c.push(i(t.split(""), e.source));
66
- for (; c.length < a;) c.push(i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?".split(""), e.source));
67
- for (let n = c.length - 1; n > 0; n--) {
68
- let r = t(0, n, e.source);
69
- [c[n], c[r]] = [c[r], c[n]];
70
- }
71
- return c.slice(0, a).join("");
72
- }
73
- function f(e) {
74
- let r = i(a.protocols, e.source) ?? "https", o = `${i([
75
- "www",
76
- "api",
77
- "app",
78
- "mail",
79
- "static",
80
- "cdn"
81
- ], e.source) ?? "www"}.${i(a.domains, e.source) ?? "example"}.${i(a.tlds, e.source) ?? "com"}`, s = t(1, 4, e.source), l = [];
82
- for (let r = 0; r < s; r++) {
83
- let r = i(c, e.source) ?? "api";
84
- t(0, 2, e.source) === 0 ? l.push(`${r}-${n(t(2, 5), e.source).toLowerCase()}`) : l.push(r);
85
- }
86
- return `${r}://${o}/${l.join("/")}`;
87
- }
88
- function p(e) {
89
- return `${i(a.domains, e.source) ?? "example"}.${i(a.tlds, e.source) ?? "com"}`;
90
- }
91
- function m(e, n = 4) {
92
- if (n === 6) {
93
- let t = [];
94
- for (let n = 0; n < 8; n++) t.push(r(4, e.source));
95
- return t.join(":");
96
- }
97
- let i = [];
98
- for (let n = 0; n < 4; n++) i.push(t(0, 255, e.source));
99
- return i.join(".");
100
- }
101
- function h(e) {
102
- let t = [];
103
- for (let n = 0; n < 6; n++) t.push(r(2, e.source));
104
- return t.join(":");
105
- }
106
- function g(e) {
107
- return i(a.userAgents, e.source) ?? a.userAgents[0];
108
- }
109
- function _(e) {
110
- return i(a.httpMethods, e.source) ?? "GET";
111
- }
112
- function v(e) {
113
- return i(a.statusCodes, e.source) ?? 200;
114
- }
115
- function y(e) {
116
- return i(a.mimeTypes, e.source) ?? "text/plain";
117
- }
118
- //#endregion
119
- export { p as domainName, l as email, _ as httpMethod, o as internet_exports, m as ip, h as mac, y as mimeType, d as password, v as statusCode, f as url, g as userAgent, u as username };
120
-
1
+ import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{int as t}from"../_helpers/int.js";import{alphanumeric as n,hexString as r,pick as i}from"../_helpers/string.js";import{INTERNET_DATA as a}from"./data.js";var o=e({domainName:()=>domainName,email:()=>email,httpMethod:()=>httpMethod,ip:()=>ip,mac:()=>mac,mimeType:()=>mimeType,password:()=>password,statusCode:()=>statusCode,url:()=>url,userAgent:()=>userAgent,username:()=>username}),s=`!@#$%^&*()_+-=[]{}|;:,.<>?`,c=[`api`,`v1`,`v2`,`users`,`posts`,`comments`,`articles`,`products`,`orders`,`items`,`search`,`auth`,`login`,`logout`,`profile`,`settings`,`dashboard`,`files`,`images`,`assets`,`static`,`public`,`private`,`admin`,`reports`];function email(e){return`${(i(e.locale.person.firstNameFemale,e.source)??i(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(i(e.locale.person.lastName,e.source)??`name`).toLowerCase()}@${i(a.domains,e.source)??`example`}.${i(a.tlds,e.source)??`com`}`}function username(e){return t(0,1,e.source)===0?n(t(6,12,e.source),e.source):`${(i(e.locale.person.firstNameFemale,e.source)??i(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(i(e.locale.person.lastName,e.source)??`name`).toLowerCase()}`}function password(e,r={}){let a=r.length??12;if(r.memorable){let r=(i(e.locale.person.firstNameFemale,e.source)??i(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase(),o=(i(e.locale.person.lastName,e.source)??`name`).toLowerCase(),c=String(t(10,99,e.source)),l=i(s.split(``),e.source)??`!`,u=`${r}${o}${c}${l}`;if(u.length<=a)return u+n(a-u.length,e.source);let d=`${c}${l}`,f=a-d.length,p=d+(f>0?(r+o).slice(0,f):``);return p.length<a?p+n(a-p.length,e.source):p.slice(0,a)}let o=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,c=`abcdefghijklmnopqrstuvwxyz`,l=`0123456789`,u=[o,c,l,s],d=[];for(let t of u)d.push(i(t.split(``),e.source));let f=o+c+l+s;for(;d.length<a;)d.push(i(f.split(``),e.source));for(let n=d.length-1;n>0;n--){let r=t(0,n,e.source);[d[n],d[r]]=[d[r],d[n]]}return d.slice(0,a).join(``)}function url(e){let r=i(a.protocols,e.source)??`https`,o=`${i([`www`,`api`,`app`,`mail`,`static`,`cdn`],e.source)??`www`}.${i(a.domains,e.source)??`example`}.${i(a.tlds,e.source)??`com`}`,s=t(1,4,e.source),l=[];for(let r=0;r<s;r++){let r=i(c,e.source)??`api`;t(0,2,e.source)===0?l.push(`${r}-${n(t(2,5),e.source).toLowerCase()}`):l.push(r)}return`${r}://${o}/${l.join(`/`)}`}function domainName(e){return`${i(a.domains,e.source)??`example`}.${i(a.tlds,e.source)??`com`}`}function ip(e,n=4){if(n===6){let t=[];for(let n=0;n<8;n++)t.push(r(4,e.source));return t.join(`:`)}let i=[];for(let n=0;n<4;n++)i.push(t(0,255,e.source));return i.join(`.`)}function mac(e){let t=[];for(let n=0;n<6;n++)t.push(r(2,e.source));return t.join(`:`)}function userAgent(e){return i(a.userAgents,e.source)??a.userAgents[0]}function httpMethod(e){return i(a.httpMethods,e.source)??`GET`}function statusCode(e){return i(a.statusCodes,e.source)??200}function mimeType(e){return i(a.mimeTypes,e.source)??`text/plain`}export{domainName,email,httpMethod,o as internet_exports,ip,mac,mimeType,password,statusCode,url,userAgent,username};
121
2
  //# sourceMappingURL=internet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internet.js","names":[],"sources":["../../src/internet/internet.ts"],"sourcesContent":["import { int } from '../_helpers/int';\nimport { alphanumeric, hexString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { INTERNET_DATA } from './data';\n\nconst SPECIAL_CHARS = '!@#$%^&*()_+-=[]{}|;:,.<>?';\n\nconst URL_PATH_WORDS = [\n 'api',\n 'v1',\n 'v2',\n 'users',\n 'posts',\n 'comments',\n 'articles',\n 'products',\n 'orders',\n 'items',\n 'search',\n 'auth',\n 'login',\n 'logout',\n 'profile',\n 'settings',\n 'dashboard',\n 'files',\n 'images',\n 'assets',\n 'static',\n 'public',\n 'private',\n 'admin',\n 'reports',\n];\n\n/** Generates an email address of the form `firstname.lastname@domain.tld`. */\nexport function email(ctx: IllusionistContext): string {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${first}.${last}@${domain}.${tld}`;\n}\n\n/** Generates a username: either a random alphanumeric string or a `firstname.lastname` pattern. */\nexport function username(ctx: IllusionistContext): string {\n if (int(0, 1, ctx.source) === 0) {\n return alphanumeric(int(6, 12, ctx.source), ctx.source);\n }\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n return `${first}.${last}`;\n}\n\n/** Options for {@link password}. */\nexport type PasswordOptions = {\n /** Password length. Defaults to `12`. */\n length?: number;\n /** When `true`, builds a memorable password from name fragments and digits. */\n memorable?: boolean;\n};\n\n/** Generates a password mixing upper/lowercase letters, digits, and special characters. */\nexport function password(ctx: IllusionistContext, opts: PasswordOptions = {}): string {\n const length = opts.length ?? 12;\n\n if (opts.memorable) {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const num = String(int(10, 99, ctx.source));\n const special = pick(SPECIAL_CHARS.split(''), ctx.source) ?? '!';\n const base = `${first}${last}${num}${special}`;\n if (base.length <= length) return base + alphanumeric(length - base.length, ctx.source);\n // Truncation would cut the special char/number — put them first, then fill from the name.\n const essential = `${num}${special}`;\n const remaining = length - essential.length;\n const namePart = remaining > 0 ? (first + last).slice(0, remaining) : '';\n const result = essential + namePart;\n\n return result.length < length ? result + alphanumeric(length - result.length, ctx.source) : result.slice(0, length);\n }\n\n const upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n const lower = 'abcdefghijklmnopqrstuvwxyz';\n const digits = '0123456789';\n const pools = [upper, lower, digits, SPECIAL_CHARS];\n\n // Guarantee at least one char from each pool, then fill the rest randomly.\n const chars: string[] = [];\n for (const pool of pools) {\n chars.push(pick(pool.split(''), ctx.source)!);\n }\n const all = upper + lower + digits + SPECIAL_CHARS;\n while (chars.length < length) {\n chars.push(pick(all.split(''), ctx.source)!);\n }\n\n // Shuffle via Fisher-Yates using ctx.source.\n for (let i = chars.length - 1; i > 0; i--) {\n const j = int(0, i, ctx.source);\n [chars[i], chars[j]] = [chars[j]!, chars[i]!];\n }\n\n return chars.slice(0, length).join('');\n}\n\n/** Generates a URL of the form `protocol://sub.domain.tld/path/...`. */\nexport function url(ctx: IllusionistContext): string {\n const protocol = pick(INTERNET_DATA.protocols, ctx.source) ?? 'https';\n const sub = pick(['www', 'api', 'app', 'mail', 'static', 'cdn'], ctx.source) ?? 'www';\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n const host = `${sub}.${domain}.${tld}`;\n\n const segmentCount = int(1, 4, ctx.source);\n const segments: string[] = [];\n for (let i = 0; i < segmentCount; i++) {\n const word = pick(URL_PATH_WORDS, ctx.source) ?? 'api';\n // Occasionally append a numeric or short alphanumeric suffix to a segment.\n if (int(0, 2, ctx.source) === 0) {\n segments.push(`${word}-${alphanumeric(int(2, 5), ctx.source).toLowerCase()}`);\n } else {\n segments.push(word);\n }\n }\n\n return `${protocol}://${host}/${segments.join('/')}`;\n}\n\n/** Generates a domain name of the form `domain.tld`. */\nexport function domainName(ctx: IllusionistContext): string {\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${domain}.${tld}`;\n}\n\n/** Generates an IPv4 or IPv6 address. Defaults to IPv4. */\nexport function ip(ctx: IllusionistContext, version: 4 | 6 = 4): string {\n if (version === 6) {\n const groups: string[] = [];\n for (let i = 0; i < 8; i++) {\n groups.push(hexString(4, ctx.source));\n }\n return groups.join(':');\n }\n const octets: number[] = [];\n for (let i = 0; i < 4; i++) {\n octets.push(int(0, 255, ctx.source));\n }\n return octets.join('.');\n}\n\n/** Generates a MAC address of the form `XX:XX:XX:XX:XX:XX`. */\nexport function mac(ctx: IllusionistContext): string {\n const parts: string[] = [];\n for (let i = 0; i < 6; i++) {\n parts.push(hexString(2, ctx.source));\n }\n return parts.join(':');\n}\n\n/** Picks a random user agent string. */\nexport function userAgent(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.userAgents, ctx.source) ?? INTERNET_DATA.userAgents[0]!;\n}\n\n/** Picks a random HTTP method. */\nexport function httpMethod(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.httpMethods, ctx.source) ?? 'GET';\n}\n\n/** Picks a random HTTP status code. */\nexport function statusCode(ctx: IllusionistContext): number {\n return pick(INTERNET_DATA.statusCodes, ctx.source) ?? 200;\n}\n\n/** Picks a random MIME type. */\nexport function mimeType(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.mimeTypes, ctx.source) ?? 'text/plain';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;IAKM,IAAgB,8BAEhB,IAAiB;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,SAAgB,EAAM,GAAiC;CASrD,OAAO,IAPL,EAAK,EAAI,OAAO,OAAO,iBAAiB,EAAI,MAAM,KAClD,EAAK,EAAI,OAAO,OAAO,eAAe,EAAI,MAAM,KAChD,OAAA,CACA,YAIQ,EAAM,IAHF,EAAK,EAAI,OAAO,OAAO,UAAU,EAAI,MAAM,KAAK,OAAA,CAAQ,YAGnD,EAAK,GAFT,EAAK,EAAc,SAAS,EAAI,MAAM,KAAK,UAExB,GADtB,EAAK,EAAc,MAAM,EAAI,MAAM,KAAK;AAEtD;AAGA,SAAgB,EAAS,GAAiC;CAUxD,OATI,EAAI,GAAG,GAAG,EAAI,MAAM,MAAM,IACrB,EAAa,EAAI,GAAG,IAAI,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I,IAAI,GAAG,IAAI,GAAG,KACrB,EAAO,KAAK,EAAU,GAAG,EAAI,MAAM,CAAC;EAEtC,OAAO,EAAO,KAAK,GAAG;CACxB;CACA,IAAM,IAAmB,CAAC;CAC1B,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KACrB,EAAO,KAAK,EAAI,GAAG,KAAK,EAAI,MAAM,CAAC;CAErC,OAAO,EAAO,KAAK,GAAG;AACxB;AAGA,SAAgB,EAAI,GAAiC;CACnD,IAAM,IAAkB,CAAC;CACzB,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KACrB,EAAM,KAAK,EAAU,GAAG,EAAI,MAAM,CAAC;CAErC,OAAO,EAAM,KAAK,GAAG;AACvB;AAGA,SAAgB,EAAU,GAAiC;CACzD,OAAO,EAAK,EAAc,YAAY,EAAI,MAAM,KAAK,EAAc,WAAW;AAChF;AAGA,SAAgB,EAAW,GAAiC;CAC1D,OAAO,EAAK,EAAc,aAAa,EAAI,MAAM,KAAK;AACxD;AAGA,SAAgB,EAAW,GAAiC;CAC1D,OAAO,EAAK,EAAc,aAAa,EAAI,MAAM,KAAK;AACxD;AAGA,SAAgB,EAAS,GAAiC;CACxD,OAAO,EAAK,EAAc,WAAW,EAAI,MAAM,KAAK;AACtD"}
1
+ {"version":3,"file":"internet.js","names":[],"sources":["../../src/internet/internet.ts"],"sourcesContent":["import { int } from '../_helpers/int';\nimport { alphanumeric, hexString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { INTERNET_DATA } from './data';\n\nconst SPECIAL_CHARS = '!@#$%^&*()_+-=[]{}|;:,.<>?';\n\nconst URL_PATH_WORDS = [\n 'api',\n 'v1',\n 'v2',\n 'users',\n 'posts',\n 'comments',\n 'articles',\n 'products',\n 'orders',\n 'items',\n 'search',\n 'auth',\n 'login',\n 'logout',\n 'profile',\n 'settings',\n 'dashboard',\n 'files',\n 'images',\n 'assets',\n 'static',\n 'public',\n 'private',\n 'admin',\n 'reports',\n];\n\n/** Generates an email address of the form `firstname.lastname@domain.tld`. */\nexport function email(ctx: IllusionistContext): string {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${first}.${last}@${domain}.${tld}`;\n}\n\n/** Generates a username: either a random alphanumeric string or a `firstname.lastname` pattern. */\nexport function username(ctx: IllusionistContext): string {\n if (int(0, 1, ctx.source) === 0) {\n return alphanumeric(int(6, 12, ctx.source), ctx.source);\n }\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n return `${first}.${last}`;\n}\n\n/** Options for {@link password}. */\nexport type PasswordOptions = {\n /** Password length. Defaults to `12`. */\n length?: number;\n /** When `true`, builds a memorable password from name fragments and digits. */\n memorable?: boolean;\n};\n\n/** Generates a password mixing upper/lowercase letters, digits, and special characters. */\nexport function password(ctx: IllusionistContext, opts: PasswordOptions = {}): string {\n const length = opts.length ?? 12;\n\n if (opts.memorable) {\n const first = (\n pick(ctx.locale.person.firstNameFemale, ctx.source) ??\n pick(ctx.locale.person.firstNameMale, ctx.source) ??\n 'user'\n ).toLowerCase();\n const last = (pick(ctx.locale.person.lastName, ctx.source) ?? 'name').toLowerCase();\n const num = String(int(10, 99, ctx.source));\n const special = pick(SPECIAL_CHARS.split(''), ctx.source) ?? '!';\n const base = `${first}${last}${num}${special}`;\n if (base.length <= length) return base + alphanumeric(length - base.length, ctx.source);\n // Truncation would cut the special char/number — put them first, then fill from the name.\n const essential = `${num}${special}`;\n const remaining = length - essential.length;\n const namePart = remaining > 0 ? (first + last).slice(0, remaining) : '';\n const result = essential + namePart;\n\n return result.length < length ? result + alphanumeric(length - result.length, ctx.source) : result.slice(0, length);\n }\n\n const upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n const lower = 'abcdefghijklmnopqrstuvwxyz';\n const digits = '0123456789';\n const pools = [upper, lower, digits, SPECIAL_CHARS];\n\n // Guarantee at least one char from each pool, then fill the rest randomly.\n const chars: string[] = [];\n for (const pool of pools) {\n chars.push(pick(pool.split(''), ctx.source)!);\n }\n const all = upper + lower + digits + SPECIAL_CHARS;\n while (chars.length < length) {\n chars.push(pick(all.split(''), ctx.source)!);\n }\n\n // Shuffle via Fisher-Yates using ctx.source.\n for (let i = chars.length - 1; i > 0; i--) {\n const j = int(0, i, ctx.source);\n [chars[i], chars[j]] = [chars[j]!, chars[i]!];\n }\n\n return chars.slice(0, length).join('');\n}\n\n/** Generates a URL of the form `protocol://sub.domain.tld/path/...`. */\nexport function url(ctx: IllusionistContext): string {\n const protocol = pick(INTERNET_DATA.protocols, ctx.source) ?? 'https';\n const sub = pick(['www', 'api', 'app', 'mail', 'static', 'cdn'], ctx.source) ?? 'www';\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n const host = `${sub}.${domain}.${tld}`;\n\n const segmentCount = int(1, 4, ctx.source);\n const segments: string[] = [];\n for (let i = 0; i < segmentCount; i++) {\n const word = pick(URL_PATH_WORDS, ctx.source) ?? 'api';\n // Occasionally append a numeric or short alphanumeric suffix to a segment.\n if (int(0, 2, ctx.source) === 0) {\n segments.push(`${word}-${alphanumeric(int(2, 5), ctx.source).toLowerCase()}`);\n } else {\n segments.push(word);\n }\n }\n\n return `${protocol}://${host}/${segments.join('/')}`;\n}\n\n/** Generates a domain name of the form `domain.tld`. */\nexport function domainName(ctx: IllusionistContext): string {\n const domain = pick(INTERNET_DATA.domains, ctx.source) ?? 'example';\n const tld = pick(INTERNET_DATA.tlds, ctx.source) ?? 'com';\n return `${domain}.${tld}`;\n}\n\n/** Generates an IPv4 or IPv6 address. Defaults to IPv4. */\nexport function ip(ctx: IllusionistContext, version: 4 | 6 = 4): string {\n if (version === 6) {\n const groups: string[] = [];\n for (let i = 0; i < 8; i++) {\n groups.push(hexString(4, ctx.source));\n }\n return groups.join(':');\n }\n const octets: number[] = [];\n for (let i = 0; i < 4; i++) {\n octets.push(int(0, 255, ctx.source));\n }\n return octets.join('.');\n}\n\n/** Generates a MAC address of the form `XX:XX:XX:XX:XX:XX`. */\nexport function mac(ctx: IllusionistContext): string {\n const parts: string[] = [];\n for (let i = 0; i < 6; i++) {\n parts.push(hexString(2, ctx.source));\n }\n return parts.join(':');\n}\n\n/** Picks a random user agent string. */\nexport function userAgent(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.userAgents, ctx.source) ?? INTERNET_DATA.userAgents[0]!;\n}\n\n/** Picks a random HTTP method. */\nexport function httpMethod(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.httpMethods, ctx.source) ?? 'GET';\n}\n\n/** Picks a random HTTP status code. */\nexport function statusCode(ctx: IllusionistContext): number {\n return pick(INTERNET_DATA.statusCodes, ctx.source) ?? 200;\n}\n\n/** Picks a random MIME type. */\nexport function mimeType(ctx: IllusionistContext): string {\n return pick(INTERNET_DATA.mimeTypes, ctx.source) ?? 'text/plain';\n}\n"],"mappings":"qcAKM,EAAgB,6BAEhB,EAAiB,CACrB,MACA,KACA,KACA,QACA,QACA,WACA,WACA,WACA,SACA,QACA,SACA,OACA,QACA,SACA,UACA,WACA,YACA,QACA,SACA,SACA,SACA,SACA,UACA,QACA,SACF,EAGA,SAAgB,MAAM,EAAiC,CASrD,MAAO,IAPL,EAAK,EAAI,OAAO,OAAO,gBAAiB,EAAI,MAAM,GAClD,EAAK,EAAI,OAAO,OAAO,cAAe,EAAI,MAAM,GAChD,OAAA,CACA,YAIQ,EAAM,IAHF,EAAK,EAAI,OAAO,OAAO,SAAU,EAAI,MAAM,GAA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,GAAG,EAAS,KAAK,EAAK,GAAG,EAAS,KAAK,GAAG,GACnD,CAGA,SAAgB,WAAW,EAAiC,CAG1D,MAAO,GAFQ,EAAK,EAAc,QAAS,EAAI,MAAM,GAAK,UAEzC,GADL,EAAK,EAAc,KAAM,EAAI,MAAM,GAAK,OAEtD,CAGA,SAAgB,GAAG,EAAyB,EAAiB,EAAW,CACtE,GAAI,IAAY,EAAG,CACjB,IAAM,EAAmB,CAAC,EAC1B,IAAK,IAAI,EAAI,EAAG,EAAI,EAAG,IACrB,EAAO,KAAK,EAAU,EAAG,EAAI,MAAM,CAAC,EAEtC,OAAO,EAAO,KAAK,GAAG,CACxB,CACA,IAAM,EAAmB,CAAC,EAC1B,IAAK,IAAI,EAAI,EAAG,EAAI,EAAG,IACrB,EAAO,KAAK,EAAI,EAAG,IAAK,EAAI,MAAM,CAAC,EAErC,OAAO,EAAO,KAAK,GAAG,CACxB,CAGA,SAAgB,IAAI,EAAiC,CACnD,IAAM,EAAkB,CAAC,EACzB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAG,IACrB,EAAM,KAAK,EAAU,EAAG,EAAI,MAAM,CAAC,EAErC,OAAO,EAAM,KAAK,GAAG,CACvB,CAGA,SAAgB,UAAU,EAAiC,CACzD,OAAO,EAAK,EAAc,WAAY,EAAI,MAAM,GAAK,EAAc,WAAW,EAChF,CAGA,SAAgB,WAAW,EAAiC,CAC1D,OAAO,EAAK,EAAc,YAAa,EAAI,MAAM,GAAK,KACxD,CAGA,SAAgB,WAAW,EAAiC,CAC1D,OAAO,EAAK,EAAc,YAAa,EAAI,MAAM,GAAK,GACxD,CAGA,SAAgB,SAAS,EAAiC,CACxD,OAAO,EAAK,EAAc,UAAW,EAAI,MAAM,GAAK,YACtD"}
@@ -1,12 +1,2 @@
1
- import { LOCATION_DATA_DE as e } from "../location/data/de.js";
2
- import { PERSON_DATA_DE as t } from "../person/data/de.js";
3
- //#region src/locales/de.ts
4
- var n = {
5
- code: "de",
6
- location: e,
7
- person: t
8
- };
9
- //#endregion
10
- export { n as de };
11
-
1
+ import{LOCATION_DATA_DE as e}from"../location/data/de.js";import{PERSON_DATA_DE as t}from"../person/data/de.js";var n={code:`de`,location:e,person:t};export{n as de};
12
2
  //# sourceMappingURL=de.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"de.js","names":[],"sources":["../../src/locales/de.ts"],"sourcesContent":["import { LOCATION_DATA_DE } from '../location/data/de';\nimport { PERSON_DATA_DE } from '../person/data/de';\nimport type { IllusionistLocale } from '../types';\n\n/** German locale data for Illusionist. */\nexport const de = {\n code: 'de',\n location: LOCATION_DATA_DE,\n person: PERSON_DATA_DE,\n} satisfies IllusionistLocale;\n"],"mappings":";;;AAKA,IAAa,IAAK;CAChB,MAAM;CACN,UAAU;CACV,QAAQ;AACV"}
1
+ {"version":3,"file":"de.js","names":[],"sources":["../../src/locales/de.ts"],"sourcesContent":["import { LOCATION_DATA_DE } from '../location/data/de';\nimport { PERSON_DATA_DE } from '../person/data/de';\nimport type { IllusionistLocale } from '../types';\n\n/** German locale data for Illusionist. */\nexport const de = {\n code: 'de',\n location: LOCATION_DATA_DE,\n person: PERSON_DATA_DE,\n} satisfies IllusionistLocale;\n"],"mappings":"gHAKA,IAAa,EAAK,CAChB,KAAM,KACN,SAAU,EACV,OAAQ,CACV"}
@@ -1,12 +1,2 @@
1
- import { LOCATION_DATA_EN as e } from "../location/data/en.js";
2
- import { PERSON_DATA_EN as t } from "../person/data/en.js";
3
- //#region src/locales/en.ts
4
- var n = {
5
- code: "en",
6
- location: e,
7
- person: t
8
- };
9
- //#endregion
10
- export { n as en };
11
-
1
+ import{LOCATION_DATA_EN as e}from"../location/data/en.js";import{PERSON_DATA_EN as t}from"../person/data/en.js";var n={code:`en`,location:e,person:t};export{n as en};
12
2
  //# sourceMappingURL=en.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"en.js","names":[],"sources":["../../src/locales/en.ts"],"sourcesContent":["import { LOCATION_DATA_EN } from '../location/data/en';\nimport { PERSON_DATA_EN } from '../person/data/en';\nimport type { IllusionistLocale } from '../types';\n\n/** English locale data for Illusionist. */\nexport const en = {\n code: 'en',\n location: LOCATION_DATA_EN,\n person: PERSON_DATA_EN,\n} satisfies IllusionistLocale;\n"],"mappings":";;;AAKA,IAAa,IAAK;CAChB,MAAM;CACN,UAAU;CACV,QAAQ;AACV"}
1
+ {"version":3,"file":"en.js","names":[],"sources":["../../src/locales/en.ts"],"sourcesContent":["import { LOCATION_DATA_EN } from '../location/data/en';\nimport { PERSON_DATA_EN } from '../person/data/en';\nimport type { IllusionistLocale } from '../types';\n\n/** English locale data for Illusionist. */\nexport const en = {\n code: 'en',\n location: LOCATION_DATA_EN,\n person: PERSON_DATA_EN,\n} satisfies IllusionistLocale;\n"],"mappings":"gHAKA,IAAa,EAAK,CAChB,KAAM,KACN,SAAU,EACV,OAAQ,CACV"}
@@ -1,3 +1 @@
1
- import { de as e } from "./de.js";
2
- import { en as t } from "./en.js";
3
- export { e as de, t as en };
1
+ import{de as e}from"./de.js";import{en as t}from"./en.js";export{e as de,t as en};
@@ -1,82 +1,2 @@
1
- //#region src/location/data/de.ts
2
- var e = {
3
- cities: [
4
- "Berlin",
5
- "Hamburg",
6
- "München",
7
- "Köln",
8
- "Frankfurt am Main",
9
- "Stuttgart",
10
- "Düsseldorf",
11
- "Leipzig",
12
- "Dortmund",
13
- "Essen",
14
- "Bremen",
15
- "Dresden",
16
- "Hannover",
17
- "Nürnberg",
18
- "Duisburg",
19
- "Bochum",
20
- "Wuppertal",
21
- "Bielefeld",
22
- "Bonn",
23
- "Münster"
24
- ],
25
- countries: [
26
- "Deutschland",
27
- "Österreich",
28
- "Schweiz",
29
- "Frankreich",
30
- "Italien",
31
- "Spanien",
32
- "Niederlande",
33
- "Belgien",
34
- "Polen",
35
- "Tschechien",
36
- "Dänemark",
37
- "Schweden",
38
- "Norwegen",
39
- "Finnland",
40
- "Portugal"
41
- ],
42
- states: [
43
- "Baden-Württemberg",
44
- "Bayern",
45
- "Berlin",
46
- "Brandenburg",
47
- "Bremen",
48
- "Hamburg",
49
- "Hessen",
50
- "Mecklenburg-Vorpommern",
51
- "Niedersachsen",
52
- "Nordrhein-Westfalen",
53
- "Rheinland-Pfalz",
54
- "Saarland",
55
- "Sachsen",
56
- "Sachsen-Anhalt",
57
- "Schleswig-Holstein",
58
- "Thüringen"
59
- ],
60
- streets: [
61
- "Hauptstraße",
62
- "Schulstraße",
63
- "Bahnhofstraße",
64
- "Gartenstraße",
65
- "Bergstraße",
66
- "Dorfstraße",
67
- "Lindenstraße",
68
- "Goethestraße",
69
- "Schillerstraße",
70
- "Mozartstraße",
71
- "Bahnhofplatz",
72
- "Marktplatz",
73
- "Kirchplatz",
74
- "Schlossplatz",
75
- "Waldrand"
76
- ],
77
- zipPattern: "#####"
78
- };
79
- //#endregion
80
- export { e as LOCATION_DATA_DE };
81
-
1
+ var e={cities:[`Berlin`,`Hamburg`,`München`,`Köln`,`Frankfurt am Main`,`Stuttgart`,`Düsseldorf`,`Leipzig`,`Dortmund`,`Essen`,`Bremen`,`Dresden`,`Hannover`,`Nürnberg`,`Duisburg`,`Bochum`,`Wuppertal`,`Bielefeld`,`Bonn`,`Münster`],countries:[`Deutschland`,`Österreich`,`Schweiz`,`Frankreich`,`Italien`,`Spanien`,`Niederlande`,`Belgien`,`Polen`,`Tschechien`,`Dänemark`,`Schweden`,`Norwegen`,`Finnland`,`Portugal`],states:[`Baden-Württemberg`,`Bayern`,`Berlin`,`Brandenburg`,`Bremen`,`Hamburg`,`Hessen`,`Mecklenburg-Vorpommern`,`Niedersachsen`,`Nordrhein-Westfalen`,`Rheinland-Pfalz`,`Saarland`,`Sachsen`,`Sachsen-Anhalt`,`Schleswig-Holstein`,`Thüringen`],streets:[`Hauptstraße`,`Schulstraße`,`Bahnhofstraße`,`Gartenstraße`,`Bergstraße`,`Dorfstraße`,`Lindenstraße`,`Goethestraße`,`Schillerstraße`,`Mozartstraße`,`Bahnhofplatz`,`Marktplatz`,`Kirchplatz`,`Schlossplatz`,`Waldrand`],zipPattern:`#####`};export{e as LOCATION_DATA_DE};
82
2
  //# sourceMappingURL=de.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"de.js","names":[],"sources":["../../../src/location/data/de.ts"],"sourcesContent":["/** German-language location dataset for the `location` category. */\nexport const LOCATION_DATA_DE = {\n cities: [\n 'Berlin',\n 'Hamburg',\n 'München',\n 'Köln',\n 'Frankfurt am Main',\n 'Stuttgart',\n 'Düsseldorf',\n 'Leipzig',\n 'Dortmund',\n 'Essen',\n 'Bremen',\n 'Dresden',\n 'Hannover',\n 'Nürnberg',\n 'Duisburg',\n 'Bochum',\n 'Wuppertal',\n 'Bielefeld',\n 'Bonn',\n 'Münster',\n ],\n countries: [\n 'Deutschland',\n 'Österreich',\n 'Schweiz',\n 'Frankreich',\n 'Italien',\n 'Spanien',\n 'Niederlande',\n 'Belgien',\n 'Polen',\n 'Tschechien',\n 'Dänemark',\n 'Schweden',\n 'Norwegen',\n 'Finnland',\n 'Portugal',\n ],\n states: [\n 'Baden-Württemberg',\n 'Bayern',\n 'Berlin',\n 'Brandenburg',\n 'Bremen',\n 'Hamburg',\n 'Hessen',\n 'Mecklenburg-Vorpommern',\n 'Niedersachsen',\n 'Nordrhein-Westfalen',\n 'Rheinland-Pfalz',\n 'Saarland',\n 'Sachsen',\n 'Sachsen-Anhalt',\n 'Schleswig-Holstein',\n 'Thüringen',\n ],\n streets: [\n 'Hauptstraße',\n 'Schulstraße',\n 'Bahnhofstraße',\n 'Gartenstraße',\n 'Bergstraße',\n 'Dorfstraße',\n 'Lindenstraße',\n 'Goethestraße',\n 'Schillerstraße',\n 'Mozartstraße',\n 'Bahnhofplatz',\n 'Marktplatz',\n 'Kirchplatz',\n 'Schlossplatz',\n 'Waldrand',\n ],\n zipPattern: '#####',\n} as const;\n"],"mappings":";AACA,IAAa,IAAmB;CAC9B,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,WAAW;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,YAAY;AACd"}
1
+ {"version":3,"file":"de.js","names":[],"sources":["../../../src/location/data/de.ts"],"sourcesContent":["/** German-language location dataset for the `location` category. */\nexport const LOCATION_DATA_DE = {\n cities: [\n 'Berlin',\n 'Hamburg',\n 'München',\n 'Köln',\n 'Frankfurt am Main',\n 'Stuttgart',\n 'Düsseldorf',\n 'Leipzig',\n 'Dortmund',\n 'Essen',\n 'Bremen',\n 'Dresden',\n 'Hannover',\n 'Nürnberg',\n 'Duisburg',\n 'Bochum',\n 'Wuppertal',\n 'Bielefeld',\n 'Bonn',\n 'Münster',\n ],\n countries: [\n 'Deutschland',\n 'Österreich',\n 'Schweiz',\n 'Frankreich',\n 'Italien',\n 'Spanien',\n 'Niederlande',\n 'Belgien',\n 'Polen',\n 'Tschechien',\n 'Dänemark',\n 'Schweden',\n 'Norwegen',\n 'Finnland',\n 'Portugal',\n ],\n states: [\n 'Baden-Württemberg',\n 'Bayern',\n 'Berlin',\n 'Brandenburg',\n 'Bremen',\n 'Hamburg',\n 'Hessen',\n 'Mecklenburg-Vorpommern',\n 'Niedersachsen',\n 'Nordrhein-Westfalen',\n 'Rheinland-Pfalz',\n 'Saarland',\n 'Sachsen',\n 'Sachsen-Anhalt',\n 'Schleswig-Holstein',\n 'Thüringen',\n ],\n streets: [\n 'Hauptstraße',\n 'Schulstraße',\n 'Bahnhofstraße',\n 'Gartenstraße',\n 'Bergstraße',\n 'Dorfstraße',\n 'Lindenstraße',\n 'Goethestraße',\n 'Schillerstraße',\n 'Mozartstraße',\n 'Bahnhofplatz',\n 'Marktplatz',\n 'Kirchplatz',\n 'Schlossplatz',\n 'Waldrand',\n ],\n zipPattern: '#####',\n} as const;\n"],"mappings":"AACA,IAAa,EAAmB,CAC9B,OAAQ,CACN,SACA,UACA,UACA,OACA,oBACA,YACA,aACA,UACA,WACA,QACA,SACA,UACA,WACA,WACA,WACA,SACA,YACA,YACA,OACA,SACF,EACA,UAAW,CACT,cACA,aACA,UACA,aACA,UACA,UACA,cACA,UACA,QACA,aACA,WACA,WACA,WACA,WACA,UACF,EACA,OAAQ,CACN,oBACA,SACA,SACA,cACA,SACA,UACA,SACA,yBACA,gBACA,sBACA,kBACA,WACA,UACA,iBACA,qBACA,WACF,EACA,QAAS,CACP,cACA,cACA,gBACA,eACA,aACA,aACA,eACA,eACA,iBACA,eACA,eACA,aACA,aACA,eACA,UACF,EACA,WAAY,OACd"}
@@ -1,65 +1,2 @@
1
- //#region src/location/data/en.ts
2
- var e = {
3
- cities: [
4
- "New York",
5
- "Los Angeles",
6
- "Chicago",
7
- "Houston",
8
- "Phoenix",
9
- "Philadelphia",
10
- "San Antonio",
11
- "San Diego",
12
- "Dallas",
13
- "San Jose",
14
- "Austin",
15
- "Jacksonville",
16
- "Fort Worth",
17
- "Columbus",
18
- "Charlotte",
19
- "San Francisco",
20
- "Indianapolis",
21
- "Seattle",
22
- "Denver",
23
- "Boston"
24
- ],
25
- countries: [
26
- "United States",
27
- "United Kingdom",
28
- "Germany",
29
- "France",
30
- "Italy",
31
- "Spain",
32
- "Netherlands",
33
- "Belgium",
34
- "Switzerland",
35
- "Austria",
36
- "Canada",
37
- "Australia",
38
- "Japan",
39
- "Brazil",
40
- "India"
41
- ],
42
- states: /* @__PURE__ */ "Alabama.Alaska.Arizona.Arkansas.California.Colorado.Connecticut.Delaware.Florida.Georgia.Hawaii.Idaho.Illinois.Indiana.Iowa.Kansas.Kentucky.Louisiana.Maine.Maryland.Massachusetts.Michigan.Minnesota.Mississippi.Missouri.Montana.Nebraska.Nevada.New Hampshire.New Jersey.New Mexico.New York.North Carolina.North Dakota.Ohio.Oklahoma.Oregon.Pennsylvania.Rhode Island.South Carolina.South Dakota.Tennessee.Texas.Utah.Vermont.Virginia.Washington.West Virginia.Wisconsin.Wyoming".split("."),
43
- streets: [
44
- "Main St",
45
- "Oak Ave",
46
- "Maple Dr",
47
- "Cedar Ln",
48
- "Pine Rd",
49
- "Elm St",
50
- "Washington Blvd",
51
- "Park Ave",
52
- "Lake Dr",
53
- "Hill Rd",
54
- "River Rd",
55
- "Spring St",
56
- "Forest Dr",
57
- "Sunset Blvd",
58
- "Highland Ave"
59
- ],
60
- zipPattern: "#####"
61
- };
62
- //#endregion
63
- export { e as LOCATION_DATA_EN };
64
-
1
+ var e={cities:[`New York`,`Los Angeles`,`Chicago`,`Houston`,`Phoenix`,`Philadelphia`,`San Antonio`,`San Diego`,`Dallas`,`San Jose`,`Austin`,`Jacksonville`,`Fort Worth`,`Columbus`,`Charlotte`,`San Francisco`,`Indianapolis`,`Seattle`,`Denver`,`Boston`],countries:[`United States`,`United Kingdom`,`Germany`,`France`,`Italy`,`Spain`,`Netherlands`,`Belgium`,`Switzerland`,`Austria`,`Canada`,`Australia`,`Japan`,`Brazil`,`India`],states:`Alabama.Alaska.Arizona.Arkansas.California.Colorado.Connecticut.Delaware.Florida.Georgia.Hawaii.Idaho.Illinois.Indiana.Iowa.Kansas.Kentucky.Louisiana.Maine.Maryland.Massachusetts.Michigan.Minnesota.Mississippi.Missouri.Montana.Nebraska.Nevada.New Hampshire.New Jersey.New Mexico.New York.North Carolina.North Dakota.Ohio.Oklahoma.Oregon.Pennsylvania.Rhode Island.South Carolina.South Dakota.Tennessee.Texas.Utah.Vermont.Virginia.Washington.West Virginia.Wisconsin.Wyoming`.split(`.`),streets:[`Main St`,`Oak Ave`,`Maple Dr`,`Cedar Ln`,`Pine Rd`,`Elm St`,`Washington Blvd`,`Park Ave`,`Lake Dr`,`Hill Rd`,`River Rd`,`Spring St`,`Forest Dr`,`Sunset Blvd`,`Highland Ave`],zipPattern:`#####`};export{e as LOCATION_DATA_EN};
65
2
  //# sourceMappingURL=en.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"en.js","names":[],"sources":["../../../src/location/data/en.ts"],"sourcesContent":["/** English-language location dataset for the `location` category. */\nexport const LOCATION_DATA_EN = {\n cities: [\n 'New York',\n 'Los Angeles',\n 'Chicago',\n 'Houston',\n 'Phoenix',\n 'Philadelphia',\n 'San Antonio',\n 'San Diego',\n 'Dallas',\n 'San Jose',\n 'Austin',\n 'Jacksonville',\n 'Fort Worth',\n 'Columbus',\n 'Charlotte',\n 'San Francisco',\n 'Indianapolis',\n 'Seattle',\n 'Denver',\n 'Boston',\n ],\n countries: [\n 'United States',\n 'United Kingdom',\n 'Germany',\n 'France',\n 'Italy',\n 'Spain',\n 'Netherlands',\n 'Belgium',\n 'Switzerland',\n 'Austria',\n 'Canada',\n 'Australia',\n 'Japan',\n 'Brazil',\n 'India',\n ],\n states: [\n 'Alabama',\n 'Alaska',\n 'Arizona',\n 'Arkansas',\n 'California',\n 'Colorado',\n 'Connecticut',\n 'Delaware',\n 'Florida',\n 'Georgia',\n 'Hawaii',\n 'Idaho',\n 'Illinois',\n 'Indiana',\n 'Iowa',\n 'Kansas',\n 'Kentucky',\n 'Louisiana',\n 'Maine',\n 'Maryland',\n 'Massachusetts',\n 'Michigan',\n 'Minnesota',\n 'Mississippi',\n 'Missouri',\n 'Montana',\n 'Nebraska',\n 'Nevada',\n 'New Hampshire',\n 'New Jersey',\n 'New Mexico',\n 'New York',\n 'North Carolina',\n 'North Dakota',\n 'Ohio',\n 'Oklahoma',\n 'Oregon',\n 'Pennsylvania',\n 'Rhode Island',\n 'South Carolina',\n 'South Dakota',\n 'Tennessee',\n 'Texas',\n 'Utah',\n 'Vermont',\n 'Virginia',\n 'Washington',\n 'West Virginia',\n 'Wisconsin',\n 'Wyoming',\n ],\n streets: [\n 'Main St',\n 'Oak Ave',\n 'Maple Dr',\n 'Cedar Ln',\n 'Pine Rd',\n 'Elm St',\n 'Washington Blvd',\n 'Park Ave',\n 'Lake Dr',\n 'Hill Rd',\n 'River Rd',\n 'Spring St',\n 'Forest Dr',\n 'Sunset Blvd',\n 'Highland Ave',\n ],\n zipPattern: '#####',\n} as const;\n"],"mappings":";AACA,IAAa,IAAmB;CAC9B,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,WAAW;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,QAAQ,mfAmDR;CACA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,YAAY;AACd"}
1
+ {"version":3,"file":"en.js","names":[],"sources":["../../../src/location/data/en.ts"],"sourcesContent":["/** English-language location dataset for the `location` category. */\nexport const LOCATION_DATA_EN = {\n cities: [\n 'New York',\n 'Los Angeles',\n 'Chicago',\n 'Houston',\n 'Phoenix',\n 'Philadelphia',\n 'San Antonio',\n 'San Diego',\n 'Dallas',\n 'San Jose',\n 'Austin',\n 'Jacksonville',\n 'Fort Worth',\n 'Columbus',\n 'Charlotte',\n 'San Francisco',\n 'Indianapolis',\n 'Seattle',\n 'Denver',\n 'Boston',\n ],\n countries: [\n 'United States',\n 'United Kingdom',\n 'Germany',\n 'France',\n 'Italy',\n 'Spain',\n 'Netherlands',\n 'Belgium',\n 'Switzerland',\n 'Austria',\n 'Canada',\n 'Australia',\n 'Japan',\n 'Brazil',\n 'India',\n ],\n states: [\n 'Alabama',\n 'Alaska',\n 'Arizona',\n 'Arkansas',\n 'California',\n 'Colorado',\n 'Connecticut',\n 'Delaware',\n 'Florida',\n 'Georgia',\n 'Hawaii',\n 'Idaho',\n 'Illinois',\n 'Indiana',\n 'Iowa',\n 'Kansas',\n 'Kentucky',\n 'Louisiana',\n 'Maine',\n 'Maryland',\n 'Massachusetts',\n 'Michigan',\n 'Minnesota',\n 'Mississippi',\n 'Missouri',\n 'Montana',\n 'Nebraska',\n 'Nevada',\n 'New Hampshire',\n 'New Jersey',\n 'New Mexico',\n 'New York',\n 'North Carolina',\n 'North Dakota',\n 'Ohio',\n 'Oklahoma',\n 'Oregon',\n 'Pennsylvania',\n 'Rhode Island',\n 'South Carolina',\n 'South Dakota',\n 'Tennessee',\n 'Texas',\n 'Utah',\n 'Vermont',\n 'Virginia',\n 'Washington',\n 'West Virginia',\n 'Wisconsin',\n 'Wyoming',\n ],\n streets: [\n 'Main St',\n 'Oak Ave',\n 'Maple Dr',\n 'Cedar Ln',\n 'Pine Rd',\n 'Elm St',\n 'Washington Blvd',\n 'Park Ave',\n 'Lake Dr',\n 'Hill Rd',\n 'River Rd',\n 'Spring St',\n 'Forest Dr',\n 'Sunset Blvd',\n 'Highland Ave',\n ],\n zipPattern: '#####',\n} as const;\n"],"mappings":"AACA,IAAa,EAAmB,CAC9B,OAAQ,CACN,WACA,cACA,UACA,UACA,UACA,eACA,cACA,YACA,SACA,WACA,SACA,eACA,aACA,WACA,YACA,gBACA,eACA,UACA,SACA,QACF,EACA,UAAW,CACT,gBACA,iBACA,UACA,SACA,QACA,QACA,cACA,UACA,cACA,UACA,SACA,YACA,QACA,SACA,OACF,EACA,OAAQ,meAmDR,EACA,QAAS,CACP,UACA,UACA,WACA,WACA,UACA,SACA,kBACA,WACA,UACA,UACA,WACA,YACA,YACA,cACA,cACF,EACA,WAAY,OACd"}
@@ -1,2 +1,2 @@
1
- const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/next-float.cjs"),n=require("../_helpers/float.cjs"),r=require("../_helpers/string.cjs");var i=e.__exportAll({city:()=>o,country:()=>d,latitude:()=>f,longitude:()=>p,nearbyGPSCoordinate:()=>m,state:()=>u,street:()=>s,streetAddress:()=>c,zipCode:()=>l});function a(e){return e.locale.location}function o(e){return r.pick(a(e).cities,e.source)}function s(e){return r.pick(a(e).streets,e.source)}function c(e){return`${Math.floor(n.float(1,1e3,e.source))} ${s(e)}`}function l(e){return a(e).zipPattern.replace(/#/g,()=>String(Math.floor(t.nextFloat(e.source)*10)))}function u(e){return r.pick(a(e).states,e.source)}function d(e){return r.pick(a(e).countries,e.source)}function f(e){return n.float(-90,90,e.source)}function p(e){return n.float(-180,180,e.source)}function m(e,t){let r=t??{lat:f(e),lng:p(e)};return{lat:n.float(r.lat-1,r.lat+1,e.source),lng:n.float(r.lng-1,r.lng+1,e.source)}}exports.city=o,exports.country=d,exports.latitude=f,Object.defineProperty(exports,"location_exports",{enumerable:!0,get:function(){return i}}),exports.longitude=p,exports.nearbyGPSCoordinate=m,exports.state=u,exports.street=s,exports.streetAddress=c,exports.zipCode=l;
1
+ const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/float.cjs"),n=require("../_helpers/string.cjs");let r=require("@vielzeug/arsenal");var i=e.__exportAll({city:()=>city,country:()=>country,latitude:()=>latitude,longitude:()=>longitude,nearbyGPSCoordinate:()=>nearbyGPSCoordinate,state:()=>state,street:()=>street,streetAddress:()=>streetAddress,zipCode:()=>zipCode});function data(e){return e.locale.location}function city(e){return n.pick(data(e).cities,e.source)}function street(e){return n.pick(data(e).streets,e.source)}function streetAddress(e){return`${Math.floor(t.float(1,1e3,e.source))} ${street(e)}`}function zipCode(e){return data(e).zipPattern.replace(/#/g,()=>String(Math.floor((0,r.randomFloat)(e.source)*10)))}function state(e){return n.pick(data(e).states,e.source)}function country(e){return n.pick(data(e).countries,e.source)}function latitude(e){return t.float(-90,90,e.source)}function longitude(e){return t.float(-180,180,e.source)}function nearbyGPSCoordinate(e,n){let r=n??{lat:latitude(e),lng:longitude(e)};return{lat:t.float(r.lat-1,r.lat+1,e.source),lng:t.float(r.lng-1,r.lng+1,e.source)}}exports.city=city,exports.country=country,exports.latitude=latitude,Object.defineProperty(exports,"location_exports",{enumerable:!0,get:function(){return i}}),exports.longitude=longitude,exports.nearbyGPSCoordinate=nearbyGPSCoordinate,exports.state=state,exports.street=street,exports.streetAddress=streetAddress,exports.zipCode=zipCode;
2
2
  //# sourceMappingURL=location.cjs.map