@treeviz/gedcom-parser 2.1.17 → 2.1.18
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.
- package/dist/classes/common.d.ts +19 -1
- package/dist/classes/common.d.ts.map +1 -1
- package/dist/classes/index.js +178 -56
- package/dist/classes/indi.d.ts.map +1 -1
- package/dist/classes/obje.d.ts +1 -1
- package/dist/classes/obje.d.ts.map +1 -1
- package/dist/cli/index.js +178 -56
- package/dist/constants/index.js +157 -37
- package/dist/factories/index.js +157 -37
- package/dist/index.js +180 -58
- package/dist/kinship-translator/index.js +157 -37
- package/dist/utils/index.js +180 -58
- package/dist/utils/media-utils.d.ts +10 -0
- package/dist/utils/media-utils.d.ts.map +1 -1
- package/dist/utils/multimedia.d.ts +5 -0
- package/dist/utils/multimedia.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -88,6 +88,30 @@ var mediaIdValue = (obje, path) => {
|
|
|
88
88
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
89
89
|
};
|
|
90
90
|
var resolveObjeMediaId = (obje) => mediaIdValue(obje, "RIN") || mediaIdValue(obje, "_CLON._OID") || mediaIdValue(obje, "_MSER._LKID") || mediaIdValue(obje, "_OID") || mediaIdValue(obje, "_LKID");
|
|
91
|
+
var ANCESTRY_TREE_MEDIA_NAMESPACE = 1093;
|
|
92
|
+
var ANCESTRY_NAMESPACE_IN_URL = /\/namespaces\/(\d+)\/media\//i;
|
|
93
|
+
var parseAncestryNamespaceFromUrl = (url) => {
|
|
94
|
+
if (!url) {
|
|
95
|
+
return void 0;
|
|
96
|
+
}
|
|
97
|
+
const match = url.match(ANCESTRY_NAMESPACE_IN_URL);
|
|
98
|
+
const namespace = match?.[1] ? Number(match[1]) : NaN;
|
|
99
|
+
return Number.isFinite(namespace) ? namespace : void 0;
|
|
100
|
+
};
|
|
101
|
+
var isAncestryOriginObje = (obje) => {
|
|
102
|
+
if (!obje) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
const orig = mediaIdValue(obje, "_ORIG");
|
|
106
|
+
if (orig?.toLowerCase() === "acom") {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
const file = mediaIdValue(obje, "FILE") ?? "";
|
|
110
|
+
if (parseAncestryNamespaceFromUrl(file)) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
return Boolean(resolveObjeMediaId(obje) && !file.trim());
|
|
114
|
+
};
|
|
91
115
|
var ANCESTRY_MEDIA_RETRIEVAL_PREFIX = "https://www.ancestry.com/api/media/retrieval/v2/image";
|
|
92
116
|
var ANCESTRY_MEDIA_QUERY = "client=trees-mediaservice&imageQuality=hq";
|
|
93
117
|
var ancestryMediaPath = (namespace, imgId) => `/namespaces/${namespace}/media/${imgId}?${ANCESTRY_MEDIA_QUERY}`;
|
|
@@ -881,8 +905,25 @@ var Common = class _Common {
|
|
|
881
905
|
getHeadRecord() {
|
|
882
906
|
return get(this, "HEAD") || get(this.getGedcom(), "HEAD");
|
|
883
907
|
}
|
|
908
|
+
unwrapHeadRecord(node) {
|
|
909
|
+
if (!node) {
|
|
910
|
+
return void 0;
|
|
911
|
+
}
|
|
912
|
+
const common = node instanceof List ? node.index(0) : node;
|
|
913
|
+
if (!common || typeof common.get !== "function") {
|
|
914
|
+
return void 0;
|
|
915
|
+
}
|
|
916
|
+
const nested = common.get("HEAD");
|
|
917
|
+
if (nested instanceof List) {
|
|
918
|
+
return nested.index(0) ?? common;
|
|
919
|
+
}
|
|
920
|
+
if (nested instanceof _Common) {
|
|
921
|
+
return nested;
|
|
922
|
+
}
|
|
923
|
+
return common;
|
|
924
|
+
}
|
|
884
925
|
getOriginalHeadRecord() {
|
|
885
|
-
return get(this, ORIG_HEAD_TAG) || get(this.getGedcom(), ORIG_HEAD_TAG) || get(this.getHeadRecord(), ORIG_HEAD_TAG);
|
|
926
|
+
return this.unwrapHeadRecord(get(this, ORIG_HEAD_TAG)) || this.unwrapHeadRecord(get(this.getGedcom(), ORIG_HEAD_TAG)) || this.unwrapHeadRecord(get(this.getHeadRecord(), ORIG_HEAD_TAG));
|
|
886
927
|
}
|
|
887
928
|
getSourceHeads() {
|
|
888
929
|
const heads = [this.getOriginalHeadRecord(), this.getHeadRecord()];
|
|
@@ -890,9 +931,23 @@ var Common = class _Common {
|
|
|
890
931
|
return Boolean(head && heads.indexOf(head) === index);
|
|
891
932
|
});
|
|
892
933
|
}
|
|
934
|
+
sourceHeadField(head, path) {
|
|
935
|
+
const normalized = path.endsWith(".value") ? path.slice(0, -".value".length) : path;
|
|
936
|
+
const node = head.get(normalized);
|
|
937
|
+
if (!node) {
|
|
938
|
+
return void 0;
|
|
939
|
+
}
|
|
940
|
+
if (node instanceof List) {
|
|
941
|
+
return node.index(0)?.toValue();
|
|
942
|
+
}
|
|
943
|
+
if (typeof node.toValue === "function") {
|
|
944
|
+
return node.toValue();
|
|
945
|
+
}
|
|
946
|
+
return void 0;
|
|
947
|
+
}
|
|
893
948
|
getFromSourceHeads(path) {
|
|
894
949
|
for (const head of this.getSourceHeads()) {
|
|
895
|
-
const value =
|
|
950
|
+
const value = this.sourceHeadField(head, path);
|
|
896
951
|
if (value !== void 0 && value !== null && value !== "") {
|
|
897
952
|
return value;
|
|
898
953
|
}
|
|
@@ -901,8 +956,8 @@ var Common = class _Common {
|
|
|
901
956
|
}
|
|
902
957
|
sourStartsWith(prefix) {
|
|
903
958
|
return this.getSourceHeads().some((head) => {
|
|
904
|
-
const sour =
|
|
905
|
-
return
|
|
959
|
+
const sour = this.sourceHeadField(head, "SOUR");
|
|
960
|
+
return typeof sour === "string" && sour.toLowerCase().startsWith(prefix);
|
|
906
961
|
});
|
|
907
962
|
}
|
|
908
963
|
isGenoPro() {
|
|
@@ -920,6 +975,51 @@ var Common = class _Common {
|
|
|
920
975
|
isMyHeritage() {
|
|
921
976
|
return this.sourStartsWith("myheritage");
|
|
922
977
|
}
|
|
978
|
+
/**
|
|
979
|
+
* GEDCOM root for Ancestry media helpers.
|
|
980
|
+
* `this._gedcom` when called on a child record; `this` when called on the file root.
|
|
981
|
+
*
|
|
982
|
+
* Cannot use `instanceof GedCom`: `GedComType` is a type alias (erased at runtime),
|
|
983
|
+
* and importing the `GedCom` class here would cycle (`GedCom extends Common`).
|
|
984
|
+
* The root is the only Common with an `objes()` method.
|
|
985
|
+
*/
|
|
986
|
+
hostGedcom() {
|
|
987
|
+
const linked = this.getGedcom();
|
|
988
|
+
if (linked) {
|
|
989
|
+
return linked;
|
|
990
|
+
}
|
|
991
|
+
if ("objes" in this && typeof this.objes === "function") {
|
|
992
|
+
return this;
|
|
993
|
+
}
|
|
994
|
+
return void 0;
|
|
995
|
+
}
|
|
996
|
+
/** True when the file still has Ancestry tree media (`_ORIG acom`, `_OID`, retrieval URL). */
|
|
997
|
+
hasAncestryOriginMedia() {
|
|
998
|
+
const objes = this.hostGedcom()?.objes?.();
|
|
999
|
+
return objes?.values().some((obje) => isAncestryOriginObje(obje)) ?? false;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Namespace for Ancestry tree photos. Prefer a `namespaces/{id}` FILE URL
|
|
1003
|
+
* (TreeViz GEDCOM 7 / GEDZIP export), otherwise 1093 for member-tree media.
|
|
1004
|
+
*/
|
|
1005
|
+
getAncestryMediaNamespace() {
|
|
1006
|
+
const objes = this.hostGedcom()?.objes?.();
|
|
1007
|
+
if (objes) {
|
|
1008
|
+
for (const obje of objes.values()) {
|
|
1009
|
+
const file = obje?.get("FILE")?.toValue();
|
|
1010
|
+
const fromUrl = parseAncestryNamespaceFromUrl(
|
|
1011
|
+
typeof file === "string" ? file : void 0
|
|
1012
|
+
);
|
|
1013
|
+
if (fromUrl) {
|
|
1014
|
+
return fromUrl;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
if (this.isAncestry() || this.hasAncestryOriginMedia()) {
|
|
1019
|
+
return ANCESTRY_TREE_MEDIA_NAMESPACE;
|
|
1020
|
+
}
|
|
1021
|
+
return void 0;
|
|
1022
|
+
}
|
|
923
1023
|
/**
|
|
924
1024
|
* Get the source type as a string (for prefixing tree IDs and names)
|
|
925
1025
|
* Returns the detected source type or undefined if unknown
|
|
@@ -936,13 +1036,13 @@ var Common = class _Common {
|
|
|
936
1036
|
}
|
|
937
1037
|
isFamilySearch() {
|
|
938
1038
|
return this.getSourceHeads().some((head) => {
|
|
939
|
-
const sourName =
|
|
1039
|
+
const sourName = this.sourceHeadField(head, "SOUR.NAME");
|
|
940
1040
|
return sourName === "FamilySearch API";
|
|
941
1041
|
});
|
|
942
1042
|
}
|
|
943
1043
|
isGNO2GED() {
|
|
944
1044
|
return this.getSourceHeads().some((head) => {
|
|
945
|
-
const sour =
|
|
1045
|
+
const sour = this.sourceHeadField(head, "SOUR");
|
|
946
1046
|
return sour === "GNO2GED";
|
|
947
1047
|
});
|
|
948
1048
|
}
|
|
@@ -987,8 +1087,7 @@ var Common = class _Common {
|
|
|
987
1087
|
return this.getFromSourceHeads("SOUR._TREE.value") || (get(this, "HEAD.SOUR._TREE.value") || get(this.getGedcom(), "HEAD.SOUR._TREE.value"));
|
|
988
1088
|
}
|
|
989
1089
|
getMyHeritageTreeName() {
|
|
990
|
-
const
|
|
991
|
-
const treeDetails = get(this, path) || get(this.getGedcom(), path);
|
|
1090
|
+
const treeDetails = this.getFromSourceHeads("FILE.value") || (get(this, "HEAD.FILE.value") || get(this.getGedcom(), "HEAD.FILE.value"));
|
|
992
1091
|
return treeDetails?.match(
|
|
993
1092
|
/Exported by MyHeritage.com from (?<tree>.+) in.+$/
|
|
994
1093
|
)?.groups?.tree;
|
|
@@ -1005,7 +1104,7 @@ var Common = class _Common {
|
|
|
1005
1104
|
if (treeName) {
|
|
1006
1105
|
return treeName;
|
|
1007
1106
|
}
|
|
1008
|
-
const fileName = get(this, "HEAD.FILE.value") || get(this.getGedcom(), "HEAD.FILE.value");
|
|
1107
|
+
const fileName = this.getFromSourceHeads("FILE.value") || get(this, "HEAD.FILE.value") || get(this.getGedcom(), "HEAD.FILE.value");
|
|
1009
1108
|
return fileName || "FamilySearch Import";
|
|
1010
1109
|
}
|
|
1011
1110
|
getAhnenblattTreeId() {
|
|
@@ -2819,6 +2918,45 @@ var notImplemented = (type, ...args) => {
|
|
|
2819
2918
|
console.error(`[Not Implemented] ${type}`, ...args);
|
|
2820
2919
|
};
|
|
2821
2920
|
|
|
2921
|
+
// src/utils/multimedia.ts
|
|
2922
|
+
var inferMediaForm = (file, fallback = "bin") => {
|
|
2923
|
+
const withoutQuery = file.split("?")[0] || file;
|
|
2924
|
+
const ext = getFileExtension(withoutQuery);
|
|
2925
|
+
if (ext) {
|
|
2926
|
+
return ext.toLowerCase() === "jpeg" ? "jpg" : ext.toLowerCase();
|
|
2927
|
+
}
|
|
2928
|
+
return fallback;
|
|
2929
|
+
};
|
|
2930
|
+
var mergeMediaLists = (...lists) => {
|
|
2931
|
+
const merged = {};
|
|
2932
|
+
for (const list of lists) {
|
|
2933
|
+
if (!list) continue;
|
|
2934
|
+
Object.assign(merged, list);
|
|
2935
|
+
}
|
|
2936
|
+
return merged;
|
|
2937
|
+
};
|
|
2938
|
+
var mergeMediaListsByObjeKey = (...lists) => {
|
|
2939
|
+
const merged = {};
|
|
2940
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2941
|
+
for (const list of lists) {
|
|
2942
|
+
if (!list) {
|
|
2943
|
+
continue;
|
|
2944
|
+
}
|
|
2945
|
+
for (const [id, item] of Object.entries(list)) {
|
|
2946
|
+
const objeKey = item.key ? String(item.key) : "";
|
|
2947
|
+
if (objeKey && seen.has(objeKey)) {
|
|
2948
|
+
continue;
|
|
2949
|
+
}
|
|
2950
|
+
merged[id] = item;
|
|
2951
|
+
if (objeKey) {
|
|
2952
|
+
seen.add(objeKey);
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
return merged;
|
|
2957
|
+
};
|
|
2958
|
+
var isObjePointer = (value) => typeof value === "string" && /^@O\d+@$/.test(value);
|
|
2959
|
+
|
|
2822
2960
|
// src/factories/place-parser-provider.ts
|
|
2823
2961
|
var placeParserProvider;
|
|
2824
2962
|
var setPlaceParserProvider = (parser) => {
|
|
@@ -4017,7 +4155,10 @@ var Indi = class extends Common {
|
|
|
4017
4155
|
return result;
|
|
4018
4156
|
}
|
|
4019
4157
|
ancestryLink() {
|
|
4020
|
-
|
|
4158
|
+
let www = this.getFromSourceHeads("SOUR.CORP.WWW.value") || this._gedcom?.HEAD?.SOUR?.CORP?.WWW?.value;
|
|
4159
|
+
if (!www || /treeviz/i.test(String(www))) {
|
|
4160
|
+
www = "www.ancestry.com";
|
|
4161
|
+
}
|
|
4021
4162
|
const tree = this.getAncestryTreeId();
|
|
4022
4163
|
if (this.id) {
|
|
4023
4164
|
return `https://${www}/family-tree/person/tree/${tree}/person/${this.id.replace(
|
|
@@ -4029,14 +4170,15 @@ var Indi = class extends Common {
|
|
|
4029
4170
|
async ancestryMedia(namespace) {
|
|
4030
4171
|
const list = {};
|
|
4031
4172
|
const objeList = this.get("OBJE")?.toList().copy();
|
|
4032
|
-
|
|
4173
|
+
this.getFromSourceHeads("SOUR.CORP.WWW.value") || this._gedcom?.HEAD?.SOUR?.CORP?.WWW?.value;
|
|
4033
4174
|
const tree = this.getAncestryTreeId();
|
|
4175
|
+
const usedNamespace = namespace || this.getAncestryMediaNamespace() || ANCESTRY_TREE_MEDIA_NAMESPACE;
|
|
4034
4176
|
if (objeList) {
|
|
4035
4177
|
await Promise.all(
|
|
4036
4178
|
objeList.map(async (objeRef) => {
|
|
4037
4179
|
const key = objeXrefKey(objeRef, 0);
|
|
4038
4180
|
const obje = objeRef?.standardizeMedia(
|
|
4039
|
-
|
|
4181
|
+
usedNamespace,
|
|
4040
4182
|
true,
|
|
4041
4183
|
ancestryMediaFileUrl
|
|
4042
4184
|
);
|
|
@@ -4048,27 +4190,9 @@ var Indi = class extends Common {
|
|
|
4048
4190
|
const type = resolveObjeForm(obje) ?? (url ? getFileExtension(url) : void 0) ?? "raw";
|
|
4049
4191
|
let imgId = media;
|
|
4050
4192
|
const hasEmbeddedOrLocalFile = !!url && (url.startsWith("data:") || url.startsWith("blob:") || !/^https?:\/\//i.test(url));
|
|
4051
|
-
if (!hasEmbeddedOrLocalFile && (!www || !tree || !this.id)) {
|
|
4052
|
-
return;
|
|
4053
|
-
}
|
|
4054
4193
|
if (!this.id) {
|
|
4055
4194
|
return;
|
|
4056
4195
|
}
|
|
4057
|
-
if (!namespace && !url) {
|
|
4058
|
-
try {
|
|
4059
|
-
if (media) {
|
|
4060
|
-
const mediaDetailsResponse = await fetch(
|
|
4061
|
-
`https://www.ancestry.com/api/media/viewer/v2/trees/${tree}/media?id=${media}`
|
|
4062
|
-
);
|
|
4063
|
-
const mediaDetails = await mediaDetailsResponse.json();
|
|
4064
|
-
if (mediaDetails.url) {
|
|
4065
|
-
url = `${mediaDetails.url}&imageQuality=hq`;
|
|
4066
|
-
}
|
|
4067
|
-
}
|
|
4068
|
-
} catch (_e) {
|
|
4069
|
-
}
|
|
4070
|
-
url = url || `https://${www}/mediaui-viewer/tree/${tree}/media/${media}`;
|
|
4071
|
-
}
|
|
4072
4196
|
if (!imgId && hasEmbeddedOrLocalFile && url) {
|
|
4073
4197
|
imgId = typeof media === "string" && media || `local-${String(key).replace(/[@]/g, "")}-${getFileExtension(url) || "bin"}`;
|
|
4074
4198
|
}
|
|
@@ -4094,9 +4218,12 @@ var Indi = class extends Common {
|
|
|
4094
4218
|
return list;
|
|
4095
4219
|
}
|
|
4096
4220
|
myheritageLink(poolId = 0) {
|
|
4097
|
-
|
|
4221
|
+
let www = (this.getFromSourceHeads("SOUR.CORP.value") || this._gedcom?.HEAD?.SOUR?.CORP?.value)?.toLowerCase().replace(/^www\./gi, "");
|
|
4222
|
+
if (!www || /treeviz/i.test(www)) {
|
|
4223
|
+
www = "myheritage.com";
|
|
4224
|
+
}
|
|
4098
4225
|
const site = this.getMyHeritageTreeId();
|
|
4099
|
-
const file = this._gedcom?.HEAD?.get("FILE")?.toValue()?.match(/Exported by MyHeritage.com from .+ in (?<site>.+) on .+$/)?.groups?.site;
|
|
4226
|
+
const file = (this.getFromSourceHeads("FILE.value") || this._gedcom?.HEAD?.get("FILE")?.toValue())?.match(/Exported by MyHeritage.com from .+ in (?<site>.+) on .+$/)?.groups?.site;
|
|
4100
4227
|
const normalizedFile = file?.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-");
|
|
4101
4228
|
if (normalizedFile && this.id) {
|
|
4102
4229
|
const id = Number(this.id.replace(/@|I/g, "")) + poolId;
|
|
@@ -4317,16 +4444,26 @@ var Indi = class extends Common {
|
|
|
4317
4444
|
return list;
|
|
4318
4445
|
}
|
|
4319
4446
|
async multimedia(namespace) {
|
|
4320
|
-
|
|
4321
|
-
|
|
4447
|
+
const lists = [];
|
|
4448
|
+
const ownObjes = this.get("OBJE")?.toList()?.values() ?? [];
|
|
4449
|
+
const ownAncestryMedia = ownObjes.some(
|
|
4450
|
+
(obje) => !!obje && (isAncestryOriginObje(obje) || isAncestryOriginObje(obje.ref))
|
|
4451
|
+
);
|
|
4452
|
+
if (this.isAncestry() || ownAncestryMedia) {
|
|
4453
|
+
lists.push(
|
|
4454
|
+
await this.ancestryMedia(
|
|
4455
|
+
namespace || this.getAncestryMediaNamespace()
|
|
4456
|
+
)
|
|
4457
|
+
);
|
|
4322
4458
|
}
|
|
4323
4459
|
if (this?.isMyHeritage()) {
|
|
4324
|
-
|
|
4460
|
+
lists.push(this.myheritageMedia());
|
|
4325
4461
|
}
|
|
4326
4462
|
if (this?.isGeni()) {
|
|
4327
|
-
|
|
4463
|
+
lists.push(this.geniMedia());
|
|
4328
4464
|
}
|
|
4329
|
-
|
|
4465
|
+
lists.push(this.universalMedia());
|
|
4466
|
+
return mergeMediaListsByObjeKey(...lists);
|
|
4330
4467
|
}
|
|
4331
4468
|
async getProfilePicture(namespace, onlyPrimary = true) {
|
|
4332
4469
|
if (!this.id) {
|
|
@@ -9939,7 +10076,7 @@ var collectExtensionTagsFrom = (node, into = /* @__PURE__ */ new Set()) => {
|
|
|
9939
10076
|
// package.json
|
|
9940
10077
|
var package_default = {
|
|
9941
10078
|
name: "@treeviz/gedcom-parser",
|
|
9942
|
-
version: "2.1.
|
|
10079
|
+
version: "2.1.18"};
|
|
9943
10080
|
|
|
9944
10081
|
// src/utils/get-product-details.ts
|
|
9945
10082
|
var isDevelopment = () => {
|
|
@@ -9948,25 +10085,6 @@ var isDevelopment = () => {
|
|
|
9948
10085
|
var getVersion = () => package_default.version;
|
|
9949
10086
|
var getName = () => package_default.name;
|
|
9950
10087
|
|
|
9951
|
-
// src/utils/multimedia.ts
|
|
9952
|
-
var inferMediaForm = (file, fallback = "bin") => {
|
|
9953
|
-
const withoutQuery = file.split("?")[0] || file;
|
|
9954
|
-
const ext = getFileExtension(withoutQuery);
|
|
9955
|
-
if (ext) {
|
|
9956
|
-
return ext.toLowerCase() === "jpeg" ? "jpg" : ext.toLowerCase();
|
|
9957
|
-
}
|
|
9958
|
-
return fallback;
|
|
9959
|
-
};
|
|
9960
|
-
var mergeMediaLists = (...lists) => {
|
|
9961
|
-
const merged = {};
|
|
9962
|
-
for (const list of lists) {
|
|
9963
|
-
if (!list) continue;
|
|
9964
|
-
Object.assign(merged, list);
|
|
9965
|
-
}
|
|
9966
|
-
return merged;
|
|
9967
|
-
};
|
|
9968
|
-
var isObjePointer = (value) => typeof value === "string" && /^@O\d+@$/.test(value);
|
|
9969
|
-
|
|
9970
10088
|
// src/classes/note.ts
|
|
9971
10089
|
var CommonNote = class extends Common {
|
|
9972
10090
|
constructor(gedcom, id, main, parent) {
|
|
@@ -10117,6 +10235,10 @@ var Obje = class extends Common {
|
|
|
10117
10235
|
if (lkidNode && !newObject.get("_LKID")) {
|
|
10118
10236
|
newObject.set("_LKID", lkidNode);
|
|
10119
10237
|
}
|
|
10238
|
+
const origNode = this.get("_ORIG");
|
|
10239
|
+
if (origNode && !newObject.get("_ORIG")) {
|
|
10240
|
+
newObject.set("_ORIG", origNode);
|
|
10241
|
+
}
|
|
10120
10242
|
if (override) {
|
|
10121
10243
|
this.remove("FILE");
|
|
10122
10244
|
this.remove("FORM");
|
|
@@ -11631,4 +11753,4 @@ var createEmptyGedcom = (options) => {
|
|
|
11631
11753
|
return gedcom;
|
|
11632
11754
|
};
|
|
11633
11755
|
|
|
11634
|
-
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 };
|
|
11756
|
+
export { ACCEPTED_DATE_FORMATS, ACCEPTED_DATE_FORMATS_REGEX, ADOPTED, ANCESTRY_MEDIA_RETRIEVAL_PREFIX, ANCESTRY_TREE_MEDIA_NAMESPACE, 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, isAncestryOriginObje, isCommonDate, isDegenerateFamily, isDevelopment, isGedcom7, isGedcomString, isGedzipContainer, isId, isImageFormat, isIntersectedRange, isObjePointer, isOnlyMainProp, isRangeContained, isRemoteOrEmbeddedMediaUrl, isValidKey, makePointer, marriageDateFormatter, mergeDuplicateCoupleFamilies, mergeGedcoms, mergeMediaLists, mergeMediaListsByObjeKey, nameFormatter, nextRecordId, normalizeGedcomVersion, notImplemented, noteDateFormatter, objeNoteValue, objeXrefKey, ordinalize, parseAncestryNamespaceFromUrl, 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 };
|