@treeviz/gedcom-parser 2.1.9 → 2.1.12

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 (43) hide show
  1. package/dist/classes/common.d.ts.map +1 -1
  2. package/dist/classes/gedcom.d.ts +5 -0
  3. package/dist/classes/gedcom.d.ts.map +1 -1
  4. package/dist/classes/index.js +860 -464
  5. package/dist/classes/indi.d.ts.map +1 -1
  6. package/dist/classes/obje.d.ts.map +1 -1
  7. package/dist/cli/index.js +850 -454
  8. package/dist/constants/index.js +818 -448
  9. package/dist/factories/index.js +818 -448
  10. package/dist/index.js +865 -474
  11. package/dist/interfaces/indi.d.ts +1 -0
  12. package/dist/interfaces/indi.d.ts.map +1 -1
  13. package/dist/kinship-translator/index.js +818 -448
  14. package/dist/kinship-translator/kinship-translator.de.d.ts +2 -3
  15. package/dist/kinship-translator/kinship-translator.de.d.ts.map +1 -1
  16. package/dist/kinship-translator/kinship-translator.en.d.ts.map +1 -1
  17. package/dist/kinship-translator/kinship-translator.es.d.ts +2 -3
  18. package/dist/kinship-translator/kinship-translator.es.d.ts.map +1 -1
  19. package/dist/kinship-translator/kinship-translator.fr.d.ts +2 -3
  20. package/dist/kinship-translator/kinship-translator.fr.d.ts.map +1 -1
  21. package/dist/kinship-translator/kinship-translator.hu.d.ts.map +1 -1
  22. package/dist/kinship-translator/kinship-translator.ja.d.ts.map +1 -1
  23. package/dist/kinship-translator/kinship-translator.ru.d.ts +1 -1
  24. package/dist/kinship-translator/kinship-translator.ru.d.ts.map +1 -1
  25. package/dist/kinship-translator/kinship-translator.zh.d.ts.map +1 -1
  26. package/dist/kinship-translator/patterns.de.d.ts +1 -0
  27. package/dist/kinship-translator/patterns.de.d.ts.map +1 -1
  28. package/dist/kinship-translator/patterns.es.d.ts +1 -0
  29. package/dist/kinship-translator/patterns.es.d.ts.map +1 -1
  30. package/dist/kinship-translator/patterns.fr.d.ts +1 -0
  31. package/dist/kinship-translator/patterns.fr.d.ts.map +1 -1
  32. package/dist/kinship-translator/patterns.hu.d.ts.map +1 -1
  33. package/dist/kinship-translator/patterns.ru.d.ts +1 -0
  34. package/dist/kinship-translator/patterns.ru.d.ts.map +1 -1
  35. package/dist/kinship-translator/patterns.zh.d.ts.map +1 -1
  36. package/dist/utils/cache.d.ts.map +1 -1
  37. package/dist/utils/gedzip.d.ts.map +1 -1
  38. package/dist/utils/index.js +865 -474
  39. package/dist/utils/local-media.d.ts +7 -3
  40. package/dist/utils/local-media.d.ts.map +1 -1
  41. package/dist/utils/media-utils.d.ts +20 -0
  42. package/dist/utils/media-utils.d.ts.map +1 -1
  43. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -35,6 +35,82 @@ var appendGedcomTrailer = (serialized) => {
35
35
  }
36
36
  return `${trimmed}${newline}0 TRLR`;
37
37
  };
38
+
39
+ // src/utils/media-utils.ts
40
+ var getFileExtension = (filename) => {
41
+ if (!filename) {
42
+ return "";
43
+ }
44
+ if (filename.startsWith("data:")) {
45
+ const mime = filename.slice(5).split(";")[0] || "";
46
+ const subtype = (mime.split("/")[1] || "").toLowerCase();
47
+ if (subtype === "jpeg") {
48
+ return "jpg";
49
+ }
50
+ return subtype.split("+")[0] || "";
51
+ }
52
+ const withoutQuery = filename.split(/[?#]/)[0] || filename;
53
+ const match = withoutQuery.match(/\.([^.]+)$/);
54
+ return match ? match[1].toLowerCase() : "";
55
+ };
56
+ var isImageFormat = (format2) => {
57
+ if (!format2) {
58
+ return false;
59
+ }
60
+ let normalized = format2.toLowerCase().trim();
61
+ if (normalized.startsWith("data:")) {
62
+ normalized = getFileExtension(normalized);
63
+ } else if (normalized.includes("/")) {
64
+ normalized = normalized.split("/")[1]?.split("+")[0] || "";
65
+ if (normalized === "jpeg") {
66
+ normalized = "jpg";
67
+ }
68
+ }
69
+ const imageFormats = [
70
+ "jpg",
71
+ "jpeg",
72
+ "png",
73
+ "gif",
74
+ "bmp",
75
+ "webp",
76
+ "svg",
77
+ "tiff",
78
+ "tif"
79
+ ];
80
+ return imageFormats.includes(normalized);
81
+ };
82
+ var resolveObjeForm = (obje) => {
83
+ const value = obje?.get?.("FILE.FORM")?.toValue?.() ?? obje?.get?.("FORM")?.toValue?.();
84
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
85
+ };
86
+ var mediaIdValue = (obje, path) => {
87
+ const value = obje?.get?.(path)?.toValue?.();
88
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
89
+ };
90
+ var resolveObjeMediaId = (obje) => mediaIdValue(obje, "RIN") || mediaIdValue(obje, "_CLON._OID") || mediaIdValue(obje, "_MSER._LKID") || mediaIdValue(obje, "_OID") || mediaIdValue(obje, "_LKID");
91
+ var ANCESTRY_MEDIA_RETRIEVAL_PREFIX = "https://www.ancestry.com/api/media/retrieval/v2/image";
92
+ var ANCESTRY_MEDIA_QUERY = "client=trees-mediaservice&imageQuality=hq";
93
+ var ancestryMediaPath = (namespace, imgId) => `/namespaces/${namespace}/media/${imgId}?${ANCESTRY_MEDIA_QUERY}`;
94
+ var ancestryMediaFileUrl = (namespace, imgId) => {
95
+ if (!namespace || !imgId) {
96
+ return void 0;
97
+ }
98
+ return `${ANCESTRY_MEDIA_RETRIEVAL_PREFIX}${ancestryMediaPath(namespace, imgId)}`;
99
+ };
100
+ var objeXrefKey = (obje, fallback = 0) => {
101
+ if (typeof obje?.id === "string" && obje.id) {
102
+ return obje.id;
103
+ }
104
+ const value = obje?.toValue?.();
105
+ if (typeof value === "string" && value.trim()) {
106
+ return value.trim();
107
+ }
108
+ if (typeof fallback === "string" && fallback.trim()) {
109
+ return fallback.trim();
110
+ }
111
+ return `@O${fallback}@`;
112
+ };
113
+ var objeNoteValue = (obje) => mediaIdValue(obje, "FILE.NOTE") || mediaIdValue(obje, "NOTE") || "";
38
114
  var List = class _List {
39
115
  // length = 0;
40
116
  constructor(items) {
@@ -684,7 +760,7 @@ var Common = class _Common {
684
760
  this,
685
761
  options.obje.namespace,
686
762
  options.obje.override,
687
- void 0,
763
+ this.isAncestry() ? ancestryMediaFileUrl : void 0,
688
764
  options.gedcomVersion
689
765
  );
690
766
  }
@@ -1240,11 +1316,8 @@ var storeCache = {
1240
1316
  getCacheDbs().relativesOnDegreeCache.setItem(value);
1241
1317
  }
1242
1318
  }, 50),
1243
- // profilePictureCache IS persisted to IndexedDB
1319
+ // Image bytes are stored as one IndexedDB record per photo.
1244
1320
  profilePictureCache: debounce((value) => {
1245
- if (value) {
1246
- getCacheDbs().profilePictureCache.setItem(value);
1247
- }
1248
1321
  }, 100)
1249
1322
  };
1250
1323
  var cacheInitialized = false;
@@ -1253,13 +1326,6 @@ var initializeCache = async () => {
1253
1326
  return;
1254
1327
  }
1255
1328
  cacheInitialized = true;
1256
- try {
1257
- const profilePictureData = await getCacheDbs().profilePictureCache.getItem();
1258
- if (profilePictureData) {
1259
- caches.profilePictureCache = profilePictureData;
1260
- }
1261
- } catch (_error) {
1262
- }
1263
1329
  };
1264
1330
  var resetRelativesCache = () => {
1265
1331
  caches.relativesOnDegreeCache = {};
@@ -2654,15 +2720,21 @@ var isRemoteOrEmbeddedMediaUrl = (path) => {
2654
2720
  }
2655
2721
  return path.startsWith("data:") || path.startsWith("blob:") || /^https?:\/\//i.test(path);
2656
2722
  };
2657
- var resolveLocalMediaUrl = async (path) => {
2723
+ var resolveLocalMediaUrl = async (path, context) => {
2658
2724
  if (!path) {
2659
2725
  return void 0;
2660
2726
  }
2661
- if (isRemoteOrEmbeddedMediaUrl(path)) {
2727
+ if (path.startsWith("data:") || path.startsWith("blob:")) {
2728
+ return path;
2729
+ }
2730
+ const resolved = await localMediaResolver?.(path, context);
2731
+ if (resolved) {
2732
+ return resolved;
2733
+ }
2734
+ if (/^https?:\/\//i.test(path)) {
2662
2735
  return path;
2663
2736
  }
2664
- const resolved = await localMediaResolver?.(path);
2665
- return resolved;
2737
+ return void 0;
2666
2738
  };
2667
2739
  var blobToDataUrl = async (blob) => {
2668
2740
  const buffer = await blob.arrayBuffer();
@@ -2719,54 +2791,6 @@ var notImplemented = (type, ...args) => {
2719
2791
  console.error(`[Not Implemented] ${type}`, ...args);
2720
2792
  };
2721
2793
 
2722
- // src/utils/media-utils.ts
2723
- var getFileExtension = (filename) => {
2724
- if (!filename) {
2725
- return "";
2726
- }
2727
- if (filename.startsWith("data:")) {
2728
- const mime = filename.slice(5).split(";")[0] || "";
2729
- const subtype = (mime.split("/")[1] || "").toLowerCase();
2730
- if (subtype === "jpeg") {
2731
- return "jpg";
2732
- }
2733
- return subtype.split("+")[0] || "";
2734
- }
2735
- const withoutQuery = filename.split(/[?#]/)[0] || filename;
2736
- const match = withoutQuery.match(/\.([^.]+)$/);
2737
- return match ? match[1].toLowerCase() : "";
2738
- };
2739
- var isImageFormat = (format2) => {
2740
- if (!format2) {
2741
- return false;
2742
- }
2743
- let normalized = format2.toLowerCase().trim();
2744
- if (normalized.startsWith("data:")) {
2745
- normalized = getFileExtension(normalized);
2746
- } else if (normalized.includes("/")) {
2747
- normalized = normalized.split("/")[1]?.split("+")[0] || "";
2748
- if (normalized === "jpeg") {
2749
- normalized = "jpg";
2750
- }
2751
- }
2752
- const imageFormats = [
2753
- "jpg",
2754
- "jpeg",
2755
- "png",
2756
- "gif",
2757
- "bmp",
2758
- "webp",
2759
- "svg",
2760
- "tiff",
2761
- "tif"
2762
- ];
2763
- return imageFormats.includes(normalized);
2764
- };
2765
- var resolveObjeForm = (obje) => {
2766
- const value = obje?.get?.("FILE.FORM")?.toValue?.() ?? obje?.get?.("FORM")?.toValue?.();
2767
- return typeof value === "string" && value.trim() ? value.trim() : void 0;
2768
- };
2769
-
2770
2794
  // src/factories/place-parser-provider.ts
2771
2795
  var placeParserProvider;
2772
2796
  var setPlaceParserProvider = (parser) => {
@@ -3982,22 +4006,19 @@ var Indi = class extends Common {
3982
4006
  if (objeList) {
3983
4007
  await Promise.all(
3984
4008
  objeList.map(async (objeRef) => {
3985
- const key = objeRef?.id;
4009
+ const key = objeXrefKey(objeRef, 0);
3986
4010
  const obje = objeRef?.standardizeMedia(
3987
4011
  namespace,
3988
4012
  true,
3989
- (ns, iId) => {
3990
- return ns && iId ? `https://mediasvc.ancestry.com/v2/image/namespaces/${ns}/media/${iId}?client=trees-mediaservice&imageQuality=hq` : void 0;
3991
- }
4013
+ ancestryMediaFileUrl
3992
4014
  );
3993
4015
  const isPrimary = obje?.get("_PRIM")?.toValue() === "Y";
3994
- const media = obje?.RIN?.toValue() || obje?.get("_OID")?.toValue();
3995
- const clone = obje?.get("_CLON._OID")?.toValue();
3996
- const mser = obje?.get("_MSER._LKID")?.toValue();
4016
+ const media = resolveObjeMediaId(obje);
3997
4017
  let url = obje?.get("FILE")?.toValue();
3998
4018
  const title = obje?.get("FILE.TITL")?.toValue() ?? obje?.get("TITL")?.toValue() ?? "";
4019
+ const note = objeNoteValue(obje);
3999
4020
  const type = resolveObjeForm(obje) ?? (url ? getFileExtension(url) : void 0) ?? "raw";
4000
- let imgId = clone || mser;
4021
+ let imgId = media;
4001
4022
  const hasEmbeddedOrLocalFile = !!url && (url.startsWith("data:") || url.startsWith("blob:") || !/^https?:\/\//i.test(url));
4002
4023
  if (!hasEmbeddedOrLocalFile && (!www || !tree || !this.id)) {
4003
4024
  return;
@@ -4033,6 +4054,7 @@ var Indi = class extends Common {
4033
4054
  imgId,
4034
4055
  person: this.id,
4035
4056
  title,
4057
+ note,
4036
4058
  url,
4037
4059
  contentType: type,
4038
4060
  downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
@@ -4071,7 +4093,7 @@ var Indi = class extends Common {
4071
4093
  return;
4072
4094
  }
4073
4095
  const obje = o;
4074
- const key = `@O${index}@`;
4096
+ const key = objeXrefKey(obje, index);
4075
4097
  obje.standardizeMedia();
4076
4098
  const isPrimary = obje?.get("_PRIM")?.toValue() === "Y";
4077
4099
  const url = obje?.get("FILE")?.toValue();
@@ -4090,6 +4112,7 @@ var Indi = class extends Common {
4090
4112
  imgId,
4091
4113
  person: this.id,
4092
4114
  title,
4115
+ note: objeNoteValue(obje),
4093
4116
  url,
4094
4117
  contentType: type,
4095
4118
  downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
@@ -4198,7 +4221,7 @@ var Indi = class extends Common {
4198
4221
  if (!obje) {
4199
4222
  return;
4200
4223
  }
4201
- const key = `@O${index}@`;
4224
+ const key = objeXrefKey(obje, index);
4202
4225
  const isPrimary = obje?.get("_PRIM")?.toValue() === "Y";
4203
4226
  const url = obje?.get("FILE")?.toValue();
4204
4227
  const title = obje?.get("TITL")?.toValue() ?? "";
@@ -4215,6 +4238,7 @@ var Indi = class extends Common {
4215
4238
  imgId,
4216
4239
  person: this.id,
4217
4240
  title,
4241
+ note: objeNoteValue(obje),
4218
4242
  url,
4219
4243
  contentType: type,
4220
4244
  downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
@@ -4238,7 +4262,7 @@ var Indi = class extends Common {
4238
4262
  if (!obje) {
4239
4263
  return;
4240
4264
  }
4241
- const key = `@O${index}@`;
4265
+ const key = objeXrefKey(obje, index);
4242
4266
  obje.standardizeMedia();
4243
4267
  const isPrimary = obje?.get("_PRIM")?.toValue() === "Y";
4244
4268
  const url = obje?.get("FILE")?.toValue();
@@ -4255,6 +4279,7 @@ var Indi = class extends Common {
4255
4279
  imgId,
4256
4280
  person: this.id,
4257
4281
  title,
4282
+ note: objeNoteValue(obje),
4258
4283
  url,
4259
4284
  contentType: type,
4260
4285
  downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
@@ -4286,7 +4311,12 @@ var Indi = class extends Common {
4286
4311
  );
4287
4312
  if (cached !== void 0) {
4288
4313
  if (cached?.file && !isRemoteOrEmbeddedMediaUrl(cached.file)) {
4289
- const resolvedCached = await resolveLocalMediaUrl(cached.file);
4314
+ const resolvedCached = await resolveLocalMediaUrl(cached.file, {
4315
+ url: cached.file,
4316
+ person: this.id,
4317
+ tree: this.getTreeId?.(),
4318
+ treeName: this.getTreeName?.()
4319
+ });
4290
4320
  if (resolvedCached && isRemoteOrEmbeddedMediaUrl(resolvedCached)) {
4291
4321
  const refreshed = { ...cached, file: resolvedCached };
4292
4322
  profilePictureCache(
@@ -4311,7 +4341,16 @@ var Indi = class extends Common {
4311
4341
  }
4312
4342
  const mediaArray = Object.values(mediaList);
4313
4343
  const toDisplayableProfile = async (media, isPrimary) => {
4314
- const resolvedFile = await resolveLocalMediaUrl(media.url);
4344
+ const resolvedFile = await resolveLocalMediaUrl(media.url, {
4345
+ url: media.url,
4346
+ id: media.id,
4347
+ imgId: media.imgId,
4348
+ key: media.key,
4349
+ contentType: media.contentType,
4350
+ person: media.person || this.id,
4351
+ tree: media.tree || this.getTreeId?.(),
4352
+ treeName: this.getTreeName?.()
4353
+ });
4315
4354
  if (!resolvedFile || !isRemoteOrEmbeddedMediaUrl(resolvedFile)) {
4316
4355
  return void 0;
4317
4356
  }
@@ -6280,7 +6319,7 @@ var KinshipTranslatorHU = class extends KinshipTranslatorBasic {
6280
6319
  }
6281
6320
  return `${hungarianOrdinalize(
6282
6321
  degree
6283
- )}unokatestv\xE9r ${level}x elt\xE1vol\xEDtva`;
6322
+ )}unokatestv\xE9r ${Math.abs(level)}x elt\xE1vol\xEDtva`;
6284
6323
  }
6285
6324
  auncle() {
6286
6325
  const level = this.pathN?.level ?? 0;
@@ -6324,14 +6363,25 @@ var KinshipTranslatorHU = class extends KinshipTranslatorBasic {
6324
6363
  return `${ordinalized ? `${ordinalized}unoka` : ""}testv\xE9r ${origPrefix.replace(/nagy$/, "")}unok\xE1ja`;
6325
6364
  }
6326
6365
  parent() {
6366
+ const level = Math.abs(this.pathN?.level ?? 0);
6367
+ if (level <= 1) {
6368
+ if (this.personN?.isMale()) {
6369
+ return "apa";
6370
+ }
6371
+ if (this.personN?.isFemale()) {
6372
+ return "anya";
6373
+ }
6374
+ return "sz\xFCl\u0151";
6375
+ }
6327
6376
  const prefix = this.directPrefix();
6377
+ const gen = prefix === "nagy" ? "" : prefix;
6328
6378
  if (this.personN?.isMale()) {
6329
- return `${prefix}apa`;
6379
+ return `${gen}nagyapa`;
6330
6380
  }
6331
6381
  if (this.personN?.isFemale()) {
6332
- return `${prefix}anya`;
6382
+ return `${gen}nagyanya`;
6333
6383
  }
6334
- return `${prefix}sz\xFCl\u0151`;
6384
+ return `${gen}nagysz\xFCl\u0151`;
6335
6385
  }
6336
6386
  child() {
6337
6387
  const level = Math.abs(this.pathN?.level ?? 0);
@@ -6525,27 +6575,30 @@ var KinshipTranslatorEn = class extends KinshipTranslatorBasic {
6525
6575
  if (!degree) {
6526
6576
  return level < 0 ? this.nibling() : this.auncle();
6527
6577
  }
6528
- return `${ordinalize(degree)} cousin ${level}x removed`;
6578
+ return `${ordinalize(degree)} cousin ${Math.abs(level)}x removed`;
6529
6579
  }
6530
6580
  auncle() {
6531
- const prefix = this.directPrefix();
6581
+ const level = Math.abs(this.pathN?.level ?? 0);
6582
+ const greats = level <= 1 ? "" : "great-".repeat(level - 1);
6532
6583
  if (this.personN?.isMale()) {
6533
- return `${prefix}uncle`;
6584
+ return `${greats}uncle`;
6534
6585
  }
6535
6586
  if (this.personN?.isFemale()) {
6536
- return `${prefix}aunt`;
6587
+ return `${greats}aunt`;
6537
6588
  }
6538
- return `${prefix}auncle`;
6589
+ return greats ? `${greats}uncle/${greats}aunt` : "uncle/aunt";
6539
6590
  }
6540
6591
  nibling() {
6541
- const prefix = this.directPrefix();
6592
+ const level = Math.abs(this.pathN?.level ?? 0);
6593
+ const greats = level <= 2 ? "" : "great-".repeat(level - 2);
6594
+ const grand = level <= 1 ? "" : "grand";
6542
6595
  if (this.personN?.isMale()) {
6543
- return `${prefix}nephew`;
6596
+ return `${greats}${grand}nephew`;
6544
6597
  }
6545
6598
  if (this.personN?.isFemale()) {
6546
- return `${prefix}niece`;
6599
+ return `${greats}${grand}niece`;
6547
6600
  }
6548
- return `${prefix}nibling`;
6601
+ return greats || grand ? `${greats}${grand}nephew/${greats}${grand}niece` : "nephew/niece";
6549
6602
  }
6550
6603
  parent() {
6551
6604
  const prefix = this.directPrefix();
@@ -6673,45 +6726,64 @@ var KinshipTranslatorEn = class extends KinshipTranslatorBasic {
6673
6726
  };
6674
6727
 
6675
6728
  // src/kinship-translator/patterns.de.ts
6729
+ var parentRelationsDe = {
6730
+ step: "Stief",
6731
+ foster: "Pflege",
6732
+ adopted: "Adoptiv"
6733
+ };
6676
6734
  var InLawsDe = {
6677
- "Ehepartner von (kind|tochter|sohn)": "Schwiegerkind",
6678
- "Ehefrau von (kind|tochter|sohn)": "Schwiegertochter",
6679
- "Ehemann von (kind|tochter|sohn)": "Schwiegersohn",
6680
- "mutter des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegermutter",
6681
- "vater des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegervater",
6682
- "elternteil des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegerelternteil",
6683
- "Ehefrau von (Halb)?(geschwister|schwester|bruder)": "Schw\xE4gerin",
6684
- "Ehemann von (Halb)?(geschwister|schwester|bruder)": "Schwager",
6685
- "Ehepartner von (Halb)?(geschwister|schwester|bruder)": "Schwager/Schw\xE4gerin",
6686
- "(Halb)?schwester des (Ehepartner|Ehefrau|Ehemann)s": "Schw\xE4gerin",
6687
- "(Halb)?bruder des (Ehepartner|Ehefrau|Ehemann)s": "Schwager",
6688
- "(Halb)?geschwister des (Ehepartner|Ehefrau|Ehemann)s": "Schwager/Schw\xE4gerin"
6735
+ "Ehepartner von (Kind|Tochter|Sohn)": "Schwiegerkind",
6736
+ "Ehefrau von (Kind|Tochter|Sohn)": "Schwiegertochter",
6737
+ "Ehemann von (Kind|Tochter|Sohn)": "Schwiegersohn",
6738
+ "Mutter (des Ehepartners|des Ehemanns|der Ehefrau)": "Schwiegermutter",
6739
+ "Vater (des Ehepartners|des Ehemanns|der Ehefrau)": "Schwiegervater",
6740
+ "Elternteil (des Ehepartners|des Ehemanns|der Ehefrau)": "Schwiegerelternteil",
6741
+ "Ehefrau von (Halb)?-?(Geschwister|Schwester|Bruder)": "Schw\xE4gerin",
6742
+ "Ehemann von (Halb)?-?(Geschwister|Schwester|Bruder)": "Schwager",
6743
+ "Ehepartner von (Halb)?-?(Geschwister|Schwester|Bruder)": "Schwager/Schw\xE4gerin",
6744
+ "(Halb)?-?(Schwester|schwester) (des Ehepartners|des Ehemanns|der Ehefrau)": "Schw\xE4gerin",
6745
+ "(Halb)?-?(Bruder|bruder) (des Ehepartners|des Ehemanns|der Ehefrau)": "Schwager",
6746
+ "(Halb)?-?(Geschwister|geschwister) (des Ehepartners|des Ehemanns|der Ehefrau)": "Schwager/Schw\xE4gerin"
6689
6747
  };
6690
6748
 
6691
6749
  // src/kinship-translator/kinship-translator.de.ts
6692
- var KinshipTranslatorDe = class extends KinshipTranslatorBasic {
6693
- directPrefix() {
6694
- const level = Math.abs(this.pathN?.level ?? 0);
6695
- if (level <= 1) {
6696
- return "";
6697
- }
6698
- if (level === 2) {
6699
- return "Gro\xDF";
6700
- }
6701
- if (level === 3) {
6702
- return "Urgro\xDF";
6703
- }
6704
- return `Ur${level - 2}-gro\xDF`;
6750
+ var sexOf = (person) => {
6751
+ if (person?.isMale?.()) {
6752
+ return "m";
6753
+ }
6754
+ if (person?.isFemale?.()) {
6755
+ return "f";
6756
+ }
6757
+ return "n";
6758
+ };
6759
+ var pick = (sex, male, female, neutral) => {
6760
+ if (sex === "m") {
6761
+ return male;
6762
+ }
6763
+ if (sex === "f") {
6764
+ return female;
6765
+ }
6766
+ return neutral;
6767
+ };
6768
+ var ur = (count) => count > 0 ? "Ur".repeat(count) : "";
6769
+ var genitiveArticle = (spouseType) => {
6770
+ if (spouseType === "Ehefrau") {
6771
+ return `der ${spouseType}`;
6705
6772
  }
6773
+ return `des ${spouseType}s`;
6774
+ };
6775
+ var KinshipTranslatorDe = class extends KinshipTranslatorBasic {
6706
6776
  indirect() {
6707
6777
  let degree = Math.abs(this.pathN?.degree ?? 0);
6708
6778
  if (degree > 0) {
6709
6779
  degree = degree - 1;
6710
6780
  }
6711
- if (degree === 1) {
6712
- return `Cousin`;
6781
+ const sex = sexOf(this.personN);
6782
+ const cousin = pick(sex, "Cousin", "Cousine", "Cousin/Cousine");
6783
+ if (degree <= 1) {
6784
+ return cousin;
6713
6785
  }
6714
- return `Cousin ${degree}. Grades`;
6786
+ return `${cousin} ${degree}. Grades`;
6715
6787
  }
6716
6788
  removal() {
6717
6789
  const level = this.pathN?.level ?? 0;
@@ -6722,101 +6794,101 @@ var KinshipTranslatorDe = class extends KinshipTranslatorBasic {
6722
6794
  if (!degree) {
6723
6795
  return level < 0 ? this.nibling() : this.auncle();
6724
6796
  }
6725
- return `Cousin ${degree}. Grades ${Math.abs(level)}\xD7 entfernt`;
6797
+ return `${this.indirect()} ${Math.abs(level)}\xD7 entfernt`;
6726
6798
  }
6727
6799
  auncle() {
6728
- const prefix = this.directPrefix();
6729
- if (this.personN?.isMale()) {
6730
- return `${prefix}onkel`;
6731
- }
6732
- if (this.personN?.isFemale()) {
6733
- return `${prefix}tante`;
6800
+ const level = Math.abs(this.pathN?.level ?? 0);
6801
+ const sex = sexOf(this.personN);
6802
+ if (level <= 1) {
6803
+ return pick(sex, "Onkel", "Tante", "Onkel/Tante");
6734
6804
  }
6735
- return `${prefix}onkel/tante`;
6805
+ const prefix = `${ur(level - 2)}Gro\xDF`;
6806
+ return pick(
6807
+ sex,
6808
+ `${prefix}onkel`,
6809
+ `${prefix}tante`,
6810
+ `${prefix}onkel/tante`
6811
+ );
6736
6812
  }
6737
6813
  nibling() {
6738
- const prefix = this.directPrefix();
6739
- if (this.personN?.isMale()) {
6740
- return `${prefix}neffe`;
6741
- }
6742
- if (this.personN?.isFemale()) {
6743
- return `${prefix}nichte`;
6814
+ const level = Math.abs(this.pathN?.level ?? 0);
6815
+ const sex = sexOf(this.personN);
6816
+ if (level <= 1) {
6817
+ return pick(sex, "Neffe", "Nichte", "Neffe/Nichte");
6744
6818
  }
6745
- return `${prefix}neffe/nichte`;
6819
+ const prefix = `${ur(level - 2)}Gro\xDF`;
6820
+ return pick(
6821
+ sex,
6822
+ `${prefix}neffe`,
6823
+ `${prefix}nichte`,
6824
+ `${prefix}neffe/nichte`
6825
+ );
6746
6826
  }
6747
6827
  parent() {
6748
- const prefix = this.directPrefix();
6749
- if (this.personN?.isMale()) {
6750
- return `${prefix}vater`;
6751
- }
6752
- if (this.personN?.isFemale()) {
6753
- return `${prefix}mutter`;
6828
+ const level = Math.abs(this.pathN?.level ?? 0);
6829
+ const sex = sexOf(this.personN);
6830
+ if (level <= 1) {
6831
+ return pick(sex, "Vater", "Mutter", "Elternteil");
6754
6832
  }
6755
- return `${prefix}elternteil`;
6833
+ const prefix = `${ur(level - 2)}Gro\xDF`;
6834
+ return pick(
6835
+ sex,
6836
+ `${prefix}vater`,
6837
+ `${prefix}mutter`,
6838
+ `${prefix}elternteil`
6839
+ );
6756
6840
  }
6757
6841
  child() {
6758
- const prefix = this.directPrefix();
6759
- if (this.personN?.isMale()) {
6760
- return `${prefix}sohn`;
6761
- }
6762
- if (this.personN?.isFemale()) {
6763
- return `${prefix}tochter`;
6842
+ const level = Math.abs(this.pathN?.level ?? 0);
6843
+ const sex = sexOf(this.personN);
6844
+ if (level <= 1) {
6845
+ return pick(sex, "Sohn", "Tochter", "Kind");
6764
6846
  }
6765
- return `${prefix}kind`;
6847
+ const prefix = ur(level - 2);
6848
+ return pick(
6849
+ sex,
6850
+ `${prefix}Enkel`,
6851
+ `${prefix}Enkelin`,
6852
+ `${prefix}Enkelkind`
6853
+ );
6766
6854
  }
6767
6855
  sibling() {
6768
- if (this.personN?.isMale()) {
6769
- return "bruder";
6770
- }
6771
- if (this.personN?.isFemale()) {
6772
- return "schwester";
6773
- }
6774
- return "geschwister";
6856
+ return pick(sexOf(this.personN), "Bruder", "Schwester", "Geschwister");
6775
6857
  }
6776
6858
  halfBlood(relation) {
6777
6859
  if (!relation || !this.isHalfBlood) {
6778
6860
  return relation ?? "";
6779
6861
  }
6780
- if (/^[A-ZÄÖÜ]/.test(relation) || /[-\s]/.test(relation)) {
6862
+ if (/[\s-]/.test(relation) || /^(Groß|Ur)/.test(relation)) {
6781
6863
  return `Halb-${relation}`;
6782
6864
  }
6783
- return `Halb${relation}`;
6865
+ return `Halb${relation.charAt(0).toLowerCase()}${relation.slice(1)}`;
6784
6866
  }
6785
6867
  spouse() {
6786
- if (this.personN?.isMale()) {
6787
- return "Ehemann";
6788
- }
6789
- if (this.personN?.isFemale()) {
6790
- return "Ehefrau";
6791
- }
6792
- return "Ehepartner";
6868
+ return pick(sexOf(this.personN), "Ehemann", "Ehefrau", "Ehepartner");
6793
6869
  }
6794
6870
  ofSpouse(relation) {
6795
6871
  if (!relation) {
6796
6872
  return "";
6797
6873
  }
6798
- const spouse = this.path?.[1].indi;
6799
- let spouseType = "Ehepartner";
6800
- if (spouse?.isMale()) {
6801
- spouseType = "Ehemann";
6802
- }
6803
- if (spouse?.isFemale()) {
6804
- spouseType = "Ehefrau";
6805
- }
6806
- return `${relation} des ${spouseType}s`;
6874
+ const spouseType = pick(
6875
+ sexOf(this.path?.[1].indi),
6876
+ "Ehemann",
6877
+ "Ehefrau",
6878
+ "Ehepartner"
6879
+ );
6880
+ return `${relation} ${genitiveArticle(spouseType)}`;
6807
6881
  }
6808
6882
  spouseOf(relation) {
6809
6883
  if (!relation) {
6810
6884
  return "";
6811
6885
  }
6812
- const spouse = this.path?.[this.path.length - 1].indi;
6813
- let spouseType = "Ehepartner";
6814
- if (spouse?.isMale()) {
6815
- spouseType = "Ehemann";
6816
- }
6817
- if (spouse?.isFemale()) {
6818
- spouseType = "Ehefrau";
6819
- }
6886
+ const spouseType = pick(
6887
+ sexOf(this.path?.[this.path.length - 1].indi),
6888
+ "Ehemann",
6889
+ "Ehefrau",
6890
+ "Ehepartner"
6891
+ );
6820
6892
  return `${spouseType} von ${relation}`;
6821
6893
  }
6822
6894
  of(relation) {
@@ -6834,8 +6906,8 @@ var KinshipTranslatorDe = class extends KinshipTranslatorBasic {
6834
6906
  if (!name || !relation) {
6835
6907
  return relation ?? "";
6836
6908
  }
6837
- if (relation.includes(" des ") || relation.includes(" von ")) {
6838
- return relation.replace(/ (des|von) /, ` $1 ${name}s `);
6909
+ if (relation.includes(" des ") || relation.includes(" der ") || relation.includes(" von ")) {
6910
+ return relation.replace(/ (des|der|von) /, ` $1 ${name}s `);
6839
6911
  }
6840
6912
  return `${name}s ${relation}`;
6841
6913
  }
@@ -6865,110 +6937,143 @@ var KinshipTranslatorDe = class extends KinshipTranslatorBasic {
6865
6937
  if (!relation || !this.pathN?.relation) {
6866
6938
  return relation ?? "";
6867
6939
  }
6868
- return `${this.pathN.relation} ${relation}`;
6940
+ const prefix = parentRelationsDe[this.pathN.relation];
6941
+ if (!prefix) {
6942
+ return relation;
6943
+ }
6944
+ if (prefix.endsWith("-") || prefix.endsWith(" ")) {
6945
+ return `${prefix}${relation}`;
6946
+ }
6947
+ return `${prefix}${relation.charAt(0).toLowerCase()}${relation.slice(1)}`;
6869
6948
  }
6870
6949
  };
6871
6950
 
6872
6951
  // src/kinship-translator/patterns.fr.ts
6952
+ var parentRelationsFr = {
6953
+ step: "step",
6954
+ foster: "foster",
6955
+ adopted: "adopted"
6956
+ };
6873
6957
  var InLawsFr = {
6874
6958
  "conjoint de (enfant|fille|fils)": "beau-fils/belle-fille",
6875
6959
  "\xE9pouse de (enfant|fille|fils)": "belle-fille",
6876
6960
  "mari de (enfant|fille|fils)": "gendre",
6877
- "m\xE8re du (conjoint|\xE9pouse|mari)": "belle-m\xE8re",
6878
- "p\xE8re du (conjoint|\xE9pouse|mari)": "beau-p\xE8re",
6879
- "parent du (conjoint|\xE9pouse|mari)": "beau-parent",
6961
+ "m\xE8re (du mari|du conjoint|de l'\xE9pouse)": "belle-m\xE8re",
6962
+ "p\xE8re (du mari|du conjoint|de l'\xE9pouse)": "beau-p\xE8re",
6963
+ "parent (du mari|du conjoint|de l'\xE9pouse)": "beau-parent",
6880
6964
  "\xE9pouse de (demi-)?(fr\xE8re/s\u0153ur|s\u0153ur|fr\xE8re)": "belle-s\u0153ur",
6881
6965
  "mari de (demi-)?(fr\xE8re/s\u0153ur|s\u0153ur|fr\xE8re)": "beau-fr\xE8re",
6882
6966
  "conjoint de (demi-)?(fr\xE8re/s\u0153ur|s\u0153ur|fr\xE8re)": "beau-fr\xE8re/belle-s\u0153ur",
6883
- "(demi-)?s\u0153ur du (conjoint|\xE9pouse|mari)": "belle-s\u0153ur",
6884
- "(demi-)?fr\xE8re du (conjoint|\xE9pouse|mari)": "beau-fr\xE8re",
6885
- "(demi-)?fr\xE8re/s\u0153ur du (conjoint|\xE9pouse|mari)": "beau-fr\xE8re/belle-s\u0153ur"
6967
+ "(demi-)?s\u0153ur (du mari|du conjoint|de l'\xE9pouse)": "belle-s\u0153ur",
6968
+ "(demi-)?fr\xE8re (du mari|du conjoint|de l'\xE9pouse)": "beau-fr\xE8re",
6969
+ "(demi-)?fr\xE8re/s\u0153ur (du mari|du conjoint|de l'\xE9pouse)": "beau-fr\xE8re/belle-s\u0153ur"
6886
6970
  };
6887
6971
 
6888
6972
  // src/kinship-translator/kinship-translator.fr.ts
6889
- var KinshipTranslatorFr = class extends KinshipTranslatorBasic {
6890
- directPrefix() {
6891
- const level = Math.abs(this.pathN?.level ?? 0);
6892
- if (level <= 1) {
6893
- return "";
6894
- }
6895
- if (level === 2) {
6896
- return "grand-";
6897
- }
6898
- if (level === 3) {
6899
- return "arri\xE8re-grand-";
6900
- }
6901
- return `arri\xE8re${level - 2}-grand-`;
6973
+ var sexOf2 = (person) => {
6974
+ if (person?.isMale?.()) {
6975
+ return "m";
6902
6976
  }
6903
- indirect() {
6904
- let degree = Math.abs(this.pathN?.degree ?? 0);
6905
- if (degree > 0) {
6906
- degree = degree - 1;
6907
- }
6908
- if (degree === 1) {
6909
- return `cousin`;
6910
- }
6911
- return `cousin au ${ordinalize(degree)} degr\xE9`;
6977
+ if (person?.isFemale?.()) {
6978
+ return "f";
6912
6979
  }
6913
- removal() {
6914
- const level = this.pathN?.level ?? 0;
6915
- let degree = Math.abs(this.pathN?.degree ?? 0);
6916
- if (degree > 0) {
6917
- degree = degree - 1;
6980
+ return "n";
6981
+ };
6982
+ var pick2 = (sex, male, female, neutral) => {
6983
+ if (sex === "m") {
6984
+ return male;
6985
+ }
6986
+ if (sex === "f") {
6987
+ return female;
6988
+ }
6989
+ return neutral;
6990
+ };
6991
+ var arriere = (count) => count > 0 ? "arri\xE8re-".repeat(count) : "";
6992
+ var frenchOrdinal = (n) => n === 1 ? "1er" : `${n}e`;
6993
+ var isFeminineRelation = (relation) => /mère|fille|sœur|tante|nièce|cousine|épouse/.test(relation);
6994
+ var ofSpousePrep = (spouseType) => {
6995
+ if (spouseType === "\xE9pouse") {
6996
+ return "de l'";
6997
+ }
6998
+ return "du ";
6999
+ };
7000
+ var KinshipTranslatorFr = class extends KinshipTranslatorBasic {
7001
+ indirect() {
7002
+ let degree = Math.abs(this.pathN?.degree ?? 0);
7003
+ if (degree > 0) {
7004
+ degree = degree - 1;
7005
+ }
7006
+ const cousin = pick2(
7007
+ sexOf2(this.personN),
7008
+ "cousin",
7009
+ "cousine",
7010
+ "cousin/cousine"
7011
+ );
7012
+ if (degree <= 1) {
7013
+ return cousin;
7014
+ }
7015
+ return `${cousin} au ${frenchOrdinal(degree)} degr\xE9`;
7016
+ }
7017
+ removal() {
7018
+ const level = this.pathN?.level ?? 0;
7019
+ let degree = Math.abs(this.pathN?.degree ?? 0);
7020
+ if (degree > 0) {
7021
+ degree = degree - 1;
6918
7022
  }
6919
7023
  if (!degree) {
6920
7024
  return level < 0 ? this.nibling() : this.auncle();
6921
7025
  }
6922
- return `cousin au ${ordinalize(degree)} degr\xE9 ${Math.abs(level)}\xD7 \xE9loign\xE9`;
7026
+ return `${this.indirect()} ${Math.abs(level)}\xD7 \xE9loign\xE9`;
6923
7027
  }
6924
7028
  auncle() {
6925
- const prefix = this.directPrefix();
6926
- if (this.personN?.isMale()) {
6927
- return `${prefix}oncle`;
6928
- }
6929
- if (this.personN?.isFemale()) {
6930
- return `${prefix}tante`;
7029
+ const level = Math.abs(this.pathN?.level ?? 0);
7030
+ const sex = sexOf2(this.personN);
7031
+ const base = pick2(sex, "oncle", "tante", "oncle/tante");
7032
+ if (level <= 1) {
7033
+ return base;
6931
7034
  }
6932
- return `${prefix}oncle/tante`;
7035
+ const grands = pick2(
7036
+ sex,
7037
+ "grand-oncle",
7038
+ "grand-tante",
7039
+ "grand-oncle/tante"
7040
+ );
7041
+ return `${arriere(level - 2)}${grands}`;
6933
7042
  }
6934
7043
  nibling() {
6935
- const prefix = this.directPrefix();
6936
- if (this.personN?.isMale()) {
6937
- return `${prefix}neveu`;
6938
- }
6939
- if (this.personN?.isFemale()) {
6940
- return `${prefix}ni\xE8ce`;
7044
+ const level = Math.abs(this.pathN?.level ?? 0);
7045
+ const sex = sexOf2(this.personN);
7046
+ if (level <= 1) {
7047
+ return pick2(sex, "neveu", "ni\xE8ce", "neveu/ni\xE8ce");
6941
7048
  }
6942
- return `${prefix}neveu/ni\xE8ce`;
7049
+ const grands = pick2(
7050
+ sex,
7051
+ "grand-neveu",
7052
+ "grande-ni\xE8ce",
7053
+ "grand-neveu/grande-ni\xE8ce"
7054
+ );
7055
+ return `${arriere(level - 2)}${grands}`;
6943
7056
  }
6944
7057
  parent() {
6945
- const prefix = this.directPrefix();
6946
- if (this.personN?.isMale()) {
6947
- return `${prefix}p\xE8re`;
6948
- }
6949
- if (this.personN?.isFemale()) {
6950
- return `${prefix}m\xE8re`;
7058
+ const level = Math.abs(this.pathN?.level ?? 0);
7059
+ const sex = sexOf2(this.personN);
7060
+ if (level <= 1) {
7061
+ return pick2(sex, "p\xE8re", "m\xE8re", "parent");
6951
7062
  }
6952
- return `${prefix}parent`;
7063
+ const grands = pick2(sex, "grand-p\xE8re", "grand-m\xE8re", "grand-parent");
7064
+ return `${arriere(level - 2)}${grands}`;
6953
7065
  }
6954
7066
  child() {
6955
- const prefix = this.directPrefix();
6956
- if (this.personN?.isMale()) {
6957
- return `${prefix}fils`;
6958
- }
6959
- if (this.personN?.isFemale()) {
6960
- return `${prefix}fille`;
7067
+ const level = Math.abs(this.pathN?.level ?? 0);
7068
+ const sex = sexOf2(this.personN);
7069
+ if (level <= 1) {
7070
+ return pick2(sex, "fils", "fille", "enfant");
6961
7071
  }
6962
- return `${prefix}enfant`;
7072
+ const petits = pick2(sex, "petit-fils", "petite-fille", "petit-enfant");
7073
+ return `${arriere(level - 2)}${petits}`;
6963
7074
  }
6964
7075
  sibling() {
6965
- if (this.personN?.isMale()) {
6966
- return "fr\xE8re";
6967
- }
6968
- if (this.personN?.isFemale()) {
6969
- return "s\u0153ur";
6970
- }
6971
- return "fr\xE8re/s\u0153ur";
7076
+ return pick2(sexOf2(this.personN), "fr\xE8re", "s\u0153ur", "fr\xE8re/s\u0153ur");
6972
7077
  }
6973
7078
  halfBlood(relation) {
6974
7079
  if (!relation || !this.isHalfBlood) {
@@ -6977,40 +7082,30 @@ var KinshipTranslatorFr = class extends KinshipTranslatorBasic {
6977
7082
  return `demi-${relation}`;
6978
7083
  }
6979
7084
  spouse() {
6980
- if (this.personN?.isMale()) {
6981
- return "mari";
6982
- }
6983
- if (this.personN?.isFemale()) {
6984
- return "\xE9pouse";
6985
- }
6986
- return "conjoint";
7085
+ return pick2(sexOf2(this.personN), "mari", "\xE9pouse", "conjoint");
6987
7086
  }
6988
7087
  ofSpouse(relation) {
6989
7088
  if (!relation) {
6990
7089
  return "";
6991
7090
  }
6992
- const spouse = this.path?.[1].indi;
6993
- let spouseType = "conjoint";
6994
- if (spouse?.isMale()) {
6995
- spouseType = "mari";
6996
- }
6997
- if (spouse?.isFemale()) {
6998
- spouseType = "\xE9pouse";
6999
- }
7000
- return `${relation} du ${spouseType}`;
7091
+ const spouseType = pick2(
7092
+ sexOf2(this.path?.[1].indi),
7093
+ "mari",
7094
+ "\xE9pouse",
7095
+ "conjoint"
7096
+ );
7097
+ return `${relation} ${ofSpousePrep(spouseType)}${spouseType}`;
7001
7098
  }
7002
7099
  spouseOf(relation) {
7003
7100
  if (!relation) {
7004
7101
  return "";
7005
7102
  }
7006
- const spouse = this.path?.[this.path.length - 1].indi;
7007
- let spouseType = "conjoint";
7008
- if (spouse?.isMale()) {
7009
- spouseType = "mari";
7010
- }
7011
- if (spouse?.isFemale()) {
7012
- spouseType = "\xE9pouse";
7013
- }
7103
+ const spouseType = pick2(
7104
+ sexOf2(this.path?.[this.path.length - 1].indi),
7105
+ "mari",
7106
+ "\xE9pouse",
7107
+ "conjoint"
7108
+ );
7014
7109
  return `${spouseType} de ${relation}`;
7015
7110
  }
7016
7111
  of(relation) {
@@ -7031,6 +7126,9 @@ var KinshipTranslatorFr = class extends KinshipTranslatorBasic {
7031
7126
  if (relation.includes(" du ") || relation.includes(" de ")) {
7032
7127
  return relation.replace(/ (du|de) /, ` $1 ${name} `);
7033
7128
  }
7129
+ if (relation.includes(" de l'")) {
7130
+ return relation.replace(" de l'", ` de ${name} l'`);
7131
+ }
7034
7132
  return `${relation} de ${name}`;
7035
7133
  }
7036
7134
  inLaw(relation) {
@@ -7059,50 +7157,118 @@ var KinshipTranslatorFr = class extends KinshipTranslatorBasic {
7059
7157
  if (!relation || !this.pathN?.relation) {
7060
7158
  return relation ?? "";
7061
7159
  }
7062
- return `${this.pathN.relation} ${relation}`;
7160
+ const kind = parentRelationsFr[this.pathN.relation];
7161
+ if (!kind) {
7162
+ return relation;
7163
+ }
7164
+ if (kind === "step") {
7165
+ return `${isFeminineRelation(relation) ? "belle-" : "beau-"}${relation}`;
7166
+ }
7167
+ if (kind === "adopted") {
7168
+ return `${relation} ${isFeminineRelation(relation) ? "adoptive" : "adoptif"}`;
7169
+ }
7170
+ if (kind === "foster") {
7171
+ return `${relation} d'accueil`;
7172
+ }
7173
+ return relation;
7063
7174
  }
7064
7175
  };
7065
7176
 
7066
7177
  // src/kinship-translator/patterns.es.ts
7178
+ var parentRelationsEs = {
7179
+ step: {
7180
+ padre: "padrastro",
7181
+ madre: "madrastra",
7182
+ hijo: "hijastro",
7183
+ hija: "hijastra",
7184
+ hermano: "hermanastro",
7185
+ hermana: "hermanastra",
7186
+ abuelo: "abuelastro",
7187
+ abuela: "abuelastra"
7188
+ }
7189
+ };
7067
7190
  var InLawsEs = {
7068
7191
  "c\xF3nyuge de (hijo/hija|hija|hijo)": "yerno/nuera",
7069
7192
  "esposa de (hijo/hija|hija|hijo)": "nuera",
7070
7193
  "esposo de (hijo/hija|hija|hijo)": "yerno",
7071
- "madre del (c\xF3nyuge|esposa|esposo)": "suegra",
7072
- "padre del (c\xF3nyuge|esposa|esposo)": "suegro",
7073
- "padre/madre del (c\xF3nyuge|esposa|esposo)": "suegro/suegra",
7194
+ "madre (del c\xF3nyuge|del esposo|de la esposa)": "suegra",
7195
+ "padre (del c\xF3nyuge|del esposo|de la esposa)": "suegro",
7196
+ "padre/madre (del c\xF3nyuge|del esposo|de la esposa)": "suegro/suegra",
7074
7197
  "esposa de (medio |media |medio/a )?(hermano/hermana|hermana|hermano)": "cu\xF1ada",
7075
7198
  "esposo de (medio |media |medio/a )?(hermano/hermana|hermana|hermano)": "cu\xF1ado",
7076
7199
  "c\xF3nyuge de (medio |media |medio/a )?(hermano/hermana|hermana|hermano)": "cu\xF1ado/cu\xF1ada",
7077
- "(medio |media |medio/a )?hermana del (c\xF3nyuge|esposa|esposo)": "cu\xF1ada",
7078
- "(medio |media |medio/a )?hermano del (c\xF3nyuge|esposa|esposo)": "cu\xF1ado",
7079
- "(medio |media |medio/a )?hermano/hermana del (c\xF3nyuge|esposa|esposo)": "cu\xF1ado/cu\xF1ada"
7200
+ "(medio |media |medio/a )?hermana (del c\xF3nyuge|del esposo|de la esposa)": "cu\xF1ada",
7201
+ "(medio |media |medio/a )?hermano (del c\xF3nyuge|del esposo|de la esposa)": "cu\xF1ado",
7202
+ "(medio |media |medio/a )?hermano/hermana (del c\xF3nyuge|del esposo|de la esposa)": "cu\xF1ado/cu\xF1ada"
7080
7203
  };
7081
7204
 
7082
7205
  // src/kinship-translator/kinship-translator.es.ts
7083
- var KinshipTranslatorEs = class extends KinshipTranslatorBasic {
7084
- directPrefix() {
7085
- const level = Math.abs(this.pathN?.level ?? 0);
7086
- if (level <= 1) {
7087
- return "";
7088
- }
7089
- if (level === 2) {
7090
- return "bisabuel";
7091
- }
7092
- if (level === 3) {
7093
- return "tatarabuel";
7094
- }
7095
- return `t\xE1tara${level - 2}-abuel`;
7206
+ var sexOf3 = (person) => {
7207
+ if (person?.isMale?.()) {
7208
+ return "m";
7209
+ }
7210
+ if (person?.isFemale?.()) {
7211
+ return "f";
7212
+ }
7213
+ return "n";
7214
+ };
7215
+ var pick3 = (sex, male, female, neutral) => {
7216
+ if (sex === "m") {
7217
+ return male;
7218
+ }
7219
+ if (sex === "f") {
7220
+ return female;
7096
7221
  }
7222
+ return neutral;
7223
+ };
7224
+ var SPANISH_ORDINALS_M = [
7225
+ "",
7226
+ "",
7227
+ "segundo",
7228
+ "tercero",
7229
+ "cuarto",
7230
+ "quinto",
7231
+ "sexto",
7232
+ "s\xE9ptimo",
7233
+ "octavo",
7234
+ "noveno",
7235
+ "d\xE9cimo"
7236
+ ];
7237
+ var SPANISH_ORDINALS_F = [
7238
+ "",
7239
+ "",
7240
+ "segunda",
7241
+ "tercera",
7242
+ "cuarta",
7243
+ "quinta",
7244
+ "sexta",
7245
+ "s\xE9ptima",
7246
+ "octava",
7247
+ "novena",
7248
+ "d\xE9cima"
7249
+ ];
7250
+ var spanishOrdinal = (n, sex) => {
7251
+ const list = sex === "f" ? SPANISH_ORDINALS_F : SPANISH_ORDINALS_M;
7252
+ return list[n] ?? `${n}.\xBA`;
7253
+ };
7254
+ var ofSpousePrep2 = (spouseType) => {
7255
+ if (spouseType === "esposa") {
7256
+ return "de la ";
7257
+ }
7258
+ return "del ";
7259
+ };
7260
+ var KinshipTranslatorEs = class extends KinshipTranslatorBasic {
7097
7261
  indirect() {
7098
7262
  let degree = Math.abs(this.pathN?.degree ?? 0);
7099
7263
  if (degree > 0) {
7100
7264
  degree = degree - 1;
7101
7265
  }
7102
- if (degree === 1) {
7103
- return `primo`;
7266
+ const sex = sexOf3(this.personN);
7267
+ const cousin = pick3(sex, "primo", "prima", "primo/prima");
7268
+ if (degree <= 1) {
7269
+ return cousin;
7104
7270
  }
7105
- return `primo ${ordinalize(degree)}`;
7271
+ return `${cousin} ${spanishOrdinal(degree, sex)}`;
7106
7272
  }
7107
7273
  removal() {
7108
7274
  const level = this.pathN?.level ?? 0;
@@ -7113,56 +7279,133 @@ var KinshipTranslatorEs = class extends KinshipTranslatorBasic {
7113
7279
  if (!degree) {
7114
7280
  return level < 0 ? this.nibling() : this.auncle();
7115
7281
  }
7116
- return `primo ${ordinalize(degree)} ${Math.abs(level)}\xD7 separado`;
7282
+ return `${this.indirect()} ${Math.abs(level)}\xD7 separado`;
7117
7283
  }
7118
7284
  auncle() {
7119
- const prefix = this.directPrefix();
7120
- if (this.personN?.isMale()) {
7121
- return `${prefix}t\xEDo`;
7285
+ const level = Math.abs(this.pathN?.level ?? 0);
7286
+ const sex = sexOf3(this.personN);
7287
+ if (level <= 1) {
7288
+ return pick3(sex, "t\xEDo", "t\xEDa", "t\xEDo/t\xEDa");
7122
7289
  }
7123
- if (this.personN?.isFemale()) {
7124
- return `${prefix}t\xEDa`;
7290
+ if (level === 2) {
7291
+ return pick3(sex, "t\xEDo abuelo", "t\xEDa abuela", "t\xEDo/t\xEDa abuelo");
7125
7292
  }
7126
- return `${prefix}t\xEDo/t\xEDa`;
7293
+ if (level === 3) {
7294
+ return pick3(
7295
+ sex,
7296
+ "t\xEDo bisabuelo",
7297
+ "t\xEDa bisabuela",
7298
+ "t\xEDo/t\xEDa bisabuelo"
7299
+ );
7300
+ }
7301
+ return pick3(
7302
+ sex,
7303
+ `t\xEDo abuelo (${level - 1}.\xBA)`,
7304
+ `t\xEDa abuela (${level - 1}.\xAA)`,
7305
+ `t\xEDo/t\xEDa abuelo (${level - 1}.\xBA)`
7306
+ );
7127
7307
  }
7128
7308
  nibling() {
7129
- const prefix = this.directPrefix();
7130
- if (this.personN?.isMale()) {
7131
- return `${prefix}sobrino`;
7309
+ const level = Math.abs(this.pathN?.level ?? 0);
7310
+ const sex = sexOf3(this.personN);
7311
+ if (level <= 1) {
7312
+ return pick3(sex, "sobrino", "sobrina", "sobrino/sobrina");
7132
7313
  }
7133
- if (this.personN?.isFemale()) {
7134
- return `${prefix}sobrina`;
7314
+ if (level === 2) {
7315
+ return pick3(
7316
+ sex,
7317
+ "sobrino nieto",
7318
+ "sobrina nieta",
7319
+ "sobrino/sobrina nieto"
7320
+ );
7135
7321
  }
7136
- return `${prefix}sobrino/sobrina`;
7322
+ if (level === 3) {
7323
+ return pick3(
7324
+ sex,
7325
+ "sobrino bisnieto",
7326
+ "sobrina bisnieta",
7327
+ "sobrino/sobrina bisnieto"
7328
+ );
7329
+ }
7330
+ return pick3(
7331
+ sex,
7332
+ `sobrino nieto (${level - 1}.\xBA)`,
7333
+ `sobrina nieta (${level - 1}.\xAA)`,
7334
+ `sobrino/sobrina nieto (${level - 1}.\xBA)`
7335
+ );
7137
7336
  }
7138
7337
  parent() {
7139
- const prefix = this.directPrefix();
7140
- if (this.personN?.isMale()) {
7141
- return `${prefix}padre`;
7338
+ const level = Math.abs(this.pathN?.level ?? 0);
7339
+ const sex = sexOf3(this.personN);
7340
+ if (level <= 1) {
7341
+ return pick3(sex, "padre", "madre", "padre/madre");
7142
7342
  }
7143
- if (this.personN?.isFemale()) {
7144
- return `${prefix}madre`;
7343
+ if (level === 2) {
7344
+ return pick3(sex, "abuelo", "abuela", "abuelo/abuela");
7145
7345
  }
7146
- return `${prefix}padre/madre`;
7346
+ if (level === 3) {
7347
+ return pick3(sex, "bisabuelo", "bisabuela", "bisabuelo/bisabuela");
7348
+ }
7349
+ if (level === 4) {
7350
+ return pick3(
7351
+ sex,
7352
+ "tatarabuelo",
7353
+ "tatarabuela",
7354
+ "tatarabuelo/tatarabuela"
7355
+ );
7356
+ }
7357
+ if (level === 5) {
7358
+ return pick3(
7359
+ sex,
7360
+ "trastatarabuelo",
7361
+ "trastatarabuela",
7362
+ "trastatarabuelo/trastatarabuela"
7363
+ );
7364
+ }
7365
+ return pick3(
7366
+ sex,
7367
+ `abuelo (${level}.\xBA)`,
7368
+ `abuela (${level}.\xAA)`,
7369
+ `abuelo/abuela (${level}.\xBA)`
7370
+ );
7147
7371
  }
7148
7372
  child() {
7149
- const prefix = this.directPrefix();
7150
- if (this.personN?.isMale()) {
7151
- return `${prefix}hijo`;
7373
+ const level = Math.abs(this.pathN?.level ?? 0);
7374
+ const sex = sexOf3(this.personN);
7375
+ if (level <= 1) {
7376
+ return pick3(sex, "hijo", "hija", "hijo/hija");
7152
7377
  }
7153
- if (this.personN?.isFemale()) {
7154
- return `${prefix}hija`;
7378
+ if (level === 2) {
7379
+ return pick3(sex, "nieto", "nieta", "nieto/nieta");
7155
7380
  }
7156
- return `${prefix}hijo/hija`;
7157
- }
7158
- sibling() {
7159
- if (this.personN?.isMale()) {
7160
- return "hermano";
7381
+ if (level === 3) {
7382
+ return pick3(sex, "bisnieto", "bisnieta", "bisnieto/bisnieta");
7161
7383
  }
7162
- if (this.personN?.isFemale()) {
7163
- return "hermana";
7384
+ if (level === 4) {
7385
+ return pick3(
7386
+ sex,
7387
+ "tataranieto",
7388
+ "tataranieta",
7389
+ "tataranieto/tataranieta"
7390
+ );
7391
+ }
7392
+ if (level === 5) {
7393
+ return pick3(
7394
+ sex,
7395
+ "trastataranieto",
7396
+ "trastataranieta",
7397
+ "trastataranieto/trastataranieta"
7398
+ );
7164
7399
  }
7165
- return "hermano/hermana";
7400
+ return pick3(
7401
+ sex,
7402
+ `nieto (${level}.\xBA)`,
7403
+ `nieta (${level}.\xAA)`,
7404
+ `nieto/nieta (${level}.\xBA)`
7405
+ );
7406
+ }
7407
+ sibling() {
7408
+ return pick3(sexOf3(this.personN), "hermano", "hermana", "hermano/hermana");
7166
7409
  }
7167
7410
  halfBlood(relation) {
7168
7411
  if (!relation || !this.isHalfBlood) {
@@ -7177,40 +7420,30 @@ var KinshipTranslatorEs = class extends KinshipTranslatorBasic {
7177
7420
  return `medio/a ${relation}`;
7178
7421
  }
7179
7422
  spouse() {
7180
- if (this.personN?.isMale()) {
7181
- return "esposo";
7182
- }
7183
- if (this.personN?.isFemale()) {
7184
- return "esposa";
7185
- }
7186
- return "c\xF3nyuge";
7423
+ return pick3(sexOf3(this.personN), "esposo", "esposa", "c\xF3nyuge");
7187
7424
  }
7188
7425
  ofSpouse(relation) {
7189
7426
  if (!relation) {
7190
7427
  return "";
7191
7428
  }
7192
- const spouse = this.path?.[1].indi;
7193
- let spouseType = "c\xF3nyuge";
7194
- if (spouse?.isMale()) {
7195
- spouseType = "esposo";
7196
- }
7197
- if (spouse?.isFemale()) {
7198
- spouseType = "esposa";
7199
- }
7200
- return `${relation} del ${spouseType}`;
7429
+ const spouseType = pick3(
7430
+ sexOf3(this.path?.[1].indi),
7431
+ "esposo",
7432
+ "esposa",
7433
+ "c\xF3nyuge"
7434
+ );
7435
+ return `${relation} ${ofSpousePrep2(spouseType)}${spouseType}`;
7201
7436
  }
7202
7437
  spouseOf(relation) {
7203
7438
  if (!relation) {
7204
7439
  return "";
7205
7440
  }
7206
- const spouse = this.path?.[this.path.length - 1].indi;
7207
- let spouseType = "c\xF3nyuge";
7208
- if (spouse?.isMale()) {
7209
- spouseType = "esposo";
7210
- }
7211
- if (spouse?.isFemale()) {
7212
- spouseType = "esposa";
7213
- }
7441
+ const spouseType = pick3(
7442
+ sexOf3(this.path?.[this.path.length - 1].indi),
7443
+ "esposo",
7444
+ "esposa",
7445
+ "c\xF3nyuge"
7446
+ );
7214
7447
  return `${spouseType} de ${relation}`;
7215
7448
  }
7216
7449
  of(relation) {
@@ -7228,8 +7461,8 @@ var KinshipTranslatorEs = class extends KinshipTranslatorBasic {
7228
7461
  if (!name || !relation) {
7229
7462
  return relation ?? "";
7230
7463
  }
7231
- if (relation.includes(" del ") || relation.includes(" de ")) {
7232
- return relation.replace(/ (del|de) /, ` $1 ${name} `);
7464
+ if (relation.includes(" del ") || relation.includes(" de la ") || relation.includes(" de ")) {
7465
+ return relation.replace(/ (del|de la|de) /, ` $1 ${name} `);
7233
7466
  }
7234
7467
  return `${relation} de ${name}`;
7235
7468
  }
@@ -7259,7 +7492,20 @@ var KinshipTranslatorEs = class extends KinshipTranslatorBasic {
7259
7492
  if (!relation || !this.pathN?.relation) {
7260
7493
  return relation ?? "";
7261
7494
  }
7262
- return `${this.pathN.relation} ${relation}`;
7495
+ const mapped = parentRelationsEs[this.pathN.relation]?.[relation];
7496
+ if (mapped) {
7497
+ return mapped;
7498
+ }
7499
+ if (this.pathN.relation === "step") {
7500
+ return `${relation} pol\xEDtico`;
7501
+ }
7502
+ if (this.pathN.relation === "adopted") {
7503
+ return `${relation} adoptivo`;
7504
+ }
7505
+ if (this.pathN.relation === "foster") {
7506
+ return `${relation} de acogida`;
7507
+ }
7508
+ return relation;
7263
7509
  }
7264
7510
  };
7265
7511
 
@@ -7268,15 +7514,35 @@ var InLawsRu = {
7268
7514
  "\u0441\u0443\u043F\u0440\u0443\u0433(?:\u0430)? (\u0440\u0435\u0431\u0451\u043D\u043A\u0430|\u0434\u043E\u0447\u0435\u0440\u0438|\u0441\u044B\u043D\u0430)": "\u0437\u044F\u0442\u044C/\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
7269
7515
  "\u0436\u0435\u043D\u0430 (\u0440\u0435\u0431\u0451\u043D\u043A\u0430|\u0434\u043E\u0447\u0435\u0440\u0438|\u0441\u044B\u043D\u0430)": "\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
7270
7516
  "\u043C\u0443\u0436 (\u0440\u0435\u0431\u0451\u043D\u043A\u0430|\u0434\u043E\u0447\u0435\u0440\u0438|\u0441\u044B\u043D\u0430)": "\u0437\u044F\u0442\u044C",
7271
- "\u043C\u0430\u0442\u044C (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0442\u0451\u0449\u0430",
7272
- "\u043E\u0442\u0435\u0446 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0442\u0435\u0441\u0442\u044C",
7273
- "\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0442\u0435\u0441\u0442\u044C/\u0442\u0451\u0449\u0430",
7517
+ "\u043C\u0430\u0442\u044C \u0436\u0435\u043D\u044B": "\u0442\u0451\u0449\u0430",
7518
+ "\u043C\u0430\u0442\u044C \u043C\u0443\u0436\u0430": "\u0441\u0432\u0435\u043A\u0440\u043E\u0432\u044C",
7519
+ "\u043C\u0430\u0442\u044C \u0441\u0443\u043F\u0440\u0443\u0433\u0430": "\u0442\u0451\u0449\u0430/\u0441\u0432\u0435\u043A\u0440\u043E\u0432\u044C",
7520
+ "\u043E\u0442\u0435\u0446 \u0436\u0435\u043D\u044B": "\u0442\u0435\u0441\u0442\u044C",
7521
+ "\u043E\u0442\u0435\u0446 \u043C\u0443\u0436\u0430": "\u0441\u0432\u0451\u043A\u043E\u0440",
7522
+ "\u043E\u0442\u0435\u0446 \u0441\u0443\u043F\u0440\u0443\u0433\u0430": "\u0442\u0435\u0441\u0442\u044C/\u0441\u0432\u0451\u043A\u043E\u0440",
7523
+ "\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C \u0436\u0435\u043D\u044B": "\u0442\u0435\u0441\u0442\u044C/\u0442\u0451\u0449\u0430",
7524
+ "\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C \u043C\u0443\u0436\u0430": "\u0441\u0432\u0451\u043A\u043E\u0440/\u0441\u0432\u0435\u043A\u0440\u043E\u0432\u044C",
7525
+ "\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C \u0441\u0443\u043F\u0440\u0443\u0433\u0430": "\u0442\u0435\u0441\u0442\u044C/\u0442\u0451\u0449\u0430",
7274
7526
  "\u0436\u0435\u043D\u0430 (\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?(\u0431\u0440\u0430\u0442\u0430|\u0441\u0435\u0441\u0442\u0440\u044B|\u0441\u0438\u0431\u043B\u0438\u043D\u0433\u0430)": "\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
7275
7527
  "\u043C\u0443\u0436 (\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?(\u0431\u0440\u0430\u0442\u0430|\u0441\u0435\u0441\u0442\u0440\u044B|\u0441\u0438\u0431\u043B\u0438\u043D\u0433\u0430)": "\u0437\u044F\u0442\u044C",
7276
7528
  "\u0441\u0443\u043F\u0440\u0443\u0433(?:\u0430)? (\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?(\u0431\u0440\u0430\u0442\u0430|\u0441\u0435\u0441\u0442\u0440\u044B|\u0441\u0438\u0431\u043B\u0438\u043D\u0433\u0430)": "\u0437\u044F\u0442\u044C/\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
7277
- "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0435\u0441\u0442\u0440\u0430 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0437\u043E\u043B\u043E\u0432\u043A\u0430",
7278
- "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0431\u0440\u0430\u0442 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0448\u0443\u0440\u0438\u043D",
7279
- "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0438\u0431\u043B\u0438\u043D\u0433 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0448\u0443\u0440\u0438\u043D/\u0437\u043E\u043B\u043E\u0432\u043A\u0430"
7529
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0435\u0441\u0442\u0440\u0430 \u0436\u0435\u043D\u044B": "\u0441\u0432\u043E\u044F\u0447\u0435\u043D\u0438\u0446\u0430",
7530
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0435\u0441\u0442\u0440\u0430 \u043C\u0443\u0436\u0430": "\u0437\u043E\u043B\u043E\u0432\u043A\u0430",
7531
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0435\u0441\u0442\u0440\u0430 \u0441\u0443\u043F\u0440\u0443\u0433\u0430": "\u0441\u0432\u043E\u044F\u0447\u0435\u043D\u0438\u0446\u0430/\u0437\u043E\u043B\u043E\u0432\u043A\u0430",
7532
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0431\u0440\u0430\u0442 \u0436\u0435\u043D\u044B": "\u0448\u0443\u0440\u0438\u043D",
7533
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0431\u0440\u0430\u0442 \u043C\u0443\u0436\u0430": "\u0434\u0435\u0432\u0435\u0440\u044C",
7534
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0431\u0440\u0430\u0442 \u0441\u0443\u043F\u0440\u0443\u0433\u0430": "\u0448\u0443\u0440\u0438\u043D/\u0434\u0435\u0432\u0435\u0440\u044C",
7535
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0438\u0431\u043B\u0438\u043D\u0433 \u0436\u0435\u043D\u044B": "\u0448\u0443\u0440\u0438\u043D/\u0441\u0432\u043E\u044F\u0447\u0435\u043D\u0438\u0446\u0430",
7536
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0438\u0431\u043B\u0438\u043D\u0433 \u043C\u0443\u0436\u0430": "\u0434\u0435\u0432\u0435\u0440\u044C/\u0437\u043E\u043B\u043E\u0432\u043A\u0430",
7537
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0438\u0431\u043B\u0438\u043D\u0433 \u0441\u0443\u043F\u0440\u0443\u0433\u0430": "\u0448\u0443\u0440\u0438\u043D/\u0437\u043E\u043B\u043E\u0432\u043A\u0430"
7538
+ };
7539
+ var parentRelationsRu = {
7540
+ step: {
7541
+ \u043E\u0442\u0435\u0446: "\u043E\u0442\u0447\u0438\u043C",
7542
+ \u043C\u0430\u0442\u044C: "\u043C\u0430\u0447\u0435\u0445\u0430",
7543
+ \u0441\u044B\u043D: "\u043F\u0430\u0441\u044B\u043D\u043E\u043A",
7544
+ \u0434\u043E\u0447\u044C: "\u043F\u0430\u0434\u0447\u0435\u0440\u0438\u0446\u0430"
7545
+ }
7280
7546
  };
7281
7547
 
7282
7548
  // src/kinship-translator/kinship-translator.ru.ts
@@ -7307,7 +7573,7 @@ var cousinWord = (degree, sex) => {
7307
7573
  return `${stem}\u044B\u0439 \u0431\u0440\u0430\u0442/\u0441\u0435\u0441\u0442\u0440\u0430`;
7308
7574
  };
7309
7575
  var praRepeat = (count) => count > 0 ? "\u043F\u0440\u0430".repeat(count) : "";
7310
- var sexOf = (person) => {
7576
+ var sexOf4 = (person) => {
7311
7577
  if (person?.isMale?.()) {
7312
7578
  return "m";
7313
7579
  }
@@ -7322,7 +7588,7 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7322
7588
  if (degree > 0) {
7323
7589
  degree = degree - 1;
7324
7590
  }
7325
- return cousinWord(degree, sexOf(this.personN));
7591
+ return cousinWord(degree, sexOf4(this.personN));
7326
7592
  }
7327
7593
  removal() {
7328
7594
  const level = this.pathN?.level ?? 0;
@@ -7334,35 +7600,53 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7334
7600
  return level < 0 ? this.nibling() : this.auncle();
7335
7601
  }
7336
7602
  const removed = Math.abs(level);
7337
- return `${cousinWord(degree, sexOf(this.personN))} (${removed}\xD7 \u0447\u0435\u0440\u0435\u0437 \u043F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0435)`;
7603
+ return `${cousinWord(degree, sexOf4(this.personN))} (${removed}\xD7 \u0447\u0435\u0440\u0435\u0437 \u043F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0435)`;
7338
7604
  }
7339
7605
  auncle() {
7340
7606
  const level = Math.abs(this.pathN?.level ?? 0);
7341
- const pra = praRepeat(Math.max(0, level - 2));
7342
- const sex = sexOf(this.personN);
7607
+ const sex = sexOf4(this.personN);
7608
+ if (level <= 1) {
7609
+ if (sex === "m") {
7610
+ return "\u0434\u044F\u0434\u044F";
7611
+ }
7612
+ if (sex === "f") {
7613
+ return "\u0442\u0451\u0442\u044F";
7614
+ }
7615
+ return "\u0434\u044F\u0434\u044F/\u0442\u0451\u0442\u044F";
7616
+ }
7617
+ const pra = praRepeat(level - 2);
7343
7618
  if (sex === "m") {
7344
- return `${pra}\u0434\u044F\u0434\u044F`;
7619
+ return `\u0434\u0432\u043E\u044E\u0440\u043E\u0434\u043D\u044B\u0439 ${pra}\u0434\u0435\u0434`;
7345
7620
  }
7346
7621
  if (sex === "f") {
7347
- return `${pra}\u0442\u0451\u0442\u044F`;
7622
+ return `\u0434\u0432\u043E\u044E\u0440\u043E\u0434\u043D\u0430\u044F ${pra}\u0431\u0430\u0431\u0443\u0448\u043A\u0430`;
7348
7623
  }
7349
- return `${pra}\u0434\u044F\u0434\u044F/\u0442\u0451\u0442\u044F`;
7624
+ return `\u0434\u0432\u043E\u044E\u0440\u043E\u0434\u043D\u044B\u0439 ${pra}\u0434\u0435\u0434/\u0431\u0430\u0431\u0443\u0448\u043A\u0430`;
7350
7625
  }
7351
7626
  nibling() {
7352
7627
  const level = Math.abs(this.pathN?.level ?? 0);
7353
- const pra = praRepeat(Math.max(0, level - 2));
7354
- const sex = sexOf(this.personN);
7628
+ const sex = sexOf4(this.personN);
7629
+ if (level <= 1) {
7630
+ if (sex === "m") {
7631
+ return "\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A";
7632
+ }
7633
+ if (sex === "f") {
7634
+ return "\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430";
7635
+ }
7636
+ return "\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A/\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430";
7637
+ }
7638
+ const pra = praRepeat(level - 2);
7355
7639
  if (sex === "m") {
7356
- return `${pra}\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A`;
7640
+ return `${pra}\u0432\u043D\u0443\u0447\u0430\u0442\u044B\u0439 \u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A`;
7357
7641
  }
7358
7642
  if (sex === "f") {
7359
- return `${pra}\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430`;
7643
+ return `${pra}\u0432\u043D\u0443\u0447\u0430\u0442\u0430\u044F \u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430`;
7360
7644
  }
7361
- return `${pra}\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A/\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430`;
7645
+ return `${pra}\u0432\u043D\u0443\u0447\u0430\u0442\u044B\u0439 \u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A/\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430`;
7362
7646
  }
7363
7647
  parent() {
7364
7648
  const level = Math.abs(this.pathN?.level ?? 0);
7365
- const sex = sexOf(this.personN);
7649
+ const sex = sexOf4(this.personN);
7366
7650
  if (level <= 1) {
7367
7651
  if (sex === "m") {
7368
7652
  return "\u043E\u0442\u0435\u0446";
@@ -7392,7 +7676,7 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7392
7676
  }
7393
7677
  child() {
7394
7678
  const level = Math.abs(this.pathN?.level ?? 0);
7395
- const sex = sexOf(this.personN);
7679
+ const sex = sexOf4(this.personN);
7396
7680
  if (level <= 1) {
7397
7681
  if (sex === "m") {
7398
7682
  return "\u0441\u044B\u043D";
@@ -7421,14 +7705,14 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7421
7705
  return `${pra}\u0432\u043D\u0443\u043A/\u0432\u043D\u0443\u0447\u043A\u0430`;
7422
7706
  }
7423
7707
  sibling() {
7424
- const sex = sexOf(this.personN);
7708
+ const sex = sexOf4(this.personN);
7425
7709
  if (sex === "m") {
7426
7710
  return "\u0431\u0440\u0430\u0442";
7427
7711
  }
7428
7712
  if (sex === "f") {
7429
7713
  return "\u0441\u0435\u0441\u0442\u0440\u0430";
7430
7714
  }
7431
- return "\u0441\u0438\u0431\u043B\u0438\u043D\u0433";
7715
+ return "\u0431\u0440\u0430\u0442/\u0441\u0435\u0441\u0442\u0440\u0430";
7432
7716
  }
7433
7717
  halfBlood(relation) {
7434
7718
  if (!relation || !this.isHalfBlood) {
@@ -7442,7 +7726,7 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7442
7726
  return `\u0441\u0432\u043E\u0434\u043D\u044B\u0439 ${relation}`;
7443
7727
  }
7444
7728
  spouse() {
7445
- const sex = sexOf(this.personN);
7729
+ const sex = sexOf4(this.personN);
7446
7730
  if (sex === "m") {
7447
7731
  return "\u043C\u0443\u0436";
7448
7732
  }
@@ -7456,7 +7740,7 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7456
7740
  return "";
7457
7741
  }
7458
7742
  const spouse = this.path?.[1].indi;
7459
- const sex = sexOf(spouse);
7743
+ const sex = sexOf4(spouse);
7460
7744
  const spouseType = sex === "m" ? "\u043C\u0443\u0436" : sex === "f" ? "\u0436\u0435\u043D\u0430" : "\u0441\u0443\u043F\u0440\u0443\u0433";
7461
7745
  return `${relation} ${toGenitive(spouseType)}`;
7462
7746
  }
@@ -7465,7 +7749,7 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7465
7749
  return "";
7466
7750
  }
7467
7751
  const spouse = this.path?.[this.path.length - 1].indi;
7468
- const sex = sexOf(spouse);
7752
+ const sex = sexOf4(spouse);
7469
7753
  const spouseType = sex === "m" ? "\u043C\u0443\u0436" : sex === "f" ? "\u0436\u0435\u043D\u0430" : "\u0441\u0443\u043F\u0440\u0443\u0433";
7470
7754
  return `${spouseType} ${toGenitive(relation)}`;
7471
7755
  }
@@ -7502,7 +7786,22 @@ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
7502
7786
  if (!relation || !this.pathN?.relation) {
7503
7787
  return relation ?? "";
7504
7788
  }
7505
- return `${this.pathN.relation} ${relation}`;
7789
+ const mapped = parentRelationsRu[this.pathN.relation]?.[relation];
7790
+ if (mapped) {
7791
+ return mapped;
7792
+ }
7793
+ if (this.pathN.relation === "step") {
7794
+ return `\u043D\u0435\u0440\u043E\u0434\u043D\u043E\u0439 ${relation}`;
7795
+ }
7796
+ if (this.pathN.relation === "adopted") {
7797
+ return /сестра|дочь|мать|тётя|бабушка|жена|племянница|внучка/.test(
7798
+ relation
7799
+ ) ? `\u043F\u0440\u0438\u0451\u043C\u043D\u0430\u044F ${relation}` : `\u043F\u0440\u0438\u0451\u043C\u043D\u044B\u0439 ${relation}`;
7800
+ }
7801
+ if (this.pathN.relation === "foster") {
7802
+ return `\u043F\u0440\u0438\u0451\u043C\u043D\u044B\u0439 ${relation}`;
7803
+ }
7804
+ return relation;
7506
7805
  }
7507
7806
  };
7508
7807
 
@@ -7526,7 +7825,7 @@ var InLawsJa = {
7526
7825
  };
7527
7826
 
7528
7827
  // src/kinship-translator/kinship-translator.ja.ts
7529
- var sexOf2 = (person) => {
7828
+ var sexOf5 = (person) => {
7530
7829
  if (person?.isMale?.()) {
7531
7830
  return "m";
7532
7831
  }
@@ -7535,7 +7834,7 @@ var sexOf2 = (person) => {
7535
7834
  }
7536
7835
  return "n";
7537
7836
  };
7538
- var pick = (sex, male, female, neutral) => {
7837
+ var pick4 = (sex, male, female, neutral) => {
7539
7838
  if (sex === "m") {
7540
7839
  return male;
7541
7840
  }
@@ -7548,18 +7847,18 @@ var lineal = (level, sex, kind) => {
7548
7847
  const L = Math.max(1, level);
7549
7848
  if (kind === "asc") {
7550
7849
  if (L <= 1) {
7551
- return pick(sex, "\u7236", "\u6BCD", "\u89AA");
7850
+ return pick4(sex, "\u7236", "\u6BCD", "\u89AA");
7552
7851
  }
7553
7852
  if (L === 2) {
7554
- return pick(sex, "\u7956\u7236", "\u7956\u6BCD", "\u7956\u7236\u6BCD");
7853
+ return pick4(sex, "\u7956\u7236", "\u7956\u6BCD", "\u7956\u7236\u6BCD");
7555
7854
  }
7556
7855
  if (L === 3) {
7557
- return pick(sex, "\u66FE\u7956\u7236", "\u66FE\u7956\u6BCD", "\u66FE\u7956\u7236\u6BCD");
7856
+ return pick4(sex, "\u66FE\u7956\u7236", "\u66FE\u7956\u6BCD", "\u66FE\u7956\u7236\u6BCD");
7558
7857
  }
7559
7858
  if (L === 4) {
7560
- return pick(sex, "\u9AD8\u7956\u7236", "\u9AD8\u7956\u6BCD", "\u9AD8\u7956\u7236\u6BCD");
7859
+ return pick4(sex, "\u9AD8\u7956\u7236", "\u9AD8\u7956\u6BCD", "\u9AD8\u7956\u7236\u6BCD");
7561
7860
  }
7562
- return pick(
7861
+ return pick4(
7563
7862
  sex,
7564
7863
  `${L - 1}\u4E16\u306E\u7956\u7236`,
7565
7864
  `${L - 1}\u4E16\u306E\u7956\u6BCD`,
@@ -7567,7 +7866,7 @@ var lineal = (level, sex, kind) => {
7567
7866
  );
7568
7867
  }
7569
7868
  if (L <= 1) {
7570
- return pick(sex, "\u606F\u5B50", "\u5A18", "\u5B50");
7869
+ return pick4(sex, "\u606F\u5B50", "\u5A18", "\u5B50");
7571
7870
  }
7572
7871
  if (L === 2) {
7573
7872
  return "\u5B6B";
@@ -7614,52 +7913,52 @@ var KinshipTranslatorJa = class extends KinshipTranslatorBasic {
7614
7913
  }
7615
7914
  auncle() {
7616
7915
  const level = Math.abs(this.pathN?.level ?? 0);
7617
- const sex = sexOf2(this.personN);
7618
- if (level <= 2) {
7619
- return pick(sex, "\u304A\u3058", "\u304A\u3070", "\u304A\u3058/\u304A\u3070");
7916
+ const sex = sexOf5(this.personN);
7917
+ if (level <= 1) {
7918
+ return pick4(sex, "\u304A\u3058", "\u304A\u3070", "\u304A\u3058/\u304A\u3070");
7620
7919
  }
7621
- if (level === 3) {
7622
- return pick(sex, "\u5927\u304A\u3058", "\u5927\u304A\u3070", "\u5927\u304A\u3058/\u5927\u304A\u3070");
7920
+ if (level === 2) {
7921
+ return pick4(sex, "\u5927\u304A\u3058", "\u5927\u304A\u3070", "\u5927\u304A\u3058/\u5927\u304A\u3070");
7623
7922
  }
7624
- return pick(
7923
+ return pick4(
7625
7924
  sex,
7626
- `${level - 2}\u4EE3\u524D\u306E\u304A\u3058`,
7627
- `${level - 2}\u4EE3\u524D\u306E\u304A\u3070`,
7628
- `${level - 2}\u4EE3\u524D\u306E\u304A\u3058/\u304A\u3070`
7925
+ `${level - 1}\u4EE3\u524D\u306E\u304A\u3058`,
7926
+ `${level - 1}\u4EE3\u524D\u306E\u304A\u3070`,
7927
+ `${level - 1}\u4EE3\u524D\u306E\u304A\u3058/\u304A\u3070`
7629
7928
  );
7630
7929
  }
7631
7930
  nibling() {
7632
7931
  const level = Math.abs(this.pathN?.level ?? 0);
7633
- const sex = sexOf2(this.personN);
7634
- if (level <= 2) {
7635
- return pick(sex, "\u7525", "\u59EA", "\u7525/\u59EA");
7932
+ const sex = sexOf5(this.personN);
7933
+ if (level <= 1) {
7934
+ return pick4(sex, "\u7525", "\u59EA", "\u7525/\u59EA");
7636
7935
  }
7637
- if (level === 3) {
7638
- return pick(sex, "\u5927\u7525", "\u5927\u59EA", "\u5927\u7525/\u5927\u59EA");
7936
+ if (level === 2) {
7937
+ return pick4(sex, "\u5927\u7525", "\u5927\u59EA", "\u5927\u7525/\u5927\u59EA");
7639
7938
  }
7640
- return pick(
7939
+ return pick4(
7641
7940
  sex,
7642
- `${level - 2}\u4EE3\u4E0B\u306E\u7525`,
7643
- `${level - 2}\u4EE3\u4E0B\u306E\u59EA`,
7644
- `${level - 2}\u4EE3\u4E0B\u306E\u7525/\u59EA`
7941
+ `${level - 1}\u4EE3\u4E0B\u306E\u7525`,
7942
+ `${level - 1}\u4EE3\u4E0B\u306E\u59EA`,
7943
+ `${level - 1}\u4EE3\u4E0B\u306E\u7525/\u59EA`
7645
7944
  );
7646
7945
  }
7647
7946
  parent() {
7648
7947
  return lineal(
7649
7948
  Math.abs(this.pathN?.level ?? 0),
7650
- sexOf2(this.personN),
7949
+ sexOf5(this.personN),
7651
7950
  "asc"
7652
7951
  );
7653
7952
  }
7654
7953
  child() {
7655
7954
  return lineal(
7656
7955
  Math.abs(this.pathN?.level ?? 0),
7657
- sexOf2(this.personN),
7956
+ sexOf5(this.personN),
7658
7957
  "desc"
7659
7958
  );
7660
7959
  }
7661
7960
  sibling() {
7662
- return pick(sexOf2(this.personN), "\u5144\u5F1F", "\u59C9\u59B9", "\u5144\u5F1F\u59C9\u59B9");
7961
+ return pick4(sexOf5(this.personN), "\u5144\u5F1F", "\u59C9\u59B9", "\u5144\u5F1F\u59C9\u59B9");
7663
7962
  }
7664
7963
  halfBlood(relation) {
7665
7964
  if (!relation || !this.isHalfBlood) {
@@ -7668,14 +7967,14 @@ var KinshipTranslatorJa = class extends KinshipTranslatorBasic {
7668
7967
  return `\u7570\u7236\u6BCD\u306E${relation}`;
7669
7968
  }
7670
7969
  spouse() {
7671
- return pick(sexOf2(this.personN), "\u592B", "\u59BB", "\u914D\u5076\u8005");
7970
+ return pick4(sexOf5(this.personN), "\u592B", "\u59BB", "\u914D\u5076\u8005");
7672
7971
  }
7673
7972
  ofSpouse(relation) {
7674
7973
  if (!relation) {
7675
7974
  return "";
7676
7975
  }
7677
- const spouseType = pick(
7678
- sexOf2(this.path?.[1].indi),
7976
+ const spouseType = pick4(
7977
+ sexOf5(this.path?.[1].indi),
7679
7978
  "\u592B",
7680
7979
  "\u59BB",
7681
7980
  "\u914D\u5076\u8005"
@@ -7687,7 +7986,7 @@ var KinshipTranslatorJa = class extends KinshipTranslatorBasic {
7687
7986
  return "";
7688
7987
  }
7689
7988
  const spouse = this.path?.[this.path.length - 1].indi;
7690
- const spouseType = pick(sexOf2(spouse), "\u592B", "\u59BB", "\u914D\u5076\u8005");
7989
+ const spouseType = pick4(sexOf5(spouse), "\u592B", "\u59BB", "\u914D\u5076\u8005");
7691
7990
  return `${relation}\u306E${spouseType}`;
7692
7991
  }
7693
7992
  of(relation) {
@@ -7723,7 +8022,28 @@ var KinshipTranslatorJa = class extends KinshipTranslatorBasic {
7723
8022
  if (!relation || !this.pathN?.relation) {
7724
8023
  return relation ?? "";
7725
8024
  }
7726
- return `${this.pathN.relation}\u306E${relation}`;
8025
+ if (this.pathN.relation === "step") {
8026
+ if (relation === "\u7236") {
8027
+ return "\u7EE7\u7236";
8028
+ }
8029
+ if (relation === "\u6BCD") {
8030
+ return "\u7D99\u6BCD";
8031
+ }
8032
+ if (relation === "\u606F\u5B50") {
8033
+ return "\u7D99\u5B50";
8034
+ }
8035
+ if (relation === "\u5A18") {
8036
+ return "\u7D99\u5A18";
8037
+ }
8038
+ return `\u7D99${relation}`;
8039
+ }
8040
+ if (this.pathN.relation === "adopted") {
8041
+ return `\u990A\u5B50\u306E${relation}`;
8042
+ }
8043
+ if (this.pathN.relation === "foster") {
8044
+ return `\u91CC\u89AA\u306E${relation}`;
8045
+ }
8046
+ return relation;
7727
8047
  }
7728
8048
  };
7729
8049
 
@@ -7732,22 +8052,32 @@ var InLawsZh = {
7732
8052
  "(\u5B50\u5973|\u5973\u513F|\u513F\u5B50)\u7684\u914D\u5076": "\u513F\u5AB3/\u5973\u5A7F",
7733
8053
  "(\u5B50\u5973|\u5973\u513F|\u513F\u5B50)\u7684\u59BB\u5B50": "\u513F\u5AB3",
7734
8054
  "(\u5B50\u5973|\u5973\u513F|\u513F\u5B50)\u7684\u4E08\u592B": "\u5973\u5A7F",
7735
- "(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)\u7684\u6BCD\u4EB2": "\u5CB3\u6BCD/\u5A46\u5A46",
7736
- "(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)\u7684\u7236\u4EB2": "\u5CB3\u7236/\u516C\u516C",
7737
- "(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)\u7684\u7236\u6BCD": "\u5CB3\u7236\u5CB3\u6BCD/\u516C\u516C\u5A46\u5A46",
8055
+ "\u59BB\u5B50\u7684\u6BCD\u4EB2": "\u5CB3\u6BCD",
8056
+ "\u4E08\u592B\u7684\u6BCD\u4EB2": "\u5A46\u5A46",
8057
+ "(\u914D\u5076)\u7684\u6BCD\u4EB2": "\u5CB3\u6BCD/\u5A46\u5A46",
8058
+ "\u59BB\u5B50\u7684\u7236\u4EB2": "\u5CB3\u7236",
8059
+ "\u4E08\u592B\u7684\u7236\u4EB2": "\u516C\u516C",
8060
+ "(\u914D\u5076)\u7684\u7236\u4EB2": "\u5CB3\u7236/\u516C\u516C",
8061
+ "\u59BB\u5B50\u7684\u7236\u6BCD": "\u5CB3\u7236\u5CB3\u6BCD",
8062
+ "\u4E08\u592B\u7684\u7236\u6BCD": "\u516C\u516C\u5A46\u5A46",
8063
+ "(\u914D\u5076)\u7684\u7236\u6BCD": "\u5CB3\u7236\u5CB3\u6BCD/\u516C\u516C\u5A46\u5A46",
7738
8064
  "(\u5F02\u7236\u6BCD\u7684)?(\u5144\u5F1F\u59D0\u59B9|\u59D0\u59B9|\u5144\u5F1F)\u7684\u59BB\u5B50": "\u5AC2\u5B50/\u5F1F\u59B9",
7739
8065
  "(\u5F02\u7236\u6BCD\u7684)?(\u5144\u5F1F\u59D0\u59B9|\u59D0\u59B9|\u5144\u5F1F)\u7684\u4E08\u592B": "\u59D0\u592B/\u59B9\u592B",
7740
8066
  "(\u5F02\u7236\u6BCD\u7684)?(\u5144\u5F1F\u59D0\u59B9|\u59D0\u59B9|\u5144\u5F1F)\u7684\u914D\u5076": "\u59FB\u4EB2\u5144\u5F1F\u59D0\u59B9",
7741
8067
  "(\u5F02\u7236\u6BCD\u7684)?\u59D0\u59B9\u7684(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)": "\u59D0\u592B/\u59B9\u592B",
7742
8068
  "(\u5F02\u7236\u6BCD\u7684)?\u5144\u5F1F\u7684(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)": "\u5AC2\u5B50/\u5F1F\u59B9",
7743
8069
  "(\u5F02\u7236\u6BCD\u7684)?\u5144\u5F1F\u59D0\u59B9\u7684(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)": "\u59FB\u4EB2\u5144\u5F1F\u59D0\u59B9",
7744
- "(\u5F02\u7236\u6BCD\u7684)?(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)\u7684\u59D0\u59B9": "\u59D1\u5B50/\u59E8\u5B50",
7745
- "(\u5F02\u7236\u6BCD\u7684)?(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)\u7684\u5144\u5F1F": "\u5927\u4F2F/\u5C0F\u53D4/\u5185\u5144/\u5185\u5F1F",
8070
+ "(\u5F02\u7236\u6BCD\u7684)?\u59BB\u5B50\u7684\u59D0\u59B9": "\u59E8\u5B50",
8071
+ "(\u5F02\u7236\u6BCD\u7684)?\u4E08\u592B\u7684\u59D0\u59B9": "\u59D1\u5B50",
8072
+ "(\u5F02\u7236\u6BCD\u7684)?(\u914D\u5076)\u7684\u59D0\u59B9": "\u59D1\u5B50/\u59E8\u5B50",
8073
+ "(\u5F02\u7236\u6BCD\u7684)?\u59BB\u5B50\u7684\u5144\u5F1F": "\u5185\u5144/\u5185\u5F1F",
8074
+ "(\u5F02\u7236\u6BCD\u7684)?\u4E08\u592B\u7684\u5144\u5F1F": "\u5927\u4F2F/\u5C0F\u53D4",
8075
+ "(\u5F02\u7236\u6BCD\u7684)?(\u914D\u5076)\u7684\u5144\u5F1F": "\u5927\u4F2F/\u5C0F\u53D4/\u5185\u5144/\u5185\u5F1F",
7746
8076
  "(\u5F02\u7236\u6BCD\u7684)?(\u914D\u5076|\u59BB\u5B50|\u4E08\u592B)\u7684\u5144\u5F1F\u59D0\u59B9": "\u59FB\u4EB2\u5144\u5F1F\u59D0\u59B9"
7747
8077
  };
7748
8078
 
7749
8079
  // src/kinship-translator/kinship-translator.zh.ts
7750
- var sexOf3 = (person) => {
8080
+ var sexOf6 = (person) => {
7751
8081
  if (person?.isMale?.()) {
7752
8082
  return "m";
7753
8083
  }
@@ -7756,7 +8086,7 @@ var sexOf3 = (person) => {
7756
8086
  }
7757
8087
  return "n";
7758
8088
  };
7759
- var pick2 = (sex, male, female, neutral) => {
8089
+ var pick5 = (sex, male, female, neutral) => {
7760
8090
  if (sex === "m") {
7761
8091
  return male;
7762
8092
  }
@@ -7769,41 +8099,41 @@ var lineal2 = (level, sex, kind) => {
7769
8099
  const L = Math.max(1, level);
7770
8100
  if (kind === "asc") {
7771
8101
  if (L <= 1) {
7772
- return pick2(sex, "\u7236\u4EB2", "\u6BCD\u4EB2", "\u7236\u6BCD");
8102
+ return pick5(sex, "\u7236\u4EB2", "\u6BCD\u4EB2", "\u7236\u6BCD");
7773
8103
  }
7774
8104
  if (L === 2) {
7775
- return pick2(sex, "\u7956\u7236", "\u7956\u6BCD", "\u7956\u7236\u6BCD");
8105
+ return pick5(sex, "\u7956\u7236", "\u7956\u6BCD", "\u7956\u7236\u6BCD");
7776
8106
  }
7777
8107
  if (L === 3) {
7778
- return pick2(sex, "\u66FE\u7956\u7236", "\u66FE\u7956\u6BCD", "\u66FE\u7956\u7236\u6BCD");
8108
+ return pick5(sex, "\u66FE\u7956\u7236", "\u66FE\u7956\u6BCD", "\u66FE\u7956\u7236\u6BCD");
7779
8109
  }
7780
8110
  if (L === 4) {
7781
- return pick2(sex, "\u9AD8\u7956\u7236", "\u9AD8\u7956\u6BCD", "\u9AD8\u7956\u7236\u6BCD");
8111
+ return pick5(sex, "\u9AD8\u7956\u7236", "\u9AD8\u7956\u6BCD", "\u9AD8\u7956\u7236\u6BCD");
7782
8112
  }
7783
- return pick2(sex, `${L}\u4E16\u7956`, `${L}\u4E16\u7956\u6BCD`, `${L}\u4E16\u7956\u7236\u6BCD`);
8113
+ return pick5(sex, `${L}\u4E16\u7956`, `${L}\u4E16\u7956\u6BCD`, `${L}\u4E16\u7956\u7236\u6BCD`);
7784
8114
  }
7785
8115
  if (L <= 1) {
7786
- return pick2(sex, "\u513F\u5B50", "\u5973\u513F", "\u5B50\u5973");
8116
+ return pick5(sex, "\u513F\u5B50", "\u5973\u513F", "\u5B50\u5973");
7787
8117
  }
7788
8118
  if (L === 2) {
7789
- return pick2(sex, "\u5B59\u5B50", "\u5B59\u5973", "\u5B59\u5B50\u5973");
8119
+ return pick5(sex, "\u5B59\u5B50", "\u5B59\u5973", "\u5B59\u5B50\u5973");
7790
8120
  }
7791
8121
  if (L === 3) {
7792
- return pick2(sex, "\u66FE\u5B59", "\u66FE\u5B59\u5973", "\u66FE\u5B59\u5B50\u5973");
8122
+ return pick5(sex, "\u66FE\u5B59", "\u66FE\u5B59\u5973", "\u66FE\u5B59\u5B50\u5973");
7793
8123
  }
7794
8124
  if (L === 4) {
7795
- return pick2(sex, "\u7384\u5B59", "\u7384\u5B59\u5973", "\u7384\u5B59\u5B50\u5973");
8125
+ return pick5(sex, "\u7384\u5B59", "\u7384\u5B59\u5973", "\u7384\u5B59\u5B50\u5973");
7796
8126
  }
7797
- return pick2(sex, `${L}\u4E16\u5B59`, `${L}\u4E16\u5B59\u5973`, `${L}\u4E16\u5B59\u5B50\u5973`);
8127
+ return pick5(sex, `${L}\u4E16\u5B59`, `${L}\u4E16\u5B59\u5973`, `${L}\u4E16\u5B59\u5B50\u5973`);
7798
8128
  };
7799
8129
  var cousinPlain2 = (degree, sex) => {
7800
8130
  if (degree <= 1) {
7801
- return pick2(sex, "\u5802\u8868\u5144\u5F1F", "\u5802\u8868\u59D0\u59B9", "\u5802\u8868\u4EB2");
8131
+ return pick5(sex, "\u5802\u8868\u5144\u5F1F", "\u5802\u8868\u59D0\u59B9", "\u5802\u8868\u4EB2");
7802
8132
  }
7803
8133
  if (degree === 2) {
7804
- return pick2(sex, "\u4ECE\u5802\u8868\u5144\u5F1F", "\u4ECE\u5802\u8868\u59D0\u59B9", "\u4ECE\u5802\u8868\u4EB2");
8134
+ return pick5(sex, "\u4ECE\u5802\u8868\u5144\u5F1F", "\u4ECE\u5802\u8868\u59D0\u59B9", "\u4ECE\u5802\u8868\u4EB2");
7805
8135
  }
7806
- return pick2(
8136
+ return pick5(
7807
8137
  sex,
7808
8138
  `${degree}\u4EE3\u5802\u8868\u5144\u5F1F`,
7809
8139
  `${degree}\u4EE3\u5802\u8868\u59D0\u59B9`,
@@ -7816,7 +8146,7 @@ var KinshipTranslatorZh = class extends KinshipTranslatorBasic {
7816
8146
  if (degree > 0) {
7817
8147
  degree = degree - 1;
7818
8148
  }
7819
- return cousinPlain2(degree, sexOf3(this.personN));
8149
+ return cousinPlain2(degree, sexOf6(this.personN));
7820
8150
  }
7821
8151
  removal() {
7822
8152
  const level = this.pathN?.level ?? 0;
@@ -7828,56 +8158,56 @@ var KinshipTranslatorZh = class extends KinshipTranslatorBasic {
7828
8158
  return level < 0 ? this.nibling() : this.auncle();
7829
8159
  }
7830
8160
  const removed = Math.abs(level);
7831
- return `${cousinPlain2(degree, sexOf3(this.personN))}\uFF08\u9694${removed}\u4EE3\uFF09`;
8161
+ return `${cousinPlain2(degree, sexOf6(this.personN))}\uFF08\u9694${removed}\u4EE3\uFF09`;
7832
8162
  }
7833
8163
  auncle() {
7834
8164
  const level = Math.abs(this.pathN?.level ?? 0);
7835
- const sex = sexOf3(this.personN);
7836
- if (level <= 2) {
7837
- return pick2(sex, "\u53D4\u53D4", "\u963F\u59E8", "\u53D4\u4F2F/\u59D1\u59E8");
8165
+ const sex = sexOf6(this.personN);
8166
+ if (level <= 1) {
8167
+ return pick5(sex, "\u53D4\u53D4", "\u963F\u59E8", "\u53D4\u4F2F/\u59D1\u59E8");
7838
8168
  }
7839
- if (level === 3) {
7840
- return pick2(sex, "\u4F2F\u53D4\u7956\u7236", "\u59D1\u7956\u6BCD", "\u4F2F\u53D4\u7956\u7236\u6BCD");
8169
+ if (level === 2) {
8170
+ return pick5(sex, "\u4F2F\u53D4\u7956\u7236", "\u59D1\u7956\u6BCD", "\u4F2F\u53D4\u7956\u7236\u6BCD");
7841
8171
  }
7842
- return pick2(
8172
+ return pick5(
7843
8173
  sex,
7844
- `${level - 2}\u4EE3\u524D\u7684\u53D4\u53D4`,
7845
- `${level - 2}\u4EE3\u524D\u7684\u963F\u59E8`,
7846
- `${level - 2}\u4EE3\u524D\u7684\u53D4\u4F2F/\u59D1\u59E8`
8174
+ `${level - 1}\u4EE3\u524D\u7684\u53D4\u53D4`,
8175
+ `${level - 1}\u4EE3\u524D\u7684\u963F\u59E8`,
8176
+ `${level - 1}\u4EE3\u524D\u7684\u53D4\u4F2F/\u59D1\u59E8`
7847
8177
  );
7848
8178
  }
7849
8179
  nibling() {
7850
8180
  const level = Math.abs(this.pathN?.level ?? 0);
7851
- const sex = sexOf3(this.personN);
7852
- if (level <= 2) {
7853
- return pick2(sex, "\u4F84\u5B50", "\u4F84\u5973", "\u4F84\u5B50\u5973");
8181
+ const sex = sexOf6(this.personN);
8182
+ if (level <= 1) {
8183
+ return pick5(sex, "\u4F84\u5B50", "\u4F84\u5973", "\u4F84\u5B50\u5973");
7854
8184
  }
7855
- if (level === 3) {
7856
- return pick2(sex, "\u4F84\u5B59", "\u4F84\u5B59\u5973", "\u4F84\u5B59\u5B50\u5973");
8185
+ if (level === 2) {
8186
+ return pick5(sex, "\u4F84\u5B59", "\u4F84\u5B59\u5973", "\u4F84\u5B59\u5B50\u5973");
7857
8187
  }
7858
- return pick2(
8188
+ return pick5(
7859
8189
  sex,
7860
- `${level - 2}\u4EE3\u4E0B\u7684\u4F84\u5B50`,
7861
- `${level - 2}\u4EE3\u4E0B\u7684\u4F84\u5973`,
7862
- `${level - 2}\u4EE3\u4E0B\u7684\u4F84\u5B50\u5973`
8190
+ `${level - 1}\u4EE3\u4E0B\u7684\u4F84\u5B50`,
8191
+ `${level - 1}\u4EE3\u4E0B\u7684\u4F84\u5973`,
8192
+ `${level - 1}\u4EE3\u4E0B\u7684\u4F84\u5B50\u5973`
7863
8193
  );
7864
8194
  }
7865
8195
  parent() {
7866
8196
  return lineal2(
7867
8197
  Math.abs(this.pathN?.level ?? 0),
7868
- sexOf3(this.personN),
8198
+ sexOf6(this.personN),
7869
8199
  "asc"
7870
8200
  );
7871
8201
  }
7872
8202
  child() {
7873
8203
  return lineal2(
7874
8204
  Math.abs(this.pathN?.level ?? 0),
7875
- sexOf3(this.personN),
8205
+ sexOf6(this.personN),
7876
8206
  "desc"
7877
8207
  );
7878
8208
  }
7879
8209
  sibling() {
7880
- return pick2(sexOf3(this.personN), "\u5144\u5F1F", "\u59D0\u59B9", "\u5144\u5F1F\u59D0\u59B9");
8210
+ return pick5(sexOf6(this.personN), "\u5144\u5F1F", "\u59D0\u59B9", "\u5144\u5F1F\u59D0\u59B9");
7881
8211
  }
7882
8212
  halfBlood(relation) {
7883
8213
  if (!relation || !this.isHalfBlood) {
@@ -7886,14 +8216,14 @@ var KinshipTranslatorZh = class extends KinshipTranslatorBasic {
7886
8216
  return `\u5F02\u7236\u6BCD\u7684${relation}`;
7887
8217
  }
7888
8218
  spouse() {
7889
- return pick2(sexOf3(this.personN), "\u4E08\u592B", "\u59BB\u5B50", "\u914D\u5076");
8219
+ return pick5(sexOf6(this.personN), "\u4E08\u592B", "\u59BB\u5B50", "\u914D\u5076");
7890
8220
  }
7891
8221
  ofSpouse(relation) {
7892
8222
  if (!relation) {
7893
8223
  return "";
7894
8224
  }
7895
- const spouseType = pick2(
7896
- sexOf3(this.path?.[1].indi),
8225
+ const spouseType = pick5(
8226
+ sexOf6(this.path?.[1].indi),
7897
8227
  "\u4E08\u592B",
7898
8228
  "\u59BB\u5B50",
7899
8229
  "\u914D\u5076"
@@ -7905,7 +8235,7 @@ var KinshipTranslatorZh = class extends KinshipTranslatorBasic {
7905
8235
  return "";
7906
8236
  }
7907
8237
  const spouse = this.path?.[this.path.length - 1].indi;
7908
- const spouseType = pick2(sexOf3(spouse), "\u4E08\u592B", "\u59BB\u5B50", "\u914D\u5076");
8238
+ const spouseType = pick5(sexOf6(spouse), "\u4E08\u592B", "\u59BB\u5B50", "\u914D\u5076");
7909
8239
  return `${relation}\u7684${spouseType}`;
7910
8240
  }
7911
8241
  of(relation) {
@@ -7941,7 +8271,40 @@ var KinshipTranslatorZh = class extends KinshipTranslatorBasic {
7941
8271
  if (!relation || !this.pathN?.relation) {
7942
8272
  return relation ?? "";
7943
8273
  }
7944
- return `${this.pathN.relation}${relation}`;
8274
+ if (this.pathN.relation === "step") {
8275
+ if (relation === "\u7236\u4EB2") {
8276
+ return "\u7EE7\u7236";
8277
+ }
8278
+ if (relation === "\u6BCD\u4EB2") {
8279
+ return "\u7EE7\u6BCD";
8280
+ }
8281
+ if (relation === "\u513F\u5B50") {
8282
+ return "\u7EE7\u5B50";
8283
+ }
8284
+ if (relation === "\u5973\u513F") {
8285
+ return "\u7EE7\u5973";
8286
+ }
8287
+ return `\u7EE7${relation}`;
8288
+ }
8289
+ if (this.pathN.relation === "adopted") {
8290
+ if (relation === "\u7236\u4EB2") {
8291
+ return "\u517B\u7236";
8292
+ }
8293
+ if (relation === "\u6BCD\u4EB2") {
8294
+ return "\u517B\u6BCD";
8295
+ }
8296
+ if (relation === "\u513F\u5B50") {
8297
+ return "\u517B\u5B50";
8298
+ }
8299
+ if (relation === "\u5973\u513F") {
8300
+ return "\u517B\u5973";
8301
+ }
8302
+ return `\u517B${relation}`;
8303
+ }
8304
+ if (this.pathN.relation === "foster") {
8305
+ return `\u5BC4\u517B${relation}`;
8306
+ }
8307
+ return relation;
7945
8308
  }
7946
8309
  };
7947
8310
 
@@ -9006,7 +9369,9 @@ var downloadGedzipMedia = async (media, onProgress) => {
9006
9369
  id: item.id,
9007
9370
  imgId: item.imgId,
9008
9371
  key: "key" in item ? item.key : void 0,
9009
- contentType: item.contentType
9372
+ contentType: item.contentType,
9373
+ person: "person" in item ? item.person : void 0,
9374
+ tree: "tree" in item ? item.tree : void 0
9010
9375
  });
9011
9376
  if (!resolved?.content) {
9012
9377
  return;
@@ -9531,7 +9896,7 @@ var collectExtensionTagsFrom = (node, into = /* @__PURE__ */ new Set()) => {
9531
9896
  // package.json
9532
9897
  var package_default = {
9533
9898
  name: "@treeviz/gedcom-parser",
9534
- version: "2.1.9"};
9899
+ version: "2.1.12"};
9535
9900
 
9536
9901
  // src/utils/get-product-details.ts
9537
9902
  var isDevelopment = () => {
@@ -9616,16 +9981,26 @@ var Obje = class extends Common {
9616
9981
  if (!this._gedcom) {
9617
9982
  return this;
9618
9983
  }
9984
+ if (typeof this.value === "string" && isId(this.value) && this.refType === "OBJE") {
9985
+ const resolved = this.ref;
9986
+ if (resolved && resolved !== this && typeof resolved.standardizeMedia === "function") {
9987
+ resolved.standardizeMedia(
9988
+ namespace,
9989
+ override,
9990
+ urlGetter,
9991
+ gedcomVersion
9992
+ );
9993
+ return this;
9994
+ }
9995
+ }
9619
9996
  const rin = this?.get("RIN")?.toValue();
9620
- const clone = this?.get("_CLON._OID")?.toValue();
9621
- const mser = this?.get("_MSER._LKID")?.toValue();
9622
9997
  const title = this?.get("FILE.TITL")?.toValue() ?? this?.get("TITL")?.toValue() ?? "";
9623
9998
  const note = this?.get("FILE.NOTE")?.toValue() ?? this?.get("NOTE")?.toValue() ?? "";
9624
9999
  const formRaw = this?.get("FILE.FORM")?.toValue() ?? this?.get("FORM")?.toValue();
9625
10000
  const mediType = this?.get("FILE.FORM.TYPE")?.toValue() ?? this?.get("FORM.TYPE")?.toValue() ?? this?.get("MEDI")?.toValue();
9626
10001
  const file = this?.get("FILE")?.toValue();
9627
- const imgId = rin || clone || mser;
9628
- const url = file || namespace && urlGetter?.(namespace, imgId);
10002
+ const imgId = resolveObjeMediaId(this);
10003
+ const url = file || this.isAncestry() && namespace && urlGetter?.(namespace, imgId);
9629
10004
  if (!url) {
9630
10005
  return this;
9631
10006
  }
@@ -10138,6 +10513,22 @@ var GedCom = class extends Common {
10138
10513
  obje(index) {
10139
10514
  return this.getMain(this.objes(), index);
10140
10515
  }
10516
+ /**
10517
+ * People who link a shared multimedia record (`1 OBJE @On@`), i.e. Ancestry
10518
+ * face tags / everyone the photo is attached to.
10519
+ */
10520
+ indisLinkingObje(objeKey) {
10521
+ const people = [];
10522
+ this.indis()?.forEach((indi) => {
10523
+ const linked = indi?.get("OBJE")?.toList()?.values()?.some(
10524
+ (item) => item?.toValue?.() === objeKey || item?.id === objeKey
10525
+ );
10526
+ if (linked && indi) {
10527
+ people.push(indi);
10528
+ }
10529
+ });
10530
+ return people;
10531
+ }
10141
10532
  sour(index) {
10142
10533
  return this.getMain(this.sours(), index);
10143
10534
  }
@@ -11197,4 +11588,4 @@ var createEmptyGedcom = (options) => {
11197
11588
  return gedcom;
11198
11589
  };
11199
11590
 
11200
- export { ACCEPTED_DATE_FORMATS, ACCEPTED_DATE_FORMATS_REGEX, ADOPTED, APP_BRANDING, BIOLOGICAL, BIRTH, BIRTH_ASC, BIRTH_DESC, Common, CommonDate, CommonName, CommonNote, CustomTags, DATE_ASC, DATE_DESC, DEATH_ASC, DEATH_DESC, DEFAULT, DEFAULT_GEDCOM_EXPORT_VERSION, EVERY, Existed, FEMALE, FOSTER, FRIEND, Fam, Families, GEDCOM7_CALENDARS, GEDCOM7_PEDI_VALUES, GEDCOM7_RESN_VALUES, GEDCOM7_ROLE_VALUES, GEDCOM7_SEX_VALUES, GEDCOM_EXPORT_VERSIONS, GEDZIP_EXTENSION, GEDZIP_GEDCOM_ENTRY, GEDZIP_MIME, GedCom, parser_default as GedcomTree, ID_GETTER_REG, ID_REG, ID_SPLIT_REG, Indi, Individuals, KinshipTranslator, KinshipTranslatorBasic, KinshipTranslatorDe as KinshipTranslatorDE, KinshipTranslatorEn as KinshipTranslatorEN, KinshipTranslatorEs as KinshipTranslatorES, KinshipTranslatorFr as KinshipTranslatorFR, KinshipTranslatorHU, KinshipTranslatorJa as KinshipTranslatorJA, KinshipTranslatorRu as KinshipTranslatorRU, KinshipTranslatorZh as KinshipTranslatorZH, LINE_REG, List, MALE, MAX_FILE_SIZE_TO_SYNC, ORIG_HEAD_TAG, OTHER, Obje, Objects, PARTNER, PEDIGREE_VALUES, PartnerType, PlaceType, REF_LINE_REG, Range, RelationType, Repo, Repositories, SEALING, SINGLE, SPOUSE, STEP, Sour, Sources, Subm, Submitters, TREEVIZ_EXTENSION_BASE_URI, TREEVIZ_EXTENSION_URIS, UNKOWN, addFamilyFact, addIndividualFact, addNonEvent, applyGedcom7DatePhrases, applyGedcom7Enumerations, applyGedcom7RecordMetadata, attachChildToFamily, attachSpouseToFamily, buildGedzip, buildGedzipBlob, bytesToDataUrl, cacheDiscoveredPath, canAttachAsSpouse, collectExtensionTagsFrom, commonDateFormatter, consolidateChildIntoFamily, coupleKeyForFam, create, createCommon, createCommonDate, createCommonName, createCommonNote, createEmptyGedcom, createFam, createGedCom, createGedcomUid, createIndi, createObje, createProxy, createRepo, createSour, createSubm, dateFormatter, parser_default as default, deleteIndividual, downloadGedzipMedia, ensureExtensionSchema, extractGedzip, extractGedzipGedcom, extractSeparationYears, extractSplitPoints, familyHasChild, familyHasParent, findDegenerateFamiliesForIndi, findDuplicateCoupleFamiliesForIndi, findMatchingRangeForSplitRange, findReusableParentChildFamily, firstPointerId, formatGedcom7Timestamp, fromTuple, generateSplitRanges, getAllProp, getBirthAsc, getCacheManagerFactory, getDateLocale, getExtensionSchema, getFamilyWith, getFileExtension, getI18n, getKinshipTranslatorClass, getListTag, getMarriageAsc, getMarriageAscAndBirth, getMarriageAscAndChildBirth, getName, getNameAsc, getNameAscAndBirth, getNameDesc, getPlaceParserProvider, getPlaceParts, getPlaceTranslatorProvider, getPlaces, getRawSize, getValidKey, getValidKeys, getValidTag, getVersion, hungarianOrdinalize, i18n, idGetter, implemented, inRange, inferMediaForm, initializeCache, isCommonDate, isDegenerateFamily, isDevelopment, isGedcom7, isGedcomString, isGedzipContainer, isId, isImageFormat, isIntersectedRange, isObjePointer, isOnlyMainProp, isRangeContained, isRemoteOrEmbeddedMediaUrl, isValidKey, makePointer, marriageDateFormatter, mergeDuplicateCoupleFamilies, mergeGedcoms, mergeMediaLists, nameFormatter, nextRecordId, normalizeGedcomVersion, notImplemented, noteDateFormatter, ordinalize, parseGedcom7CalendarPrefix, parseRangeBounds, pathCache, placeTranslator, pointerIds, profilePictureCache, pruneEmptyFamilies, pruneFamiliesByIds, registerExtensionTag, relativesCache, remountGedzipMediaAsDataUrls, removePointerByValue, resetCacheManagerFactory, resetDateLocaleProvider, resetI18nProvider, resetKinshipTranslatorClass, resetPlaceParserProvider, resetPlaceTranslatorProvider, resetRelativesCache, resolveLocalMediaUrl, resolveMediaContent, resolveObjeForm, rewriteGedcomFilePaths, setCacheManagerFactory, setCauseOfDeath, setChildPedigree, setDateLocaleProvider, setDeceased, setFamilyMarriage, setI18nProvider, setKinshipTranslatorClass, setLocalMediaResolver, setMediaContentResolver, setNestedGroup, setPlaceParserProvider, setPlaceTranslatorProvider, splitOverlappingRanges, splitRange, spouseTagFor, toGedcomPedigree, translators_exports as translators, unlinkRelative, updateFactRecord, validateGedcomContent, withGedcom7Calendar };
11591
+ export { ACCEPTED_DATE_FORMATS, ACCEPTED_DATE_FORMATS_REGEX, ADOPTED, ANCESTRY_MEDIA_RETRIEVAL_PREFIX, APP_BRANDING, BIOLOGICAL, BIRTH, BIRTH_ASC, BIRTH_DESC, Common, CommonDate, CommonName, CommonNote, CustomTags, DATE_ASC, DATE_DESC, DEATH_ASC, DEATH_DESC, DEFAULT, DEFAULT_GEDCOM_EXPORT_VERSION, EVERY, Existed, FEMALE, FOSTER, FRIEND, Fam, Families, GEDCOM7_CALENDARS, GEDCOM7_PEDI_VALUES, GEDCOM7_RESN_VALUES, GEDCOM7_ROLE_VALUES, GEDCOM7_SEX_VALUES, GEDCOM_EXPORT_VERSIONS, GEDZIP_EXTENSION, GEDZIP_GEDCOM_ENTRY, GEDZIP_MIME, GedCom, parser_default as GedcomTree, ID_GETTER_REG, ID_REG, ID_SPLIT_REG, Indi, Individuals, KinshipTranslator, KinshipTranslatorBasic, KinshipTranslatorDe as KinshipTranslatorDE, KinshipTranslatorEn as KinshipTranslatorEN, KinshipTranslatorEs as KinshipTranslatorES, KinshipTranslatorFr as KinshipTranslatorFR, KinshipTranslatorHU, KinshipTranslatorJa as KinshipTranslatorJA, KinshipTranslatorRu as KinshipTranslatorRU, KinshipTranslatorZh as KinshipTranslatorZH, LINE_REG, List, MALE, MAX_FILE_SIZE_TO_SYNC, ORIG_HEAD_TAG, OTHER, Obje, Objects, PARTNER, PEDIGREE_VALUES, PartnerType, PlaceType, REF_LINE_REG, Range, RelationType, Repo, Repositories, SEALING, SINGLE, SPOUSE, STEP, Sour, Sources, Subm, Submitters, TREEVIZ_EXTENSION_BASE_URI, TREEVIZ_EXTENSION_URIS, UNKOWN, addFamilyFact, addIndividualFact, addNonEvent, ancestryMediaFileUrl, applyGedcom7DatePhrases, applyGedcom7Enumerations, applyGedcom7RecordMetadata, attachChildToFamily, attachSpouseToFamily, buildGedzip, buildGedzipBlob, bytesToDataUrl, cacheDiscoveredPath, canAttachAsSpouse, collectExtensionTagsFrom, commonDateFormatter, consolidateChildIntoFamily, coupleKeyForFam, create, createCommon, createCommonDate, createCommonName, createCommonNote, createEmptyGedcom, createFam, createGedCom, createGedcomUid, createIndi, createObje, createProxy, createRepo, createSour, createSubm, dateFormatter, parser_default as default, deleteIndividual, downloadGedzipMedia, ensureExtensionSchema, extractGedzip, extractGedzipGedcom, extractSeparationYears, extractSplitPoints, familyHasChild, familyHasParent, findDegenerateFamiliesForIndi, findDuplicateCoupleFamiliesForIndi, findMatchingRangeForSplitRange, findReusableParentChildFamily, firstPointerId, formatGedcom7Timestamp, fromTuple, generateSplitRanges, getAllProp, getBirthAsc, getCacheManagerFactory, getDateLocale, getExtensionSchema, getFamilyWith, getFileExtension, getI18n, getKinshipTranslatorClass, getListTag, getMarriageAsc, getMarriageAscAndBirth, getMarriageAscAndChildBirth, getName, getNameAsc, getNameAscAndBirth, getNameDesc, getPlaceParserProvider, getPlaceParts, getPlaceTranslatorProvider, getPlaces, getRawSize, getValidKey, getValidKeys, getValidTag, getVersion, hungarianOrdinalize, i18n, idGetter, implemented, inRange, inferMediaForm, initializeCache, isCommonDate, isDegenerateFamily, isDevelopment, isGedcom7, isGedcomString, isGedzipContainer, isId, isImageFormat, isIntersectedRange, isObjePointer, isOnlyMainProp, isRangeContained, isRemoteOrEmbeddedMediaUrl, isValidKey, makePointer, marriageDateFormatter, mergeDuplicateCoupleFamilies, mergeGedcoms, mergeMediaLists, nameFormatter, nextRecordId, normalizeGedcomVersion, notImplemented, noteDateFormatter, objeNoteValue, objeXrefKey, ordinalize, parseGedcom7CalendarPrefix, parseRangeBounds, pathCache, placeTranslator, pointerIds, profilePictureCache, pruneEmptyFamilies, pruneFamiliesByIds, registerExtensionTag, relativesCache, remountGedzipMediaAsDataUrls, removePointerByValue, resetCacheManagerFactory, resetDateLocaleProvider, resetI18nProvider, resetKinshipTranslatorClass, resetPlaceParserProvider, resetPlaceTranslatorProvider, resetRelativesCache, resolveLocalMediaUrl, resolveMediaContent, resolveObjeForm, resolveObjeMediaId, rewriteGedcomFilePaths, setCacheManagerFactory, setCauseOfDeath, setChildPedigree, setDateLocaleProvider, setDeceased, setFamilyMarriage, setI18nProvider, setKinshipTranslatorClass, setLocalMediaResolver, setMediaContentResolver, setNestedGroup, setPlaceParserProvider, setPlaceTranslatorProvider, splitOverlappingRanges, splitRange, spouseTagFor, toGedcomPedigree, translators_exports as translators, unlinkRelative, updateFactRecord, validateGedcomContent, withGedcom7Calendar };