@opensanctions/followthemoney 4.7.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/dist/defaultModel.json
CHANGED
|
@@ -5379,6 +5379,14 @@
|
|
|
5379
5379
|
"stub": true,
|
|
5380
5380
|
"type": "entity"
|
|
5381
5381
|
},
|
|
5382
|
+
"biography": {
|
|
5383
|
+
"description": "A biographical narrative of the person.",
|
|
5384
|
+
"label": "Biography",
|
|
5385
|
+
"maxLength": 65000,
|
|
5386
|
+
"name": "biography",
|
|
5387
|
+
"qname": "Person:biography",
|
|
5388
|
+
"type": "text"
|
|
5389
|
+
},
|
|
5382
5390
|
"birthCountry": {
|
|
5383
5391
|
"label": "Country of birth",
|
|
5384
5392
|
"matchable": true,
|
|
@@ -7139,7 +7147,6 @@
|
|
|
7139
7147
|
},
|
|
7140
7148
|
"wikipediaUrl": {
|
|
7141
7149
|
"label": "Wikipedia Article",
|
|
7142
|
-
"matchable": true,
|
|
7143
7150
|
"maxLength": 4096,
|
|
7144
7151
|
"name": "wikipediaUrl",
|
|
7145
7152
|
"qname": "Thing:wikipediaUrl",
|
|
@@ -7449,6 +7456,7 @@
|
|
|
7449
7456
|
"owner"
|
|
7450
7457
|
],
|
|
7451
7458
|
"label": "Vehicle",
|
|
7459
|
+
"matchable": true,
|
|
7452
7460
|
"plural": "Vehicles",
|
|
7453
7461
|
"properties": {
|
|
7454
7462
|
"buildDate": {
|
|
@@ -6634,6 +6634,14 @@ var schemata = {
|
|
|
6634
6634
|
stub: true,
|
|
6635
6635
|
type: "entity"
|
|
6636
6636
|
},
|
|
6637
|
+
biography: {
|
|
6638
|
+
description: "A biographical narrative of the person.",
|
|
6639
|
+
label: "Biography",
|
|
6640
|
+
maxLength: 65000,
|
|
6641
|
+
name: "biography",
|
|
6642
|
+
qname: "Person:biography",
|
|
6643
|
+
type: "text"
|
|
6644
|
+
},
|
|
6637
6645
|
birthCountry: {
|
|
6638
6646
|
label: "Country of birth",
|
|
6639
6647
|
matchable: true,
|
|
@@ -8400,7 +8408,6 @@ var schemata = {
|
|
|
8400
8408
|
},
|
|
8401
8409
|
wikipediaUrl: {
|
|
8402
8410
|
label: "Wikipedia Article",
|
|
8403
|
-
matchable: true,
|
|
8404
8411
|
maxLength: 4096,
|
|
8405
8412
|
name: "wikipediaUrl",
|
|
8406
8413
|
qname: "Thing:wikipediaUrl",
|
|
@@ -8711,6 +8718,7 @@ var schemata = {
|
|
|
8711
8718
|
"owner"
|
|
8712
8719
|
],
|
|
8713
8720
|
label: "Vehicle",
|
|
8721
|
+
matchable: true,
|
|
8714
8722
|
plural: "Vehicles",
|
|
8715
8723
|
properties: {
|
|
8716
8724
|
buildDate: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followthemoney.es.js","sources":["../src/entity.ts","../node_modules/tslib/tslib.es6.js","../src/property.ts","../src/schema.ts","../src/type.ts","../src/model.ts","../src/namespace.ts","../src/icons.ts","../src/followthemoney.ts"],"sourcesContent":["import { Schema } from './schema'\nimport { Model } from './model'\nimport { Property } from './property'\nimport { PropertyType } from './type'\n\nexport type Value = string | Entity\nexport type Values = Array<Value>\nexport type EntityProperties = { [prop: string]: Array<Value | IEntityDatum> }\n\nexport interface IEntityDatum {\n schema: Schema | string\n properties?: EntityProperties\n id: string\n}\n\n/**\n * An entity proxy which provides simplified access to the\n * properties and schema associated with an entity.\n */\nexport class Entity {\n public id: string\n public properties: Map<Property, Values> = new Map()\n public readonly schema: Schema\n\n constructor(model: Model, data: IEntityDatum) {\n this.schema = model.getSchema(data.schema)\n this.id = data.id\n\n if (data.properties) {\n Object.entries(data.properties).forEach(([prop, values]) => {\n values.forEach((value) => {\n this.setProperty(prop, value)\n })\n })\n }\n }\n\n setProperty(prop: string | Property, value: Value | IEntityDatum | undefined | null): Values {\n const property = this.schema.getProperty(prop)\n const values = this.properties.get(property) || []\n if (value === undefined || value === null) {\n return values\n }\n if (typeof (value) === 'string' && value.trim().length === 0) {\n return values\n }\n if (typeof (value) !== 'string') {\n value = this.schema.model.getEntity(value)\n }\n values.push(value)\n this.properties.set(property, values)\n return values\n }\n\n hasProperty(prop: string | Property): boolean {\n try {\n const property = this.schema.getProperty(prop)\n return this.properties.has(property)\n } catch {\n return false\n }\n }\n\n getProperty(prop: string | Property): Values {\n try {\n const property = this.schema.getProperty(prop)\n if (!this.properties.has(property)) {\n return []\n }\n return this.properties.get(property) as Values\n } catch {\n return []\n }\n }\n\n /**\n * The first value of a property only.\n *\n * @param prop A property name or object\n */\n getFirst(prop: string | Property): Value | null {\n for (const value of this.getProperty(prop)) {\n return value\n }\n return null\n }\n\n /**\n * List all properties for which this entity has values set. This\n * does not include unset properties.\n */\n getProperties(): Array<Property> {\n return Array.from(this.properties.keys())\n }\n\n /**\n * Copy the properties from a given entity that match the local\n * schema to this entity.\n */\n copyProperties(entity: Entity): void {\n entity.getProperties().forEach((prop) => {\n if (this.schema.hasProperty(prop)) {\n const localProp = this.schema.getProperty(prop.name)\n if (localProp.qname === prop.qname) {\n entity.getProperty(prop).forEach((value) => {\n this.setProperty(localProp, value)\n })\n }\n }\n })\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getCaption(): string {\n for (const property of this.schema.caption) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Set the designated label as the first caption prop for the given entity.\n */\n setCaption(value: string): void {\n const captionProperties = this.schema.caption\n if (captionProperties && captionProperties.length > 0) {\n this.setProperty(captionProperties[0], value)\n }\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getEdgeCaption(): string {\n const captions = this.schema.edge ? this.schema.edge.caption : []\n for (const property of captions) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Get a date that can be used to represent the start of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalStart(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalStartProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => a.value < b.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /** \n * Get a date that can be used to represent the end of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalEnd(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalEndProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => b.value < a.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /**\n * Get all the values of a particular type, irrespective of\n * which property it is associated with.\n */\n getTypeValues(type: string | PropertyType, matchableOnly = false): Values {\n const propType = this.schema.model.getType(type)\n const values = new Array<Value>()\n for (const property of this.getProperties()) {\n if (!matchableOnly || property.matchable) {\n if (property.type.toString() === propType.toString()) {\n for (const value of this.getProperty(property)) {\n if (values.indexOf(value) === -1) {\n values.push(value)\n }\n }\n }\n }\n }\n return values\n }\n\n /**\n * Serialise the entity to a plain JSON object, suitable for feeding to the\n * JSON.stringify() call.\n */\n toJSON(): IEntityDatum {\n const properties: EntityProperties = {}\n this.properties.forEach((values, prop) => {\n properties[prop.name] = values.map((value) =>\n Entity.isEntity(value) ? (value as Entity).toJSON() : value\n )\n })\n return {\n id: this.id,\n schema: this.schema.name,\n properties: properties\n }\n }\n\n /**\n * Make a copy of the entity with no shared object identity.\n */\n clone(): Entity {\n return Entity.fromJSON(this.schema.model, this.toJSON())\n }\n\n /**\n * Shortcut helper function.\n *\n * @param model active FollowTheMoney model\n * @param data the raw blob, which must match IEntityDatum\n */\n static fromJSON(model: Model, data: any): Entity { // eslint-disable-line\n return model.getEntity(data)\n }\n\n static isEntity(value: Value): boolean {\n return typeof (value) !== 'string'\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import { Schema } from './schema'\nimport { PropertyType } from './type'\n\nexport interface IPropertyDatum {\n name: string\n qname: string\n label: string\n type: string\n description?: string\n maxLength?: number\n format?: string\n stub?: boolean\n hidden?: boolean\n matchable?: boolean\n deprecated?: boolean\n range?: string | null\n reverse?: string\n examples?: string[]\n}\n\n/**\n * Definition of a property, with relevant metadata for type,\n * labels and other useful criteria.\n */\nexport class Property {\n public readonly schema: Schema\n public readonly name: string\n public readonly qname: string\n public readonly label: string\n public readonly type: PropertyType\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly format: string | null\n public readonly stub: boolean\n public readonly maxLength: number\n public readonly hasReverse: boolean\n public readonly hasRange: boolean\n private readonly range: string | null\n private readonly reverse: string | null\n public readonly examples: string[] | null = null\n\n constructor(schema: Schema, property: IPropertyDatum) {\n this.schema = schema\n this.name = property.name\n this.qname = property.qname\n this.label = property.label || property.name\n this.hidden = !!property.hidden\n this.description = property.description || null\n this.format = property.format || null\n this.stub = !!property.stub\n this.maxLength = property.maxLength || 0\n this.matchable = !!property.matchable\n this.deprecated = !!property.deprecated\n this.range = property.range || null\n this.reverse = property.reverse || null\n this.type = schema.model.getType(property.type)\n this.hasRange = this.range !== null\n this.hasReverse = this.range !== null && this.reverse !== null\n this.examples = property.examples || null\n }\n\n getRange(): Schema {\n return this.schema.model.getSchema(this.range)\n }\n\n getReverse(): Property {\n if (this.range === null || this.reverse === null) {\n throw new Error(\"This property has no reverse\")\n }\n return this.getRange().getProperty(this.reverse)\n }\n\n static isProperty = (item: Property | undefined): item is Property => {\n return !!item\n }\n\n toString(): string {\n return this.qname\n }\n}\n","import { IPropertyDatum, Property } from './property'\nimport { Model } from './model'\n\ninterface IEdgeSpecification {\n source: string\n target: string\n directed: boolean\n label?: string\n caption: string[]\n required?: string[]\n}\n\ninterface ITemporalExtentSpecification {\n start: string[]\n end: string[]\n}\n\nexport type SchemaSpec = string | null | undefined | Schema;\n\nexport interface ISchemaDatum {\n label: string\n plural: string\n schemata: string[]\n extends: string[]\n abstract?: boolean\n hidden?: boolean\n matchable?: boolean\n generated?: boolean\n deprecated?: boolean\n description?: string\n edge?: IEdgeSpecification\n temporalExtent?: ITemporalExtentSpecification\n featured?: string[]\n caption?: string[]\n required?: string[]\n properties: {\n [x: string]: IPropertyDatum\n }\n}\n\nexport class Schema {\n static readonly THING = 'Thing'\n static readonly DOCUMENT = 'Document'\n\n public readonly model: Model\n public readonly name: string\n public readonly label: string\n public readonly plural: string\n public readonly abstract: boolean\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly generated: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly featured: string[]\n public readonly schemata: string[]\n public readonly extends: string[]\n public readonly caption: string[]\n public readonly required: string[]\n public readonly edge?: IEdgeSpecification\n public readonly isEdge: boolean\n public readonly temporalStart: string[]\n public readonly temporalEnd: string[]\n private properties: Map<string, Property> = new Map()\n\n constructor(model: Model, schemaName: string, config: ISchemaDatum) {\n this.model = model\n this.name = schemaName\n this.label = config.label || this.name;\n this.plural = config.plural || this.label;\n this.schemata = config.schemata\n this.extends = config.extends\n this.featured = config.featured || []\n this.caption = config.caption || []\n this.required = config.required || []\n this.abstract = !!config.abstract\n this.hidden = !!config.hidden\n this.matchable = !!config.matchable\n this.generated = !!config.generated\n this.deprecated = !!config.deprecated\n this.description = config.description || null\n this.isEdge = !!config.edge\n this.edge = config.edge\n this.temporalStart = config.temporalExtent?.start || []\n this.temporalEnd = config.temporalExtent?.end || []\n\n Object.entries(config.properties).forEach(\n ([propertyName, property]) => {\n this.properties.set(propertyName, new Property(this, property))\n }\n )\n }\n\n isThing(): boolean {\n return this.isA(Schema.THING)\n }\n\n isDocument(): boolean {\n return this.isA(Schema.DOCUMENT)\n }\n\n getExtends(): Array<Schema> {\n return this.extends.map(name => this.model.getSchema(name))\n }\n\n getParents(): Array<Schema> {\n const parents = new Map<string, Schema>()\n for (const ext of this.getExtends()) {\n parents.set(ext.name, ext)\n for (const parent of ext.getParents()) {\n parents.set(parent.name, parent)\n }\n }\n return Array.from(parents.values())\n }\n\n getChildren(): Array<Schema> {\n const children = new Array<Schema>()\n for (const schema of this.model.getSchemata()) {\n const parents = schema.getParents().map(s => s.name)\n if (parents.indexOf(this.name) !== -1) {\n children.push(schema)\n }\n }\n return children;\n }\n\n getProperties(qualified = false): Map<string, Property> {\n const properties = new Map<string, Property>()\n this.getExtends().forEach((schema) => {\n schema.getProperties(qualified).forEach((prop, name) => {\n properties.set(name, prop)\n })\n })\n this.properties.forEach((prop, name) => {\n properties.set(qualified ? prop.qname : name, prop)\n })\n return properties\n }\n\n getEditableProperties(): Array<Property> {\n return Array.from(this.getProperties().values())\n .filter(prop => !prop.hidden && !prop.stub)\n }\n\n getFeaturedProperties(): Array<Property> {\n return this.featured.map(name => this.getProperty(name))\n }\n\n getTemporalStartProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalStart);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalStartProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n getTemporalEndProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalEnd);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalEndProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n hasProperty(prop: string | Property): boolean {\n if (prop instanceof Property) {\n return this.getProperties(true).has(prop.qname)\n }\n return this.getProperties().has(prop)\n }\n\n /**\n * Get the value of a property. If it's not defined, return an\n * empty array. If it's not a valid property, raise an error.\n *\n * @param prop name or Property\n */\n getProperty(prop: string | Property): Property {\n if (prop instanceof Property) {\n return prop\n }\n if (this.hasProperty(prop)) {\n return this.getProperties().get(prop) as Property\n } else {\n throw new Error('Property does not exist: ' + prop)\n }\n }\n\n isA(schema: SchemaSpec): boolean {\n try {\n schema = this.model.getSchema(schema)\n return !!~this.schemata.indexOf(schema.name)\n } catch {\n return false;\n }\n }\n\n isAny(schemata: Array<SchemaSpec>): boolean {\n for (const schema of schemata) {\n if (this.isA(schema)) {\n return true;\n }\n }\n return false;\n }\n\n static isSchema = (item: Schema | undefined): item is Schema => {\n return !!item\n }\n\n toString(): string {\n return this.name\n }\n}\n","\nexport interface IPropertyTypeDatum {\n group?: string\n label?: string\n description?: string\n maxLength?: number\n plural?: string | null\n matchable?: boolean,\n pivot?: boolean,\n values?: { [name: string]: string }\n}\n\n/**\n * A property type, such as a string, email address, phone number,\n * URL or a related entity.\n */\nexport class PropertyType {\n static ENTITY = 'entity';\n\n public name: string\n public group: string | null\n public grouped: boolean\n public label: string\n public plural: string\n public description: string | null\n public maxLength: number\n public matchable: boolean\n public pivot: boolean\n public values: Map<string, string>\n public isEntity: boolean\n\n constructor(name: string, data: IPropertyTypeDatum) {\n this.name = name\n this.label = data.label || name\n this.description = data.description || null\n this.maxLength = data.maxLength || 0\n this.plural = data.plural || this.label\n this.group = data.group || null\n this.grouped = data.group !== undefined\n this.matchable = !!data.matchable\n this.pivot = !!data.pivot\n this.isEntity = name === PropertyType.ENTITY\n this.values = new Map<string, string>()\n\n if (data.values) {\n Object.entries(data.values).forEach(([value, label]) => {\n this.values.set(value, label)\n })\n }\n }\n\n getLabel(value: string | undefined | null): string {\n if (!value) {\n return ''\n }\n return this.values.get(value) || value\n }\n\n toString(): string {\n return this.name\n }\n}","import { Entity, IEntityDatum } from './entity';\nimport { Namespace } from './namespace';\nimport { Property } from './property';\nimport { ISchemaDatum, Schema } from './schema';\nimport { IPropertyTypeDatum, PropertyType } from './type';\n\n\nexport interface IModelDatum {\n schemata: { [name: string]: ISchemaDatum }\n types: { [name: string]: IPropertyTypeDatum }\n}\n\nexport class Model {\n public readonly schemata: { [x: string]: Schema | undefined } = {}\n public readonly types: { [x: string]: PropertyType } = {}\n\n constructor(config: IModelDatum) {\n this.types = {}\n Object.entries(config.types).forEach(\n ([typeName, typeData]) => {\n this.types[typeName] = new PropertyType(typeName, typeData)\n }\n )\n\n this.schemata = {}\n Object.entries(config.schemata).forEach(\n ([schemaName, schema]) => {\n this.schemata[schemaName] = new Schema(this, schemaName, schema)\n }\n )\n }\n\n getSchema(schemaName: string | null | undefined | Schema): Schema {\n if (schemaName === null || schemaName === undefined) {\n throw new Error('Invalid schema.')\n }\n if (schemaName instanceof Schema) {\n return schemaName\n }\n const schema = this.schemata[schemaName];\n if (schema === undefined) {\n throw new Error('No such schema: ' + schemaName)\n }\n return schema;\n }\n\n /**\n * Get a list of all schemata.\n */\n getSchemata(): Schema[] {\n return Object.keys(this.schemata)\n .map((name) => this.schemata[name])\n .filter(Schema.isSchema)\n }\n\n /**\n * Get a list of all unique properties.\n */\n getProperties(): Property[] {\n const qnames = new Map<string, Property>()\n this.getSchemata().forEach((schema) => {\n schema.getProperties().forEach((prop) => {\n qnames.set(prop.qname, prop)\n })\n })\n return Array.from(qnames.values())\n }\n\n /**\n * Get a particular property type.\n *\n * @param type name of the type\n */\n getType(type: string | PropertyType): PropertyType {\n if (type instanceof PropertyType) {\n return type;\n }\n return this.types[type]\n }\n\n /**\n * Convert a raw JSON object to an entity proxy.\n *\n * @param raw entity source data\n */\n getEntity(raw: IEntityDatum | Entity): Entity {\n if (raw instanceof Entity) {\n return raw\n } else {\n return new Entity(this, raw)\n }\n }\n\n /**\n * Generate a new random UUID.\n * \n * @returns a new UUID.\n */\n generateRandomId(): string {\n return crypto.randomUUID();\n }\n\n /**\n * Make a new object with the given schema, and generate a random ID for\n * it.\n *\n * @param schema Schema name or object\n */\n async createEntity(schema: string | Schema, namespace?: Namespace): Promise<Entity> {\n const rawId = this.generateRandomId();\n const id = namespace ? await namespace.sign(rawId) : rawId;\n return this.getEntity({\n id,\n schema: schema,\n properties: {}\n })\n }\n}\n","\nexport class Namespace {\n private separator = '.'\n private namespaceKey: string\n\n constructor(namespaceKey: string) {\n this.namespaceKey = namespaceKey;\n }\n\n parse(id: string): string[] {\n return id.split(this.separator);\n }\n\n async signature(id: string): Promise<string> {\n // Generate an HMAC signature for the given ID using the namespace key, using \n // SHA-1 as the hashing algorithm and returning the result as a hexadecimal string.\n // Use in-browser crypto library for compatibility with browsers.\n if (!this.namespaceKey.length) {\n return id;\n }\n // Convert strings to ArrayBuffers\n const encoder = new TextEncoder();\n const keyData = encoder.encode(this.namespaceKey);\n const data = encoder.encode(id);\n\n // Import the key\n const key = await crypto.subtle.importKey(\n 'raw',\n keyData,\n { name: 'HMAC', hash: 'SHA-1' },\n false,\n ['sign']\n );\n\n // Generate the signature\n const signature = await crypto.subtle.sign('HMAC', key, data);\n\n // Convert to hexadecimal string\n const hashArray = Array.from(new Uint8Array(signature));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n return hashHex;\n }\n\n async sign(id: string): Promise<string> {\n const entityId = this.parse(id)[0];\n if (!entityId) {\n return id;\n }\n if (!this.namespaceKey.length) {\n return entityId;\n }\n const digest = await this.signature(entityId);\n\n return [entityId, digest].join(this.separator);\n }\n}\n","import icons from './generated/icons.json'\nimport { Schema } from './schema'\n\ninterface IIconStorage {\n [iconName:string]: string[]\n}\n\nexport const IconRegistry = {\n SIZE: 24,\n storage: icons as IIconStorage,\n\n getIcon(iconName: string): string[] {\n return this.storage[iconName];\n },\n\n getSchemaIcon(schema: Schema): string[] {\n const iconName = schema.name.toLowerCase()\n return this.getIcon(iconName) || this.getIcon('info')\n }\n}\n","export * from './entity'\nexport * from './model'\nexport * from './namespace'\nexport * from './property'\nexport * from './schema'\nexport * from './type'\nexport * from './icons'\n\n\nimport defaultModel_ from './defaultModel.json';\nimport { IModelDatum } from './model';\nexport const defaultModel: IModelDatum = defaultModel_;\n"],"names":[],"mappings":"AAeA;;;AAGG;MACU,MAAM,CAAA;IAKjB,WAAA,CAAY,KAAY,EAAE,IAAkB,EAAA;AAHrC,QAAA,IAAA,CAAA,UAAU,GAA0B,IAAI,GAAG,EAAE;QAIlD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;AAC1C,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE;AAEjB,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,YAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPK,MAAM,YAAY,GAAgB;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"followthemoney.es.js","sources":["../src/entity.ts","../node_modules/tslib/tslib.es6.js","../src/property.ts","../src/schema.ts","../src/type.ts","../src/model.ts","../src/namespace.ts","../src/icons.ts","../src/followthemoney.ts"],"sourcesContent":["import { Schema } from './schema'\nimport { Model } from './model'\nimport { Property } from './property'\nimport { PropertyType } from './type'\n\nexport type Value = string | Entity\nexport type Values = Array<Value>\nexport type EntityProperties = { [prop: string]: Array<Value | IEntityDatum> }\n\nexport interface IEntityDatum {\n schema: Schema | string\n properties?: EntityProperties\n id: string\n}\n\n/**\n * An entity proxy which provides simplified access to the\n * properties and schema associated with an entity.\n */\nexport class Entity {\n public id: string\n public properties: Map<Property, Values> = new Map()\n public readonly schema: Schema\n\n constructor(model: Model, data: IEntityDatum) {\n this.schema = model.getSchema(data.schema)\n this.id = data.id\n\n if (data.properties) {\n Object.entries(data.properties).forEach(([prop, values]) => {\n values.forEach((value) => {\n this.setProperty(prop, value)\n })\n })\n }\n }\n\n setProperty(prop: string | Property, value: Value | IEntityDatum | undefined | null): Values {\n const property = this.schema.getProperty(prop)\n const values = this.properties.get(property) || []\n if (value === undefined || value === null) {\n return values\n }\n if (typeof (value) === 'string' && value.trim().length === 0) {\n return values\n }\n if (typeof (value) !== 'string') {\n value = this.schema.model.getEntity(value)\n }\n values.push(value)\n this.properties.set(property, values)\n return values\n }\n\n hasProperty(prop: string | Property): boolean {\n try {\n const property = this.schema.getProperty(prop)\n return this.properties.has(property)\n } catch {\n return false\n }\n }\n\n getProperty(prop: string | Property): Values {\n try {\n const property = this.schema.getProperty(prop)\n if (!this.properties.has(property)) {\n return []\n }\n return this.properties.get(property) as Values\n } catch {\n return []\n }\n }\n\n /**\n * The first value of a property only.\n *\n * @param prop A property name or object\n */\n getFirst(prop: string | Property): Value | null {\n for (const value of this.getProperty(prop)) {\n return value\n }\n return null\n }\n\n /**\n * List all properties for which this entity has values set. This\n * does not include unset properties.\n */\n getProperties(): Array<Property> {\n return Array.from(this.properties.keys())\n }\n\n /**\n * Copy the properties from a given entity that match the local\n * schema to this entity.\n */\n copyProperties(entity: Entity): void {\n entity.getProperties().forEach((prop) => {\n if (this.schema.hasProperty(prop)) {\n const localProp = this.schema.getProperty(prop.name)\n if (localProp.qname === prop.qname) {\n entity.getProperty(prop).forEach((value) => {\n this.setProperty(localProp, value)\n })\n }\n }\n })\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getCaption(): string {\n for (const property of this.schema.caption) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Set the designated label as the first caption prop for the given entity.\n */\n setCaption(value: string): void {\n const captionProperties = this.schema.caption\n if (captionProperties && captionProperties.length > 0) {\n this.setProperty(captionProperties[0], value)\n }\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getEdgeCaption(): string {\n const captions = this.schema.edge ? this.schema.edge.caption : []\n for (const property of captions) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Get a date that can be used to represent the start of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalStart(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalStartProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => a.value < b.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /** \n * Get a date that can be used to represent the end of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalEnd(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalEndProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => b.value < a.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /**\n * Get all the values of a particular type, irrespective of\n * which property it is associated with.\n */\n getTypeValues(type: string | PropertyType, matchableOnly = false): Values {\n const propType = this.schema.model.getType(type)\n const values = new Array<Value>()\n for (const property of this.getProperties()) {\n if (!matchableOnly || property.matchable) {\n if (property.type.toString() === propType.toString()) {\n for (const value of this.getProperty(property)) {\n if (values.indexOf(value) === -1) {\n values.push(value)\n }\n }\n }\n }\n }\n return values\n }\n\n /**\n * Serialise the entity to a plain JSON object, suitable for feeding to the\n * JSON.stringify() call.\n */\n toJSON(): IEntityDatum {\n const properties: EntityProperties = {}\n this.properties.forEach((values, prop) => {\n properties[prop.name] = values.map((value) =>\n Entity.isEntity(value) ? (value as Entity).toJSON() : value\n )\n })\n return {\n id: this.id,\n schema: this.schema.name,\n properties: properties\n }\n }\n\n /**\n * Make a copy of the entity with no shared object identity.\n */\n clone(): Entity {\n return Entity.fromJSON(this.schema.model, this.toJSON())\n }\n\n /**\n * Shortcut helper function.\n *\n * @param model active FollowTheMoney model\n * @param data the raw blob, which must match IEntityDatum\n */\n static fromJSON(model: Model, data: any): Entity { // eslint-disable-line\n return model.getEntity(data)\n }\n\n static isEntity(value: Value): boolean {\n return typeof (value) !== 'string'\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import { Schema } from './schema'\nimport { PropertyType } from './type'\n\nexport interface IPropertyDatum {\n name: string\n qname: string\n label: string\n type: string\n description?: string\n maxLength?: number\n format?: string\n stub?: boolean\n hidden?: boolean\n matchable?: boolean\n deprecated?: boolean\n range?: string | null\n reverse?: string\n examples?: string[]\n}\n\n/**\n * Definition of a property, with relevant metadata for type,\n * labels and other useful criteria.\n */\nexport class Property {\n public readonly schema: Schema\n public readonly name: string\n public readonly qname: string\n public readonly label: string\n public readonly type: PropertyType\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly format: string | null\n public readonly stub: boolean\n public readonly maxLength: number\n public readonly hasReverse: boolean\n public readonly hasRange: boolean\n private readonly range: string | null\n private readonly reverse: string | null\n public readonly examples: string[] | null = null\n\n constructor(schema: Schema, property: IPropertyDatum) {\n this.schema = schema\n this.name = property.name\n this.qname = property.qname\n this.label = property.label || property.name\n this.hidden = !!property.hidden\n this.description = property.description || null\n this.format = property.format || null\n this.stub = !!property.stub\n this.maxLength = property.maxLength || 0\n this.matchable = !!property.matchable\n this.deprecated = !!property.deprecated\n this.range = property.range || null\n this.reverse = property.reverse || null\n this.type = schema.model.getType(property.type)\n this.hasRange = this.range !== null\n this.hasReverse = this.range !== null && this.reverse !== null\n this.examples = property.examples || null\n }\n\n getRange(): Schema {\n return this.schema.model.getSchema(this.range)\n }\n\n getReverse(): Property {\n if (this.range === null || this.reverse === null) {\n throw new Error(\"This property has no reverse\")\n }\n return this.getRange().getProperty(this.reverse)\n }\n\n static isProperty = (item: Property | undefined): item is Property => {\n return !!item\n }\n\n toString(): string {\n return this.qname\n }\n}\n","import { IPropertyDatum, Property } from './property'\nimport { Model } from './model'\n\ninterface IEdgeSpecification {\n source: string\n target: string\n directed: boolean\n label?: string\n caption: string[]\n required?: string[]\n}\n\ninterface ITemporalExtentSpecification {\n start: string[]\n end: string[]\n}\n\nexport type SchemaSpec = string | null | undefined | Schema;\n\nexport interface ISchemaDatum {\n label: string\n plural: string\n schemata: string[]\n extends: string[]\n abstract?: boolean\n hidden?: boolean\n matchable?: boolean\n generated?: boolean\n deprecated?: boolean\n description?: string\n edge?: IEdgeSpecification\n temporalExtent?: ITemporalExtentSpecification\n featured?: string[]\n caption?: string[]\n required?: string[]\n properties: {\n [x: string]: IPropertyDatum\n }\n}\n\nexport class Schema {\n static readonly THING = 'Thing'\n static readonly DOCUMENT = 'Document'\n\n public readonly model: Model\n public readonly name: string\n public readonly label: string\n public readonly plural: string\n public readonly abstract: boolean\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly generated: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly featured: string[]\n public readonly schemata: string[]\n public readonly extends: string[]\n public readonly caption: string[]\n public readonly required: string[]\n public readonly edge?: IEdgeSpecification\n public readonly isEdge: boolean\n public readonly temporalStart: string[]\n public readonly temporalEnd: string[]\n private properties: Map<string, Property> = new Map()\n\n constructor(model: Model, schemaName: string, config: ISchemaDatum) {\n this.model = model\n this.name = schemaName\n this.label = config.label || this.name;\n this.plural = config.plural || this.label;\n this.schemata = config.schemata\n this.extends = config.extends\n this.featured = config.featured || []\n this.caption = config.caption || []\n this.required = config.required || []\n this.abstract = !!config.abstract\n this.hidden = !!config.hidden\n this.matchable = !!config.matchable\n this.generated = !!config.generated\n this.deprecated = !!config.deprecated\n this.description = config.description || null\n this.isEdge = !!config.edge\n this.edge = config.edge\n this.temporalStart = config.temporalExtent?.start || []\n this.temporalEnd = config.temporalExtent?.end || []\n\n Object.entries(config.properties).forEach(\n ([propertyName, property]) => {\n this.properties.set(propertyName, new Property(this, property))\n }\n )\n }\n\n isThing(): boolean {\n return this.isA(Schema.THING)\n }\n\n isDocument(): boolean {\n return this.isA(Schema.DOCUMENT)\n }\n\n getExtends(): Array<Schema> {\n return this.extends.map(name => this.model.getSchema(name))\n }\n\n getParents(): Array<Schema> {\n const parents = new Map<string, Schema>()\n for (const ext of this.getExtends()) {\n parents.set(ext.name, ext)\n for (const parent of ext.getParents()) {\n parents.set(parent.name, parent)\n }\n }\n return Array.from(parents.values())\n }\n\n getChildren(): Array<Schema> {\n const children = new Array<Schema>()\n for (const schema of this.model.getSchemata()) {\n const parents = schema.getParents().map(s => s.name)\n if (parents.indexOf(this.name) !== -1) {\n children.push(schema)\n }\n }\n return children;\n }\n\n getProperties(qualified = false): Map<string, Property> {\n const properties = new Map<string, Property>()\n this.getExtends().forEach((schema) => {\n schema.getProperties(qualified).forEach((prop, name) => {\n properties.set(name, prop)\n })\n })\n this.properties.forEach((prop, name) => {\n properties.set(qualified ? prop.qname : name, prop)\n })\n return properties\n }\n\n getEditableProperties(): Array<Property> {\n return Array.from(this.getProperties().values())\n .filter(prop => !prop.hidden && !prop.stub)\n }\n\n getFeaturedProperties(): Array<Property> {\n return this.featured.map(name => this.getProperty(name))\n }\n\n getTemporalStartProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalStart);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalStartProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n getTemporalEndProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalEnd);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalEndProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n hasProperty(prop: string | Property): boolean {\n if (prop instanceof Property) {\n return this.getProperties(true).has(prop.qname)\n }\n return this.getProperties().has(prop)\n }\n\n /**\n * Get the value of a property. If it's not defined, return an\n * empty array. If it's not a valid property, raise an error.\n *\n * @param prop name or Property\n */\n getProperty(prop: string | Property): Property {\n if (prop instanceof Property) {\n return prop\n }\n if (this.hasProperty(prop)) {\n return this.getProperties().get(prop) as Property\n } else {\n throw new Error('Property does not exist: ' + prop)\n }\n }\n\n isA(schema: SchemaSpec): boolean {\n try {\n schema = this.model.getSchema(schema)\n return !!~this.schemata.indexOf(schema.name)\n } catch {\n return false;\n }\n }\n\n isAny(schemata: Array<SchemaSpec>): boolean {\n for (const schema of schemata) {\n if (this.isA(schema)) {\n return true;\n }\n }\n return false;\n }\n\n static isSchema = (item: Schema | undefined): item is Schema => {\n return !!item\n }\n\n toString(): string {\n return this.name\n }\n}\n","\nexport interface IPropertyTypeDatum {\n group?: string\n label?: string\n description?: string\n maxLength?: number\n plural?: string | null\n matchable?: boolean,\n pivot?: boolean,\n values?: { [name: string]: string }\n}\n\n/**\n * A property type, such as a string, email address, phone number,\n * URL or a related entity.\n */\nexport class PropertyType {\n static ENTITY = 'entity';\n\n public name: string\n public group: string | null\n public grouped: boolean\n public label: string\n public plural: string\n public description: string | null\n public maxLength: number\n public matchable: boolean\n public pivot: boolean\n public values: Map<string, string>\n public isEntity: boolean\n\n constructor(name: string, data: IPropertyTypeDatum) {\n this.name = name\n this.label = data.label || name\n this.description = data.description || null\n this.maxLength = data.maxLength || 0\n this.plural = data.plural || this.label\n this.group = data.group || null\n this.grouped = data.group !== undefined\n this.matchable = !!data.matchable\n this.pivot = !!data.pivot\n this.isEntity = name === PropertyType.ENTITY\n this.values = new Map<string, string>()\n\n if (data.values) {\n Object.entries(data.values).forEach(([value, label]) => {\n this.values.set(value, label)\n })\n }\n }\n\n getLabel(value: string | undefined | null): string {\n if (!value) {\n return ''\n }\n return this.values.get(value) || value\n }\n\n toString(): string {\n return this.name\n }\n}","import { Entity, IEntityDatum } from './entity';\nimport { Namespace } from './namespace';\nimport { Property } from './property';\nimport { ISchemaDatum, Schema } from './schema';\nimport { IPropertyTypeDatum, PropertyType } from './type';\n\n\nexport interface IModelDatum {\n schemata: { [name: string]: ISchemaDatum }\n types: { [name: string]: IPropertyTypeDatum }\n}\n\nexport class Model {\n public readonly schemata: { [x: string]: Schema | undefined } = {}\n public readonly types: { [x: string]: PropertyType } = {}\n\n constructor(config: IModelDatum) {\n this.types = {}\n Object.entries(config.types).forEach(\n ([typeName, typeData]) => {\n this.types[typeName] = new PropertyType(typeName, typeData)\n }\n )\n\n this.schemata = {}\n Object.entries(config.schemata).forEach(\n ([schemaName, schema]) => {\n this.schemata[schemaName] = new Schema(this, schemaName, schema)\n }\n )\n }\n\n getSchema(schemaName: string | null | undefined | Schema): Schema {\n if (schemaName === null || schemaName === undefined) {\n throw new Error('Invalid schema.')\n }\n if (schemaName instanceof Schema) {\n return schemaName\n }\n const schema = this.schemata[schemaName];\n if (schema === undefined) {\n throw new Error('No such schema: ' + schemaName)\n }\n return schema;\n }\n\n /**\n * Get a list of all schemata.\n */\n getSchemata(): Schema[] {\n return Object.keys(this.schemata)\n .map((name) => this.schemata[name])\n .filter(Schema.isSchema)\n }\n\n /**\n * Get a list of all unique properties.\n */\n getProperties(): Property[] {\n const qnames = new Map<string, Property>()\n this.getSchemata().forEach((schema) => {\n schema.getProperties().forEach((prop) => {\n qnames.set(prop.qname, prop)\n })\n })\n return Array.from(qnames.values())\n }\n\n /**\n * Get a particular property type.\n *\n * @param type name of the type\n */\n getType(type: string | PropertyType): PropertyType {\n if (type instanceof PropertyType) {\n return type;\n }\n return this.types[type]\n }\n\n /**\n * Convert a raw JSON object to an entity proxy.\n *\n * @param raw entity source data\n */\n getEntity(raw: IEntityDatum | Entity): Entity {\n if (raw instanceof Entity) {\n return raw\n } else {\n return new Entity(this, raw)\n }\n }\n\n /**\n * Generate a new random UUID.\n * \n * @returns a new UUID.\n */\n generateRandomId(): string {\n return crypto.randomUUID();\n }\n\n /**\n * Make a new object with the given schema, and generate a random ID for\n * it.\n *\n * @param schema Schema name or object\n */\n async createEntity(schema: string | Schema, namespace?: Namespace): Promise<Entity> {\n const rawId = this.generateRandomId();\n const id = namespace ? await namespace.sign(rawId) : rawId;\n return this.getEntity({\n id,\n schema: schema,\n properties: {}\n })\n }\n}\n","\nexport class Namespace {\n private separator = '.'\n private namespaceKey: string\n\n constructor(namespaceKey: string) {\n this.namespaceKey = namespaceKey;\n }\n\n parse(id: string): string[] {\n return id.split(this.separator);\n }\n\n async signature(id: string): Promise<string> {\n // Generate an HMAC signature for the given ID using the namespace key, using \n // SHA-1 as the hashing algorithm and returning the result as a hexadecimal string.\n // Use in-browser crypto library for compatibility with browsers.\n if (!this.namespaceKey.length) {\n return id;\n }\n // Convert strings to ArrayBuffers\n const encoder = new TextEncoder();\n const keyData = encoder.encode(this.namespaceKey);\n const data = encoder.encode(id);\n\n // Import the key\n const key = await crypto.subtle.importKey(\n 'raw',\n keyData,\n { name: 'HMAC', hash: 'SHA-1' },\n false,\n ['sign']\n );\n\n // Generate the signature\n const signature = await crypto.subtle.sign('HMAC', key, data);\n\n // Convert to hexadecimal string\n const hashArray = Array.from(new Uint8Array(signature));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n return hashHex;\n }\n\n async sign(id: string): Promise<string> {\n const entityId = this.parse(id)[0];\n if (!entityId) {\n return id;\n }\n if (!this.namespaceKey.length) {\n return entityId;\n }\n const digest = await this.signature(entityId);\n\n return [entityId, digest].join(this.separator);\n }\n}\n","import icons from './generated/icons.json'\nimport { Schema } from './schema'\n\ninterface IIconStorage {\n [iconName:string]: string[]\n}\n\nexport const IconRegistry = {\n SIZE: 24,\n storage: icons as IIconStorage,\n\n getIcon(iconName: string): string[] {\n return this.storage[iconName];\n },\n\n getSchemaIcon(schema: Schema): string[] {\n const iconName = schema.name.toLowerCase()\n return this.getIcon(iconName) || this.getIcon('info')\n }\n}\n","export * from './entity'\nexport * from './model'\nexport * from './namespace'\nexport * from './property'\nexport * from './schema'\nexport * from './type'\nexport * from './icons'\n\n\nimport defaultModel_ from './defaultModel.json';\nimport { IModelDatum } from './model';\nexport const defaultModel: IModelDatum = defaultModel_;\n"],"names":[],"mappings":"AAeA;;;AAGG;MACU,MAAM,CAAA;IAKjB,WAAA,CAAY,KAAY,EAAE,IAAkB,EAAA;AAHrC,QAAA,IAAA,CAAA,UAAU,GAA0B,IAAI,GAAG,EAAE;QAIlD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;AAC1C,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE;AAEjB,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,YAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,KAAI;AACzD,gBAAA,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACvB,oBAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;AAC/B,gBAAA,CAAC,CAAC;AACJ,YAAA,CAAC,CAAC;QACJ;IACF;IAEA,WAAW,CAAC,IAAuB,EAAE,KAA8C,EAAA;QACjF,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPK,MAAM,YAAY,GAAgB;;;;","x_google_ignoreList":[1]}
|
|
@@ -6640,6 +6640,14 @@
|
|
|
6640
6640
|
stub: true,
|
|
6641
6641
|
type: "entity"
|
|
6642
6642
|
},
|
|
6643
|
+
biography: {
|
|
6644
|
+
description: "A biographical narrative of the person.",
|
|
6645
|
+
label: "Biography",
|
|
6646
|
+
maxLength: 65000,
|
|
6647
|
+
name: "biography",
|
|
6648
|
+
qname: "Person:biography",
|
|
6649
|
+
type: "text"
|
|
6650
|
+
},
|
|
6643
6651
|
birthCountry: {
|
|
6644
6652
|
label: "Country of birth",
|
|
6645
6653
|
matchable: true,
|
|
@@ -8406,7 +8414,6 @@
|
|
|
8406
8414
|
},
|
|
8407
8415
|
wikipediaUrl: {
|
|
8408
8416
|
label: "Wikipedia Article",
|
|
8409
|
-
matchable: true,
|
|
8410
8417
|
maxLength: 4096,
|
|
8411
8418
|
name: "wikipediaUrl",
|
|
8412
8419
|
qname: "Thing:wikipediaUrl",
|
|
@@ -8717,6 +8724,7 @@
|
|
|
8717
8724
|
"owner"
|
|
8718
8725
|
],
|
|
8719
8726
|
label: "Vehicle",
|
|
8727
|
+
matchable: true,
|
|
8720
8728
|
plural: "Vehicles",
|
|
8721
8729
|
properties: {
|
|
8722
8730
|
buildDate: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followthemoney.umd.js","sources":["../src/entity.ts","../node_modules/tslib/tslib.es6.js","../src/property.ts","../src/schema.ts","../src/type.ts","../src/model.ts","../src/namespace.ts","../src/icons.ts","../src/followthemoney.ts"],"sourcesContent":["import { Schema } from './schema'\nimport { Model } from './model'\nimport { Property } from './property'\nimport { PropertyType } from './type'\n\nexport type Value = string | Entity\nexport type Values = Array<Value>\nexport type EntityProperties = { [prop: string]: Array<Value | IEntityDatum> }\n\nexport interface IEntityDatum {\n schema: Schema | string\n properties?: EntityProperties\n id: string\n}\n\n/**\n * An entity proxy which provides simplified access to the\n * properties and schema associated with an entity.\n */\nexport class Entity {\n public id: string\n public properties: Map<Property, Values> = new Map()\n public readonly schema: Schema\n\n constructor(model: Model, data: IEntityDatum) {\n this.schema = model.getSchema(data.schema)\n this.id = data.id\n\n if (data.properties) {\n Object.entries(data.properties).forEach(([prop, values]) => {\n values.forEach((value) => {\n this.setProperty(prop, value)\n })\n })\n }\n }\n\n setProperty(prop: string | Property, value: Value | IEntityDatum | undefined | null): Values {\n const property = this.schema.getProperty(prop)\n const values = this.properties.get(property) || []\n if (value === undefined || value === null) {\n return values\n }\n if (typeof (value) === 'string' && value.trim().length === 0) {\n return values\n }\n if (typeof (value) !== 'string') {\n value = this.schema.model.getEntity(value)\n }\n values.push(value)\n this.properties.set(property, values)\n return values\n }\n\n hasProperty(prop: string | Property): boolean {\n try {\n const property = this.schema.getProperty(prop)\n return this.properties.has(property)\n } catch {\n return false\n }\n }\n\n getProperty(prop: string | Property): Values {\n try {\n const property = this.schema.getProperty(prop)\n if (!this.properties.has(property)) {\n return []\n }\n return this.properties.get(property) as Values\n } catch {\n return []\n }\n }\n\n /**\n * The first value of a property only.\n *\n * @param prop A property name or object\n */\n getFirst(prop: string | Property): Value | null {\n for (const value of this.getProperty(prop)) {\n return value\n }\n return null\n }\n\n /**\n * List all properties for which this entity has values set. This\n * does not include unset properties.\n */\n getProperties(): Array<Property> {\n return Array.from(this.properties.keys())\n }\n\n /**\n * Copy the properties from a given entity that match the local\n * schema to this entity.\n */\n copyProperties(entity: Entity): void {\n entity.getProperties().forEach((prop) => {\n if (this.schema.hasProperty(prop)) {\n const localProp = this.schema.getProperty(prop.name)\n if (localProp.qname === prop.qname) {\n entity.getProperty(prop).forEach((value) => {\n this.setProperty(localProp, value)\n })\n }\n }\n })\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getCaption(): string {\n for (const property of this.schema.caption) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Set the designated label as the first caption prop for the given entity.\n */\n setCaption(value: string): void {\n const captionProperties = this.schema.caption\n if (captionProperties && captionProperties.length > 0) {\n this.setProperty(captionProperties[0], value)\n }\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getEdgeCaption(): string {\n const captions = this.schema.edge ? this.schema.edge.caption : []\n for (const property of captions) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Get a date that can be used to represent the start of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalStart(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalStartProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => a.value < b.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /** \n * Get a date that can be used to represent the end of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalEnd(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalEndProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => b.value < a.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /**\n * Get all the values of a particular type, irrespective of\n * which property it is associated with.\n */\n getTypeValues(type: string | PropertyType, matchableOnly = false): Values {\n const propType = this.schema.model.getType(type)\n const values = new Array<Value>()\n for (const property of this.getProperties()) {\n if (!matchableOnly || property.matchable) {\n if (property.type.toString() === propType.toString()) {\n for (const value of this.getProperty(property)) {\n if (values.indexOf(value) === -1) {\n values.push(value)\n }\n }\n }\n }\n }\n return values\n }\n\n /**\n * Serialise the entity to a plain JSON object, suitable for feeding to the\n * JSON.stringify() call.\n */\n toJSON(): IEntityDatum {\n const properties: EntityProperties = {}\n this.properties.forEach((values, prop) => {\n properties[prop.name] = values.map((value) =>\n Entity.isEntity(value) ? (value as Entity).toJSON() : value\n )\n })\n return {\n id: this.id,\n schema: this.schema.name,\n properties: properties\n }\n }\n\n /**\n * Make a copy of the entity with no shared object identity.\n */\n clone(): Entity {\n return Entity.fromJSON(this.schema.model, this.toJSON())\n }\n\n /**\n * Shortcut helper function.\n *\n * @param model active FollowTheMoney model\n * @param data the raw blob, which must match IEntityDatum\n */\n static fromJSON(model: Model, data: any): Entity { // eslint-disable-line\n return model.getEntity(data)\n }\n\n static isEntity(value: Value): boolean {\n return typeof (value) !== 'string'\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import { Schema } from './schema'\nimport { PropertyType } from './type'\n\nexport interface IPropertyDatum {\n name: string\n qname: string\n label: string\n type: string\n description?: string\n maxLength?: number\n format?: string\n stub?: boolean\n hidden?: boolean\n matchable?: boolean\n deprecated?: boolean\n range?: string | null\n reverse?: string\n examples?: string[]\n}\n\n/**\n * Definition of a property, with relevant metadata for type,\n * labels and other useful criteria.\n */\nexport class Property {\n public readonly schema: Schema\n public readonly name: string\n public readonly qname: string\n public readonly label: string\n public readonly type: PropertyType\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly format: string | null\n public readonly stub: boolean\n public readonly maxLength: number\n public readonly hasReverse: boolean\n public readonly hasRange: boolean\n private readonly range: string | null\n private readonly reverse: string | null\n public readonly examples: string[] | null = null\n\n constructor(schema: Schema, property: IPropertyDatum) {\n this.schema = schema\n this.name = property.name\n this.qname = property.qname\n this.label = property.label || property.name\n this.hidden = !!property.hidden\n this.description = property.description || null\n this.format = property.format || null\n this.stub = !!property.stub\n this.maxLength = property.maxLength || 0\n this.matchable = !!property.matchable\n this.deprecated = !!property.deprecated\n this.range = property.range || null\n this.reverse = property.reverse || null\n this.type = schema.model.getType(property.type)\n this.hasRange = this.range !== null\n this.hasReverse = this.range !== null && this.reverse !== null\n this.examples = property.examples || null\n }\n\n getRange(): Schema {\n return this.schema.model.getSchema(this.range)\n }\n\n getReverse(): Property {\n if (this.range === null || this.reverse === null) {\n throw new Error(\"This property has no reverse\")\n }\n return this.getRange().getProperty(this.reverse)\n }\n\n static isProperty = (item: Property | undefined): item is Property => {\n return !!item\n }\n\n toString(): string {\n return this.qname\n }\n}\n","import { IPropertyDatum, Property } from './property'\nimport { Model } from './model'\n\ninterface IEdgeSpecification {\n source: string\n target: string\n directed: boolean\n label?: string\n caption: string[]\n required?: string[]\n}\n\ninterface ITemporalExtentSpecification {\n start: string[]\n end: string[]\n}\n\nexport type SchemaSpec = string | null | undefined | Schema;\n\nexport interface ISchemaDatum {\n label: string\n plural: string\n schemata: string[]\n extends: string[]\n abstract?: boolean\n hidden?: boolean\n matchable?: boolean\n generated?: boolean\n deprecated?: boolean\n description?: string\n edge?: IEdgeSpecification\n temporalExtent?: ITemporalExtentSpecification\n featured?: string[]\n caption?: string[]\n required?: string[]\n properties: {\n [x: string]: IPropertyDatum\n }\n}\n\nexport class Schema {\n static readonly THING = 'Thing'\n static readonly DOCUMENT = 'Document'\n\n public readonly model: Model\n public readonly name: string\n public readonly label: string\n public readonly plural: string\n public readonly abstract: boolean\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly generated: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly featured: string[]\n public readonly schemata: string[]\n public readonly extends: string[]\n public readonly caption: string[]\n public readonly required: string[]\n public readonly edge?: IEdgeSpecification\n public readonly isEdge: boolean\n public readonly temporalStart: string[]\n public readonly temporalEnd: string[]\n private properties: Map<string, Property> = new Map()\n\n constructor(model: Model, schemaName: string, config: ISchemaDatum) {\n this.model = model\n this.name = schemaName\n this.label = config.label || this.name;\n this.plural = config.plural || this.label;\n this.schemata = config.schemata\n this.extends = config.extends\n this.featured = config.featured || []\n this.caption = config.caption || []\n this.required = config.required || []\n this.abstract = !!config.abstract\n this.hidden = !!config.hidden\n this.matchable = !!config.matchable\n this.generated = !!config.generated\n this.deprecated = !!config.deprecated\n this.description = config.description || null\n this.isEdge = !!config.edge\n this.edge = config.edge\n this.temporalStart = config.temporalExtent?.start || []\n this.temporalEnd = config.temporalExtent?.end || []\n\n Object.entries(config.properties).forEach(\n ([propertyName, property]) => {\n this.properties.set(propertyName, new Property(this, property))\n }\n )\n }\n\n isThing(): boolean {\n return this.isA(Schema.THING)\n }\n\n isDocument(): boolean {\n return this.isA(Schema.DOCUMENT)\n }\n\n getExtends(): Array<Schema> {\n return this.extends.map(name => this.model.getSchema(name))\n }\n\n getParents(): Array<Schema> {\n const parents = new Map<string, Schema>()\n for (const ext of this.getExtends()) {\n parents.set(ext.name, ext)\n for (const parent of ext.getParents()) {\n parents.set(parent.name, parent)\n }\n }\n return Array.from(parents.values())\n }\n\n getChildren(): Array<Schema> {\n const children = new Array<Schema>()\n for (const schema of this.model.getSchemata()) {\n const parents = schema.getParents().map(s => s.name)\n if (parents.indexOf(this.name) !== -1) {\n children.push(schema)\n }\n }\n return children;\n }\n\n getProperties(qualified = false): Map<string, Property> {\n const properties = new Map<string, Property>()\n this.getExtends().forEach((schema) => {\n schema.getProperties(qualified).forEach((prop, name) => {\n properties.set(name, prop)\n })\n })\n this.properties.forEach((prop, name) => {\n properties.set(qualified ? prop.qname : name, prop)\n })\n return properties\n }\n\n getEditableProperties(): Array<Property> {\n return Array.from(this.getProperties().values())\n .filter(prop => !prop.hidden && !prop.stub)\n }\n\n getFeaturedProperties(): Array<Property> {\n return this.featured.map(name => this.getProperty(name))\n }\n\n getTemporalStartProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalStart);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalStartProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n getTemporalEndProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalEnd);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalEndProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n hasProperty(prop: string | Property): boolean {\n if (prop instanceof Property) {\n return this.getProperties(true).has(prop.qname)\n }\n return this.getProperties().has(prop)\n }\n\n /**\n * Get the value of a property. If it's not defined, return an\n * empty array. If it's not a valid property, raise an error.\n *\n * @param prop name or Property\n */\n getProperty(prop: string | Property): Property {\n if (prop instanceof Property) {\n return prop\n }\n if (this.hasProperty(prop)) {\n return this.getProperties().get(prop) as Property\n } else {\n throw new Error('Property does not exist: ' + prop)\n }\n }\n\n isA(schema: SchemaSpec): boolean {\n try {\n schema = this.model.getSchema(schema)\n return !!~this.schemata.indexOf(schema.name)\n } catch {\n return false;\n }\n }\n\n isAny(schemata: Array<SchemaSpec>): boolean {\n for (const schema of schemata) {\n if (this.isA(schema)) {\n return true;\n }\n }\n return false;\n }\n\n static isSchema = (item: Schema | undefined): item is Schema => {\n return !!item\n }\n\n toString(): string {\n return this.name\n }\n}\n","\nexport interface IPropertyTypeDatum {\n group?: string\n label?: string\n description?: string\n maxLength?: number\n plural?: string | null\n matchable?: boolean,\n pivot?: boolean,\n values?: { [name: string]: string }\n}\n\n/**\n * A property type, such as a string, email address, phone number,\n * URL or a related entity.\n */\nexport class PropertyType {\n static ENTITY = 'entity';\n\n public name: string\n public group: string | null\n public grouped: boolean\n public label: string\n public plural: string\n public description: string | null\n public maxLength: number\n public matchable: boolean\n public pivot: boolean\n public values: Map<string, string>\n public isEntity: boolean\n\n constructor(name: string, data: IPropertyTypeDatum) {\n this.name = name\n this.label = data.label || name\n this.description = data.description || null\n this.maxLength = data.maxLength || 0\n this.plural = data.plural || this.label\n this.group = data.group || null\n this.grouped = data.group !== undefined\n this.matchable = !!data.matchable\n this.pivot = !!data.pivot\n this.isEntity = name === PropertyType.ENTITY\n this.values = new Map<string, string>()\n\n if (data.values) {\n Object.entries(data.values).forEach(([value, label]) => {\n this.values.set(value, label)\n })\n }\n }\n\n getLabel(value: string | undefined | null): string {\n if (!value) {\n return ''\n }\n return this.values.get(value) || value\n }\n\n toString(): string {\n return this.name\n }\n}","import { Entity, IEntityDatum } from './entity';\nimport { Namespace } from './namespace';\nimport { Property } from './property';\nimport { ISchemaDatum, Schema } from './schema';\nimport { IPropertyTypeDatum, PropertyType } from './type';\n\n\nexport interface IModelDatum {\n schemata: { [name: string]: ISchemaDatum }\n types: { [name: string]: IPropertyTypeDatum }\n}\n\nexport class Model {\n public readonly schemata: { [x: string]: Schema | undefined } = {}\n public readonly types: { [x: string]: PropertyType } = {}\n\n constructor(config: IModelDatum) {\n this.types = {}\n Object.entries(config.types).forEach(\n ([typeName, typeData]) => {\n this.types[typeName] = new PropertyType(typeName, typeData)\n }\n )\n\n this.schemata = {}\n Object.entries(config.schemata).forEach(\n ([schemaName, schema]) => {\n this.schemata[schemaName] = new Schema(this, schemaName, schema)\n }\n )\n }\n\n getSchema(schemaName: string | null | undefined | Schema): Schema {\n if (schemaName === null || schemaName === undefined) {\n throw new Error('Invalid schema.')\n }\n if (schemaName instanceof Schema) {\n return schemaName\n }\n const schema = this.schemata[schemaName];\n if (schema === undefined) {\n throw new Error('No such schema: ' + schemaName)\n }\n return schema;\n }\n\n /**\n * Get a list of all schemata.\n */\n getSchemata(): Schema[] {\n return Object.keys(this.schemata)\n .map((name) => this.schemata[name])\n .filter(Schema.isSchema)\n }\n\n /**\n * Get a list of all unique properties.\n */\n getProperties(): Property[] {\n const qnames = new Map<string, Property>()\n this.getSchemata().forEach((schema) => {\n schema.getProperties().forEach((prop) => {\n qnames.set(prop.qname, prop)\n })\n })\n return Array.from(qnames.values())\n }\n\n /**\n * Get a particular property type.\n *\n * @param type name of the type\n */\n getType(type: string | PropertyType): PropertyType {\n if (type instanceof PropertyType) {\n return type;\n }\n return this.types[type]\n }\n\n /**\n * Convert a raw JSON object to an entity proxy.\n *\n * @param raw entity source data\n */\n getEntity(raw: IEntityDatum | Entity): Entity {\n if (raw instanceof Entity) {\n return raw\n } else {\n return new Entity(this, raw)\n }\n }\n\n /**\n * Generate a new random UUID.\n * \n * @returns a new UUID.\n */\n generateRandomId(): string {\n return crypto.randomUUID();\n }\n\n /**\n * Make a new object with the given schema, and generate a random ID for\n * it.\n *\n * @param schema Schema name or object\n */\n async createEntity(schema: string | Schema, namespace?: Namespace): Promise<Entity> {\n const rawId = this.generateRandomId();\n const id = namespace ? await namespace.sign(rawId) : rawId;\n return this.getEntity({\n id,\n schema: schema,\n properties: {}\n })\n }\n}\n","\nexport class Namespace {\n private separator = '.'\n private namespaceKey: string\n\n constructor(namespaceKey: string) {\n this.namespaceKey = namespaceKey;\n }\n\n parse(id: string): string[] {\n return id.split(this.separator);\n }\n\n async signature(id: string): Promise<string> {\n // Generate an HMAC signature for the given ID using the namespace key, using \n // SHA-1 as the hashing algorithm and returning the result as a hexadecimal string.\n // Use in-browser crypto library for compatibility with browsers.\n if (!this.namespaceKey.length) {\n return id;\n }\n // Convert strings to ArrayBuffers\n const encoder = new TextEncoder();\n const keyData = encoder.encode(this.namespaceKey);\n const data = encoder.encode(id);\n\n // Import the key\n const key = await crypto.subtle.importKey(\n 'raw',\n keyData,\n { name: 'HMAC', hash: 'SHA-1' },\n false,\n ['sign']\n );\n\n // Generate the signature\n const signature = await crypto.subtle.sign('HMAC', key, data);\n\n // Convert to hexadecimal string\n const hashArray = Array.from(new Uint8Array(signature));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n return hashHex;\n }\n\n async sign(id: string): Promise<string> {\n const entityId = this.parse(id)[0];\n if (!entityId) {\n return id;\n }\n if (!this.namespaceKey.length) {\n return entityId;\n }\n const digest = await this.signature(entityId);\n\n return [entityId, digest].join(this.separator);\n }\n}\n","import icons from './generated/icons.json'\nimport { Schema } from './schema'\n\ninterface IIconStorage {\n [iconName:string]: string[]\n}\n\nexport const IconRegistry = {\n SIZE: 24,\n storage: icons as IIconStorage,\n\n getIcon(iconName: string): string[] {\n return this.storage[iconName];\n },\n\n getSchemaIcon(schema: Schema): string[] {\n const iconName = schema.name.toLowerCase()\n return this.getIcon(iconName) || this.getIcon('info')\n }\n}\n","export * from './entity'\nexport * from './model'\nexport * from './namespace'\nexport * from './property'\nexport * from './schema'\nexport * from './type'\nexport * from './icons'\n\n\nimport defaultModel_ from './defaultModel.json';\nimport { IModelDatum } from './model';\nexport const defaultModel: IModelDatum = defaultModel_;\n"],"names":[],"mappings":";;;;;;IAeA;;;IAGG;UACU,MAAM,CAAA;QAKjB,WAAA,CAAY,KAAY,EAAE,IAAkB,EAAA;IAHrC,QAAA,IAAA,CAAA,UAAU,GAA0B,IAAI,GAAG,EAAE;YAIlD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;IAC1C,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPK,UAAM,YAAY,GAAgB;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"followthemoney.umd.js","sources":["../src/entity.ts","../node_modules/tslib/tslib.es6.js","../src/property.ts","../src/schema.ts","../src/type.ts","../src/model.ts","../src/namespace.ts","../src/icons.ts","../src/followthemoney.ts"],"sourcesContent":["import { Schema } from './schema'\nimport { Model } from './model'\nimport { Property } from './property'\nimport { PropertyType } from './type'\n\nexport type Value = string | Entity\nexport type Values = Array<Value>\nexport type EntityProperties = { [prop: string]: Array<Value | IEntityDatum> }\n\nexport interface IEntityDatum {\n schema: Schema | string\n properties?: EntityProperties\n id: string\n}\n\n/**\n * An entity proxy which provides simplified access to the\n * properties and schema associated with an entity.\n */\nexport class Entity {\n public id: string\n public properties: Map<Property, Values> = new Map()\n public readonly schema: Schema\n\n constructor(model: Model, data: IEntityDatum) {\n this.schema = model.getSchema(data.schema)\n this.id = data.id\n\n if (data.properties) {\n Object.entries(data.properties).forEach(([prop, values]) => {\n values.forEach((value) => {\n this.setProperty(prop, value)\n })\n })\n }\n }\n\n setProperty(prop: string | Property, value: Value | IEntityDatum | undefined | null): Values {\n const property = this.schema.getProperty(prop)\n const values = this.properties.get(property) || []\n if (value === undefined || value === null) {\n return values\n }\n if (typeof (value) === 'string' && value.trim().length === 0) {\n return values\n }\n if (typeof (value) !== 'string') {\n value = this.schema.model.getEntity(value)\n }\n values.push(value)\n this.properties.set(property, values)\n return values\n }\n\n hasProperty(prop: string | Property): boolean {\n try {\n const property = this.schema.getProperty(prop)\n return this.properties.has(property)\n } catch {\n return false\n }\n }\n\n getProperty(prop: string | Property): Values {\n try {\n const property = this.schema.getProperty(prop)\n if (!this.properties.has(property)) {\n return []\n }\n return this.properties.get(property) as Values\n } catch {\n return []\n }\n }\n\n /**\n * The first value of a property only.\n *\n * @param prop A property name or object\n */\n getFirst(prop: string | Property): Value | null {\n for (const value of this.getProperty(prop)) {\n return value\n }\n return null\n }\n\n /**\n * List all properties for which this entity has values set. This\n * does not include unset properties.\n */\n getProperties(): Array<Property> {\n return Array.from(this.properties.keys())\n }\n\n /**\n * Copy the properties from a given entity that match the local\n * schema to this entity.\n */\n copyProperties(entity: Entity): void {\n entity.getProperties().forEach((prop) => {\n if (this.schema.hasProperty(prop)) {\n const localProp = this.schema.getProperty(prop.name)\n if (localProp.qname === prop.qname) {\n entity.getProperty(prop).forEach((value) => {\n this.setProperty(localProp, value)\n })\n }\n }\n })\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getCaption(): string {\n for (const property of this.schema.caption) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Set the designated label as the first caption prop for the given entity.\n */\n setCaption(value: string): void {\n const captionProperties = this.schema.caption\n if (captionProperties && captionProperties.length > 0) {\n this.setProperty(captionProperties[0], value)\n }\n }\n\n /**\n * Get the designated label for the given entity.\n */\n getEdgeCaption(): string {\n const captions = this.schema.edge ? this.schema.edge.caption : []\n for (const property of captions) {\n for (const value of this.getProperty(property)) {\n return value as string\n }\n }\n return this.schema.label\n }\n\n /**\n * Get a date that can be used to represent the start of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalStart(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalStartProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => a.value < b.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /** \n * Get a date that can be used to represent the end of the entity in a timeline.\n * If there are multiple possible dates, the earliest date is returned.\n */\n getTemporalEnd(): { property: Property, value: string } | null {\n const values = []\n const properties = this.schema.getTemporalEndProperties()\n\n for (const property of properties) {\n for (const value of this.getProperty(property)) {\n if (typeof value === 'string') {\n values.push({ property, value })\n }\n }\n }\n\n const sortedValues = values.sort(\n (a, b) => b.value < a.value ? -1 : 1\n )\n\n return sortedValues[0] || null\n }\n\n /**\n * Get all the values of a particular type, irrespective of\n * which property it is associated with.\n */\n getTypeValues(type: string | PropertyType, matchableOnly = false): Values {\n const propType = this.schema.model.getType(type)\n const values = new Array<Value>()\n for (const property of this.getProperties()) {\n if (!matchableOnly || property.matchable) {\n if (property.type.toString() === propType.toString()) {\n for (const value of this.getProperty(property)) {\n if (values.indexOf(value) === -1) {\n values.push(value)\n }\n }\n }\n }\n }\n return values\n }\n\n /**\n * Serialise the entity to a plain JSON object, suitable for feeding to the\n * JSON.stringify() call.\n */\n toJSON(): IEntityDatum {\n const properties: EntityProperties = {}\n this.properties.forEach((values, prop) => {\n properties[prop.name] = values.map((value) =>\n Entity.isEntity(value) ? (value as Entity).toJSON() : value\n )\n })\n return {\n id: this.id,\n schema: this.schema.name,\n properties: properties\n }\n }\n\n /**\n * Make a copy of the entity with no shared object identity.\n */\n clone(): Entity {\n return Entity.fromJSON(this.schema.model, this.toJSON())\n }\n\n /**\n * Shortcut helper function.\n *\n * @param model active FollowTheMoney model\n * @param data the raw blob, which must match IEntityDatum\n */\n static fromJSON(model: Model, data: any): Entity { // eslint-disable-line\n return model.getEntity(data)\n }\n\n static isEntity(value: Value): boolean {\n return typeof (value) !== 'string'\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import { Schema } from './schema'\nimport { PropertyType } from './type'\n\nexport interface IPropertyDatum {\n name: string\n qname: string\n label: string\n type: string\n description?: string\n maxLength?: number\n format?: string\n stub?: boolean\n hidden?: boolean\n matchable?: boolean\n deprecated?: boolean\n range?: string | null\n reverse?: string\n examples?: string[]\n}\n\n/**\n * Definition of a property, with relevant metadata for type,\n * labels and other useful criteria.\n */\nexport class Property {\n public readonly schema: Schema\n public readonly name: string\n public readonly qname: string\n public readonly label: string\n public readonly type: PropertyType\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly format: string | null\n public readonly stub: boolean\n public readonly maxLength: number\n public readonly hasReverse: boolean\n public readonly hasRange: boolean\n private readonly range: string | null\n private readonly reverse: string | null\n public readonly examples: string[] | null = null\n\n constructor(schema: Schema, property: IPropertyDatum) {\n this.schema = schema\n this.name = property.name\n this.qname = property.qname\n this.label = property.label || property.name\n this.hidden = !!property.hidden\n this.description = property.description || null\n this.format = property.format || null\n this.stub = !!property.stub\n this.maxLength = property.maxLength || 0\n this.matchable = !!property.matchable\n this.deprecated = !!property.deprecated\n this.range = property.range || null\n this.reverse = property.reverse || null\n this.type = schema.model.getType(property.type)\n this.hasRange = this.range !== null\n this.hasReverse = this.range !== null && this.reverse !== null\n this.examples = property.examples || null\n }\n\n getRange(): Schema {\n return this.schema.model.getSchema(this.range)\n }\n\n getReverse(): Property {\n if (this.range === null || this.reverse === null) {\n throw new Error(\"This property has no reverse\")\n }\n return this.getRange().getProperty(this.reverse)\n }\n\n static isProperty = (item: Property | undefined): item is Property => {\n return !!item\n }\n\n toString(): string {\n return this.qname\n }\n}\n","import { IPropertyDatum, Property } from './property'\nimport { Model } from './model'\n\ninterface IEdgeSpecification {\n source: string\n target: string\n directed: boolean\n label?: string\n caption: string[]\n required?: string[]\n}\n\ninterface ITemporalExtentSpecification {\n start: string[]\n end: string[]\n}\n\nexport type SchemaSpec = string | null | undefined | Schema;\n\nexport interface ISchemaDatum {\n label: string\n plural: string\n schemata: string[]\n extends: string[]\n abstract?: boolean\n hidden?: boolean\n matchable?: boolean\n generated?: boolean\n deprecated?: boolean\n description?: string\n edge?: IEdgeSpecification\n temporalExtent?: ITemporalExtentSpecification\n featured?: string[]\n caption?: string[]\n required?: string[]\n properties: {\n [x: string]: IPropertyDatum\n }\n}\n\nexport class Schema {\n static readonly THING = 'Thing'\n static readonly DOCUMENT = 'Document'\n\n public readonly model: Model\n public readonly name: string\n public readonly label: string\n public readonly plural: string\n public readonly abstract: boolean\n public readonly hidden: boolean\n public readonly matchable: boolean\n public readonly generated: boolean\n public readonly deprecated: boolean\n public readonly description: string | null\n public readonly featured: string[]\n public readonly schemata: string[]\n public readonly extends: string[]\n public readonly caption: string[]\n public readonly required: string[]\n public readonly edge?: IEdgeSpecification\n public readonly isEdge: boolean\n public readonly temporalStart: string[]\n public readonly temporalEnd: string[]\n private properties: Map<string, Property> = new Map()\n\n constructor(model: Model, schemaName: string, config: ISchemaDatum) {\n this.model = model\n this.name = schemaName\n this.label = config.label || this.name;\n this.plural = config.plural || this.label;\n this.schemata = config.schemata\n this.extends = config.extends\n this.featured = config.featured || []\n this.caption = config.caption || []\n this.required = config.required || []\n this.abstract = !!config.abstract\n this.hidden = !!config.hidden\n this.matchable = !!config.matchable\n this.generated = !!config.generated\n this.deprecated = !!config.deprecated\n this.description = config.description || null\n this.isEdge = !!config.edge\n this.edge = config.edge\n this.temporalStart = config.temporalExtent?.start || []\n this.temporalEnd = config.temporalExtent?.end || []\n\n Object.entries(config.properties).forEach(\n ([propertyName, property]) => {\n this.properties.set(propertyName, new Property(this, property))\n }\n )\n }\n\n isThing(): boolean {\n return this.isA(Schema.THING)\n }\n\n isDocument(): boolean {\n return this.isA(Schema.DOCUMENT)\n }\n\n getExtends(): Array<Schema> {\n return this.extends.map(name => this.model.getSchema(name))\n }\n\n getParents(): Array<Schema> {\n const parents = new Map<string, Schema>()\n for (const ext of this.getExtends()) {\n parents.set(ext.name, ext)\n for (const parent of ext.getParents()) {\n parents.set(parent.name, parent)\n }\n }\n return Array.from(parents.values())\n }\n\n getChildren(): Array<Schema> {\n const children = new Array<Schema>()\n for (const schema of this.model.getSchemata()) {\n const parents = schema.getParents().map(s => s.name)\n if (parents.indexOf(this.name) !== -1) {\n children.push(schema)\n }\n }\n return children;\n }\n\n getProperties(qualified = false): Map<string, Property> {\n const properties = new Map<string, Property>()\n this.getExtends().forEach((schema) => {\n schema.getProperties(qualified).forEach((prop, name) => {\n properties.set(name, prop)\n })\n })\n this.properties.forEach((prop, name) => {\n properties.set(qualified ? prop.qname : name, prop)\n })\n return properties\n }\n\n getEditableProperties(): Array<Property> {\n return Array.from(this.getProperties().values())\n .filter(prop => !prop.hidden && !prop.stub)\n }\n\n getFeaturedProperties(): Array<Property> {\n return this.featured.map(name => this.getProperty(name))\n }\n\n getTemporalStartProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalStart);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalStartProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n getTemporalEndProperties(): Array<Property> {\n const properties: Set<string> = new Set(this.temporalEnd);\n\n for (const ext of this.getExtends()) {\n for (const property of ext.getTemporalEndProperties()) {\n properties.add(property.name);\n }\n }\n\n return Array.from(properties).map((name) => this.getProperty(name));\n }\n\n hasProperty(prop: string | Property): boolean {\n if (prop instanceof Property) {\n return this.getProperties(true).has(prop.qname)\n }\n return this.getProperties().has(prop)\n }\n\n /**\n * Get the value of a property. If it's not defined, return an\n * empty array. If it's not a valid property, raise an error.\n *\n * @param prop name or Property\n */\n getProperty(prop: string | Property): Property {\n if (prop instanceof Property) {\n return prop\n }\n if (this.hasProperty(prop)) {\n return this.getProperties().get(prop) as Property\n } else {\n throw new Error('Property does not exist: ' + prop)\n }\n }\n\n isA(schema: SchemaSpec): boolean {\n try {\n schema = this.model.getSchema(schema)\n return !!~this.schemata.indexOf(schema.name)\n } catch {\n return false;\n }\n }\n\n isAny(schemata: Array<SchemaSpec>): boolean {\n for (const schema of schemata) {\n if (this.isA(schema)) {\n return true;\n }\n }\n return false;\n }\n\n static isSchema = (item: Schema | undefined): item is Schema => {\n return !!item\n }\n\n toString(): string {\n return this.name\n }\n}\n","\nexport interface IPropertyTypeDatum {\n group?: string\n label?: string\n description?: string\n maxLength?: number\n plural?: string | null\n matchable?: boolean,\n pivot?: boolean,\n values?: { [name: string]: string }\n}\n\n/**\n * A property type, such as a string, email address, phone number,\n * URL or a related entity.\n */\nexport class PropertyType {\n static ENTITY = 'entity';\n\n public name: string\n public group: string | null\n public grouped: boolean\n public label: string\n public plural: string\n public description: string | null\n public maxLength: number\n public matchable: boolean\n public pivot: boolean\n public values: Map<string, string>\n public isEntity: boolean\n\n constructor(name: string, data: IPropertyTypeDatum) {\n this.name = name\n this.label = data.label || name\n this.description = data.description || null\n this.maxLength = data.maxLength || 0\n this.plural = data.plural || this.label\n this.group = data.group || null\n this.grouped = data.group !== undefined\n this.matchable = !!data.matchable\n this.pivot = !!data.pivot\n this.isEntity = name === PropertyType.ENTITY\n this.values = new Map<string, string>()\n\n if (data.values) {\n Object.entries(data.values).forEach(([value, label]) => {\n this.values.set(value, label)\n })\n }\n }\n\n getLabel(value: string | undefined | null): string {\n if (!value) {\n return ''\n }\n return this.values.get(value) || value\n }\n\n toString(): string {\n return this.name\n }\n}","import { Entity, IEntityDatum } from './entity';\nimport { Namespace } from './namespace';\nimport { Property } from './property';\nimport { ISchemaDatum, Schema } from './schema';\nimport { IPropertyTypeDatum, PropertyType } from './type';\n\n\nexport interface IModelDatum {\n schemata: { [name: string]: ISchemaDatum }\n types: { [name: string]: IPropertyTypeDatum }\n}\n\nexport class Model {\n public readonly schemata: { [x: string]: Schema | undefined } = {}\n public readonly types: { [x: string]: PropertyType } = {}\n\n constructor(config: IModelDatum) {\n this.types = {}\n Object.entries(config.types).forEach(\n ([typeName, typeData]) => {\n this.types[typeName] = new PropertyType(typeName, typeData)\n }\n )\n\n this.schemata = {}\n Object.entries(config.schemata).forEach(\n ([schemaName, schema]) => {\n this.schemata[schemaName] = new Schema(this, schemaName, schema)\n }\n )\n }\n\n getSchema(schemaName: string | null | undefined | Schema): Schema {\n if (schemaName === null || schemaName === undefined) {\n throw new Error('Invalid schema.')\n }\n if (schemaName instanceof Schema) {\n return schemaName\n }\n const schema = this.schemata[schemaName];\n if (schema === undefined) {\n throw new Error('No such schema: ' + schemaName)\n }\n return schema;\n }\n\n /**\n * Get a list of all schemata.\n */\n getSchemata(): Schema[] {\n return Object.keys(this.schemata)\n .map((name) => this.schemata[name])\n .filter(Schema.isSchema)\n }\n\n /**\n * Get a list of all unique properties.\n */\n getProperties(): Property[] {\n const qnames = new Map<string, Property>()\n this.getSchemata().forEach((schema) => {\n schema.getProperties().forEach((prop) => {\n qnames.set(prop.qname, prop)\n })\n })\n return Array.from(qnames.values())\n }\n\n /**\n * Get a particular property type.\n *\n * @param type name of the type\n */\n getType(type: string | PropertyType): PropertyType {\n if (type instanceof PropertyType) {\n return type;\n }\n return this.types[type]\n }\n\n /**\n * Convert a raw JSON object to an entity proxy.\n *\n * @param raw entity source data\n */\n getEntity(raw: IEntityDatum | Entity): Entity {\n if (raw instanceof Entity) {\n return raw\n } else {\n return new Entity(this, raw)\n }\n }\n\n /**\n * Generate a new random UUID.\n * \n * @returns a new UUID.\n */\n generateRandomId(): string {\n return crypto.randomUUID();\n }\n\n /**\n * Make a new object with the given schema, and generate a random ID for\n * it.\n *\n * @param schema Schema name or object\n */\n async createEntity(schema: string | Schema, namespace?: Namespace): Promise<Entity> {\n const rawId = this.generateRandomId();\n const id = namespace ? await namespace.sign(rawId) : rawId;\n return this.getEntity({\n id,\n schema: schema,\n properties: {}\n })\n }\n}\n","\nexport class Namespace {\n private separator = '.'\n private namespaceKey: string\n\n constructor(namespaceKey: string) {\n this.namespaceKey = namespaceKey;\n }\n\n parse(id: string): string[] {\n return id.split(this.separator);\n }\n\n async signature(id: string): Promise<string> {\n // Generate an HMAC signature for the given ID using the namespace key, using \n // SHA-1 as the hashing algorithm and returning the result as a hexadecimal string.\n // Use in-browser crypto library for compatibility with browsers.\n if (!this.namespaceKey.length) {\n return id;\n }\n // Convert strings to ArrayBuffers\n const encoder = new TextEncoder();\n const keyData = encoder.encode(this.namespaceKey);\n const data = encoder.encode(id);\n\n // Import the key\n const key = await crypto.subtle.importKey(\n 'raw',\n keyData,\n { name: 'HMAC', hash: 'SHA-1' },\n false,\n ['sign']\n );\n\n // Generate the signature\n const signature = await crypto.subtle.sign('HMAC', key, data);\n\n // Convert to hexadecimal string\n const hashArray = Array.from(new Uint8Array(signature));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n return hashHex;\n }\n\n async sign(id: string): Promise<string> {\n const entityId = this.parse(id)[0];\n if (!entityId) {\n return id;\n }\n if (!this.namespaceKey.length) {\n return entityId;\n }\n const digest = await this.signature(entityId);\n\n return [entityId, digest].join(this.separator);\n }\n}\n","import icons from './generated/icons.json'\nimport { Schema } from './schema'\n\ninterface IIconStorage {\n [iconName:string]: string[]\n}\n\nexport const IconRegistry = {\n SIZE: 24,\n storage: icons as IIconStorage,\n\n getIcon(iconName: string): string[] {\n return this.storage[iconName];\n },\n\n getSchemaIcon(schema: Schema): string[] {\n const iconName = schema.name.toLowerCase()\n return this.getIcon(iconName) || this.getIcon('info')\n }\n}\n","export * from './entity'\nexport * from './model'\nexport * from './namespace'\nexport * from './property'\nexport * from './schema'\nexport * from './type'\nexport * from './icons'\n\n\nimport defaultModel_ from './defaultModel.json';\nimport { IModelDatum } from './model';\nexport const defaultModel: IModelDatum = defaultModel_;\n"],"names":[],"mappings":";;;;;;IAeA;;;IAGG;UACU,MAAM,CAAA;QAKjB,WAAA,CAAY,KAAY,EAAE,IAAkB,EAAA;IAHrC,QAAA,IAAA,CAAA,UAAU,GAA0B,IAAI,GAAG,EAAE;YAIlD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;IAC1C,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE;IAEjB,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;IACnB,YAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,KAAI;IACzD,gBAAA,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;IACvB,oBAAA,IAAI,CAAC,WAAW,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;ACPK,UAAM,YAAY,GAAgB;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensanctions/followthemoney",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "JavaScript version of the followthemoney data model",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "dist/followthemoney.umd.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"jest": {
|
|
36
36
|
"transform": {
|
|
37
|
-
".(ts|tsx)": "ts-jest"
|
|
37
|
+
".(ts|tsx)": ["ts-jest", { "tsconfig": "tsconfig.test.json" }]
|
|
38
38
|
},
|
|
39
39
|
"testEnvironment": "node",
|
|
40
40
|
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
|
|
@@ -65,30 +65,30 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@eslint/js": "^10.0.1",
|
|
68
|
-
"@rollup/plugin-commonjs": "^29.0.
|
|
68
|
+
"@rollup/plugin-commonjs": "^29.0.2",
|
|
69
69
|
"@rollup/plugin-json": "^6.1.0",
|
|
70
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
71
|
-
"@rollup/plugin-typescript": "^12.
|
|
70
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
71
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
72
72
|
"@types/jest": "^30.0.0",
|
|
73
73
|
"colors": "^1.4.0",
|
|
74
|
-
"cross-env": "^10.
|
|
75
|
-
"eslint": "^10.0
|
|
76
|
-
"jest": "^30.0
|
|
77
|
-
"jest-config": "^30.
|
|
78
|
-
"jest-util": "^30.
|
|
79
|
-
"lint-staged": "^16.
|
|
80
|
-
"prettier": "^3.
|
|
74
|
+
"cross-env": "^10.1.0",
|
|
75
|
+
"eslint": "^10.2.0",
|
|
76
|
+
"jest": "^30.3.0",
|
|
77
|
+
"jest-config": "^30.3.0",
|
|
78
|
+
"jest-util": "^30.3.0",
|
|
79
|
+
"lint-staged": "^16.4.0",
|
|
80
|
+
"prettier": "^3.8.1",
|
|
81
81
|
"prompt": "^1.3.0",
|
|
82
|
-
"replace-in-file": "^8.
|
|
83
|
-
"rimraf": "^6.
|
|
84
|
-
"rollup": "^4.
|
|
82
|
+
"replace-in-file": "^8.4.0",
|
|
83
|
+
"rimraf": "^6.1.3",
|
|
84
|
+
"rollup": "^4.60.1",
|
|
85
85
|
"shelljs": "^0.10.0",
|
|
86
|
-
"svgo": "^4.0.
|
|
87
|
-
"ts-jest": "^29.4.
|
|
86
|
+
"svgo": "^4.0.1",
|
|
87
|
+
"ts-jest": "^29.4.9",
|
|
88
88
|
"ts-node": "^10.9.2",
|
|
89
89
|
"tslib": "^2.8.1",
|
|
90
|
-
"typescript": "^
|
|
91
|
-
"typescript-eslint": "^8.
|
|
90
|
+
"typescript": "^6.0.2",
|
|
91
|
+
"typescript-eslint": "^8.58.0"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
94
|
}
|