@vielzeug/illusionist 2.3.1 → 3.0.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 (78) 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 +4 -3
  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 +6 -7
  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 -1
  19. package/dist/_helpers/int.js.map +1 -1
  20. package/dist/_helpers/next-float.d.ts +2 -0
  21. package/dist/_helpers/next-float.d.ts.map +1 -0
  22. package/dist/_helpers/next-float.js +2 -0
  23. package/dist/_helpers/string.cjs +1 -1
  24. package/dist/_helpers/string.cjs.map +1 -1
  25. package/dist/_helpers/string.d.ts +2 -2
  26. package/dist/_helpers/string.d.ts.map +1 -1
  27. package/dist/_helpers/string.js +18 -27
  28. package/dist/_helpers/string.js.map +1 -1
  29. package/dist/date/date.cjs +1 -1
  30. package/dist/date/date.cjs.map +1 -1
  31. package/dist/date/date.d.ts.map +1 -1
  32. package/dist/date/date.js +24 -24
  33. package/dist/date/date.js.map +1 -1
  34. package/dist/factory.cjs +1 -1
  35. package/dist/factory.cjs.map +1 -1
  36. package/dist/factory.d.ts +0 -5
  37. package/dist/factory.d.ts.map +1 -1
  38. package/dist/factory.js +12 -22
  39. package/dist/factory.js.map +1 -1
  40. package/dist/finance/finance.cjs +1 -1
  41. package/dist/finance/finance.cjs.map +1 -1
  42. package/dist/finance/finance.js +4 -4
  43. package/dist/finance/finance.js.map +1 -1
  44. package/dist/illusionist.cjs +3 -3
  45. package/dist/illusionist.cjs.map +1 -1
  46. package/dist/illusionist.iife.js +3 -3
  47. package/dist/illusionist.iife.js.map +1 -1
  48. package/dist/illusionist.js +3 -3
  49. package/dist/illusionist.js.map +1 -1
  50. package/dist/internet/internet.cjs +1 -1
  51. package/dist/internet/internet.cjs.map +1 -1
  52. package/dist/internet/internet.js +11 -10
  53. package/dist/internet/internet.js.map +1 -1
  54. package/dist/location/location.cjs +1 -1
  55. package/dist/location/location.cjs.map +1 -1
  56. package/dist/location/location.d.ts.map +1 -1
  57. package/dist/location/location.js +31 -30
  58. package/dist/location/location.js.map +1 -1
  59. package/dist/seed/create-seed.cjs +1 -1
  60. package/dist/seed/create-seed.cjs.map +1 -1
  61. package/dist/seed/create-seed.d.ts +2 -2
  62. package/dist/seed/create-seed.d.ts.map +1 -1
  63. package/dist/seed/create-seed.js +10 -11
  64. package/dist/seed/create-seed.js.map +1 -1
  65. package/dist/seed/mulberry32.cjs.map +1 -1
  66. package/dist/seed/mulberry32.d.ts +1 -1
  67. package/dist/seed/mulberry32.d.ts.map +1 -1
  68. package/dist/seed/mulberry32.js.map +1 -1
  69. package/dist/system/system.cjs +1 -1
  70. package/dist/system/system.cjs.map +1 -1
  71. package/dist/system/system.d.ts.map +1 -1
  72. package/dist/system/system.js +23 -24
  73. package/dist/system/system.js.map +1 -1
  74. package/dist/types.d.ts +2 -3
  75. package/dist/types.d.ts.map +1 -1
  76. package/package.json +10 -10
  77. package/dist/_dev.d.ts +0 -2
  78. package/dist/_dev.d.ts.map +0 -1
package/dist/factory.js CHANGED
@@ -9,35 +9,25 @@ import { createSeed as s } from "./seed/create-seed.js";
9
9
  import { system_exports as c } from "./system/system.js";
10
10
  //#region src/factory.ts
11
11
  function l(l) {
12
- let { locale: u, seed: d } = l, f = s(d), p = new AbortController(), m = !1, h = {
12
+ let { locale: u, seed: d } = l, f = {
13
13
  locale: u,
14
- source: f
15
- }, g = (e) => {
14
+ source: s(d)
15
+ }, p = (e) => {
16
16
  let t = {};
17
- for (let [n, r] of Object.entries(e)) typeof r == "function" && (t[n] = (...e) => r(h, ...e));
17
+ for (let [n, r] of Object.entries(e)) typeof r == "function" && (t[n] = (...e) => r(f, ...e));
18
18
  return t;
19
- }, _ = () => {
20
- m || (m = !0, p.abort());
21
19
  };
22
20
  return {
23
- commerce: g(e),
24
- date: g(t),
25
- get disposalSignal() {
26
- return p.signal;
27
- },
28
- dispose: _,
29
- get disposed() {
30
- return m;
31
- },
32
- finance: g(n),
33
- internet: g(r),
21
+ commerce: p(e),
22
+ date: p(t),
23
+ finance: p(n),
24
+ internet: p(r),
34
25
  locale: u,
35
- location: g(i),
36
- lorem: g(a),
37
- person: g(o),
26
+ location: p(i),
27
+ lorem: p(a),
28
+ person: p(o),
38
29
  seed: d,
39
- system: g(c),
40
- [Symbol.dispose]: _
30
+ system: p(c)
41
31
  };
42
32
  }
43
33
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","names":[],"sources":["../src/factory.ts"],"sourcesContent":["import type { RandomSource } from '@vielzeug/arsenal/random';\nimport * as commerceApi from './commerce/commerce';\nimport * as dateApi from './date/date';\nimport * as financeApi from './finance/finance';\nimport * as internetApi from './internet/internet';\nimport * as locationApi from './location/location';\nimport * as loremApi from './lorem/lorem';\nimport * as personApi from './person/person';\nimport { createSeed } from './seed/create-seed';\nimport * as systemApi from './system/system';\nimport type { IllusionistContext, IllusionistLocale, IllusionistOptions } from './types';\n\nexport type { IllusionistOptions } from './types';\n\n/** Strips the leading `IllusionistContext` parameter from a function type. */\ntype Bound<F> = F extends (ctx: IllusionistContext, ...args: infer A) => infer R ? (...args: A) => R : F;\n\n/** Maps a module of `(ctx, ...args) => R` functions to `(...args) => R`. */\ntype BoundApi<T> = { readonly [K in keyof T]: Bound<T[K]> };\n\nexport type Illusionist = {\n readonly person: BoundApi<typeof personApi>;\n readonly internet: BoundApi<typeof internetApi>;\n readonly commerce: BoundApi<typeof commerceApi>;\n readonly date: BoundApi<typeof dateApi>;\n readonly finance: BoundApi<typeof financeApi>;\n readonly location: BoundApi<typeof locationApi>;\n readonly lorem: BoundApi<typeof loremApi>;\n readonly system: BoundApi<typeof systemApi>;\n\n /** The seed used to initialize this instance, or `undefined` for cryptographic randomness. */\n readonly seed: number | string | undefined;\n /** The active locale data. */\n readonly locale: IllusionistLocale;\n\n dispose(): void;\n readonly disposed: boolean;\n readonly disposalSignal: AbortSignal;\n [Symbol.dispose](): void;\n};\n\n/**\n * Creates a bound illusionist instance with all categories sharing a single seeded\n * random source and locale.\n *\n * @example\n * ```ts\n * import { en } from '@vielzeug/illusionist/locales';\n *\n * const illusion = createIllusion({ seed: 12345, locale: en });\n *\n * illusion.person.fullName(); // deterministic — same seed → same result\n * illusion.internet.email();\n * illusion.commerce.price();\n * illusion.dispose(); // [Symbol.dispose]() also works\n * ```\n */\nexport function createIllusion(options: IllusionistOptions): Illusionist {\n const { locale, seed } = options;\n const source: RandomSource = createSeed(seed);\n const controller = new AbortController();\n let disposed = false;\n\n const ctx: IllusionistContext = { locale, source };\n\n const bind = <T extends Record<string, (ctx: IllusionistContext, ...args: never[]) => unknown>>(\n api: T,\n ): BoundApi<T> => {\n const bound = {} as Record<string, (...args: never[]) => unknown>;\n\n for (const [key, fn] of Object.entries(api)) {\n if (typeof fn === 'function') {\n bound[key] = (...args: never[]) => (fn as (ctx: IllusionistContext, ...args: never[]) => unknown)(ctx, ...args);\n }\n }\n\n return bound as unknown as BoundApi<T>;\n };\n\n const dispose = (): void => {\n if (disposed) return;\n\n disposed = true;\n controller.abort();\n };\n\n return {\n commerce: bind(commerceApi),\n date: bind(dateApi),\n get disposalSignal(): AbortSignal {\n return controller.signal;\n },\n dispose,\n get disposed(): boolean {\n return disposed;\n },\n finance: bind(financeApi),\n internet: bind(internetApi),\n locale,\n location: bind(locationApi),\n lorem: bind(loremApi),\n person: bind(personApi),\n seed,\n system: bind(systemApi),\n [Symbol.dispose]: dispose,\n };\n}\n"],"mappings":";;;;;;;;;;AAyDA,SAAgB,EAAe,GAA0C;CACvE,IAAM,EAAE,WAAQ,YAAS,GACnB,IAAuB,EAAW,CAAI,GACtC,IAAa,IAAI,gBAAgB,GACnC,IAAW,IAET,IAA0B;EAAE;EAAQ;CAAO,GAE3C,KACJ,MACgB;EAChB,IAAM,IAAQ,CAAC;EAEf,KAAK,IAAM,CAAC,GAAK,MAAO,OAAO,QAAQ,CAAG,GACxC,AAAI,OAAO,KAAO,eAChB,EAAM,MAAQ,GAAG,MAAmB,EAA8D,GAAK,GAAG,CAAI;EAIlH,OAAO;CACT,GAEM,UAAsB;EACtB,MAEJ,IAAW,IACX,EAAW,MAAM;CACnB;CAEA,OAAO;EACL,UAAU,EAAK,CAAW;EAC1B,MAAM,EAAK,CAAO;EAClB,IAAI,iBAA8B;GAChC,OAAO,EAAW;EACpB;EACA;EACA,IAAI,WAAoB;GACtB,OAAO;EACT;EACA,SAAS,EAAK,CAAU;EACxB,UAAU,EAAK,CAAW;EAC1B;EACA,UAAU,EAAK,CAAW;EAC1B,OAAO,EAAK,CAAQ;EACpB,QAAQ,EAAK,CAAS;EACtB;EACA,QAAQ,EAAK,CAAS;GACrB,OAAO,UAAU;CACpB;AACF"}
1
+ {"version":3,"file":"factory.js","names":[],"sources":["../src/factory.ts"],"sourcesContent":["import * as commerceApi from './commerce/commerce';\nimport * as dateApi from './date/date';\nimport * as financeApi from './finance/finance';\nimport * as internetApi from './internet/internet';\nimport * as locationApi from './location/location';\nimport * as loremApi from './lorem/lorem';\nimport * as personApi from './person/person';\nimport { createSeed } from './seed/create-seed';\nimport * as systemApi from './system/system';\nimport type { IllusionistContext, IllusionistLocale, IllusionistOptions, RandomSource } from './types';\n\nexport type { IllusionistOptions } from './types';\n\n/** Strips the leading `IllusionistContext` parameter from a function type. */\ntype Bound<F> = F extends (ctx: IllusionistContext, ...args: infer A) => infer R ? (...args: A) => R : F;\n\n/** Maps a module of `(ctx, ...args) => R` functions to `(...args) => R`. */\ntype BoundApi<T> = { readonly [K in keyof T]: Bound<T[K]> };\n\nexport type Illusionist = {\n readonly person: BoundApi<typeof personApi>;\n readonly internet: BoundApi<typeof internetApi>;\n readonly commerce: BoundApi<typeof commerceApi>;\n readonly date: BoundApi<typeof dateApi>;\n readonly finance: BoundApi<typeof financeApi>;\n readonly location: BoundApi<typeof locationApi>;\n readonly lorem: BoundApi<typeof loremApi>;\n readonly system: BoundApi<typeof systemApi>;\n\n /** The seed used to initialize this instance, or `undefined` for cryptographic randomness. */\n readonly seed: number | string | undefined;\n /** The active locale data. */\n readonly locale: IllusionistLocale;\n};\n\n/**\n * Creates a bound illusionist instance with all categories sharing a single seeded\n * random source and locale.\n *\n * @example\n * ```ts\n * import { en } from '@vielzeug/illusionist/locales';\n *\n * const illusion = createIllusion({ seed: 12345, locale: en });\n *\n * illusion.person.fullName(); // deterministic — same seed → same result\n * illusion.internet.email();\n * illusion.commerce.price();\n * ```\n */\nexport function createIllusion(options: IllusionistOptions): Illusionist {\n const { locale, seed } = options;\n const source: RandomSource = createSeed(seed);\n\n const ctx: IllusionistContext = { locale, source };\n\n const bind = <T extends Record<string, (ctx: IllusionistContext, ...args: never[]) => unknown>>(\n api: T,\n ): BoundApi<T> => {\n const bound = {} as Record<string, (...args: never[]) => unknown>;\n\n for (const [key, fn] of Object.entries(api)) {\n if (typeof fn === 'function') {\n bound[key] = (...args: never[]) => (fn as (ctx: IllusionistContext, ...args: never[]) => unknown)(ctx, ...args);\n }\n }\n\n return bound as unknown as BoundApi<T>;\n };\n\n return {\n commerce: bind(commerceApi),\n date: bind(dateApi),\n finance: bind(financeApi),\n internet: bind(internetApi),\n locale,\n location: bind(locationApi),\n lorem: bind(loremApi),\n person: bind(personApi),\n seed,\n system: bind(systemApi),\n };\n}\n"],"mappings":";;;;;;;;;;AAkDA,SAAgB,EAAe,GAA0C;CACvE,IAAM,EAAE,WAAQ,YAAS,GAGnB,IAA0B;EAAE;EAAQ,QAFb,EAAW,CAEE;CAAO,GAE3C,KACJ,MACgB;EAChB,IAAM,IAAQ,CAAC;EAEf,KAAK,IAAM,CAAC,GAAK,MAAO,OAAO,QAAQ,CAAG,GACxC,AAAI,OAAO,KAAO,eAChB,EAAM,MAAQ,GAAG,MAAmB,EAA8D,GAAK,GAAG,CAAI;EAIlH,OAAO;CACT;CAEA,OAAO;EACL,UAAU,EAAK,CAAW;EAC1B,MAAM,EAAK,CAAO;EAClB,SAAS,EAAK,CAAU;EACxB,UAAU,EAAK,CAAW;EAC1B;EACA,UAAU,EAAK,CAAW;EAC1B,OAAO,EAAK,CAAQ;EACpB,QAAQ,EAAK,CAAS;EACtB;EACA,QAAQ,EAAK,CAAS;CACxB;AACF"}
@@ -1,2 +1,2 @@
1
- const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/float.cjs"),n=require("../_helpers/int.cjs"),r=require("../_helpers/string.cjs"),i=require("./data.cjs");let a=require("@vielzeug/coins");var o=e.__exportAll({amount:()=>h,bank:()=>C,bic:()=>_,bitcoinAddress:()=>b,creditCardCVV:()=>y,creditCardNumber:()=>v,ethereumAddress:()=>x,iban:()=>g,transactionType:()=>S}),s={EUR:a.EUR,GBP:a.GBP,USD:a.USD},c=[`visa`,`mastercard`,`amex`],l=Object.keys(i.FINANCE_DATA.ibanCountryCodes),u=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`;function d(e,t){let n=``;for(let r=0;r<e;r++)n+=u[Math.floor(t.source.next()*26)];return n}function f(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function p(e,t){return(98-f(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function m(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function h(e,n={}){let r=n.min??100,i=n.max??1e4,o=n.currency??`USD`,c=t.floatFixed(r,i,2,e.source);return(0,a.money)(c.toFixed(2),s[o])}function g(e,t){let n=t??r.pick(l,e.source);if(!(n in i.FINANCE_DATA.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${l.join(`, `)}`);let a=i.FINANCE_DATA.ibanLengths[n]-4,o=r.numericString(a,e.source);return`${n}${p(n,o)}${o}`}function _(e){return`${d(4,e)}${d(2,e)}${r.alphanumeric(2,e.source).toUpperCase()}${n.int(0,1,e.source)===1?r.alphanumeric(3,e.source).toUpperCase():``}`}function v(e,t){let n=t??r.pick(c,e.source),a=r.pick(i.FINANCE_DATA.creditCardIins[n],e.source),o=a+r.numericString((n===`amex`?15:16)-a.length-1,e.source);return`${o}${m(o)}`}function y(e,t){let n=(t??r.pick(c,e.source))===`amex`?4:3;return r.numericString(n,e.source)}function b(e){let t=r.pick([`1`,`3`,`bc1`],e.source),i=n.int(25,34,e.source);return`${t}${r.base58String(i,e.source)}`}function x(e){return`0x${r.hexString(40,e.source)}`}function S(e){return r.pick(i.FINANCE_DATA.transactionTypes,e.source)}function C(e){return r.pick(i.FINANCE_DATA.banks,e.source)}exports.amount=h,exports.bank=C,exports.bic=_,exports.bitcoinAddress=b,exports.creditCardCVV=y,exports.creditCardNumber=v,exports.ethereumAddress=x,Object.defineProperty(exports,"finance_exports",{enumerable:!0,get:function(){return o}}),exports.iban=g,exports.transactionType=S;
1
+ const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/float.cjs"),n=require("../_helpers/int.cjs"),r=require("../_helpers/string.cjs"),i=require("./data.cjs");let a=require("@vielzeug/coins");var o=e.__exportAll({amount:()=>h,bank:()=>C,bic:()=>_,bitcoinAddress:()=>b,creditCardCVV:()=>y,creditCardNumber:()=>v,ethereumAddress:()=>x,iban:()=>g,transactionType:()=>S}),s={EUR:a.EUR,GBP:a.GBP,USD:a.USD},c=[`visa`,`mastercard`,`amex`],l=Object.keys(i.FINANCE_DATA.ibanCountryCodes),u=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function d(e,t){let n=[];for(let i=0;i<e;i++)n.push(r.pick(u,t.source));return n.join(``)}function f(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function p(e,t){return(98-f(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function m(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function h(e,n={}){let r=n.min??100,i=n.max??1e4,o=n.currency??`USD`,c=t.floatFixed(r,i,2,e.source);return(0,a.money)(c.toFixed(2),s[o])}function g(e,t){let n=t??r.pick(l,e.source);if(!(n in i.FINANCE_DATA.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${l.join(`, `)}`);let a=i.FINANCE_DATA.ibanLengths[n]-4,o=r.numericString(a,e.source);return`${n}${p(n,o)}${o}`}function _(e){return`${d(4,e)}${d(2,e)}${r.alphanumeric(2,e.source).toUpperCase()}${n.int(0,1,e.source)===1?r.alphanumeric(3,e.source).toUpperCase():``}`}function v(e,t){let n=t??r.pick(c,e.source),a=r.pick(i.FINANCE_DATA.creditCardIins[n],e.source),o=a+r.numericString((n===`amex`?15:16)-a.length-1,e.source);return`${o}${m(o)}`}function y(e,t){let n=(t??r.pick(c,e.source))===`amex`?4:3;return r.numericString(n,e.source)}function b(e){let t=r.pick([`1`,`3`,`bc1`],e.source),i=n.int(25,34,e.source);return`${t}${r.base58String(i,e.source)}`}function x(e){return`0x${r.hexString(40,e.source)}`}function S(e){return r.pick(i.FINANCE_DATA.transactionTypes,e.source)}function C(e){return r.pick(i.FINANCE_DATA.banks,e.source)}exports.amount=h,exports.bank=C,exports.bic=_,exports.bitcoinAddress=b,exports.creditCardCVV=y,exports.creditCardNumber=v,exports.ethereumAddress=x,Object.defineProperty(exports,"finance_exports",{enumerable:!0,get:function(){return o}}),exports.iban=g,exports.transactionType=S;
2
2
  //# sourceMappingURL=finance.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"finance.cjs","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n let result = '';\n\n for (let i = 0; i < count; i++) {\n result += LETTERS[Math.floor(ctx.source.next() * LETTERS.length)];\n }\n\n return result;\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":"sYAQM,EAAsD,CAAE,IAAA,EAAA,IAAK,IAAA,EAAA,IAAK,IAAA,EAAA,GAAI,EAEtE,EAAoB,CAAC,OAAQ,aAAc,MAAM,EAGjD,EAAiB,OAAO,KAAK,EAAA,aAAa,gBAAgB,EAE1D,EAAU,6BAEhB,SAAS,EAAQ,EAAe,EAAiC,CAC/D,IAAI,EAAS,GAEb,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,IACzB,GAAU,EAAQ,KAAK,MAAM,EAAI,OAAO,KAAK,EAAI,EAAc,GAGjE,OAAO,CACT,CAGA,SAAS,EAAM,EAAyB,CACtC,IAAI,EAAY,EAEhB,IAAK,IAAM,KAAM,EACf,GAAa,EAAY,GAAK,OAAO,CAAE,GAAK,GAG9C,OAAO,CACT,CAGA,SAAS,EAAgB,EAAiB,EAAsB,CAK9D,OAFc,GAAK,EADH,GADM,IAAO,EAAQ,IACV,QAAQ,SAAW,GAAM,OAAO,EAAE,WAAW,CAAC,EAAI,EAAE,CACtD,CAAO,EAAA,CAEnB,SAAS,CAAC,CAAC,SAAS,EAAG,GAAG,CACzC,CAGA,SAAS,EAAe,EAAyB,CAC/C,IA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EAAmB,EAAI,MAAM,EACrD,EAAM,EAAA,KAAK,EAAA,aAAa,eAAe,GAAW,EAAI,MAAM,EAE5D,EAAU,EAAM,EAAA,eADF,IAAa,OAAS,GAAK,IACG,EAAI,OAAS,EAAG,EAAI,MAAM,EAG5E,MAAO,GAAG,IAFS,EAAe,CAEd,GACtB,CAEA,SAAgB,EAAc,EAAyB,EAA+B,CAEpF,IAAM,GADW,GAAQ,EAAA,KAAK,EAAmB,EAAI,MAAM,KAC/B,OAAS,EAAI,EAEzC,OAAO,EAAA,cAAc,EAAQ,EAAI,MAAM,CACzC,CAEA,SAAgB,EAAe,EAAiC,CAC9D,IAAM,EAAS,EAAA,KAAK,CAAC,IAAK,IAAK,KAAK,EAAG,EAAI,MAAM,EAC3C,EAAe,EAAA,IAAI,GAAI,GAAI,EAAI,MAAM,EAE3C,MAAO,GAAG,IAAS,EAAA,aAAa,EAAc,EAAI,MAAM,GAC1D,CAEA,SAAgB,EAAgB,EAAiC,CAC/D,MAAO,KAAK,EAAA,UAAU,GAAI,EAAI,MAAM,GACtC,CAEA,SAAgB,EAAgB,EAAiC,CAC/D,OAAO,EAAA,KAAK,EAAA,aAAa,iBAAkB,EAAI,MAAM,CACvD,CAEA,SAAgB,EAAK,EAAiC,CACpD,OAAO,EAAA,KAAK,EAAA,aAAa,MAAO,EAAI,MAAM,CAC5C"}
1
+ {"version":3,"file":"finance.cjs","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n const out: string[] = [];\n\n for (let i = 0; i < count; i++) {\n out.push(pick(LETTERS, ctx.source)!);\n }\n\n return out.join('');\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":"sYAQM,EAAsD,CAAE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GAAI,EAAI,MAAM,EAE3C,MAAO,GAAG,IAAS,EAAA,aAAa,EAAc,EAAI,MAAM,GAC1D,CAEA,SAAgB,EAAgB,EAAiC,CAC/D,MAAO,KAAK,EAAA,UAAU,GAAI,EAAI,MAAM,GACtC,CAEA,SAAgB,EAAgB,EAAiC,CAC/D,OAAO,EAAA,KAAK,EAAA,aAAa,iBAAkB,EAAI,MAAM,CACvD,CAEA,SAAgB,EAAK,EAAiC,CACpD,OAAO,EAAA,KAAK,EAAA,aAAa,MAAO,EAAI,MAAM,CAC5C"}
@@ -23,11 +23,11 @@ var p = /* @__PURE__ */ e({
23
23
  "visa",
24
24
  "mastercard",
25
25
  "amex"
26
- ], g = Object.keys(c.ibanCountryCodes), _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
26
+ ], g = Object.keys(c.ibanCountryCodes), _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
27
27
  function v(e, t) {
28
- let n = "";
29
- for (let r = 0; r < e; r++) n += _[Math.floor(t.source.next() * 26)];
30
- return n;
28
+ let n = [];
29
+ for (let r = 0; r < e; r++) n.push(s(_, t.source));
30
+ return n.join("");
31
31
  }
32
32
  function y(e) {
33
33
  let t = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"finance.js","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n let result = '';\n\n for (let i = 0; i < count; i++) {\n result += LETTERS[Math.floor(ctx.source.next() * LETTERS.length)];\n }\n\n return result;\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;IAQM,IAAsD;CAAE;CAAK;CAAK;AAAI,GAEtE,IAAoB;CAAC;CAAQ;CAAc;AAAM,G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AAiC;CACpD,OAAO,EAAK,EAAa,OAAO,EAAI,MAAM;AAC5C"}
1
+ {"version":3,"file":"finance.js","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n const out: string[] = [];\n\n for (let i = 0; i < count; i++) {\n out.push(pick(LETTERS, ctx.source)!);\n }\n\n return out.join('');\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;IAQM,IAAsD;CAAE;CAAK;CAAK;AAAI,GAEtE,IAAoB;CAAC;CAAQ;CAAc;AAAM,GAGjD,IAAiB,OAAO,KAAK,EAAa,gBAAgB,GAE1D,IAAU,6BAA6B,MAAM,EAAE;AAErD,SAAS,EAAQ,GAAe,GAAiC;CAC/D,IAAM,IAAgB,CAAC;CAEvB,KAAK,IAAI,IAAI,GAAG,IAAI,GAAO,KACzB,EAAI,KAAK,EAAK,GAAS,EAAI,MAAM,CAAE;CAGrC,OAAO,EAAI,KAAK,EAAE;AACpB;AAGA,SAAS,EAAM,GAAyB;CACtC,IAAI,IAAY;CAEhB,KAAK,IAAM,KAAM,GACf,KAAa,IAAY,KAAK,OAAO,CAAE,KAAK;CAG9C,OAAO;AACT;AAGA,SAAS,EAAgB,GAAiB,GAAsB;CAK9D,QAFc,KAAK,EADH,GADM,IAAO,EAAQ,IACV,QAAQ,WAAW,MAAM,OAAO,EAAE,WAAW,CAAC,IAAI,EAAE,CACtD,CAAO,EAAA,CAEnB,SAAS,CAAC,CAAC,SAAS,GAAG,GAAG;AACzC;AAGA,SAAS,EAAe,GAAyB;CAC/C,IAAM,IAAS,EAAQ,MAAM,EAAE,CAAC,CAAC,IAAI,MAAM,GACvC,IAAM,GACN,IAAS;CAEb,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E,OAAO,GAAG,IAFS,EAAe,CAEd;AACtB;AAEA,SAAgB,EAAc,GAAyB,GAA+B;CAEpF,IAAM,KADW,KAAQ,EAAK,GAAmB,EAAI,MAAM,OAC/B,SAAS,IAAI;CAEzC,OAAO,EAAc,GAAQ,EAAI,MAAM;AACzC;AAEA,SAAgB,EAAe,GAAiC;CAC9D,IAAM,IAAS,EAAK;EAAC;EAAK;EAAK;CAAK,GAAG,EAAI,MAAM,GAC3C,IAAe,EAAI,IAAI,IAAI,EAAI,MAAM;CAE3C,OAAO,GAAG,IAAS,EAAa,GAAc,EAAI,MAAM;AAC1D;AAEA,SAAgB,EAAgB,GAAiC;CAC/D,OAAO,KAAK,EAAU,IAAI,EAAI,MAAM;AACtC;AAEA,SAAgB,EAAgB,GAAiC;CAC/D,OAAO,EAAK,EAAa,kBAAkB,EAAI,MAAM;AACvD;AAEA,SAAgB,EAAK,GAAiC;CACpD,OAAO,EAAK,EAAa,OAAO,EAAI,MAAM;AAC5C"}
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require("@vielzeug/coins"),r=require("@vielzeug/tempo");function i(e,t,n){if(e>t)return e;let r=t-e;return e+(n?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296)*r}function a(e,t,n=2,r){let a=10**n,o=i(e*a,t*a,r);return Math.round(o)/a}function o(){return crypto.randomUUID()}function s(e,t){let n=t?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296;if(!Number.isFinite(n)||n<0||n>=1)throw RangeError(`random source must return a finite number in [0, 1)`);return Math.floor(n*e)}function c(e,t,n){if(e>t)throw RangeError(`random: minimum value must not be greater than maximum value`);return s(t-e+1,n)+e}function l(e,t){if(e.length!==0)return e[c(0,e.length-1,t)]}function u(e,t,n){return c(e,t,n)}function d(e,t){return l([...e],t)}function f(e,t){let n=``;for(let r=0;r<e;r++)n+=Math.floor((t?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296)*10);return n}function p(e,t){let n=``;for(let r=0;r<e;r++){let e=Math.floor((t?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296)*16);n+=`0123456789abcdef`[e]}return n}function m(e,t){let n=``;for(let r=0;r<e;r++){let e=Math.floor((t?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296)*62);n+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[e]}return n}function ee(e,t){let n=``;for(let r=0;r<e;r++){let e=Math.floor((t?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296)*58);n+=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`[e]}return n}var h={departments:[`Books`,`Movies`,`Music`,`Games`,`Electronics`,`Computers`,`Home`,`Garden`,`Tools`,`Grocery`,`Health`,`Beauty`,`Toys`,`Kids`,`Baby`,`Clothing`,`Shoes`,`Jewelry`,`Sports`,`Outdoors`,`Automotive`],productAdjectives:[`Small`,`Ergonomic`,`Rustic`,`Intelligent`,`Gorgeous`,`Incredible`,`Fantastic`,`Practical`,`Sleek`,`Awesome`,`Generic`,`Handmade`,`Licensed`,`Refined`,`Unbranded`,`Tasty`],productMaterials:[`Steel`,`Wooden`,`Concrete`,`Plastic`,`Cotton`,`Granite`,`Rubber`,`Metal`,`Soft`,`Fresh`,`Frozen`],productNouns:[`Chair`,`Car`,`Computer`,`Gloves`,`Pants`,`Shirt`,`Table`,`Shoes`,`Hat`,`Plate`,`Knife`,`Bottle`,`Coat`,`Lamp`,`Keyboard`,`Bag`,`Bench`,`Clock`,`Watch`,`Wallet`]},te=t({department:()=>ie,price:()=>ae,productAdjective:()=>g,productDescription:()=>oe,productMaterial:()=>_,productName:()=>re,productNoun:()=>v}),ne={EUR:n.EUR,GBP:n.GBP,USD:n.USD};function g(e){return d(h.productAdjectives,e.source)}function _(e){return d(h.productMaterials,e.source)}function v(e){return d(h.productNouns,e.source)}function re(e){return`${g(e)} ${_(e)} ${v(e)}`}function ie(e){return d(h.departments,e.source)}function ae(e,t={}){let r=t.min??.01,i=t.max??1e3,o=t.currency??`USD`,s=a(r,i,2,e.source);return(0,n.money)(s.toFixed(2),ne[o])}function oe(e){let t=u(1,2,e.source),n=[];for(let r=0;r<t;r++){let t=d(h.productAdjectives,e.source),r=d(h.productMaterials,e.source),i=d(h.productNouns,e.source),a=d(h.departments,e.source);n.push(`The ${t.toLowerCase()} ${r.toLowerCase()} ${i.toLowerCase()} is a great choice for your ${a.toLowerCase()} needs.`)}return n.join(` `)}var se=t({between:()=>de,birthday:()=>fe,future:()=>le,month:()=>me,past:()=>ce,recent:()=>ue,weekday:()=>pe});function y(e){return e??r.Temporal.Now.zonedDateTimeISO(`UTC`)}function ce(e,t){let n=y(t?.ref),i=(t?.years??1)*365*24*60*60;return(0,r.shift)(n,{seconds:-u(1,i,e.source)})}function le(e,t){let n=y(t?.ref),i=(t?.years??1)*365*24*60*60;return(0,r.shift)(n,{seconds:u(1,i,e.source)})}function ue(e,t){let n=y(t?.ref),i=(t?.days??1)*24*60*60;return(0,r.shift)(n,{seconds:-u(1,i,e.source)})}function de(e,t,n){let r=t.toInstant().epochNanoseconds,i=n.toInstant().epochNanoseconds;if(r>i)return t;let a=i-r,o=Number(a/1000000000n),s=Math.floor(e.source.next()*o);return t.add({seconds:s})}function fe(e,t){let n=y(t?.ref),r=u(t?.minAge??18,t?.maxAge??80,e.source),i=u(1,12,e.source),a=u(1,28,e.source);return n.toPlainDate().subtract({years:r}).with({day:a,month:i})}function pe(e,t){return((t??e.locale.code)===`de`?[`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`,`Sonntag`]:[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`])[u(0,6,e.source)]}function me(e,t){return((t??e.locale.code)===`de`?[`Januar`,`Februar`,`März`,`April`,`Mai`,`Juni`,`Juli`,`August`,`September`,`Oktober`,`November`,`Dezember`]:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`])[u(0,11,e.source)]}var he=class extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}},ge=class extends he{},b={banks:[`Deutsche Bank`,`Commerzbank`,`Sparkasse`,`Barclays`,`HSBC`,`BNP Paribas`,`Santander`,`ING`,`UniCredit`,`UBS`],creditCardIins:{amex:[`34`,`37`],mastercard:[`51`,`52`,`53`,`54`,`55`],visa:[`4`]},ibanCountryCodes:{AT:`AT`,BE:`BE`,CH:`CH`,DE:`DE`,ES:`ES`,FR:`FR`,GB:`GB`,IT:`IT`,NL:`NL`},ibanLengths:{AT:20,BE:16,CH:21,DE:22,ES:24,FR:27,GB:22,IT:27,NL:18},transactionTypes:[`payment`,`transfer`,`deposit`,`withdrawal`,`refund`,`fee`]},_e=t({amount:()=>w,bank:()=>M,bic:()=>E,bitcoinAddress:()=>k,creditCardCVV:()=>O,creditCardNumber:()=>D,ethereumAddress:()=>A,iban:()=>T,transactionType:()=>j}),ve={EUR:n.EUR,GBP:n.GBP,USD:n.USD},x=[`visa`,`mastercard`,`amex`],S=Object.keys(b.ibanCountryCodes),ye=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`;function C(e,t){let n=``;for(let r=0;r<e;r++)n+=ye[Math.floor(t.source.next()*26)];return n}function be(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function xe(e,t){return(98-be(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function Se(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function w(e,t={}){let r=t.min??100,i=t.max??1e4,o=t.currency??`USD`,s=a(r,i,2,e.source);return(0,n.money)(s.toFixed(2),ve[o])}function T(e,t){let n=t??d(S,e.source);if(!(n in b.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${S.join(`, `)}`);let r=f(b.ibanLengths[n]-4,e.source);return`${n}${xe(n,r)}${r}`}function E(e){return`${C(4,e)}${C(2,e)}${m(2,e.source).toUpperCase()}${u(0,1,e.source)===1?m(3,e.source).toUpperCase():``}`}function D(e,t){let n=t??d(x,e.source),r=d(b.creditCardIins[n],e.source),i=r+f((n===`amex`?15:16)-r.length-1,e.source);return`${i}${Se(i)}`}function O(e,t){return f((t??d(x,e.source))===`amex`?4:3,e.source)}function k(e){return`${d([`1`,`3`,`bc1`],e.source)}${ee(u(25,34,e.source),e.source)}`}function A(e){return`0x${p(40,e.source)}`}function j(e){return d(b.transactionTypes,e.source)}function M(e){return d(b.banks,e.source)}var N={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`]},Ce=t({domainName:()=>Ee,email:()=>F,httpMethod:()=>Ae,ip:()=>De,mac:()=>Oe,mimeType:()=>Me,password:()=>L,statusCode:()=>je,url:()=>Te,userAgent:()=>ke,username:()=>I}),P=`!@#$%^&*()_+-=[]{}|;:,.<>?`,we=[`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 F(e){return`${(d(e.locale.person.firstNameFemale,e.source)??d(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(d(e.locale.person.lastName,e.source)??`name`).toLowerCase()}@${d(N.domains,e.source)??`example`}.${d(N.tlds,e.source)??`com`}`}function I(e){return u(0,1,e.source)===0?m(u(6,12,e.source),e.source):`${(d(e.locale.person.firstNameFemale,e.source)??d(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(d(e.locale.person.lastName,e.source)??`name`).toLowerCase()}`}function L(e,t={}){let n=t.length??12;if(t.memorable){let t=(d(e.locale.person.firstNameFemale,e.source)??d(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase(),r=(d(e.locale.person.lastName,e.source)??`name`).toLowerCase(),i=String(u(10,99,e.source)),a=d(P.split(``),e.source)??`!`,o=`${t}${r}${i}${a}`;if(o.length<=n)return o+m(n-o.length,e.source);let s=`${i}${a}`,c=n-s.length,l=s+(c>0?(t+r).slice(0,c):``);return l.length<n?l+m(n-l.length,e.source):l.slice(0,n)}let r=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,i=[r,`abcdefghijklmnopqrstuvwxyz`,`0123456789`,P],a=[];for(let t of i)a.push(t[Math.floor(e.source.next()*t.length)]??r[0]);for(;a.length<n;)a.push(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?`[Math.floor(e.source.next()*88)]??`a`);for(let t=a.length-1;t>0;t--){let n=Math.floor(e.source.next()*(t+1));[a[t],a[n]]=[a[n],a[t]]}return a.slice(0,n).join(``)}function Te(e){let t=d(N.protocols,e.source)??`https`,n=`${d([`www`,`api`,`app`,`mail`,`static`,`cdn`],e.source)??`www`}.${d(N.domains,e.source)??`example`}.${d(N.tlds,e.source)??`com`}`,r=u(1,4,e.source),i=[];for(let t=0;t<r;t++){let t=d(we,e.source)??`api`;u(0,2,e.source)===0?i.push(`${t}-${m(u(2,5),e.source).toLowerCase()}`):i.push(t)}return`${t}://${n}/${i.join(`/`)}`}function Ee(e){return`${d(N.domains,e.source)??`example`}.${d(N.tlds,e.source)??`com`}`}function De(e,t=4){if(t===6){let t=[];for(let n=0;n<8;n++)t.push(p(4,e.source));return t.join(`:`)}let n=[];for(let t=0;t<4;t++)n.push(u(0,255,e.source));return n.join(`.`)}function Oe(e){let t=[];for(let n=0;n<6;n++)t.push(p(2,e.source));return t.join(`:`)}function ke(e){return d(N.userAgents,e.source)??N.userAgents[0]}function Ae(e){return d(N.httpMethods,e.source)??`GET`}function je(e){return d(N.statusCodes,e.source)??200}function Me(e){return d(N.mimeTypes,e.source)??`text/plain`}var Ne=t({city:()=>Pe,country:()=>Re,latitude:()=>B,longitude:()=>V,nearbyGPSCoordinate:()=>ze,state:()=>Le,street:()=>z,streetAddress:()=>Fe,zipCode:()=>Ie});function R(e){return e.locale.location}function Pe(e){return d(R(e).cities,e.source)}function z(e){return d(R(e).streets,e.source)}function Fe(e){return`${Math.floor(i(1,1e3,e.source))} ${z(e)}`}function Ie(e){return R(e).zipPattern.replace(/#/g,()=>String(Math.floor((e.source.next()??0)*10)))}function Le(e){return d(R(e).states,e.source)}function Re(e){return d(R(e).countries,e.source)}function B(e){return i(-90,90,e.source)}function V(e){return i(-180,180,e.source)}function ze(e,t){let n=t??{lat:B(e),lng:V(e)};return{lat:i(n.lat-1,n.lat+1,e.source),lng:i(n.lng-1,n.lng+1,e.source)}}var Be={words:`lorem.ipsum.dolor.sit.amet.consectetur.adipiscing.elit.sed.do.eiusmod.tempor.incididunt.ut.labore.et.dolore.magna.aliqua.enim.ad.minim.veniam.quis.nostrud.exercitation.ullamco.laboris.nisi.aliquip.ex.ea.commodo.consequat.duis.aute.irure.in.reprehenderit.voluptate.velit.esse.cillum.fugiat.nulla.pariatur.excepteur.sint.occaecat.cupidatat.non.proident.sunt.culpa.qui.officia.deserunt.mollit.anim.id.est.laborum`.split(`.`)},Ve=t({lines:()=>We,paragraph:()=>K,paragraphs:()=>He,sentence:()=>W,sentences:()=>G,slug:()=>Ue,word:()=>H,words:()=>U});function H(e){return d(Be.words,e.source)}function U(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(H(e));return n.join(` `)}function W(e,t){let n=U(e,t??Math.floor(i(6,13,e.source)));return`${n.charAt(0).toUpperCase()}${n.slice(1)}.`}function G(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(W(e));return n.join(` `)}function K(e,t){return G(e,t??Math.floor(i(3,8,e.source)))}function He(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(K(e));return n.join(`
2
- `)}function Ue(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(H(e));return n.join(`-`)}function We(e,t=5){let n=[];for(let r=0;r<t;r++)n.push(W(e));return n.join(`
3
- `)}function Ge(e,t=.5){return(e?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296)<t}var Ke=t({firstName:()=>J,fullName:()=>qe,gender:()=>Je,jobTitle:()=>Ze,lastName:()=>Y,prefix:()=>Ye,suffix:()=>Xe});function q(e){return e.locale.person}function J(e){let t=q(e);return d(Ge(e.source)?t.firstNameMale:t.firstNameFemale,e.source)}function Y(e){return d(q(e).lastName,e.source)}function qe(e){return`${J(e)} ${Y(e)}`}function Je(e){return d(q(e).gender,e.source)}function Ye(e){return d(q(e).prefix,e.source)}function Xe(e){let t=q(e);return t.suffix.length===0?``:d(t.suffix,e.source)}function Ze(e){let t=q(e);return`${d(t.jobAreas,e.source)} ${d(t.jobTypes,e.source)}`}var Qe=class extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}},$e=class extends Qe{};function X(e,t,n){if(e===void 0)return`undefined`;if(e===null)return`null`;if(typeof e==`bigint`)return`${e}n`;if(typeof e!=`object`)return JSON.stringify(e);if(n.has(e))return`[Circular]`;if(n.add(e),e instanceof Date)return`[Date:${Number.isNaN(e.getTime())?`Invalid`:e.toISOString()}]`;if(e instanceof RegExp)return`[RegExp:${e.source}/${e.flags}]`;if(e instanceof Set)return`[Set:${[...e].map(e=>X(e,t,n)).sort().join(`,`)}]`;if(e instanceof Map)return`[Map:${[...e.entries()].map(([e,r])=>[X(e,t,n),X(r,t,n)]).sort(([e,t],[n,r])=>e===n?t.localeCompare(r):e.localeCompare(n)).map(([e,t])=>`${e}=>${t}`).join(`,`)}]`;if(Array.isArray(e))return`[${e.map(e=>X(e,t,n)).join(`,`)}]`;let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null){if(t?.onClassInstance===`throw`)throw new $e(`hash: unsupported type ${e.constructor?.name??`unknown`}`);return String(e)}let i=e;return`{${Object.keys(i).filter(e=>i[e]!==void 0).sort().map(e=>`${JSON.stringify(e)}:${X(i[e],t,n)}`).join(`,`)}}`}function et(e,t){return X(e,t,new Set)}function Z(e){let t=e>>>0;return{next(){t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}}function tt(e){if(e==null)return nt();if(typeof e==`number`){if(!Number.isFinite(e))throw new ge(`createSeed: numeric seed must be finite, got ${e}`);return Z(Math.trunc(e))}let t=et(e),n=0;for(let e=0;e<t.length;e++)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return Z(n)}function nt(){return{next(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967296}}}var Q={cronExpressions:[`0 * * * *`,`0 0 * * *`,`0 0 * * 0`,`*/5 * * * *`,`0 12 * * 1-5`,`0 0 1 * *`,`0 0 1 1 *`,`0 3 * * *`,`30 7 * * 1-5`,`0 18 * * 5`],directories:[`src`,`dist`,`build`,`lib`,`test`,`docs`,`config`,`assets`,`public`,`private`,`tmp`,`cache`,`var`,`opt`,`etc`],fileExtensions:`txt.pdf.doc.docx.xls.xlsx.ppt.pptx.jpg.png.gif.svg.webp.ico.mp3.wav.flac.ogg.mp4.avi.mkv.webm.zip.tar.gz.rar.7z.js.ts.json.xml.html.css.md.py.java.go.rs.c.cpp`.split(`.`),fileNames:[`document`,`report`,`summary`,`notes`,`draft`,`config`,`readme`,`index`,`main`,`app`,`data`,`backup`,`export`,`import`,`log`],mimeTypes:{avi:`video/x-msvideo`,css:`text/css`,gif:`image/gif`,gz:`application/gzip`,html:`text/html`,jpeg:`image/jpeg`,jpg:`image/jpeg`,js:`application/javascript`,json:`application/json`,mp3:`audio/mpeg`,mp4:`video/mp4`,pdf:`application/pdf`,png:`image/png`,svg:`image/svg+xml`,tar:`application/x-tar`,txt:`text/plain`,wav:`audio/wav`,webp:`image/webp`,xml:`application/xml`,zip:`application/zip`}},rt=t({cron:()=>ut,fileExtension:()=>it,fileName:()=>$,filePath:()=>at,mimeType:()=>ot,port:()=>lt,process:()=>dt,semver:()=>st,uuid:()=>ct});function it(e){return d(Q.fileExtensions,e.source)}function $(e){return`${d(Q.fileNames,e.source)}.${it(e)}`}function at(e){let t=u(1,4,e.source),n=[];for(let r=0;r<t;r++)n.push(d(Q.directories,e.source));return`${n.join(`/`)}/${$(e)}`}function ot(e){return d(Object.values(Q.mimeTypes),e.source)}function st(e,t){let n=`${u(0,t?.maxMajor??20,e.source)}.${u(0,20,e.source)}.${u(0,99,e.source)}`;if(t?.includePrerelease&&e.source.next()<.3){let t=d([`alpha`,`beta`,`rc`,`next`],e.source),r=u(1,10,e.source);n+=`-${t}.${r}`}return n}function ct(){return o()}function lt(e,t){return u(t?.min??1024,t?.max??65535,e.source)}function ut(e){return d(Q.cronExpressions,e.source)}function dt(e){return`${d([`node`,`python`,`ruby`,`java`,`go`,`rust`,`bash`],e.source)}_${m(u(3,8,e.source),e.source)}`}function ft(e){let{locale:t,seed:n}=e,r=tt(n),i=new AbortController,a=!1,o={locale:t,source:r},s=e=>{let t={};for(let[n,r]of Object.entries(e))typeof r==`function`&&(t[n]=(...e)=>r(o,...e));return t},c=()=>{a||(a=!0,i.abort())};return{commerce:s(te),date:s(se),get disposalSignal(){return i.signal},dispose:c,get disposed(){return a},finance:s(_e),internet:s(Ce),locale:t,location:s(Ne),lorem:s(Ve),person:s(Ke),seed:n,system:s(rt),[Symbol.dispose]:c}}var pt={code:`de`,location:{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:`#####`},person:{firstNameFemale:`Mia.Emma.Sophia.Hannah.Emilia.Lina.Ella.Marie.Clara.Lena.Lea.Lilly.Anna.Ida.Mila.Luisa.Nora.Greta.Frieda.Johanna.Lotte.Charlotte.Mathilda.Lara.Sarah.Julia.Laura.Lisa.Katharina.Sabine.Andrea.Petra.Susanne.Nicole.Stefanie.Christina.Tanja.Birgit.Monika.Ursula.Helga.Ingrid.Brigitte.Gisela.Renate.Angelika.Claudia.Sandra.Beate.Klara`.split(`.`),firstNameMale:`Ben.Paul.Leon.Finn.Elias.Jonas.Felix.Maximilian.Max.Luca.Noah.Henry.Lukas.Moritz.David.Niklas.Philipp.Julian.Tim.Tom.Simon.Alexander.Liam.Emil.Daniel.Sebastian.Matteo.Fabian.Jakob.Tobias.Florian.Marvin.Anton.Johannes.Stefan.Andreas.Michael.Thomas.Christian.Klaus.Peter.Wolfgang.Jürgen.Frank.Hans.Martin.Rolf.Bernd.Uwe.Karl`.split(`.`),gender:[`Männlich`,`Weiblich`,`Nicht-binär`,`Divers`],jobAreas:[`Finanzen`,`IT`,`Marketing`,`Vertrieb`,`Personalwesen`,`Betrieb`,`Ingenieurwesen`,`Forschung`,`Design`,`Recht`,`Kundenservice`,`Produkt`,`Logistik`,`Buchhaltung`,`Öffentlichkeitsarbeit`,`Qualitätssicherung`,`Daten`,`Sicherheit`,`Kommunikation`,`Verwaltung`],jobTypes:[`Ingenieur`,`Manager`,`Analyst`,`Spezialist`,`Koordinator`,`Direktor`,`Berater`,`Entwickler`,`Architekt`,`Administrator`,`Beamter`,`Mitarbeiter`,`Aufseher`,`Techniker`,`Assistent`],lastName:`Müller.Schmidt.Schneider.Fischer.Weber.Meyer.Wagner.Becker.Schulz.Hoffmann.Schäfer.Koch.Bauer.Richter.Klein.Wolf.Schröder.Neumann.Schwarz.Zimmermann.Braun.Krüger.Hofmann.Hartmann.Lange.Schmitt.Werner.Krause.Lehmann.Schmid.Schulze.Maier.Köhler.Herrmann.König.Walter.Mayer.Huber.Kaiser.Fuchs.Peters.Lang.Scholz.Möller.Weiß.Jung.Hahn.Schubert.Vogel.Friedrich`.split(`.`),prefix:[`Herr`,`Frau`,`Dr.`,`Prof.`],suffix:[]}},mt={code:`en`,location:{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:`#####`},person:{firstNameFemale:`Mary.Patricia.Jennifer.Linda.Elizabeth.Barbara.Susan.Jessica.Sarah.Karen.Lisa.Nancy.Betty.Margaret.Sandra.Ashley.Kimberly.Emily.Donna.Michelle.Carol.Amanda.Dorothy.Melissa.Deborah.Stephanie.Rebecca.Sharon.Laura.Cynthia.Kathleen.Amy.Shirley.Angela.Helen.Anna.Brenda.Pamela.Nicole.Emma.Samantha.Katherine.Christine.Debra.Rachel.Catherine.Carolyn.Janet.Ruth.Maria`.split(`.`),firstNameMale:`James.John.Robert.Michael.William.David.Richard.Joseph.Thomas.Charles.Christopher.Daniel.Matthew.Anthony.Mark.Donald.Steven.Paul.Andrew.Joshua.Kenneth.Kevin.Brian.George.Edward.Ronald.Timothy.Jason.Jeffrey.Ryan.Jacob.Gary.Nicholas.Eric.Jonathan.Stephen.Larry.Justin.Scott.Brandon.Benjamin.Samuel.Gregory.Frank.Alexander.Raymond.Patrick.Jack.Dennis.Jerry`.split(`.`),gender:[`Male`,`Female`,`Non-binary`,`Other`],jobAreas:[`Finance`,`IT`,`Marketing`,`Sales`,`Human Resources`,`Operations`,`Engineering`,`Research`,`Design`,`Legal`,`Customer Support`,`Product`,`Logistics`,`Accounting`,`Public Relations`,`Quality Assurance`,`Data`,`Security`,`Communications`,`Administration`],jobTypes:[`Engineer`,`Manager`,`Analyst`,`Specialist`,`Coordinator`,`Director`,`Consultant`,`Developer`,`Architect`,`Administrator`,`Officer`,`Representative`,`Supervisor`,`Technician`,`Assistant`],lastName:`Smith.Johnson.Williams.Brown.Jones.Garcia.Miller.Davis.Rodriguez.Martinez.Hernandez.Lopez.Gonzalez.Wilson.Anderson.Thomas.Taylor.Moore.Jackson.Martin.Lee.Perez.Thompson.White.Harris.Sanchez.Clark.Ramirez.Lewis.Robinson.Walker.Young.Allen.King.Wright.Scott.Torres.Nguyen.Hill.Flores.Green.Adams.Nelson.Baker.Hall.Rivera.Campbell.Mitchell.Carter.Roberts`.split(`.`),prefix:[`Mr.`,`Mrs.`,`Ms.`,`Dr.`,`Prof.`],suffix:[`Jr.`,`Sr.`,`II`,`III`,`IV`,`PhD`]}};exports.IllusionistError=he,exports.IllusionistSeedError=ge,exports.amount=w,exports.bank=M,exports.between=de,exports.bic=E,exports.birthday=fe,exports.bitcoinAddress=k,exports.city=Pe,exports.country=Re,exports.createIllusion=ft,exports.createSeed=tt,exports.creditCardCVV=O,exports.creditCardNumber=D,exports.de=pt,exports.department=ie,exports.domainName=Ee,exports.email=F,exports.en=mt,exports.ethereumAddress=A,exports.firstName=J,exports.fullName=qe,exports.future=le,exports.gender=Je,exports.httpMethod=Ae,exports.iban=T,exports.ip=De,exports.jobTitle=Ze,exports.lastName=Y,exports.latitude=B,exports.lines=We,exports.longitude=V,exports.mac=Oe,exports.mimeType=Me,exports.month=me,exports.mulberry32=Z,exports.nearbyGPSCoordinate=ze,exports.paragraph=K,exports.paragraphs=He,exports.password=L,exports.past=ce,exports.prefix=Ye,exports.price=ae,exports.productAdjective=g,exports.productDescription=oe,exports.productMaterial=_,exports.productName=re,exports.productNoun=v,exports.recent=ue,exports.sentence=W,exports.sentences=G,exports.slug=Ue,exports.state=Le,exports.statusCode=je,exports.street=z,exports.streetAddress=Fe,exports.suffix=Xe,exports.transactionType=j,exports.url=Te,exports.userAgent=ke,exports.username=I,exports.weekday=pe,exports.word=H,exports.words=U,exports.zipCode=Ie;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require("@vielzeug/coins"),r=require("@vielzeug/arsenal"),i=require("@vielzeug/tempo");function a(e,t,n){return e>t?e:e+(0,r.randomFloat)(n)*(t-e)}function o(e,t,n=2,r){let i=10**n,o=a(e*i,t*i,r);return Math.round(o)/i}function s(e,t,n){return(0,r.random)(e,t,n)}function c(e,t){return e.length===0?void 0:e[Math.floor((0,r.randomFloat)(t)*e.length)]}function l(e,t){let n=``;for(let i=0;i<e;i++)n+=Math.floor((0,r.randomFloat)(t)*10);return n}function u(e,t){let n=``;for(let i=0;i<e;i++)n+=`0123456789abcdef`[Math.floor((0,r.randomFloat)(t)*16)];return n}function d(e,t){let n=``;for(let i=0;i<e;i++)n+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[Math.floor((0,r.randomFloat)(t)*62)];return n}function f(e,t){let n=``;for(let i=0;i<e;i++)n+=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`[Math.floor((0,r.randomFloat)(t)*58)];return n}var p={departments:[`Books`,`Movies`,`Music`,`Games`,`Electronics`,`Computers`,`Home`,`Garden`,`Tools`,`Grocery`,`Health`,`Beauty`,`Toys`,`Kids`,`Baby`,`Clothing`,`Shoes`,`Jewelry`,`Sports`,`Outdoors`,`Automotive`],productAdjectives:[`Small`,`Ergonomic`,`Rustic`,`Intelligent`,`Gorgeous`,`Incredible`,`Fantastic`,`Practical`,`Sleek`,`Awesome`,`Generic`,`Handmade`,`Licensed`,`Refined`,`Unbranded`,`Tasty`],productMaterials:[`Steel`,`Wooden`,`Concrete`,`Plastic`,`Cotton`,`Granite`,`Rubber`,`Metal`,`Soft`,`Fresh`,`Frozen`],productNouns:[`Chair`,`Car`,`Computer`,`Gloves`,`Pants`,`Shirt`,`Table`,`Shoes`,`Hat`,`Plate`,`Knife`,`Bottle`,`Coat`,`Lamp`,`Keyboard`,`Bag`,`Bench`,`Clock`,`Watch`,`Wallet`]},ee=t({department:()=>v,price:()=>ne,productAdjective:()=>m,productDescription:()=>re,productMaterial:()=>h,productName:()=>_,productNoun:()=>g}),te={EUR:n.EUR,GBP:n.GBP,USD:n.USD};function m(e){return c(p.productAdjectives,e.source)}function h(e){return c(p.productMaterials,e.source)}function g(e){return c(p.productNouns,e.source)}function _(e){return`${m(e)} ${h(e)} ${g(e)}`}function v(e){return c(p.departments,e.source)}function ne(e,t={}){let r=t.min??.01,i=t.max??1e3,a=t.currency??`USD`,s=o(r,i,2,e.source);return(0,n.money)(s.toFixed(2),te[a])}function re(e){let t=s(1,2,e.source),n=[];for(let r=0;r<t;r++){let t=c(p.productAdjectives,e.source),r=c(p.productMaterials,e.source),i=c(p.productNouns,e.source),a=c(p.departments,e.source);n.push(`The ${t.toLowerCase()} ${r.toLowerCase()} ${i.toLowerCase()} is a great choice for your ${a.toLowerCase()} needs.`)}return n.join(` `)}var ie=t({between:()=>ce,birthday:()=>le,future:()=>oe,month:()=>de,past:()=>ae,recent:()=>se,weekday:()=>ue});function y(e){return e??i.Temporal.Now.zonedDateTimeISO(`UTC`)}function ae(e,t){let n=y(t?.ref),r=(t?.years??1)*365*24*60*60;return n.add({seconds:-s(1,r,e.source)})}function oe(e,t){let n=y(t?.ref),r=(t?.years??1)*365*24*60*60;return n.add({seconds:s(1,r,e.source)})}function se(e,t){let n=y(t?.ref),r=(t?.days??1)*24*60*60;return n.add({seconds:-s(1,r,e.source)})}function ce(e,t,n){let r=t.toInstant().epochNanoseconds,i=n.toInstant().epochNanoseconds;if(r>i)return t;let a=i-r,o=Number(a/1000000000n),s=Math.floor(e.source.next()*o);return t.add({seconds:s})}function le(e,t){let n=y(t?.ref),r=s(t?.minAge??18,t?.maxAge??80,e.source),i=s(1,12,e.source),a=s(1,28,e.source);return n.toPlainDate().subtract({years:r}).with({day:a,month:i})}function ue(e,t){return((t??e.locale.code)===`de`?[`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`,`Sonntag`]:[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`])[s(0,6,e.source)]}function de(e,t){return((t??e.locale.code)===`de`?[`Januar`,`Februar`,`März`,`April`,`Mai`,`Juni`,`Juli`,`August`,`September`,`Oktober`,`November`,`Dezember`]:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`])[s(0,11,e.source)]}var fe=class extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}},pe=class extends fe{},b={banks:[`Deutsche Bank`,`Commerzbank`,`Sparkasse`,`Barclays`,`HSBC`,`BNP Paribas`,`Santander`,`ING`,`UniCredit`,`UBS`],creditCardIins:{amex:[`34`,`37`],mastercard:[`51`,`52`,`53`,`54`,`55`],visa:[`4`]},ibanCountryCodes:{AT:`AT`,BE:`BE`,CH:`CH`,DE:`DE`,ES:`ES`,FR:`FR`,GB:`GB`,IT:`IT`,NL:`NL`},ibanLengths:{AT:20,BE:16,CH:21,DE:22,ES:24,FR:27,GB:22,IT:27,NL:18},transactionTypes:[`payment`,`transfer`,`deposit`,`withdrawal`,`refund`,`fee`]},me=t({amount:()=>C,bank:()=>j,bic:()=>T,bitcoinAddress:()=>O,creditCardCVV:()=>D,creditCardNumber:()=>E,ethereumAddress:()=>k,iban:()=>w,transactionType:()=>A}),he={EUR:n.EUR,GBP:n.GBP,USD:n.USD},ge=[`visa`,`mastercard`,`amex`],x=Object.keys(b.ibanCountryCodes),_e=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function S(e,t){let n=[];for(let r=0;r<e;r++)n.push(c(_e,t.source));return n.join(``)}function ve(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function ye(e,t){return(98-ve(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function be(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function C(e,t={}){let r=t.min??100,i=t.max??1e4,a=t.currency??`USD`,s=o(r,i,2,e.source);return(0,n.money)(s.toFixed(2),he[a])}function w(e,t){let n=t??c(x,e.source);if(!(n in b.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${x.join(`, `)}`);let r=l(b.ibanLengths[n]-4,e.source);return`${n}${ye(n,r)}${r}`}function T(e){return`${S(4,e)}${S(2,e)}${d(2,e.source).toUpperCase()}${s(0,1,e.source)===1?d(3,e.source).toUpperCase():``}`}function E(e,t){let n=t??c(ge,e.source),r=c(b.creditCardIins[n],e.source),i=r+l((n===`amex`?15:16)-r.length-1,e.source);return`${i}${be(i)}`}function D(e,t){return l((t??c(ge,e.source))===`amex`?4:3,e.source)}function O(e){return`${c([`1`,`3`,`bc1`],e.source)}${f(s(25,34,e.source),e.source)}`}function k(e){return`0x${u(40,e.source)}`}function A(e){return c(b.transactionTypes,e.source)}function j(e){return c(b.banks,e.source)}var M={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`]},xe=t({domainName:()=>R,email:()=>P,httpMethod:()=>Ee,ip:()=>Ce,mac:()=>we,mimeType:()=>Oe,password:()=>I,statusCode:()=>De,url:()=>L,userAgent:()=>Te,username:()=>F}),N=`!@#$%^&*()_+-=[]{}|;:,.<>?`,Se=[`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 P(e){return`${(c(e.locale.person.firstNameFemale,e.source)??c(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(c(e.locale.person.lastName,e.source)??`name`).toLowerCase()}@${c(M.domains,e.source)??`example`}.${c(M.tlds,e.source)??`com`}`}function F(e){return s(0,1,e.source)===0?d(s(6,12,e.source),e.source):`${(c(e.locale.person.firstNameFemale,e.source)??c(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(c(e.locale.person.lastName,e.source)??`name`).toLowerCase()}`}function I(e,t={}){let n=t.length??12;if(t.memorable){let t=(c(e.locale.person.firstNameFemale,e.source)??c(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase(),r=(c(e.locale.person.lastName,e.source)??`name`).toLowerCase(),i=String(s(10,99,e.source)),a=c(N.split(``),e.source)??`!`,o=`${t}${r}${i}${a}`;if(o.length<=n)return o+d(n-o.length,e.source);let l=`${i}${a}`,u=n-l.length,f=l+(u>0?(t+r).slice(0,u):``);return f.length<n?f+d(n-f.length,e.source):f.slice(0,n)}let r=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,i=`abcdefghijklmnopqrstuvwxyz`,a=`0123456789`,o=[r,i,a,N],l=[];for(let t of o)l.push(c(t.split(``),e.source));let u=r+i+a+N;for(;l.length<n;)l.push(c(u.split(``),e.source));for(let t=l.length-1;t>0;t--){let n=s(0,t,e.source);[l[t],l[n]]=[l[n],l[t]]}return l.slice(0,n).join(``)}function L(e){let t=c(M.protocols,e.source)??`https`,n=`${c([`www`,`api`,`app`,`mail`,`static`,`cdn`],e.source)??`www`}.${c(M.domains,e.source)??`example`}.${c(M.tlds,e.source)??`com`}`,r=s(1,4,e.source),i=[];for(let t=0;t<r;t++){let t=c(Se,e.source)??`api`;s(0,2,e.source)===0?i.push(`${t}-${d(s(2,5),e.source).toLowerCase()}`):i.push(t)}return`${t}://${n}/${i.join(`/`)}`}function R(e){return`${c(M.domains,e.source)??`example`}.${c(M.tlds,e.source)??`com`}`}function Ce(e,t=4){if(t===6){let t=[];for(let n=0;n<8;n++)t.push(u(4,e.source));return t.join(`:`)}let n=[];for(let t=0;t<4;t++)n.push(s(0,255,e.source));return n.join(`.`)}function we(e){let t=[];for(let n=0;n<6;n++)t.push(u(2,e.source));return t.join(`:`)}function Te(e){return c(M.userAgents,e.source)??M.userAgents[0]}function Ee(e){return c(M.httpMethods,e.source)??`GET`}function De(e){return c(M.statusCodes,e.source)??200}function Oe(e){return c(M.mimeTypes,e.source)??`text/plain`}var ke=t({city:()=>Ae,country:()=>Pe,latitude:()=>V,longitude:()=>H,nearbyGPSCoordinate:()=>Fe,state:()=>Ne,street:()=>B,streetAddress:()=>je,zipCode:()=>Me});function z(e){return e.locale.location}function Ae(e){return c(z(e).cities,e.source)}function B(e){return c(z(e).streets,e.source)}function je(e){return`${Math.floor(a(1,1e3,e.source))} ${B(e)}`}function Me(e){return z(e).zipPattern.replace(/#/g,()=>String(Math.floor((0,r.randomFloat)(e.source)*10)))}function Ne(e){return c(z(e).states,e.source)}function Pe(e){return c(z(e).countries,e.source)}function V(e){return a(-90,90,e.source)}function H(e){return a(-180,180,e.source)}function Fe(e,t){let n=t??{lat:V(e),lng:H(e)};return{lat:a(n.lat-1,n.lat+1,e.source),lng:a(n.lng-1,n.lng+1,e.source)}}var Ie={words:`lorem.ipsum.dolor.sit.amet.consectetur.adipiscing.elit.sed.do.eiusmod.tempor.incididunt.ut.labore.et.dolore.magna.aliqua.enim.ad.minim.veniam.quis.nostrud.exercitation.ullamco.laboris.nisi.aliquip.ex.ea.commodo.consequat.duis.aute.irure.in.reprehenderit.voluptate.velit.esse.cillum.fugiat.nulla.pariatur.excepteur.sint.occaecat.cupidatat.non.proident.sunt.culpa.qui.officia.deserunt.mollit.anim.id.est.laborum`.split(`.`)},Le=t({lines:()=>Be,paragraph:()=>q,paragraphs:()=>Re,sentence:()=>G,sentences:()=>K,slug:()=>ze,word:()=>U,words:()=>W});function U(e){return c(Ie.words,e.source)}function W(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(U(e));return n.join(` `)}function G(e,t){let n=W(e,t??Math.floor(a(6,13,e.source)));return`${n.charAt(0).toUpperCase()}${n.slice(1)}.`}function K(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(G(e));return n.join(` `)}function q(e,t){return K(e,t??Math.floor(a(3,8,e.source)))}function Re(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(q(e));return n.join(`
2
+ `)}function ze(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(U(e));return n.join(`-`)}function Be(e,t=5){let n=[];for(let r=0;r<t;r++)n.push(G(e));return n.join(`
3
+ `)}function Ve(e,t=.5){return(0,r.randomFloat)(e)<t}var He=t({firstName:()=>Y,fullName:()=>Ue,gender:()=>We,jobTitle:()=>qe,lastName:()=>X,prefix:()=>Ge,suffix:()=>Ke});function J(e){return e.locale.person}function Y(e){let t=J(e);return c(Ve(e.source)?t.firstNameMale:t.firstNameFemale,e.source)}function X(e){return c(J(e).lastName,e.source)}function Ue(e){return`${Y(e)} ${X(e)}`}function We(e){return c(J(e).gender,e.source)}function Ge(e){return c(J(e).prefix,e.source)}function Ke(e){let t=J(e);return t.suffix.length===0?``:c(t.suffix,e.source)}function qe(e){let t=J(e);return`${c(t.jobAreas,e.source)} ${c(t.jobTypes,e.source)}`}function Z(e){let t=e>>>0;return{next(){t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}}function Je(e){if(e==null)return Ye();if(typeof e==`number`){if(!Number.isFinite(e))throw new pe(`createSeed: numeric seed must be finite, got ${e}`);return Z(Math.trunc(e))}let t=JSON.stringify(e),n=0;for(let e=0;e<t.length;e++)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return Z(n)}function Ye(){return{next(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967296}}}var Q={cronExpressions:[`0 * * * *`,`0 0 * * *`,`0 0 * * 0`,`*/5 * * * *`,`0 12 * * 1-5`,`0 0 1 * *`,`0 0 1 1 *`,`0 3 * * *`,`30 7 * * 1-5`,`0 18 * * 5`],directories:[`src`,`dist`,`build`,`lib`,`test`,`docs`,`config`,`assets`,`public`,`private`,`tmp`,`cache`,`var`,`opt`,`etc`],fileExtensions:`txt.pdf.doc.docx.xls.xlsx.ppt.pptx.jpg.png.gif.svg.webp.ico.mp3.wav.flac.ogg.mp4.avi.mkv.webm.zip.tar.gz.rar.7z.js.ts.json.xml.html.css.md.py.java.go.rs.c.cpp`.split(`.`),fileNames:[`document`,`report`,`summary`,`notes`,`draft`,`config`,`readme`,`index`,`main`,`app`,`data`,`backup`,`export`,`import`,`log`],mimeTypes:{avi:`video/x-msvideo`,css:`text/css`,gif:`image/gif`,gz:`application/gzip`,html:`text/html`,jpeg:`image/jpeg`,jpg:`image/jpeg`,js:`application/javascript`,json:`application/json`,mp3:`audio/mpeg`,mp4:`video/mp4`,pdf:`application/pdf`,png:`image/png`,svg:`image/svg+xml`,tar:`application/x-tar`,txt:`text/plain`,wav:`audio/wav`,webp:`image/webp`,xml:`application/xml`,zip:`application/zip`}},Xe=t({cron:()=>rt,fileExtension:()=>Ze,fileName:()=>$,filePath:()=>Qe,mimeType:()=>$e,port:()=>nt,process:()=>it,semver:()=>et,uuid:()=>tt});function Ze(e){return c(Q.fileExtensions,e.source)}function $(e){return`${c(Q.fileNames,e.source)}.${Ze(e)}`}function Qe(e){let t=s(1,4,e.source),n=[];for(let r=0;r<t;r++)n.push(c(Q.directories,e.source));return`${n.join(`/`)}/${$(e)}`}function $e(e){return c(Object.values(Q.mimeTypes),e.source)}function et(e,t){let n=`${s(0,t?.maxMajor??20,e.source)}.${s(0,20,e.source)}.${s(0,99,e.source)}`;if(t?.includePrerelease&&e.source.next()<.3){let t=c([`alpha`,`beta`,`rc`,`next`],e.source),r=s(1,10,e.source);n+=`-${t}.${r}`}return n}function tt(){return crypto.randomUUID()}function nt(e,t){return s(t?.min??1024,t?.max??65535,e.source)}function rt(e){return c(Q.cronExpressions,e.source)}function it(e){return`${c([`node`,`python`,`ruby`,`java`,`go`,`rust`,`bash`],e.source)}_${d(s(3,8,e.source),e.source)}`}function at(e){let{locale:t,seed:n}=e,r={locale:t,source:Je(n)},i=e=>{let t={};for(let[n,i]of Object.entries(e))typeof i==`function`&&(t[n]=(...e)=>i(r,...e));return t};return{commerce:i(ee),date:i(ie),finance:i(me),internet:i(xe),locale:t,location:i(ke),lorem:i(Le),person:i(He),seed:n,system:i(Xe)}}var ot={code:`de`,location:{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:`#####`},person:{firstNameFemale:`Mia.Emma.Sophia.Hannah.Emilia.Lina.Ella.Marie.Clara.Lena.Lea.Lilly.Anna.Ida.Mila.Luisa.Nora.Greta.Frieda.Johanna.Lotte.Charlotte.Mathilda.Lara.Sarah.Julia.Laura.Lisa.Katharina.Sabine.Andrea.Petra.Susanne.Nicole.Stefanie.Christina.Tanja.Birgit.Monika.Ursula.Helga.Ingrid.Brigitte.Gisela.Renate.Angelika.Claudia.Sandra.Beate.Klara`.split(`.`),firstNameMale:`Ben.Paul.Leon.Finn.Elias.Jonas.Felix.Maximilian.Max.Luca.Noah.Henry.Lukas.Moritz.David.Niklas.Philipp.Julian.Tim.Tom.Simon.Alexander.Liam.Emil.Daniel.Sebastian.Matteo.Fabian.Jakob.Tobias.Florian.Marvin.Anton.Johannes.Stefan.Andreas.Michael.Thomas.Christian.Klaus.Peter.Wolfgang.Jürgen.Frank.Hans.Martin.Rolf.Bernd.Uwe.Karl`.split(`.`),gender:[`Männlich`,`Weiblich`,`Nicht-binär`,`Divers`],jobAreas:[`Finanzen`,`IT`,`Marketing`,`Vertrieb`,`Personalwesen`,`Betrieb`,`Ingenieurwesen`,`Forschung`,`Design`,`Recht`,`Kundenservice`,`Produkt`,`Logistik`,`Buchhaltung`,`Öffentlichkeitsarbeit`,`Qualitätssicherung`,`Daten`,`Sicherheit`,`Kommunikation`,`Verwaltung`],jobTypes:[`Ingenieur`,`Manager`,`Analyst`,`Spezialist`,`Koordinator`,`Direktor`,`Berater`,`Entwickler`,`Architekt`,`Administrator`,`Beamter`,`Mitarbeiter`,`Aufseher`,`Techniker`,`Assistent`],lastName:`Müller.Schmidt.Schneider.Fischer.Weber.Meyer.Wagner.Becker.Schulz.Hoffmann.Schäfer.Koch.Bauer.Richter.Klein.Wolf.Schröder.Neumann.Schwarz.Zimmermann.Braun.Krüger.Hofmann.Hartmann.Lange.Schmitt.Werner.Krause.Lehmann.Schmid.Schulze.Maier.Köhler.Herrmann.König.Walter.Mayer.Huber.Kaiser.Fuchs.Peters.Lang.Scholz.Möller.Weiß.Jung.Hahn.Schubert.Vogel.Friedrich`.split(`.`),prefix:[`Herr`,`Frau`,`Dr.`,`Prof.`],suffix:[]}},st={code:`en`,location:{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:`#####`},person:{firstNameFemale:`Mary.Patricia.Jennifer.Linda.Elizabeth.Barbara.Susan.Jessica.Sarah.Karen.Lisa.Nancy.Betty.Margaret.Sandra.Ashley.Kimberly.Emily.Donna.Michelle.Carol.Amanda.Dorothy.Melissa.Deborah.Stephanie.Rebecca.Sharon.Laura.Cynthia.Kathleen.Amy.Shirley.Angela.Helen.Anna.Brenda.Pamela.Nicole.Emma.Samantha.Katherine.Christine.Debra.Rachel.Catherine.Carolyn.Janet.Ruth.Maria`.split(`.`),firstNameMale:`James.John.Robert.Michael.William.David.Richard.Joseph.Thomas.Charles.Christopher.Daniel.Matthew.Anthony.Mark.Donald.Steven.Paul.Andrew.Joshua.Kenneth.Kevin.Brian.George.Edward.Ronald.Timothy.Jason.Jeffrey.Ryan.Jacob.Gary.Nicholas.Eric.Jonathan.Stephen.Larry.Justin.Scott.Brandon.Benjamin.Samuel.Gregory.Frank.Alexander.Raymond.Patrick.Jack.Dennis.Jerry`.split(`.`),gender:[`Male`,`Female`,`Non-binary`,`Other`],jobAreas:[`Finance`,`IT`,`Marketing`,`Sales`,`Human Resources`,`Operations`,`Engineering`,`Research`,`Design`,`Legal`,`Customer Support`,`Product`,`Logistics`,`Accounting`,`Public Relations`,`Quality Assurance`,`Data`,`Security`,`Communications`,`Administration`],jobTypes:[`Engineer`,`Manager`,`Analyst`,`Specialist`,`Coordinator`,`Director`,`Consultant`,`Developer`,`Architect`,`Administrator`,`Officer`,`Representative`,`Supervisor`,`Technician`,`Assistant`],lastName:`Smith.Johnson.Williams.Brown.Jones.Garcia.Miller.Davis.Rodriguez.Martinez.Hernandez.Lopez.Gonzalez.Wilson.Anderson.Thomas.Taylor.Moore.Jackson.Martin.Lee.Perez.Thompson.White.Harris.Sanchez.Clark.Ramirez.Lewis.Robinson.Walker.Young.Allen.King.Wright.Scott.Torres.Nguyen.Hill.Flores.Green.Adams.Nelson.Baker.Hall.Rivera.Campbell.Mitchell.Carter.Roberts`.split(`.`),prefix:[`Mr.`,`Mrs.`,`Ms.`,`Dr.`,`Prof.`],suffix:[`Jr.`,`Sr.`,`II`,`III`,`IV`,`PhD`]}};exports.IllusionistError=fe,exports.IllusionistSeedError=pe,exports.amount=C,exports.bank=j,exports.between=ce,exports.bic=T,exports.birthday=le,exports.bitcoinAddress=O,exports.city=Ae,exports.country=Pe,exports.createIllusion=at,exports.createSeed=Je,exports.creditCardCVV=D,exports.creditCardNumber=E,exports.de=ot,exports.department=v,exports.domainName=R,exports.email=P,exports.en=st,exports.ethereumAddress=k,exports.firstName=Y,exports.fullName=Ue,exports.future=oe,exports.gender=We,exports.httpMethod=Ee,exports.iban=w,exports.ip=Ce,exports.jobTitle=qe,exports.lastName=X,exports.latitude=V,exports.lines=Be,exports.longitude=H,exports.mac=we,exports.mimeType=Oe,exports.month=de,exports.mulberry32=Z,exports.nearbyGPSCoordinate=Fe,exports.paragraph=q,exports.paragraphs=Re,exports.password=I,exports.past=ae,exports.prefix=Ge,exports.price=ne,exports.productAdjective=m,exports.productDescription=re,exports.productMaterial=h,exports.productName=_,exports.productNoun=g,exports.recent=se,exports.sentence=G,exports.sentences=K,exports.slug=ze,exports.state=Ne,exports.statusCode=De,exports.street=B,exports.streetAddress=je,exports.suffix=Ke,exports.transactionType=A,exports.url=L,exports.userAgent=Te,exports.username=F,exports.weekday=ue,exports.word=U,exports.words=W,exports.zipCode=Me;
4
4
  //# sourceMappingURL=illusionist.cjs.map