@dxos/random 0.10.0 → 0.11.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.
@@ -0,0 +1,395 @@
1
+ import { rand, randChanceBoolean, randCompanyName, randDepartment, randEmail, randFirstName, randFloat, randFullName, randHexaDecimal, randImg, randJobTitle, randNumber, randParagraph, randProductName, randRecentDate, randSentence, randUrl, randUuid, randWord, seed } from "@ngneat/falso";
2
+ import { idEmoji, idHue } from "@dxos/util";
3
+ export * from "@ngneat/falso";
4
+ //#region src/data.ts
5
+ var airports = [
6
+ {
7
+ name: "Atlanta",
8
+ code: "ATL",
9
+ location: [-84.4277, 33.6407]
10
+ },
11
+ {
12
+ name: "Dubai",
13
+ code: "DXB",
14
+ location: [55.3644, 25.2532]
15
+ },
16
+ {
17
+ name: "Dallas",
18
+ code: "DFW",
19
+ location: [-97.0403, 32.8998]
20
+ },
21
+ {
22
+ name: "London",
23
+ code: "LHR",
24
+ location: [-.4543, 51.47]
25
+ },
26
+ {
27
+ name: "Tokyo",
28
+ code: "HND",
29
+ location: [139.7811, 35.5494]
30
+ },
31
+ {
32
+ name: "Denver",
33
+ code: "DEN",
34
+ location: [-104.6737, 39.8561]
35
+ },
36
+ {
37
+ name: "Istanbul",
38
+ code: "IST",
39
+ location: [28.8153, 41.2753]
40
+ },
41
+ {
42
+ name: "Los Angeles",
43
+ code: "LAX",
44
+ location: [-118.4085, 33.9416]
45
+ },
46
+ {
47
+ name: "Paris",
48
+ code: "CDG",
49
+ location: [2.55, 49.0097]
50
+ },
51
+ {
52
+ name: "Guangzhou",
53
+ code: "CAN",
54
+ location: [113.2971, 23.3924]
55
+ },
56
+ {
57
+ name: "Frankfurt",
58
+ code: "FRA",
59
+ location: [8.5706, 50.0333]
60
+ },
61
+ {
62
+ name: "Delhi",
63
+ code: "DEL",
64
+ location: [77.1031, 28.5562]
65
+ },
66
+ {
67
+ name: "Singapore",
68
+ code: "SIN",
69
+ location: [103.994, 1.3644]
70
+ },
71
+ {
72
+ name: "Amsterdam",
73
+ code: "AMS",
74
+ location: [4.7639, 52.3105]
75
+ },
76
+ {
77
+ name: "Seoul",
78
+ code: "ICN",
79
+ location: [126.4505, 37.4602]
80
+ },
81
+ {
82
+ name: "Jakarta",
83
+ code: "CGK",
84
+ location: [106.6559, -6.1256]
85
+ },
86
+ {
87
+ name: "Bangkok",
88
+ code: "BKK",
89
+ location: [100.7501, 13.6899]
90
+ },
91
+ {
92
+ name: "Hong Kong",
93
+ code: "HKG",
94
+ location: [113.9185, 22.308]
95
+ },
96
+ {
97
+ name: "Madrid",
98
+ code: "MAD",
99
+ location: [-3.5676, 40.4936]
100
+ },
101
+ {
102
+ name: "San Francisco",
103
+ code: "SFO",
104
+ location: [-122.379, 37.6213]
105
+ },
106
+ {
107
+ name: "New York",
108
+ code: "JFK",
109
+ location: [-73.7781, 40.6413]
110
+ },
111
+ {
112
+ name: "Chicago",
113
+ code: "ORD",
114
+ location: [-87.9048, 41.9742]
115
+ },
116
+ {
117
+ name: "Shanghai",
118
+ code: "PVG",
119
+ location: [121.8083, 31.1434]
120
+ },
121
+ {
122
+ name: "Beijing",
123
+ code: "PEK",
124
+ location: [116.4074, 39.9042]
125
+ },
126
+ {
127
+ name: "Miami",
128
+ code: "MIA",
129
+ location: [-80.2906, 25.7959]
130
+ },
131
+ {
132
+ name: "Houston",
133
+ code: "IAH",
134
+ location: [-95.3414, 29.9844]
135
+ },
136
+ {
137
+ name: "Munich",
138
+ code: "MUC",
139
+ location: [11.7861, 48.3538]
140
+ },
141
+ {
142
+ name: "Toronto",
143
+ code: "YYZ",
144
+ location: [-79.6306, 43.6777]
145
+ },
146
+ {
147
+ name: "Sydney",
148
+ code: "SYD",
149
+ location: [151.1799, -33.9399]
150
+ },
151
+ {
152
+ name: "Melbourne",
153
+ code: "MEL",
154
+ location: [144.843, -37.6733]
155
+ },
156
+ {
157
+ name: "Rome",
158
+ code: "FCO",
159
+ location: [12.2508, 41.8003]
160
+ },
161
+ {
162
+ name: "Barcelona",
163
+ code: "BCN",
164
+ location: [2.0759, 41.2974]
165
+ },
166
+ {
167
+ name: "Kuala Lumpur",
168
+ code: "KUL",
169
+ location: [101.7099, 2.7456]
170
+ },
171
+ {
172
+ name: "Doha",
173
+ code: "DOH",
174
+ location: [51.6136, 25.2731]
175
+ },
176
+ {
177
+ name: "Vienna",
178
+ code: "VIE",
179
+ location: [16.5697, 48.1103]
180
+ },
181
+ {
182
+ name: "Zurich",
183
+ code: "ZRH",
184
+ location: [8.5492, 47.4583]
185
+ },
186
+ {
187
+ name: "Brussels",
188
+ code: "BRU",
189
+ location: [4.4844, 50.901]
190
+ },
191
+ {
192
+ name: "Copenhagen",
193
+ code: "CPH",
194
+ location: [12.6508, 55.6181]
195
+ },
196
+ {
197
+ name: "Oslo",
198
+ code: "OSL",
199
+ location: [11.1004, 60.1939]
200
+ },
201
+ {
202
+ name: "Stockholm",
203
+ code: "ARN",
204
+ location: [17.9186, 59.6519]
205
+ },
206
+ {
207
+ name: "Helsinki",
208
+ code: "HEL",
209
+ location: [24.9633, 60.3172]
210
+ },
211
+ {
212
+ name: "Lisbon",
213
+ code: "LIS",
214
+ location: [-9.1359, 38.7742]
215
+ },
216
+ {
217
+ name: "Athens",
218
+ code: "ATH",
219
+ location: [23.9445, 37.9364]
220
+ },
221
+ {
222
+ name: "Warsaw",
223
+ code: "WAW",
224
+ location: [20.9671, 52.1657]
225
+ },
226
+ {
227
+ name: "Budapest",
228
+ code: "BUD",
229
+ location: [19.261, 47.433]
230
+ },
231
+ {
232
+ name: "Prague",
233
+ code: "PRG",
234
+ location: [14.2632, 50.1008]
235
+ },
236
+ {
237
+ name: "Moscow",
238
+ code: "SVO",
239
+ location: [37.4146, 55.9726]
240
+ },
241
+ {
242
+ name: "Dubai",
243
+ code: "DXB",
244
+ location: [55.3644, 25.2532]
245
+ }
246
+ ];
247
+ var icons = [
248
+ "ph--air-traffic-control--regular",
249
+ "ph--asterisk--regular",
250
+ "ph--atom--regular",
251
+ "ph--basketball--regular",
252
+ "ph--butterfly--regular",
253
+ "ph--cactus--regular",
254
+ "ph--cake--regular",
255
+ "ph--calendar-dots--regular",
256
+ "ph--campfire--regular",
257
+ "ph--command--regular",
258
+ "ph--confetti--regular",
259
+ "ph--detective--regular",
260
+ "ph--disco-ball--regular",
261
+ "ph--dna--regular",
262
+ "ph--factory--regular",
263
+ "ph--flag-banner-fold--regular",
264
+ "ph--flask--regular",
265
+ "ph--flower-lotus--regular",
266
+ "ph--flying-saucer--regular",
267
+ "ph--game-controller--regular",
268
+ "ph--gavel--regular",
269
+ "ph--gift--regular",
270
+ "ph--guitar--regular",
271
+ "ph--hamburger--regular",
272
+ "ph--handshake--regular",
273
+ "ph--heart--regular",
274
+ "ph--lightbulb--regular",
275
+ "ph--lock--regular",
276
+ "ph--martini--regular",
277
+ "ph--medal-military--regular",
278
+ "ph--moped-front--regular",
279
+ "ph--office-chair--regular",
280
+ "ph--paint-brush-household--regular",
281
+ "ph--peace--regular",
282
+ "ph--person-simple-hike--regular",
283
+ "ph--piggy-bank--regular",
284
+ "ph--potted-plant--regular",
285
+ "ph--radioactive--regular",
286
+ "ph--rocket-launch--regular",
287
+ "ph--shield-star--regular",
288
+ "ph--shopping-cart--regular",
289
+ "ph--stethoscope--regular",
290
+ "ph--student--regular",
291
+ "ph--sun--regular",
292
+ "ph--tote--regular",
293
+ "ph--tree--regular",
294
+ "ph--users-three--regular",
295
+ "ph--yin-yang--regular"
296
+ ];
297
+ //#endregion
298
+ //#region src/util.ts
299
+ var toRange = (range, min = 0) => typeof range === "number" ? {
300
+ min,
301
+ max: range
302
+ } : range;
303
+ var getCount = (range) => typeof range === "number" ? range : randNumber(range);
304
+ var multiple = (fn, n) => {
305
+ return Array.from({ length: n }).map((_, i) => fn(i));
306
+ };
307
+ var uniqueArray = (values, n) => {
308
+ if (Array.isArray(values)) {
309
+ const results = [];
310
+ const selection = Array.from(new Set(values));
311
+ for (let i = 0; i < n; i++) {
312
+ if (selection.length === 0) break;
313
+ results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);
314
+ }
315
+ return results;
316
+ } else {
317
+ const results = /* @__PURE__ */ new Set();
318
+ while (results.size < n) results.add(values());
319
+ return Array.from(results);
320
+ }
321
+ };
322
+ //#endregion
323
+ //#region src/random.ts
324
+ var random = {
325
+ seed: (value) => seed(String(value)),
326
+ helpers: {
327
+ arrayElement: (a) => rand(a),
328
+ multiple: (f, { count }) => multiple(f, typeof count === "number" ? count : getCount(count)),
329
+ uniqueArray: (f, n) => uniqueArray(f, n),
330
+ randomSubset: (array, count) => {
331
+ const length = count === void 0 ? Math.floor(Math.random() * (array.length + 1)) : Math.min(typeof count === "number" ? count : getCount(count), array.length);
332
+ if (length === 0) return [];
333
+ return uniqueArray(() => rand(array), length);
334
+ }
335
+ },
336
+ number: {
337
+ float: (range) => randFloat(range ? toRange(range) : void 0),
338
+ int: (range) => randNumber(range ? toRange(range) : void 0)
339
+ },
340
+ datatype: { boolean: (p) => randChanceBoolean({ chanceTrue: p?.probability ?? .5 }) },
341
+ date: {
342
+ recent: () => randRecentDate(),
343
+ iso8601: () => randRecentDate().toISOString()
344
+ },
345
+ image: { url: () => randImg() },
346
+ lorem: {
347
+ word: () => randWord(),
348
+ words: (n = 1) => randWord({ length: getCount(n) }).join(" "),
349
+ sentence: (n = 1) => {
350
+ if (n) {
351
+ const text = randWord({ length: getCount(n) }).join(" ");
352
+ return text.charAt(0).toUpperCase() + text.slice(1) + ".";
353
+ }
354
+ return randSentence();
355
+ },
356
+ sentences: (n = 1) => randSentence({ length: getCount(n) }).join(" "),
357
+ paragraph: (n = 1) => {
358
+ if (n) return randSentence({ length: getCount(n) }).join(" ");
359
+ return randParagraph();
360
+ },
361
+ paragraphs: (n = 1) => randParagraph({ length: getCount(n) }).join("\n")
362
+ },
363
+ string: {
364
+ hexadecimal: (l) => randHexaDecimal(l).join(""),
365
+ uuid: () => randUuid()
366
+ },
367
+ internet: {
368
+ email: () => randEmail(),
369
+ url: () => randUrl()
370
+ },
371
+ person: {
372
+ firstName: () => randFirstName(),
373
+ fullName: () => randFullName(),
374
+ jobTitle: () => randJobTitle()
375
+ },
376
+ company: { name: () => randCompanyName() },
377
+ commerce: {
378
+ productName: () => randProductName(),
379
+ department: () => randDepartment()
380
+ },
381
+ geo: {
382
+ airport: () => rand(airports),
383
+ location: () => rand(airports).location
384
+ },
385
+ email: {},
386
+ properties: {
387
+ emoji: () => rand(idEmoji),
388
+ hue: () => rand(idHue),
389
+ icon: () => rand(icons)
390
+ }
391
+ };
392
+ //#endregion
393
+ export { random };
394
+
395
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/data.ts","../../src/util.ts","../../src/random.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nexport const airports = [\n { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },\n { name: 'London', code: 'LHR', location: [-0.4543, 51.47] },\n { name: 'Tokyo', code: 'HND', location: [139.7811, 35.5494] },\n { name: 'Denver', code: 'DEN', location: [-104.6737, 39.8561] },\n { name: 'Istanbul', code: 'IST', location: [28.8153, 41.2753] },\n { name: 'Los Angeles', code: 'LAX', location: [-118.4085, 33.9416] },\n { name: 'Paris', code: 'CDG', location: [2.55, 49.0097] },\n { name: 'Guangzhou', code: 'CAN', location: [113.2971, 23.3924] },\n { name: 'Frankfurt', code: 'FRA', location: [8.5706, 50.0333] },\n { name: 'Delhi', code: 'DEL', location: [77.1031, 28.5562] },\n { name: 'Singapore', code: 'SIN', location: [103.994, 1.3644] },\n { name: 'Amsterdam', code: 'AMS', location: [4.7639, 52.3105] },\n { name: 'Seoul', code: 'ICN', location: [126.4505, 37.4602] },\n { name: 'Jakarta', code: 'CGK', location: [106.6559, -6.1256] },\n { name: 'Bangkok', code: 'BKK', location: [100.7501, 13.6899] },\n { name: 'Hong Kong', code: 'HKG', location: [113.9185, 22.308] },\n { name: 'Madrid', code: 'MAD', location: [-3.5676, 40.4936] },\n { name: 'San Francisco', code: 'SFO', location: [-122.379, 37.6213] },\n { name: 'New York', code: 'JFK', location: [-73.7781, 40.6413] },\n { name: 'Chicago', code: 'ORD', location: [-87.9048, 41.9742] },\n { name: 'Shanghai', code: 'PVG', location: [121.8083, 31.1434] },\n { name: 'Beijing', code: 'PEK', location: [116.4074, 39.9042] },\n { name: 'Miami', code: 'MIA', location: [-80.2906, 25.7959] },\n { name: 'Houston', code: 'IAH', location: [-95.3414, 29.9844] },\n { name: 'Munich', code: 'MUC', location: [11.7861, 48.3538] },\n { name: 'Toronto', code: 'YYZ', location: [-79.6306, 43.6777] },\n { name: 'Sydney', code: 'SYD', location: [151.1799, -33.9399] },\n { name: 'Melbourne', code: 'MEL', location: [144.843, -37.6733] },\n { name: 'Rome', code: 'FCO', location: [12.2508, 41.8003] },\n { name: 'Barcelona', code: 'BCN', location: [2.0759, 41.2974] },\n { name: 'Kuala Lumpur', code: 'KUL', location: [101.7099, 2.7456] },\n { name: 'Doha', code: 'DOH', location: [51.6136, 25.2731] },\n { name: 'Vienna', code: 'VIE', location: [16.5697, 48.1103] },\n { name: 'Zurich', code: 'ZRH', location: [8.5492, 47.4583] },\n { name: 'Brussels', code: 'BRU', location: [4.4844, 50.901] },\n { name: 'Copenhagen', code: 'CPH', location: [12.6508, 55.6181] },\n { name: 'Oslo', code: 'OSL', location: [11.1004, 60.1939] },\n { name: 'Stockholm', code: 'ARN', location: [17.9186, 59.6519] },\n { name: 'Helsinki', code: 'HEL', location: [24.9633, 60.3172] },\n { name: 'Lisbon', code: 'LIS', location: [-9.1359, 38.7742] },\n { name: 'Athens', code: 'ATH', location: [23.9445, 37.9364] },\n { name: 'Warsaw', code: 'WAW', location: [20.9671, 52.1657] },\n { name: 'Budapest', code: 'BUD', location: [19.261, 47.433] },\n { name: 'Prague', code: 'PRG', location: [14.2632, 50.1008] },\n { name: 'Moscow', code: 'SVO', location: [37.4146, 55.9726] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n];\n\nexport const icons = [\n 'ph--air-traffic-control--regular',\n 'ph--asterisk--regular',\n 'ph--atom--regular',\n 'ph--basketball--regular',\n 'ph--butterfly--regular',\n 'ph--cactus--regular',\n 'ph--cake--regular',\n 'ph--calendar-dots--regular',\n 'ph--campfire--regular',\n 'ph--command--regular',\n 'ph--confetti--regular',\n 'ph--detective--regular',\n 'ph--disco-ball--regular',\n 'ph--dna--regular',\n 'ph--factory--regular',\n 'ph--flag-banner-fold--regular',\n 'ph--flask--regular',\n 'ph--flower-lotus--regular',\n 'ph--flying-saucer--regular',\n 'ph--game-controller--regular',\n 'ph--gavel--regular',\n 'ph--gift--regular',\n 'ph--guitar--regular',\n 'ph--hamburger--regular',\n 'ph--handshake--regular',\n 'ph--heart--regular',\n 'ph--lightbulb--regular',\n 'ph--lock--regular',\n 'ph--martini--regular',\n 'ph--medal-military--regular',\n 'ph--moped-front--regular',\n 'ph--office-chair--regular',\n 'ph--paint-brush-household--regular',\n 'ph--peace--regular',\n 'ph--person-simple-hike--regular',\n 'ph--piggy-bank--regular',\n 'ph--potted-plant--regular',\n 'ph--radioactive--regular',\n 'ph--rocket-launch--regular',\n 'ph--shield-star--regular',\n 'ph--shopping-cart--regular',\n 'ph--stethoscope--regular',\n 'ph--student--regular',\n 'ph--sun--regular',\n 'ph--tote--regular',\n 'ph--tree--regular',\n 'ph--users-three--regular',\n 'ph--yin-yang--regular',\n];\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport { randNumber } from '@ngneat/falso';\n\nexport type Range = { min?: number; max?: number; count?: number };\n\nexport const toRange = (range: number | Range, min = 0) => (typeof range === 'number' ? { min, max: range } : range);\n\nexport const getCount = (range?: number | Range) => (typeof range === 'number' ? range : randNumber(range));\n\nexport const multiple = <T>(fn: (i: number) => T, n: number): T[] => {\n return Array.from({ length: n }).map((_, i) => fn(i));\n};\n\nexport const uniqueArray = <T>(values: T[] | (() => T), n: number): T[] => {\n if (Array.isArray(values)) {\n const results: T[] = [];\n const selection = Array.from(new Set<T>(values));\n for (let i = 0; i < n; i++) {\n if (selection.length === 0) {\n break;\n }\n results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);\n }\n return results;\n } else {\n const results = new Set<T>();\n // TODO(burdon): Set timeout.\n while (results.size < n) {\n results.add(values());\n }\n\n return Array.from(results);\n }\n};\n","//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n rand,\n randChanceBoolean,\n randCompanyName,\n randDepartment,\n randEmail,\n randFirstName,\n randFloat,\n randFullName,\n randHexaDecimal,\n randImg,\n randJobTitle,\n randNumber,\n randParagraph,\n randProductName,\n randRecentDate,\n randSentence,\n randUrl,\n randUuid,\n randWord,\n seed,\n} from '@ngneat/falso';\n\nimport { idEmoji, idHue } from '@dxos/util';\n\nimport { airports, icons } from './data';\nimport { type Range, getCount, multiple, toRange, uniqueArray } from './util';\n\nexport const random = {\n //\n // Util\n //\n seed: (value: number) => seed(String(value)),\n helpers: {\n arrayElement: <T>(a: T[]) => rand(a),\n multiple: <T>(f: () => T, { count }: { count: number | { min: number; max: number } }) =>\n multiple(f, typeof count === 'number' ? count : getCount(count)),\n uniqueArray: <T>(f: T[] | (() => T), n: number) => uniqueArray(f, n),\n randomSubset: <T>(array: T[], count?: number | { min: number; max: number }) => {\n const length =\n count === undefined\n ? Math.floor(Math.random() * (array.length + 1))\n : Math.min(typeof count === 'number' ? count : getCount(count), array.length);\n\n if (length === 0) {\n return [];\n }\n return uniqueArray(() => rand(array), length);\n },\n },\n\n //\n // Type\n //\n number: {\n float: (range?: number | Range) => randFloat(range ? toRange(range) : undefined),\n int: (range?: number | Range) => randNumber(range ? toRange(range) : undefined),\n },\n datatype: {\n boolean: (p?: { probability: number }) => randChanceBoolean({ chanceTrue: p?.probability ?? 0.5 }),\n },\n date: {\n recent: () => randRecentDate(),\n iso8601: () => randRecentDate().toISOString(),\n },\n image: {\n url: () => randImg(),\n },\n\n //\n // Text\n //\n lorem: {\n word: () => randWord(),\n words: (n: number | Range = 1) => randWord({ length: getCount(n) }).join(' '),\n sentence: (n: number | Range = 1) => {\n if (n) {\n const text = randWord({ length: getCount(n) }).join(' ');\n return text.charAt(0).toUpperCase() + text.slice(1) + '.';\n }\n\n return randSentence();\n },\n sentences: (n: number | Range = 1) => randSentence({ length: getCount(n) }).join(' '),\n paragraph: (n: number | Range = 1) => {\n if (n) {\n return randSentence({ length: getCount(n) }).join(' ');\n }\n\n return randParagraph();\n },\n paragraphs: (n: number | Range = 1) => randParagraph({ length: getCount(n) }).join('\\n'),\n },\n\n //\n // String\n //\n string: {\n hexadecimal: (l?: { length: number }) => randHexaDecimal(l).join(''),\n uuid: () => randUuid(),\n },\n\n //\n // Custom\n //\n internet: {\n email: () => randEmail(),\n url: () => randUrl(),\n },\n person: {\n firstName: () => randFirstName(),\n fullName: () => randFullName(),\n jobTitle: () => randJobTitle(),\n },\n company: {\n name: () => randCompanyName(),\n },\n commerce: {\n productName: () => randProductName(),\n department: () => randDepartment(),\n },\n geo: {\n airport: () => rand(airports),\n location: () => rand(airports).location,\n },\n email: {},\n properties: {\n emoji: () => rand(idEmoji),\n hue: () => rand(idHue),\n icon: () => rand(icons),\n },\n};\n"],"mappings":";;;;AAIA,IAAa,WAAW;CACtB;EAAE,MAAM;EAAW,MAAM;EAAO,UAAU,CAAC,UAAU,OAAO;CAAE;CAC9D;EAAE,MAAM;EAAS,MAAM;EAAO,UAAU,CAAC,SAAS,OAAO;CAAE;CAC3D;EAAE,MAAM;EAAU,MAAM;EAAO,UAAU,CAAC,UAAU,OAAO;CAAE;CAC7D;EAAE,MAAM;EAAU,MAAM;EAAO,UAAU,CAAC,QAAS,KAAK;CAAE;CAC1D;EAAE,MAAM;EAAS,MAAM;EAAO,UAAU,CAAC,UAAU,OAAO;CAAE;CAC5D;EAAE,MAAM;EAAU,MAAM;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AI,GAAG;IACL,MAAM,OAAO,SAAS,EAAE,QAAQ,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG;IACvD,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,KAAK,MAAM,CAAC,IAAI;GACxD;GAEA,OAAO,aAAa;EACtB;EACA,YAAY,IAAoB,MAAM,aAAa,EAAE,QAAQ,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG;EACpF,YAAY,IAAoB,MAAM;GACpC,IAAI,GACF,OAAO,aAAa,EAAE,QAAQ,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG;GAGvD,OAAO,cAAc;EACvB;EACA,aAAa,IAAoB,MAAM,cAAc,EAAE,QAAQ,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI;CACzF;CAKA,QAAQ;EACN,cAAc,MAA2B,gBAAgB,CAAC,CAAC,CAAC,KAAK,EAAE;EACnE,YAAY,SAAS;CACvB;CAKA,UAAU;EACR,aAAa,UAAU;EACvB,WAAW,QAAQ;CACrB;CACA,QAAQ;EACN,iBAAiB,cAAc;EAC/B,gBAAgB,aAAa;EAC7B,gBAAgB,aAAa;CAC/B;CACA,SAAS,EACP,YAAY,gBAAgB,EAC9B;CACA,UAAU;EACR,mBAAmB,gBAAgB;EACnC,kBAAkB,eAAe;CACnC;CACA,KAAK;EACH,eAAe,KAAK,QAAQ;EAC5B,gBAAgB,KAAK,QAAQ,CAAC,CAAC;CACjC;CACA,OAAO,CAAC;CACR,YAAY;EACV,aAAa,KAAK,OAAO;EACzB,WAAW,KAAK,KAAK;EACrB,YAAY,KAAK,KAAK;CACxB;AACF"}
@@ -52,12 +52,14 @@ export declare const random: {
52
52
  person: {
53
53
  firstName: () => string;
54
54
  fullName: () => string;
55
+ jobTitle: () => string;
55
56
  };
56
57
  company: {
57
58
  name: () => string;
58
59
  };
59
60
  commerce: {
60
61
  productName: () => string;
62
+ department: () => string;
61
63
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