@pod-os/core 0.16.2-rc.e91f9f4.0 → 0.17.1-rc.d4c6cc6.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/dist/index.js +131 -28
- package/lib/index.js +414 -311
- package/package.json +6 -6
- package/types/thing/Thing.d.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -7190,15 +7190,15 @@ var PodOS = (() => {
|
|
|
7190
7190
|
* @param language - The language for the literal. Defaults to ''.
|
|
7191
7191
|
* @param datatype - The literal's datatype as a named node. Defaults to xsd:string.
|
|
7192
7192
|
*/
|
|
7193
|
-
constructor(value7,
|
|
7193
|
+
constructor(value7, language9, datatype3) {
|
|
7194
7194
|
super(value7);
|
|
7195
7195
|
_defineProperty(this, "termType", LiteralTermType);
|
|
7196
7196
|
_defineProperty(this, "classOrder", class_order_default.Literal);
|
|
7197
7197
|
_defineProperty(this, "datatype", xsd_internal_default.string);
|
|
7198
7198
|
_defineProperty(this, "isVar", 0);
|
|
7199
7199
|
_defineProperty(this, "language", "");
|
|
7200
|
-
if (
|
|
7201
|
-
this.language =
|
|
7200
|
+
if (language9) {
|
|
7201
|
+
this.language = language9;
|
|
7202
7202
|
this.datatype = xsd_internal_default.langString;
|
|
7203
7203
|
} else if (datatype3) {
|
|
7204
7204
|
this.datatype = NamedNode.fromValue(datatype3);
|
|
@@ -7229,8 +7229,8 @@ var PodOS = (() => {
|
|
|
7229
7229
|
get lang() {
|
|
7230
7230
|
return this.language;
|
|
7231
7231
|
}
|
|
7232
|
-
set lang(
|
|
7233
|
-
this.language =
|
|
7232
|
+
set lang(language9) {
|
|
7233
|
+
this.language = language9 || "";
|
|
7234
7234
|
}
|
|
7235
7235
|
toNT() {
|
|
7236
7236
|
return _Literal.toNT(this);
|
|
@@ -7277,8 +7277,8 @@ var PodOS = (() => {
|
|
|
7277
7277
|
let d2 = function(x) {
|
|
7278
7278
|
return ("" + (100 + x)).slice(1, 3);
|
|
7279
7279
|
};
|
|
7280
|
-
let
|
|
7281
|
-
return new _Literal(
|
|
7280
|
+
let date6 = "" + value7.getUTCFullYear() + "-" + d2(value7.getUTCMonth() + 1) + "-" + d2(value7.getUTCDate()) + "T" + d2(value7.getUTCHours()) + ":" + d2(value7.getUTCMinutes()) + ":" + d2(value7.getUTCSeconds()) + "Z";
|
|
7281
|
+
return new _Literal(date6, null, xsd_internal_default.dateTime);
|
|
7282
7282
|
}
|
|
7283
7283
|
/**
|
|
7284
7284
|
* Builds a literal node from a number value
|
|
@@ -19388,8 +19388,8 @@ var PodOS = (() => {
|
|
|
19388
19388
|
var matchIndex = 0;
|
|
19389
19389
|
var match = function(f2, g, bindingsSoFar, level2, fetcher3, localCallback, branch3) {
|
|
19390
19390
|
log_default.debug("Match begins, Branch count now: " + branch3.count + " for " + branch3.pattern_debug);
|
|
19391
|
-
var
|
|
19392
|
-
if (
|
|
19391
|
+
var pattern7 = g.statements;
|
|
19392
|
+
if (pattern7.length === 0) {
|
|
19393
19393
|
log_default.debug("FOUND MATCH WITH BINDINGS:" + bindingDebug(bindingsSoFar));
|
|
19394
19394
|
if (g.optional.length === 0) {
|
|
19395
19395
|
branch3.reportMatch(bindingsSoFar);
|
|
@@ -19413,7 +19413,7 @@ var PodOS = (() => {
|
|
|
19413
19413
|
}
|
|
19414
19414
|
var item4;
|
|
19415
19415
|
var i;
|
|
19416
|
-
var n2 =
|
|
19416
|
+
var n2 = pattern7.length;
|
|
19417
19417
|
if (fetcher3) {
|
|
19418
19418
|
var id4 = "match" + matchIndex++;
|
|
19419
19419
|
var fetchResource = function(requestedTerm, id5) {
|
|
@@ -19435,7 +19435,7 @@ var PodOS = (() => {
|
|
|
19435
19435
|
});
|
|
19436
19436
|
};
|
|
19437
19437
|
for (i = 0; i < n2; i++) {
|
|
19438
|
-
item4 =
|
|
19438
|
+
item4 = pattern7[i];
|
|
19439
19439
|
if (bindingsSoFar[item4.subject] !== void 0 && bindingsSoFar[item4.subject].uri && fetcher3 && fetcher3.getState(docpart(bindingsSoFar[item4.subject].uri)) === "unrequested") {
|
|
19440
19440
|
fetchResource(bindingsSoFar[item4.subject], id4);
|
|
19441
19441
|
return;
|
|
@@ -19465,8 +19465,8 @@ var PodOS = (() => {
|
|
|
19465
19465
|
return res;
|
|
19466
19466
|
};
|
|
19467
19467
|
var match2 = function(f2, g, bindingsSoFar, level2, fetcher3, callback2, branch3) {
|
|
19468
|
-
var
|
|
19469
|
-
var n2 =
|
|
19468
|
+
var pattern7 = g.statements;
|
|
19469
|
+
var n2 = pattern7.length;
|
|
19470
19470
|
var i;
|
|
19471
19471
|
var k;
|
|
19472
19472
|
var nk;
|
|
@@ -19475,15 +19475,15 @@ var PodOS = (() => {
|
|
|
19475
19475
|
var newBindings1;
|
|
19476
19476
|
var item4;
|
|
19477
19477
|
for (i = 0; i < n2; i++) {
|
|
19478
|
-
item4 =
|
|
19478
|
+
item4 = pattern7[i];
|
|
19479
19479
|
prepare(f2, item4, bindingsSoFar);
|
|
19480
19480
|
}
|
|
19481
|
-
|
|
19482
|
-
item4 =
|
|
19481
|
+
pattern7.sort(easiestQuery);
|
|
19482
|
+
item4 = pattern7[0];
|
|
19483
19483
|
var rest3 = f2.formula();
|
|
19484
19484
|
rest3.optional = g.optional;
|
|
19485
19485
|
rest3.constraints = g.constraints;
|
|
19486
|
-
rest3.statements =
|
|
19486
|
+
rest3.statements = pattern7.slice(1);
|
|
19487
19487
|
log_default.debug(level2 + "match2 searching " + item4.index.length + " for " + item4 + "; bindings so far=" + bindingDebug(bindingsSoFar));
|
|
19488
19488
|
var c;
|
|
19489
19489
|
var nc = item4.index.length;
|
|
@@ -20369,19 +20369,19 @@ var PodOS = (() => {
|
|
|
20369
20369
|
*/
|
|
20370
20370
|
statementsMatching(subj, pred, obj, why, justOne) {
|
|
20371
20371
|
var pat = [subj, pred, obj, why];
|
|
20372
|
-
var
|
|
20372
|
+
var pattern7 = [];
|
|
20373
20373
|
var hash2 = [];
|
|
20374
20374
|
var wild = [];
|
|
20375
20375
|
var given2 = [];
|
|
20376
20376
|
var p;
|
|
20377
20377
|
var list;
|
|
20378
20378
|
for (p = 0; p < 4; p++) {
|
|
20379
|
-
|
|
20380
|
-
if (!
|
|
20379
|
+
pattern7[p] = this.canon(node_default.fromValue(pat[p]));
|
|
20380
|
+
if (!pattern7[p]) {
|
|
20381
20381
|
wild.push(p);
|
|
20382
20382
|
} else {
|
|
20383
20383
|
given2.push(p);
|
|
20384
|
-
hash2[p] = this.id(
|
|
20384
|
+
hash2[p] = this.id(pattern7[p]);
|
|
20385
20385
|
}
|
|
20386
20386
|
}
|
|
20387
20387
|
if (given2.length === 0) {
|
|
@@ -20421,7 +20421,7 @@ var PodOS = (() => {
|
|
|
20421
20421
|
var st2 = possibles[j];
|
|
20422
20422
|
for (i = 0; i < check2.length; i++) {
|
|
20423
20423
|
p = check2[i];
|
|
20424
|
-
if (!this.canon(st2[parts[p]]).equals(
|
|
20424
|
+
if (!this.canon(st2[parts[p]]).equals(pattern7[p])) {
|
|
20425
20425
|
st2 = null;
|
|
20426
20426
|
break;
|
|
20427
20427
|
}
|
|
@@ -20570,11 +20570,11 @@ var PodOS = (() => {
|
|
|
20570
20570
|
init_lists();
|
|
20571
20571
|
Utf8 = {
|
|
20572
20572
|
// public method for url encoding
|
|
20573
|
-
encode: function(
|
|
20574
|
-
|
|
20573
|
+
encode: function(string3) {
|
|
20574
|
+
string3 = string3.replace(/\r\n/g, "\n");
|
|
20575
20575
|
var utftext = "";
|
|
20576
|
-
for (var n2 = 0; n2 <
|
|
20577
|
-
var c =
|
|
20576
|
+
for (var n2 = 0; n2 < string3.length; n2++) {
|
|
20577
|
+
var c = string3.charCodeAt(n2);
|
|
20578
20578
|
if (c < 128) {
|
|
20579
20579
|
utftext += String.fromCharCode(c);
|
|
20580
20580
|
} else if (c > 127 && c < 2048) {
|
|
@@ -20590,22 +20590,22 @@ var PodOS = (() => {
|
|
|
20590
20590
|
},
|
|
20591
20591
|
// public method for url decoding
|
|
20592
20592
|
decode: function(utftext) {
|
|
20593
|
-
var
|
|
20593
|
+
var string3 = "";
|
|
20594
20594
|
var i = 0;
|
|
20595
20595
|
while (i < utftext.length) {
|
|
20596
20596
|
var c = utftext.charCodeAt(i);
|
|
20597
20597
|
if (c < 128) {
|
|
20598
|
-
|
|
20598
|
+
string3 += String.fromCharCode(c);
|
|
20599
20599
|
i++;
|
|
20600
20600
|
} else if (c > 191 && c < 224) {
|
|
20601
|
-
|
|
20601
|
+
string3 += String.fromCharCode((c & 31) << 6 | utftext.charCodeAt(i + 1) & 63);
|
|
20602
20602
|
i += 2;
|
|
20603
20603
|
} else {
|
|
20604
|
-
|
|
20604
|
+
string3 += String.fromCharCode((c & 15) << 12 | (utftext.charCodeAt(i + 1) & 63) << 6 | utftext.charCodeAt(i + 2) & 63);
|
|
20605
20605
|
i += 3;
|
|
20606
20606
|
}
|
|
20607
20607
|
}
|
|
20608
|
-
return
|
|
20608
|
+
return string3;
|
|
20609
20609
|
}
|
|
20610
20610
|
};
|
|
20611
20611
|
Logic_NS = "http://www.w3.org/2000/10/swap/log#";
|
|
@@ -22221,8 +22221,8 @@ var PodOS = (() => {
|
|
|
22221
22221
|
const bnode = BLANK_NODE_LABEL;
|
|
22222
22222
|
const plain = '"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"';
|
|
22223
22223
|
const datatype3 = "(?:\\^\\^" + iri + ")";
|
|
22224
|
-
const
|
|
22225
|
-
const literal4 = "(?:" + plain + "(?:" + datatype3 + "|" +
|
|
22224
|
+
const language9 = "(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*))";
|
|
22225
|
+
const literal4 = "(?:" + plain + "(?:" + datatype3 + "|" + language9 + ")?)";
|
|
22226
22226
|
const ws2 = "[ \\t]+";
|
|
22227
22227
|
const wso = "[ \\t]*";
|
|
22228
22228
|
const subject6 = "(?:" + iri + "|" + bnode + ")" + ws2;
|
|
@@ -25864,18 +25864,18 @@ var PodOS = (() => {
|
|
|
25864
25864
|
mapping3["@context"] = value7["@context"];
|
|
25865
25865
|
}
|
|
25866
25866
|
if ("@language" in value7 && !("@type" in value7)) {
|
|
25867
|
-
let
|
|
25868
|
-
if (
|
|
25867
|
+
let language9 = value7["@language"];
|
|
25868
|
+
if (language9 !== null && !_isString(language9)) {
|
|
25869
25869
|
throw new JsonLdError(
|
|
25870
25870
|
"Invalid JSON-LD syntax; @context @language value must be a string or null.",
|
|
25871
25871
|
"jsonld.SyntaxError",
|
|
25872
25872
|
{ code: "invalid language mapping", context: localCtx }
|
|
25873
25873
|
);
|
|
25874
25874
|
}
|
|
25875
|
-
if (
|
|
25876
|
-
|
|
25875
|
+
if (language9 !== null) {
|
|
25876
|
+
language9 = language9.toLowerCase();
|
|
25877
25877
|
}
|
|
25878
|
-
mapping3["@language"] =
|
|
25878
|
+
mapping3["@language"] = language9;
|
|
25879
25879
|
}
|
|
25880
25880
|
if ("@prefix" in value7) {
|
|
25881
25881
|
if (term3.match(/:|\//)) {
|
|
@@ -26104,16 +26104,16 @@ var PodOS = (() => {
|
|
|
26104
26104
|
} else if ("@type" in mapping3) {
|
|
26105
26105
|
_addPreferredTerm(term3, entry2["@type"], mapping3["@type"]);
|
|
26106
26106
|
} else if ("@language" in mapping3 && "@direction" in mapping3) {
|
|
26107
|
-
const
|
|
26107
|
+
const language9 = mapping3["@language"];
|
|
26108
26108
|
const direction3 = mapping3["@direction"];
|
|
26109
|
-
if (
|
|
26109
|
+
if (language9 && direction3) {
|
|
26110
26110
|
_addPreferredTerm(
|
|
26111
26111
|
term3,
|
|
26112
26112
|
entry2["@language"],
|
|
26113
|
-
`${
|
|
26113
|
+
`${language9}_${direction3}`.toLowerCase()
|
|
26114
26114
|
);
|
|
26115
|
-
} else if (
|
|
26116
|
-
_addPreferredTerm(term3, entry2["@language"],
|
|
26115
|
+
} else if (language9) {
|
|
26116
|
+
_addPreferredTerm(term3, entry2["@language"], language9.toLowerCase());
|
|
26117
26117
|
} else if (direction3) {
|
|
26118
26118
|
_addPreferredTerm(term3, entry2["@language"], `_${direction3}`);
|
|
26119
26119
|
} else {
|
|
@@ -26914,8 +26914,8 @@ var PodOS = (() => {
|
|
|
26914
26914
|
);
|
|
26915
26915
|
}
|
|
26916
26916
|
value7 = _asArray(value7).map((v2) => _isString(v2) ? v2.toLowerCase() : v2);
|
|
26917
|
-
for (const
|
|
26918
|
-
if (_isString(
|
|
26917
|
+
for (const language9 of value7) {
|
|
26918
|
+
if (_isString(language9) && !language9.match(REGEX_BCP47)) {
|
|
26919
26919
|
if (options.eventHandler) {
|
|
26920
26920
|
_handleEvent({
|
|
26921
26921
|
event: {
|
|
@@ -26924,7 +26924,7 @@ var PodOS = (() => {
|
|
|
26924
26924
|
level: "warning",
|
|
26925
26925
|
message: "@language value must be valid BCP47.",
|
|
26926
26926
|
details: {
|
|
26927
|
-
language:
|
|
26927
|
+
language: language9
|
|
26928
26928
|
}
|
|
26929
26929
|
},
|
|
26930
26930
|
options
|
|
@@ -27232,9 +27232,9 @@ var PodOS = (() => {
|
|
|
27232
27232
|
if (type5 && !["@id", "@vocab", "@none"].includes(type5)) {
|
|
27233
27233
|
rval["@type"] = type5;
|
|
27234
27234
|
} else if (_isString(value7)) {
|
|
27235
|
-
const
|
|
27236
|
-
if (
|
|
27237
|
-
rval["@language"] =
|
|
27235
|
+
const language9 = _getContextValue(activeCtx, activeProperty, "@language");
|
|
27236
|
+
if (language9 !== null) {
|
|
27237
|
+
rval["@language"] = language9;
|
|
27238
27238
|
}
|
|
27239
27239
|
const direction3 = _getContextValue(activeCtx, activeProperty, "@direction");
|
|
27240
27240
|
if (direction3 !== null) {
|
|
@@ -27857,10 +27857,10 @@ var PodOS = (() => {
|
|
|
27857
27857
|
rval["@type"] = type5;
|
|
27858
27858
|
}
|
|
27859
27859
|
} else if (rdfDirection === "i18n-datatype" && type5.startsWith("https://www.w3.org/ns/i18n#")) {
|
|
27860
|
-
const [,
|
|
27861
|
-
if (
|
|
27862
|
-
rval["@language"] =
|
|
27863
|
-
if (!
|
|
27860
|
+
const [, language9, direction3] = type5.split(/[#_]/);
|
|
27861
|
+
if (language9.length > 0) {
|
|
27862
|
+
rval["@language"] = language9;
|
|
27863
|
+
if (!language9.match(REGEX_BCP47)) {
|
|
27864
27864
|
if (options.eventHandler) {
|
|
27865
27865
|
_handleEvent({
|
|
27866
27866
|
event: {
|
|
@@ -27869,7 +27869,7 @@ var PodOS = (() => {
|
|
|
27869
27869
|
level: "warning",
|
|
27870
27870
|
message: "@language value must be valid BCP47.",
|
|
27871
27871
|
details: {
|
|
27872
|
-
language:
|
|
27872
|
+
language: language9
|
|
27873
27873
|
}
|
|
27874
27874
|
},
|
|
27875
27875
|
options
|
|
@@ -28162,9 +28162,9 @@ var PodOS = (() => {
|
|
|
28162
28162
|
object8.value = value7.toFixed(0);
|
|
28163
28163
|
object8.datatype.value = datatype3 || XSD_INTEGER;
|
|
28164
28164
|
} else if ("@direction" in item4 && rdfDirection === "i18n-datatype") {
|
|
28165
|
-
const
|
|
28165
|
+
const language9 = (item4["@language"] || "").toLowerCase();
|
|
28166
28166
|
const direction3 = item4["@direction"];
|
|
28167
|
-
const datatype4 = `https://www.w3.org/ns/i18n#${
|
|
28167
|
+
const datatype4 = `https://www.w3.org/ns/i18n#${language9}_${direction3}`;
|
|
28168
28168
|
object8.datatype.value = datatype4;
|
|
28169
28169
|
object8.value = value7;
|
|
28170
28170
|
} else if ("@direction" in item4 && rdfDirection === "compound-literal") {
|
|
@@ -28755,20 +28755,20 @@ var PodOS = (() => {
|
|
|
28755
28755
|
parent4.push(output2);
|
|
28756
28756
|
}
|
|
28757
28757
|
}
|
|
28758
|
-
function _nodeMatch(state2,
|
|
28758
|
+
function _nodeMatch(state2, pattern7, value7, flags3) {
|
|
28759
28759
|
if (!("@id" in value7)) {
|
|
28760
28760
|
return false;
|
|
28761
28761
|
}
|
|
28762
28762
|
const nodeObject = state2.subjects[value7["@id"]];
|
|
28763
|
-
return nodeObject && _filterSubject(state2, nodeObject,
|
|
28763
|
+
return nodeObject && _filterSubject(state2, nodeObject, pattern7, flags3);
|
|
28764
28764
|
}
|
|
28765
|
-
function _valueMatch(
|
|
28765
|
+
function _valueMatch(pattern7, value7) {
|
|
28766
28766
|
const v1 = value7["@value"];
|
|
28767
28767
|
const t1 = value7["@type"];
|
|
28768
28768
|
const l1 = value7["@language"];
|
|
28769
|
-
const v2 =
|
|
28770
|
-
const t2 =
|
|
28771
|
-
const l2 =
|
|
28769
|
+
const v2 = pattern7["@value"] ? types2.isArray(pattern7["@value"]) ? pattern7["@value"] : [pattern7["@value"]] : [];
|
|
28770
|
+
const t2 = pattern7["@type"] ? types2.isArray(pattern7["@type"]) ? pattern7["@type"] : [pattern7["@type"]] : [];
|
|
28771
|
+
const l2 = pattern7["@language"] ? types2.isArray(pattern7["@language"]) ? pattern7["@language"] : [pattern7["@language"]] : [];
|
|
28772
28772
|
if (v2.length === 0 && t2.length === 0 && l2.length === 0) {
|
|
28773
28773
|
return true;
|
|
28774
28774
|
}
|
|
@@ -29547,7 +29547,7 @@ var PodOS = (() => {
|
|
|
29547
29547
|
api.compactValue = ({ activeCtx, activeProperty, value: value7, options }) => {
|
|
29548
29548
|
if (_isValue(value7)) {
|
|
29549
29549
|
const type6 = _getContextValue(activeCtx, activeProperty, "@type");
|
|
29550
|
-
const
|
|
29550
|
+
const language9 = _getContextValue(activeCtx, activeProperty, "@language");
|
|
29551
29551
|
const direction3 = _getContextValue(activeCtx, activeProperty, "@direction");
|
|
29552
29552
|
const container2 = _getContextValue(activeCtx, activeProperty, "@container") || [];
|
|
29553
29553
|
const preserveIndex = "@index" in value7 && !container2.includes("@index");
|
|
@@ -29555,10 +29555,10 @@ var PodOS = (() => {
|
|
|
29555
29555
|
if (value7["@type"] === type6) {
|
|
29556
29556
|
return value7["@value"];
|
|
29557
29557
|
}
|
|
29558
|
-
if ("@language" in value7 && value7["@language"] ===
|
|
29558
|
+
if ("@language" in value7 && value7["@language"] === language9 && "@direction" in value7 && value7["@direction"] === direction3) {
|
|
29559
29559
|
return value7["@value"];
|
|
29560
29560
|
}
|
|
29561
|
-
if ("@language" in value7 && value7["@language"] ===
|
|
29561
|
+
if ("@language" in value7 && value7["@language"] === language9) {
|
|
29562
29562
|
return value7["@value"];
|
|
29563
29563
|
}
|
|
29564
29564
|
if ("@direction" in value7 && value7["@direction"] === direction3) {
|
|
@@ -30743,16 +30743,16 @@ var PodOS = (() => {
|
|
|
30743
30743
|
Buffer3.allocUnsafeSlow = function(size4) {
|
|
30744
30744
|
return allocUnsafe(size4);
|
|
30745
30745
|
};
|
|
30746
|
-
function fromString(
|
|
30746
|
+
function fromString(string3, encoding3) {
|
|
30747
30747
|
if (typeof encoding3 !== "string" || encoding3 === "") {
|
|
30748
30748
|
encoding3 = "utf8";
|
|
30749
30749
|
}
|
|
30750
30750
|
if (!Buffer3.isEncoding(encoding3)) {
|
|
30751
30751
|
throw new TypeError("Unknown encoding: " + encoding3);
|
|
30752
30752
|
}
|
|
30753
|
-
const length3 = byteLength(
|
|
30753
|
+
const length3 = byteLength(string3, encoding3) | 0;
|
|
30754
30754
|
let buf = createBuffer(length3);
|
|
30755
|
-
const actual2 = buf.write(
|
|
30755
|
+
const actual2 = buf.write(string3, encoding3);
|
|
30756
30756
|
if (actual2 !== length3) {
|
|
30757
30757
|
buf = buf.slice(0, actual2);
|
|
30758
30758
|
}
|
|
@@ -30904,19 +30904,19 @@ var PodOS = (() => {
|
|
|
30904
30904
|
}
|
|
30905
30905
|
return buffer;
|
|
30906
30906
|
};
|
|
30907
|
-
function byteLength(
|
|
30908
|
-
if (Buffer3.isBuffer(
|
|
30909
|
-
return
|
|
30907
|
+
function byteLength(string3, encoding3) {
|
|
30908
|
+
if (Buffer3.isBuffer(string3)) {
|
|
30909
|
+
return string3.length;
|
|
30910
30910
|
}
|
|
30911
|
-
if (ArrayBuffer.isView(
|
|
30912
|
-
return
|
|
30911
|
+
if (ArrayBuffer.isView(string3) || isInstance(string3, ArrayBuffer)) {
|
|
30912
|
+
return string3.byteLength;
|
|
30913
30913
|
}
|
|
30914
|
-
if (typeof
|
|
30914
|
+
if (typeof string3 !== "string") {
|
|
30915
30915
|
throw new TypeError(
|
|
30916
|
-
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof
|
|
30916
|
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string3
|
|
30917
30917
|
);
|
|
30918
30918
|
}
|
|
30919
|
-
const len =
|
|
30919
|
+
const len = string3.length;
|
|
30920
30920
|
const mustMatch = arguments.length > 2 && arguments[2] === true;
|
|
30921
30921
|
if (!mustMatch && len === 0) return 0;
|
|
30922
30922
|
let loweredCase = false;
|
|
@@ -30928,7 +30928,7 @@ var PodOS = (() => {
|
|
|
30928
30928
|
return len;
|
|
30929
30929
|
case "utf8":
|
|
30930
30930
|
case "utf-8":
|
|
30931
|
-
return utf8ToBytes(
|
|
30931
|
+
return utf8ToBytes(string3).length;
|
|
30932
30932
|
case "ucs2":
|
|
30933
30933
|
case "ucs-2":
|
|
30934
30934
|
case "utf16le":
|
|
@@ -30937,10 +30937,10 @@ var PodOS = (() => {
|
|
|
30937
30937
|
case "hex":
|
|
30938
30938
|
return len >>> 1;
|
|
30939
30939
|
case "base64":
|
|
30940
|
-
return base64ToBytes(
|
|
30940
|
+
return base64ToBytes(string3).length;
|
|
30941
30941
|
default:
|
|
30942
30942
|
if (loweredCase) {
|
|
30943
|
-
return mustMatch ? -1 : utf8ToBytes(
|
|
30943
|
+
return mustMatch ? -1 : utf8ToBytes(string3).length;
|
|
30944
30944
|
}
|
|
30945
30945
|
encoding3 = ("" + encoding3).toLowerCase();
|
|
30946
30946
|
loweredCase = true;
|
|
@@ -31212,7 +31212,7 @@ var PodOS = (() => {
|
|
|
31212
31212
|
Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding3) {
|
|
31213
31213
|
return bidirectionalIndexOf(this, val, byteOffset, encoding3, false);
|
|
31214
31214
|
};
|
|
31215
|
-
function hexWrite(buf,
|
|
31215
|
+
function hexWrite(buf, string3, offset3, length3) {
|
|
31216
31216
|
offset3 = Number(offset3) || 0;
|
|
31217
31217
|
const remaining = buf.length - offset3;
|
|
31218
31218
|
if (!length3) {
|
|
@@ -31223,31 +31223,31 @@ var PodOS = (() => {
|
|
|
31223
31223
|
length3 = remaining;
|
|
31224
31224
|
}
|
|
31225
31225
|
}
|
|
31226
|
-
const strLen =
|
|
31226
|
+
const strLen = string3.length;
|
|
31227
31227
|
if (length3 > strLen / 2) {
|
|
31228
31228
|
length3 = strLen / 2;
|
|
31229
31229
|
}
|
|
31230
31230
|
let i;
|
|
31231
31231
|
for (i = 0; i < length3; ++i) {
|
|
31232
|
-
const parsed = parseInt(
|
|
31232
|
+
const parsed = parseInt(string3.substr(i * 2, 2), 16);
|
|
31233
31233
|
if (numberIsNaN(parsed)) return i;
|
|
31234
31234
|
buf[offset3 + i] = parsed;
|
|
31235
31235
|
}
|
|
31236
31236
|
return i;
|
|
31237
31237
|
}
|
|
31238
|
-
function utf8Write(buf,
|
|
31239
|
-
return blitBuffer(utf8ToBytes(
|
|
31238
|
+
function utf8Write(buf, string3, offset3, length3) {
|
|
31239
|
+
return blitBuffer(utf8ToBytes(string3, buf.length - offset3), buf, offset3, length3);
|
|
31240
31240
|
}
|
|
31241
|
-
function asciiWrite(buf,
|
|
31242
|
-
return blitBuffer(asciiToBytes(
|
|
31241
|
+
function asciiWrite(buf, string3, offset3, length3) {
|
|
31242
|
+
return blitBuffer(asciiToBytes(string3), buf, offset3, length3);
|
|
31243
31243
|
}
|
|
31244
|
-
function base64Write(buf,
|
|
31245
|
-
return blitBuffer(base64ToBytes(
|
|
31244
|
+
function base64Write(buf, string3, offset3, length3) {
|
|
31245
|
+
return blitBuffer(base64ToBytes(string3), buf, offset3, length3);
|
|
31246
31246
|
}
|
|
31247
|
-
function ucs2Write(buf,
|
|
31248
|
-
return blitBuffer(utf16leToBytes(
|
|
31247
|
+
function ucs2Write(buf, string3, offset3, length3) {
|
|
31248
|
+
return blitBuffer(utf16leToBytes(string3, buf.length - offset3), buf, offset3, length3);
|
|
31249
31249
|
}
|
|
31250
|
-
Buffer3.prototype.write = function write(
|
|
31250
|
+
Buffer3.prototype.write = function write(string3, offset3, length3, encoding3) {
|
|
31251
31251
|
if (offset3 === void 0) {
|
|
31252
31252
|
encoding3 = "utf8";
|
|
31253
31253
|
length3 = this.length;
|
|
@@ -31272,7 +31272,7 @@ var PodOS = (() => {
|
|
|
31272
31272
|
}
|
|
31273
31273
|
const remaining = this.length - offset3;
|
|
31274
31274
|
if (length3 === void 0 || length3 > remaining) length3 = remaining;
|
|
31275
|
-
if (
|
|
31275
|
+
if (string3.length > 0 && (length3 < 0 || offset3 < 0) || offset3 > this.length) {
|
|
31276
31276
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
31277
31277
|
}
|
|
31278
31278
|
if (!encoding3) encoding3 = "utf8";
|
|
@@ -31280,21 +31280,21 @@ var PodOS = (() => {
|
|
|
31280
31280
|
for (; ; ) {
|
|
31281
31281
|
switch (encoding3) {
|
|
31282
31282
|
case "hex":
|
|
31283
|
-
return hexWrite(this,
|
|
31283
|
+
return hexWrite(this, string3, offset3, length3);
|
|
31284
31284
|
case "utf8":
|
|
31285
31285
|
case "utf-8":
|
|
31286
|
-
return utf8Write(this,
|
|
31286
|
+
return utf8Write(this, string3, offset3, length3);
|
|
31287
31287
|
case "ascii":
|
|
31288
31288
|
case "latin1":
|
|
31289
31289
|
case "binary":
|
|
31290
|
-
return asciiWrite(this,
|
|
31290
|
+
return asciiWrite(this, string3, offset3, length3);
|
|
31291
31291
|
case "base64":
|
|
31292
|
-
return base64Write(this,
|
|
31292
|
+
return base64Write(this, string3, offset3, length3);
|
|
31293
31293
|
case "ucs2":
|
|
31294
31294
|
case "ucs-2":
|
|
31295
31295
|
case "utf16le":
|
|
31296
31296
|
case "utf-16le":
|
|
31297
|
-
return ucs2Write(this,
|
|
31297
|
+
return ucs2Write(this, string3, offset3, length3);
|
|
31298
31298
|
default:
|
|
31299
31299
|
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding3);
|
|
31300
31300
|
encoding3 = ("" + encoding3).toLowerCase();
|
|
@@ -32082,14 +32082,14 @@ var PodOS = (() => {
|
|
|
32082
32082
|
}
|
|
32083
32083
|
return str;
|
|
32084
32084
|
}
|
|
32085
|
-
function utf8ToBytes(
|
|
32085
|
+
function utf8ToBytes(string3, units2) {
|
|
32086
32086
|
units2 = units2 || Infinity;
|
|
32087
32087
|
let codePoint;
|
|
32088
|
-
const length3 =
|
|
32088
|
+
const length3 = string3.length;
|
|
32089
32089
|
let leadSurrogate = null;
|
|
32090
32090
|
const bytes = [];
|
|
32091
32091
|
for (let i = 0; i < length3; ++i) {
|
|
32092
|
-
codePoint =
|
|
32092
|
+
codePoint = string3.charCodeAt(i);
|
|
32093
32093
|
if (codePoint > 55295 && codePoint < 57344) {
|
|
32094
32094
|
if (!leadSurrogate) {
|
|
32095
32095
|
if (codePoint > 56319) {
|
|
@@ -32551,17 +32551,17 @@ var PodOS = (() => {
|
|
|
32551
32551
|
return this._input = input2;
|
|
32552
32552
|
}
|
|
32553
32553
|
const length3 = matchLength || match[0].length;
|
|
32554
|
-
const
|
|
32555
|
-
this.previousToken =
|
|
32554
|
+
const token2 = emitToken(type5, value7, prefix3, line4, length3);
|
|
32555
|
+
this.previousToken = token2;
|
|
32556
32556
|
this._previousMarker = type5;
|
|
32557
32557
|
input2 = input2.substr(length3, input2.length);
|
|
32558
32558
|
}
|
|
32559
32559
|
function emitToken(type5, value7, prefix3, line4, length3) {
|
|
32560
32560
|
const start3 = input2 ? currentLineLength - input2.length : currentLineLength;
|
|
32561
32561
|
const end2 = start3 + length3;
|
|
32562
|
-
const
|
|
32563
|
-
callback(null,
|
|
32564
|
-
return
|
|
32562
|
+
const token2 = { type: type5, value: value7, prefix: prefix3, line: line4, start: start3, end: end2 };
|
|
32563
|
+
callback(null, token2);
|
|
32564
|
+
return token2;
|
|
32565
32565
|
}
|
|
32566
32566
|
function reportSyntaxError(self2) {
|
|
32567
32567
|
callback(self2._syntaxError(/^\S*/.exec(input2)[0]));
|
|
@@ -33002,10 +33002,10 @@ var PodOS = (() => {
|
|
|
33002
33002
|
}
|
|
33003
33003
|
// ### `_restoreContext` restores the parent context
|
|
33004
33004
|
// when leaving a scope (list, blank node, formula)
|
|
33005
|
-
_restoreContext(type5,
|
|
33005
|
+
_restoreContext(type5, token2) {
|
|
33006
33006
|
const context4 = this._contextStack.pop();
|
|
33007
33007
|
if (!context4 || context4.type !== type5)
|
|
33008
|
-
return this._error(`Unexpected ${
|
|
33008
|
+
return this._error(`Unexpected ${token2.type}`, token2);
|
|
33009
33009
|
this._subject = context4.subject;
|
|
33010
33010
|
this._predicate = context4.predicate;
|
|
33011
33011
|
this._object = context4.object;
|
|
@@ -33017,12 +33017,12 @@ var PodOS = (() => {
|
|
|
33017
33017
|
}
|
|
33018
33018
|
}
|
|
33019
33019
|
// ### `_readInTopContext` reads a token when in the top context
|
|
33020
|
-
_readInTopContext(
|
|
33021
|
-
switch (
|
|
33020
|
+
_readInTopContext(token2) {
|
|
33021
|
+
switch (token2.type) {
|
|
33022
33022
|
// If an EOF token arrives in the top context, signal that we're done
|
|
33023
33023
|
case "eof":
|
|
33024
33024
|
if (this._graph !== null)
|
|
33025
|
-
return this._error("Unclosed graph",
|
|
33025
|
+
return this._error("Unclosed graph", token2);
|
|
33026
33026
|
delete this._prefixes._;
|
|
33027
33027
|
return this._callback(null, null, this._prefixes);
|
|
33028
33028
|
// It could be a prefix declaration
|
|
@@ -33047,49 +33047,49 @@ var PodOS = (() => {
|
|
|
33047
33047
|
return this._readNamedGraphLabel;
|
|
33048
33048
|
// Otherwise, the next token must be a subject
|
|
33049
33049
|
default:
|
|
33050
|
-
return this._readSubject(
|
|
33050
|
+
return this._readSubject(token2);
|
|
33051
33051
|
}
|
|
33052
33052
|
}
|
|
33053
33053
|
// ### `_readEntity` reads an IRI, prefixed name, blank node, or variable
|
|
33054
|
-
_readEntity(
|
|
33054
|
+
_readEntity(token2, quantifier) {
|
|
33055
33055
|
let value7;
|
|
33056
|
-
switch (
|
|
33056
|
+
switch (token2.type) {
|
|
33057
33057
|
// Read a relative or absolute IRI
|
|
33058
33058
|
case "IRI":
|
|
33059
33059
|
case "typeIRI":
|
|
33060
|
-
const iri = this._resolveIRI(
|
|
33060
|
+
const iri = this._resolveIRI(token2.value);
|
|
33061
33061
|
if (iri === null)
|
|
33062
|
-
return this._error("Invalid IRI",
|
|
33062
|
+
return this._error("Invalid IRI", token2);
|
|
33063
33063
|
value7 = this._factory.namedNode(iri);
|
|
33064
33064
|
break;
|
|
33065
33065
|
// Read a prefixed name
|
|
33066
33066
|
case "type":
|
|
33067
33067
|
case "prefixed":
|
|
33068
|
-
const prefix3 = this._prefixes[
|
|
33068
|
+
const prefix3 = this._prefixes[token2.prefix];
|
|
33069
33069
|
if (prefix3 === void 0)
|
|
33070
|
-
return this._error(`Undefined prefix "${
|
|
33071
|
-
value7 = this._factory.namedNode(prefix3 +
|
|
33070
|
+
return this._error(`Undefined prefix "${token2.prefix}:"`, token2);
|
|
33071
|
+
value7 = this._factory.namedNode(prefix3 + token2.value);
|
|
33072
33072
|
break;
|
|
33073
33073
|
// Read a blank node
|
|
33074
33074
|
case "blank":
|
|
33075
|
-
value7 = this._factory.blankNode(this._prefixes[
|
|
33075
|
+
value7 = this._factory.blankNode(this._prefixes[token2.prefix] + token2.value);
|
|
33076
33076
|
break;
|
|
33077
33077
|
// Read a variable
|
|
33078
33078
|
case "var":
|
|
33079
|
-
value7 = this._factory.variable(
|
|
33079
|
+
value7 = this._factory.variable(token2.value.substr(1));
|
|
33080
33080
|
break;
|
|
33081
33081
|
// Everything else is not an entity
|
|
33082
33082
|
default:
|
|
33083
|
-
return this._error(`Expected entity but got ${
|
|
33083
|
+
return this._error(`Expected entity but got ${token2.type}`, token2);
|
|
33084
33084
|
}
|
|
33085
33085
|
if (!quantifier && this._n3Mode && value7.id in this._quantified)
|
|
33086
33086
|
value7 = this._quantified[value7.id];
|
|
33087
33087
|
return value7;
|
|
33088
33088
|
}
|
|
33089
33089
|
// ### `_readSubject` reads a quad's subject
|
|
33090
|
-
_readSubject(
|
|
33090
|
+
_readSubject(token2) {
|
|
33091
33091
|
this._predicate = null;
|
|
33092
|
-
switch (
|
|
33092
|
+
switch (token2.type) {
|
|
33093
33093
|
case "[":
|
|
33094
33094
|
this._saveContext(
|
|
33095
33095
|
"blank",
|
|
@@ -33105,7 +33105,7 @@ var PodOS = (() => {
|
|
|
33105
33105
|
return this._readListItem;
|
|
33106
33106
|
case "{":
|
|
33107
33107
|
if (!this._n3Mode)
|
|
33108
|
-
return this._error("Unexpected graph",
|
|
33108
|
+
return this._error("Unexpected graph", token2);
|
|
33109
33109
|
this._saveContext(
|
|
33110
33110
|
"formula",
|
|
33111
33111
|
this._graph,
|
|
@@ -33115,38 +33115,38 @@ var PodOS = (() => {
|
|
|
33115
33115
|
);
|
|
33116
33116
|
return this._readSubject;
|
|
33117
33117
|
case "}":
|
|
33118
|
-
return this._readPunctuation(
|
|
33118
|
+
return this._readPunctuation(token2);
|
|
33119
33119
|
case "@forSome":
|
|
33120
33120
|
if (!this._n3Mode)
|
|
33121
|
-
return this._error('Unexpected "@forSome"',
|
|
33121
|
+
return this._error('Unexpected "@forSome"', token2);
|
|
33122
33122
|
this._subject = null;
|
|
33123
33123
|
this._predicate = this.N3_FORSOME;
|
|
33124
33124
|
this._quantifier = "blankNode";
|
|
33125
33125
|
return this._readQuantifierList;
|
|
33126
33126
|
case "@forAll":
|
|
33127
33127
|
if (!this._n3Mode)
|
|
33128
|
-
return this._error('Unexpected "@forAll"',
|
|
33128
|
+
return this._error('Unexpected "@forAll"', token2);
|
|
33129
33129
|
this._subject = null;
|
|
33130
33130
|
this._predicate = this.N3_FORALL;
|
|
33131
33131
|
this._quantifier = "variable";
|
|
33132
33132
|
return this._readQuantifierList;
|
|
33133
33133
|
case "literal":
|
|
33134
33134
|
if (!this._n3Mode)
|
|
33135
|
-
return this._error("Unexpected literal",
|
|
33136
|
-
if (
|
|
33137
|
-
this._literalValue =
|
|
33135
|
+
return this._error("Unexpected literal", token2);
|
|
33136
|
+
if (token2.prefix.length === 0) {
|
|
33137
|
+
this._literalValue = token2.value;
|
|
33138
33138
|
return this._completeSubjectLiteral;
|
|
33139
33139
|
} else
|
|
33140
|
-
this._subject = this._factory.literal(
|
|
33140
|
+
this._subject = this._factory.literal(token2.value, this._factory.namedNode(token2.prefix));
|
|
33141
33141
|
break;
|
|
33142
33142
|
case "<<":
|
|
33143
33143
|
if (!this._supportsRDFStar)
|
|
33144
|
-
return this._error("Unexpected RDF-star syntax",
|
|
33144
|
+
return this._error("Unexpected RDF-star syntax", token2);
|
|
33145
33145
|
this._saveContext("<<", this._graph, null, null, null);
|
|
33146
33146
|
this._graph = null;
|
|
33147
33147
|
return this._readSubject;
|
|
33148
33148
|
default:
|
|
33149
|
-
if ((this._subject = this._readEntity(
|
|
33149
|
+
if ((this._subject = this._readEntity(token2)) === void 0)
|
|
33150
33150
|
return;
|
|
33151
33151
|
if (this._n3Mode)
|
|
33152
33152
|
return this._getPathReader(this._readPredicateOrNamedGraph);
|
|
@@ -33154,23 +33154,23 @@ var PodOS = (() => {
|
|
|
33154
33154
|
return this._readPredicateOrNamedGraph;
|
|
33155
33155
|
}
|
|
33156
33156
|
// ### `_readPredicate` reads a quad's predicate
|
|
33157
|
-
_readPredicate(
|
|
33158
|
-
const type5 =
|
|
33157
|
+
_readPredicate(token2) {
|
|
33158
|
+
const type5 = token2.type;
|
|
33159
33159
|
switch (type5) {
|
|
33160
33160
|
case "inverse":
|
|
33161
33161
|
this._inversePredicate = true;
|
|
33162
33162
|
case "abbreviation":
|
|
33163
|
-
this._predicate = this.ABBREVIATIONS[
|
|
33163
|
+
this._predicate = this.ABBREVIATIONS[token2.value];
|
|
33164
33164
|
break;
|
|
33165
33165
|
case ".":
|
|
33166
33166
|
case "]":
|
|
33167
33167
|
case "}":
|
|
33168
33168
|
if (this._predicate === null)
|
|
33169
|
-
return this._error(`Unexpected ${type5}`,
|
|
33169
|
+
return this._error(`Unexpected ${type5}`, token2);
|
|
33170
33170
|
this._subject = null;
|
|
33171
|
-
return type5 === "]" ? this._readBlankNodeTail(
|
|
33171
|
+
return type5 === "]" ? this._readBlankNodeTail(token2) : this._readPunctuation(token2);
|
|
33172
33172
|
case ";":
|
|
33173
|
-
return this._predicate !== null ? this._readPredicate : this._error("Expected predicate but got ;",
|
|
33173
|
+
return this._predicate !== null ? this._readPredicate : this._error("Expected predicate but got ;", token2);
|
|
33174
33174
|
case "[":
|
|
33175
33175
|
if (this._n3Mode) {
|
|
33176
33176
|
this._saveContext(
|
|
@@ -33184,22 +33184,22 @@ var PodOS = (() => {
|
|
|
33184
33184
|
}
|
|
33185
33185
|
case "blank":
|
|
33186
33186
|
if (!this._n3Mode)
|
|
33187
|
-
return this._error("Disallowed blank node as predicate",
|
|
33187
|
+
return this._error("Disallowed blank node as predicate", token2);
|
|
33188
33188
|
default:
|
|
33189
|
-
if ((this._predicate = this._readEntity(
|
|
33189
|
+
if ((this._predicate = this._readEntity(token2)) === void 0)
|
|
33190
33190
|
return;
|
|
33191
33191
|
}
|
|
33192
33192
|
return this._readObject;
|
|
33193
33193
|
}
|
|
33194
33194
|
// ### `_readObject` reads a quad's object
|
|
33195
|
-
_readObject(
|
|
33196
|
-
switch (
|
|
33195
|
+
_readObject(token2) {
|
|
33196
|
+
switch (token2.type) {
|
|
33197
33197
|
case "literal":
|
|
33198
|
-
if (
|
|
33199
|
-
this._literalValue =
|
|
33198
|
+
if (token2.prefix.length === 0) {
|
|
33199
|
+
this._literalValue = token2.value;
|
|
33200
33200
|
return this._readDataTypeOrLang;
|
|
33201
33201
|
} else
|
|
33202
|
-
this._object = this._factory.literal(
|
|
33202
|
+
this._object = this._factory.literal(token2.value, this._factory.namedNode(token2.prefix));
|
|
33203
33203
|
break;
|
|
33204
33204
|
case "[":
|
|
33205
33205
|
this._saveContext(
|
|
@@ -33216,7 +33216,7 @@ var PodOS = (() => {
|
|
|
33216
33216
|
return this._readListItem;
|
|
33217
33217
|
case "{":
|
|
33218
33218
|
if (!this._n3Mode)
|
|
33219
|
-
return this._error("Unexpected graph",
|
|
33219
|
+
return this._error("Unexpected graph", token2);
|
|
33220
33220
|
this._saveContext(
|
|
33221
33221
|
"formula",
|
|
33222
33222
|
this._graph,
|
|
@@ -33227,12 +33227,12 @@ var PodOS = (() => {
|
|
|
33227
33227
|
return this._readSubject;
|
|
33228
33228
|
case "<<":
|
|
33229
33229
|
if (!this._supportsRDFStar)
|
|
33230
|
-
return this._error("Unexpected RDF-star syntax",
|
|
33230
|
+
return this._error("Unexpected RDF-star syntax", token2);
|
|
33231
33231
|
this._saveContext("<<", this._graph, this._subject, this._predicate, null);
|
|
33232
33232
|
this._graph = null;
|
|
33233
33233
|
return this._readSubject;
|
|
33234
33234
|
default:
|
|
33235
|
-
if ((this._object = this._readEntity(
|
|
33235
|
+
if ((this._object = this._readEntity(token2)) === void 0)
|
|
33236
33236
|
return;
|
|
33237
33237
|
if (this._n3Mode)
|
|
33238
33238
|
return this._getPathReader(this._getContextEndReader());
|
|
@@ -33240,34 +33240,34 @@ var PodOS = (() => {
|
|
|
33240
33240
|
return this._getContextEndReader();
|
|
33241
33241
|
}
|
|
33242
33242
|
// ### `_readPredicateOrNamedGraph` reads a quad's predicate, or a named graph
|
|
33243
|
-
_readPredicateOrNamedGraph(
|
|
33244
|
-
return
|
|
33243
|
+
_readPredicateOrNamedGraph(token2) {
|
|
33244
|
+
return token2.type === "{" ? this._readGraph(token2) : this._readPredicate(token2);
|
|
33245
33245
|
}
|
|
33246
33246
|
// ### `_readGraph` reads a graph
|
|
33247
|
-
_readGraph(
|
|
33248
|
-
if (
|
|
33249
|
-
return this._error(`Expected graph but got ${
|
|
33247
|
+
_readGraph(token2) {
|
|
33248
|
+
if (token2.type !== "{")
|
|
33249
|
+
return this._error(`Expected graph but got ${token2.type}`, token2);
|
|
33250
33250
|
this._graph = this._subject, this._subject = null;
|
|
33251
33251
|
return this._readSubject;
|
|
33252
33252
|
}
|
|
33253
33253
|
// ### `_readBlankNodeHead` reads the head of a blank node
|
|
33254
|
-
_readBlankNodeHead(
|
|
33255
|
-
if (
|
|
33254
|
+
_readBlankNodeHead(token2) {
|
|
33255
|
+
if (token2.type === "]") {
|
|
33256
33256
|
this._subject = null;
|
|
33257
|
-
return this._readBlankNodeTail(
|
|
33257
|
+
return this._readBlankNodeTail(token2);
|
|
33258
33258
|
} else {
|
|
33259
33259
|
this._predicate = null;
|
|
33260
|
-
return this._readPredicate(
|
|
33260
|
+
return this._readPredicate(token2);
|
|
33261
33261
|
}
|
|
33262
33262
|
}
|
|
33263
33263
|
// ### `_readBlankNodeTail` reads the end of a blank node
|
|
33264
|
-
_readBlankNodeTail(
|
|
33265
|
-
if (
|
|
33266
|
-
return this._readBlankNodePunctuation(
|
|
33264
|
+
_readBlankNodeTail(token2) {
|
|
33265
|
+
if (token2.type !== "]")
|
|
33266
|
+
return this._readBlankNodePunctuation(token2);
|
|
33267
33267
|
if (this._subject !== null)
|
|
33268
33268
|
this._emit(this._subject, this._predicate, this._object, this._graph);
|
|
33269
33269
|
const empty = this._predicate === null;
|
|
33270
|
-
this._restoreContext("blank",
|
|
33270
|
+
this._restoreContext("blank", token2);
|
|
33271
33271
|
if (this._object !== null)
|
|
33272
33272
|
return this._getContextEndReader();
|
|
33273
33273
|
else if (this._predicate !== null)
|
|
@@ -33276,21 +33276,21 @@ var PodOS = (() => {
|
|
|
33276
33276
|
return empty ? this._readPredicateOrNamedGraph : this._readPredicateAfterBlank;
|
|
33277
33277
|
}
|
|
33278
33278
|
// ### `_readPredicateAfterBlank` reads a predicate after an anonymous blank node
|
|
33279
|
-
_readPredicateAfterBlank(
|
|
33280
|
-
switch (
|
|
33279
|
+
_readPredicateAfterBlank(token2) {
|
|
33280
|
+
switch (token2.type) {
|
|
33281
33281
|
case ".":
|
|
33282
33282
|
case "}":
|
|
33283
33283
|
this._subject = null;
|
|
33284
|
-
return this._readPunctuation(
|
|
33284
|
+
return this._readPunctuation(token2);
|
|
33285
33285
|
default:
|
|
33286
|
-
return this._readPredicate(
|
|
33286
|
+
return this._readPredicate(token2);
|
|
33287
33287
|
}
|
|
33288
33288
|
}
|
|
33289
33289
|
// ### `_readListItem` reads items from a list
|
|
33290
|
-
_readListItem(
|
|
33290
|
+
_readListItem(token2) {
|
|
33291
33291
|
let item4 = null, list = null, next3 = this._readListItem;
|
|
33292
33292
|
const previousList = this._subject, stack = this._contextStack, parent4 = stack[stack.length - 1];
|
|
33293
|
-
switch (
|
|
33293
|
+
switch (token2.type) {
|
|
33294
33294
|
case "[":
|
|
33295
33295
|
this._saveContext(
|
|
33296
33296
|
"blank",
|
|
@@ -33312,7 +33312,7 @@ var PodOS = (() => {
|
|
|
33312
33312
|
this._subject = null;
|
|
33313
33313
|
break;
|
|
33314
33314
|
case ")":
|
|
33315
|
-
this._restoreContext("list",
|
|
33315
|
+
this._restoreContext("list", token2);
|
|
33316
33316
|
if (stack.length !== 0 && stack[stack.length - 1].type === "list")
|
|
33317
33317
|
this._emit(this._subject, this._predicate, this._object, this._graph);
|
|
33318
33318
|
if (this._predicate === null) {
|
|
@@ -33327,17 +33327,17 @@ var PodOS = (() => {
|
|
|
33327
33327
|
list = this.RDF_NIL;
|
|
33328
33328
|
break;
|
|
33329
33329
|
case "literal":
|
|
33330
|
-
if (
|
|
33331
|
-
this._literalValue =
|
|
33330
|
+
if (token2.prefix.length === 0) {
|
|
33331
|
+
this._literalValue = token2.value;
|
|
33332
33332
|
next3 = this._readListItemDataTypeOrLang;
|
|
33333
33333
|
} else {
|
|
33334
|
-
item4 = this._factory.literal(
|
|
33334
|
+
item4 = this._factory.literal(token2.value, this._factory.namedNode(token2.prefix));
|
|
33335
33335
|
next3 = this._getContextEndReader();
|
|
33336
33336
|
}
|
|
33337
33337
|
break;
|
|
33338
33338
|
case "{":
|
|
33339
33339
|
if (!this._n3Mode)
|
|
33340
|
-
return this._error("Unexpected graph",
|
|
33340
|
+
return this._error("Unexpected graph", token2);
|
|
33341
33341
|
this._saveContext(
|
|
33342
33342
|
"formula",
|
|
33343
33343
|
this._graph,
|
|
@@ -33347,7 +33347,7 @@ var PodOS = (() => {
|
|
|
33347
33347
|
);
|
|
33348
33348
|
return this._readSubject;
|
|
33349
33349
|
default:
|
|
33350
|
-
if ((item4 = this._readEntity(
|
|
33350
|
+
if ((item4 = this._readEntity(token2)) === void 0)
|
|
33351
33351
|
return;
|
|
33352
33352
|
}
|
|
33353
33353
|
if (list === null)
|
|
@@ -33361,7 +33361,7 @@ var PodOS = (() => {
|
|
|
33361
33361
|
this._emit(previousList, this.RDF_REST, list, this._graph);
|
|
33362
33362
|
}
|
|
33363
33363
|
if (item4 !== null) {
|
|
33364
|
-
if (this._n3Mode && (
|
|
33364
|
+
if (this._n3Mode && (token2.type === "IRI" || token2.type === "prefixed")) {
|
|
33365
33365
|
this._saveContext("item", this._graph, list, this.RDF_FIRST, item4);
|
|
33366
33366
|
this._subject = item4, this._predicate = null;
|
|
33367
33367
|
return this._getPathReader(this._readListItem);
|
|
@@ -33371,41 +33371,41 @@ var PodOS = (() => {
|
|
|
33371
33371
|
return next3;
|
|
33372
33372
|
}
|
|
33373
33373
|
// ### `_readDataTypeOrLang` reads an _optional_ datatype or language
|
|
33374
|
-
_readDataTypeOrLang(
|
|
33375
|
-
return this._completeObjectLiteral(
|
|
33374
|
+
_readDataTypeOrLang(token2) {
|
|
33375
|
+
return this._completeObjectLiteral(token2, false);
|
|
33376
33376
|
}
|
|
33377
33377
|
// ### `_readListItemDataTypeOrLang` reads an _optional_ datatype or language in a list
|
|
33378
|
-
_readListItemDataTypeOrLang(
|
|
33379
|
-
return this._completeObjectLiteral(
|
|
33378
|
+
_readListItemDataTypeOrLang(token2) {
|
|
33379
|
+
return this._completeObjectLiteral(token2, true);
|
|
33380
33380
|
}
|
|
33381
33381
|
// ### `_completeLiteral` completes a literal with an optional datatype or language
|
|
33382
|
-
_completeLiteral(
|
|
33382
|
+
_completeLiteral(token2) {
|
|
33383
33383
|
let literal4 = this._factory.literal(this._literalValue);
|
|
33384
|
-
switch (
|
|
33384
|
+
switch (token2.type) {
|
|
33385
33385
|
// Create a datatyped literal
|
|
33386
33386
|
case "type":
|
|
33387
33387
|
case "typeIRI":
|
|
33388
|
-
const datatype3 = this._readEntity(
|
|
33388
|
+
const datatype3 = this._readEntity(token2);
|
|
33389
33389
|
if (datatype3 === void 0) return;
|
|
33390
33390
|
literal4 = this._factory.literal(this._literalValue, datatype3);
|
|
33391
|
-
|
|
33391
|
+
token2 = null;
|
|
33392
33392
|
break;
|
|
33393
33393
|
// Create a language-tagged string
|
|
33394
33394
|
case "langcode":
|
|
33395
|
-
literal4 = this._factory.literal(this._literalValue,
|
|
33396
|
-
|
|
33395
|
+
literal4 = this._factory.literal(this._literalValue, token2.value);
|
|
33396
|
+
token2 = null;
|
|
33397
33397
|
break;
|
|
33398
33398
|
}
|
|
33399
|
-
return { token, literal: literal4 };
|
|
33399
|
+
return { token: token2, literal: literal4 };
|
|
33400
33400
|
}
|
|
33401
33401
|
// Completes a literal in subject position
|
|
33402
|
-
_completeSubjectLiteral(
|
|
33403
|
-
this._subject = this._completeLiteral(
|
|
33402
|
+
_completeSubjectLiteral(token2) {
|
|
33403
|
+
this._subject = this._completeLiteral(token2).literal;
|
|
33404
33404
|
return this._readPredicateOrNamedGraph;
|
|
33405
33405
|
}
|
|
33406
33406
|
// Completes a literal in object position
|
|
33407
|
-
_completeObjectLiteral(
|
|
33408
|
-
const completed2 = this._completeLiteral(
|
|
33407
|
+
_completeObjectLiteral(token2, listItem) {
|
|
33408
|
+
const completed2 = this._completeLiteral(token2);
|
|
33409
33409
|
if (!completed2)
|
|
33410
33410
|
return;
|
|
33411
33411
|
this._object = completed2.literal;
|
|
@@ -33419,25 +33419,25 @@ var PodOS = (() => {
|
|
|
33419
33419
|
}
|
|
33420
33420
|
}
|
|
33421
33421
|
// ### `_readFormulaTail` reads the end of a formula
|
|
33422
|
-
_readFormulaTail(
|
|
33423
|
-
if (
|
|
33424
|
-
return this._readPunctuation(
|
|
33422
|
+
_readFormulaTail(token2) {
|
|
33423
|
+
if (token2.type !== "}")
|
|
33424
|
+
return this._readPunctuation(token2);
|
|
33425
33425
|
if (this._subject !== null)
|
|
33426
33426
|
this._emit(this._subject, this._predicate, this._object, this._graph);
|
|
33427
|
-
this._restoreContext("formula",
|
|
33427
|
+
this._restoreContext("formula", token2);
|
|
33428
33428
|
return this._object === null ? this._readPredicate : this._getContextEndReader();
|
|
33429
33429
|
}
|
|
33430
33430
|
// ### `_readPunctuation` reads punctuation between quads or quad parts
|
|
33431
|
-
_readPunctuation(
|
|
33431
|
+
_readPunctuation(token2) {
|
|
33432
33432
|
let next3, graph3 = this._graph;
|
|
33433
33433
|
const subject6 = this._subject, inversePredicate = this._inversePredicate;
|
|
33434
|
-
switch (
|
|
33434
|
+
switch (token2.type) {
|
|
33435
33435
|
// A closing brace ends a graph
|
|
33436
33436
|
case "}":
|
|
33437
33437
|
if (this._graph === null)
|
|
33438
|
-
return this._error("Unexpected graph closing",
|
|
33438
|
+
return this._error("Unexpected graph closing", token2);
|
|
33439
33439
|
if (this._n3Mode)
|
|
33440
|
-
return this._readFormulaTail(
|
|
33440
|
+
return this._readFormulaTail(token2);
|
|
33441
33441
|
this._graph = null;
|
|
33442
33442
|
// A dot just ends the statement, without sharing anything with the next
|
|
33443
33443
|
case ".":
|
|
@@ -33456,7 +33456,7 @@ var PodOS = (() => {
|
|
|
33456
33456
|
// {| means that the current triple is annotated with predicate-object pairs.
|
|
33457
33457
|
case "{|":
|
|
33458
33458
|
if (!this._supportsRDFStar)
|
|
33459
|
-
return this._error("Unexpected RDF-star syntax",
|
|
33459
|
+
return this._error("Unexpected RDF-star syntax", token2);
|
|
33460
33460
|
const predicate4 = this._predicate, object8 = this._object;
|
|
33461
33461
|
this._subject = this._factory.quad(subject6, predicate4, object8, this.DEFAULTGRAPH);
|
|
33462
33462
|
next3 = this._readPredicate;
|
|
@@ -33464,16 +33464,16 @@ var PodOS = (() => {
|
|
|
33464
33464
|
// |} means that the current quoted triple in annotation syntax is finalized.
|
|
33465
33465
|
case "|}":
|
|
33466
33466
|
if (this._subject.termType !== "Quad")
|
|
33467
|
-
return this._error("Unexpected asserted triple closing",
|
|
33467
|
+
return this._error("Unexpected asserted triple closing", token2);
|
|
33468
33468
|
this._subject = null;
|
|
33469
33469
|
next3 = this._readPunctuation;
|
|
33470
33470
|
break;
|
|
33471
33471
|
default:
|
|
33472
|
-
if (this._supportsQuads && this._graph === null && (graph3 = this._readEntity(
|
|
33472
|
+
if (this._supportsQuads && this._graph === null && (graph3 = this._readEntity(token2)) !== void 0) {
|
|
33473
33473
|
next3 = this._readQuadPunctuation;
|
|
33474
33474
|
break;
|
|
33475
33475
|
}
|
|
33476
|
-
return this._error(`Expected punctuation to follow "${this._object.id}"`,
|
|
33476
|
+
return this._error(`Expected punctuation to follow "${this._object.id}"`, token2);
|
|
33477
33477
|
}
|
|
33478
33478
|
if (subject6 !== null) {
|
|
33479
33479
|
const predicate4 = this._predicate, object8 = this._object;
|
|
@@ -33485,9 +33485,9 @@ var PodOS = (() => {
|
|
|
33485
33485
|
return next3;
|
|
33486
33486
|
}
|
|
33487
33487
|
// ### `_readBlankNodePunctuation` reads punctuation in a blank node
|
|
33488
|
-
_readBlankNodePunctuation(
|
|
33488
|
+
_readBlankNodePunctuation(token2) {
|
|
33489
33489
|
let next3;
|
|
33490
|
-
switch (
|
|
33490
|
+
switch (token2.type) {
|
|
33491
33491
|
// Semicolon means the subject is shared; predicate and object are different
|
|
33492
33492
|
case ";":
|
|
33493
33493
|
next3 = this._readPredicate;
|
|
@@ -33497,81 +33497,81 @@ var PodOS = (() => {
|
|
|
33497
33497
|
next3 = this._readObject;
|
|
33498
33498
|
break;
|
|
33499
33499
|
default:
|
|
33500
|
-
return this._error(`Expected punctuation to follow "${this._object.id}"`,
|
|
33500
|
+
return this._error(`Expected punctuation to follow "${this._object.id}"`, token2);
|
|
33501
33501
|
}
|
|
33502
33502
|
this._emit(this._subject, this._predicate, this._object, this._graph);
|
|
33503
33503
|
return next3;
|
|
33504
33504
|
}
|
|
33505
33505
|
// ### `_readQuadPunctuation` reads punctuation after a quad
|
|
33506
|
-
_readQuadPunctuation(
|
|
33507
|
-
if (
|
|
33508
|
-
return this._error("Expected dot to follow quad",
|
|
33506
|
+
_readQuadPunctuation(token2) {
|
|
33507
|
+
if (token2.type !== ".")
|
|
33508
|
+
return this._error("Expected dot to follow quad", token2);
|
|
33509
33509
|
return this._readInTopContext;
|
|
33510
33510
|
}
|
|
33511
33511
|
// ### `_readPrefix` reads the prefix of a prefix declaration
|
|
33512
|
-
_readPrefix(
|
|
33513
|
-
if (
|
|
33514
|
-
return this._error("Expected prefix to follow @prefix",
|
|
33515
|
-
this._prefix =
|
|
33512
|
+
_readPrefix(token2) {
|
|
33513
|
+
if (token2.type !== "prefix")
|
|
33514
|
+
return this._error("Expected prefix to follow @prefix", token2);
|
|
33515
|
+
this._prefix = token2.value;
|
|
33516
33516
|
return this._readPrefixIRI;
|
|
33517
33517
|
}
|
|
33518
33518
|
// ### `_readPrefixIRI` reads the IRI of a prefix declaration
|
|
33519
|
-
_readPrefixIRI(
|
|
33520
|
-
if (
|
|
33521
|
-
return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,
|
|
33522
|
-
const prefixNode = this._readEntity(
|
|
33519
|
+
_readPrefixIRI(token2) {
|
|
33520
|
+
if (token2.type !== "IRI")
|
|
33521
|
+
return this._error(`Expected IRI to follow prefix "${this._prefix}:"`, token2);
|
|
33522
|
+
const prefixNode = this._readEntity(token2);
|
|
33523
33523
|
this._prefixes[this._prefix] = prefixNode.value;
|
|
33524
33524
|
this._prefixCallback(this._prefix, prefixNode);
|
|
33525
33525
|
return this._readDeclarationPunctuation;
|
|
33526
33526
|
}
|
|
33527
33527
|
// ### `_readBaseIRI` reads the IRI of a base declaration
|
|
33528
|
-
_readBaseIRI(
|
|
33529
|
-
const iri =
|
|
33528
|
+
_readBaseIRI(token2) {
|
|
33529
|
+
const iri = token2.type === "IRI" && this._resolveIRI(token2.value);
|
|
33530
33530
|
if (!iri)
|
|
33531
|
-
return this._error("Expected valid IRI to follow base declaration",
|
|
33531
|
+
return this._error("Expected valid IRI to follow base declaration", token2);
|
|
33532
33532
|
this._setBase(iri);
|
|
33533
33533
|
return this._readDeclarationPunctuation;
|
|
33534
33534
|
}
|
|
33535
33535
|
// ### `_readNamedGraphLabel` reads the label of a named graph
|
|
33536
|
-
_readNamedGraphLabel(
|
|
33537
|
-
switch (
|
|
33536
|
+
_readNamedGraphLabel(token2) {
|
|
33537
|
+
switch (token2.type) {
|
|
33538
33538
|
case "IRI":
|
|
33539
33539
|
case "blank":
|
|
33540
33540
|
case "prefixed":
|
|
33541
|
-
return this._readSubject(
|
|
33541
|
+
return this._readSubject(token2), this._readGraph;
|
|
33542
33542
|
case "[":
|
|
33543
33543
|
return this._readNamedGraphBlankLabel;
|
|
33544
33544
|
default:
|
|
33545
|
-
return this._error("Invalid graph label",
|
|
33545
|
+
return this._error("Invalid graph label", token2);
|
|
33546
33546
|
}
|
|
33547
33547
|
}
|
|
33548
33548
|
// ### `_readNamedGraphLabel` reads a blank node label of a named graph
|
|
33549
|
-
_readNamedGraphBlankLabel(
|
|
33550
|
-
if (
|
|
33551
|
-
return this._error("Invalid graph label",
|
|
33549
|
+
_readNamedGraphBlankLabel(token2) {
|
|
33550
|
+
if (token2.type !== "]")
|
|
33551
|
+
return this._error("Invalid graph label", token2);
|
|
33552
33552
|
this._subject = this._factory.blankNode();
|
|
33553
33553
|
return this._readGraph;
|
|
33554
33554
|
}
|
|
33555
33555
|
// ### `_readDeclarationPunctuation` reads the punctuation of a declaration
|
|
33556
|
-
_readDeclarationPunctuation(
|
|
33556
|
+
_readDeclarationPunctuation(token2) {
|
|
33557
33557
|
if (this._sparqlStyle) {
|
|
33558
33558
|
this._sparqlStyle = false;
|
|
33559
|
-
return this._readInTopContext(
|
|
33559
|
+
return this._readInTopContext(token2);
|
|
33560
33560
|
}
|
|
33561
|
-
if (
|
|
33562
|
-
return this._error("Expected declaration to end with a dot",
|
|
33561
|
+
if (token2.type !== ".")
|
|
33562
|
+
return this._error("Expected declaration to end with a dot", token2);
|
|
33563
33563
|
return this._readInTopContext;
|
|
33564
33564
|
}
|
|
33565
33565
|
// Reads a list of quantified symbols from a @forSome or @forAll statement
|
|
33566
|
-
_readQuantifierList(
|
|
33566
|
+
_readQuantifierList(token2) {
|
|
33567
33567
|
let entity2;
|
|
33568
|
-
switch (
|
|
33568
|
+
switch (token2.type) {
|
|
33569
33569
|
case "IRI":
|
|
33570
33570
|
case "prefixed":
|
|
33571
|
-
if ((entity2 = this._readEntity(
|
|
33571
|
+
if ((entity2 = this._readEntity(token2, true)) !== void 0)
|
|
33572
33572
|
break;
|
|
33573
33573
|
default:
|
|
33574
|
-
return this._error(`Unexpected ${
|
|
33574
|
+
return this._error(`Unexpected ${token2.type}`, token2);
|
|
33575
33575
|
}
|
|
33576
33576
|
if (!this._explicitQuantifiers)
|
|
33577
33577
|
this._quantified[entity2.id] = this._factory[this._quantifier](this._factory.blankNode().value);
|
|
@@ -33595,8 +33595,8 @@ var PodOS = (() => {
|
|
|
33595
33595
|
return this._readQuantifierPunctuation;
|
|
33596
33596
|
}
|
|
33597
33597
|
// Reads punctuation from a @forSome or @forAll statement
|
|
33598
|
-
_readQuantifierPunctuation(
|
|
33599
|
-
if (
|
|
33598
|
+
_readQuantifierPunctuation(token2) {
|
|
33599
|
+
if (token2.type === ",")
|
|
33600
33600
|
return this._readQuantifierList;
|
|
33601
33601
|
else {
|
|
33602
33602
|
if (this._explicitQuantifiers) {
|
|
@@ -33604,7 +33604,7 @@ var PodOS = (() => {
|
|
|
33604
33604
|
this._subject = null;
|
|
33605
33605
|
}
|
|
33606
33606
|
this._readCallback = this._getContextEndReader();
|
|
33607
|
-
return this._readCallback(
|
|
33607
|
+
return this._readCallback(token2);
|
|
33608
33608
|
}
|
|
33609
33609
|
}
|
|
33610
33610
|
// ### `_getPathReader` reads a potential path and then resumes with the given function
|
|
@@ -33613,8 +33613,8 @@ var PodOS = (() => {
|
|
|
33613
33613
|
return this._readPath;
|
|
33614
33614
|
}
|
|
33615
33615
|
// ### `_readPath` reads a potential path
|
|
33616
|
-
_readPath(
|
|
33617
|
-
switch (
|
|
33616
|
+
_readPath(token2) {
|
|
33617
|
+
switch (token2.type) {
|
|
33618
33618
|
// Forward path
|
|
33619
33619
|
case "!":
|
|
33620
33620
|
return this._readForwardPath;
|
|
@@ -33626,17 +33626,17 @@ var PodOS = (() => {
|
|
|
33626
33626
|
const stack = this._contextStack, parent4 = stack.length && stack[stack.length - 1];
|
|
33627
33627
|
if (parent4 && parent4.type === "item") {
|
|
33628
33628
|
const item4 = this._subject;
|
|
33629
|
-
this._restoreContext("item",
|
|
33629
|
+
this._restoreContext("item", token2);
|
|
33630
33630
|
this._emit(this._subject, this.RDF_FIRST, item4, this._graph);
|
|
33631
33631
|
}
|
|
33632
|
-
return this._afterPath(
|
|
33632
|
+
return this._afterPath(token2);
|
|
33633
33633
|
}
|
|
33634
33634
|
}
|
|
33635
33635
|
// ### `_readForwardPath` reads a '!' path
|
|
33636
|
-
_readForwardPath(
|
|
33636
|
+
_readForwardPath(token2) {
|
|
33637
33637
|
let subject6, predicate4;
|
|
33638
33638
|
const object8 = this._factory.blankNode();
|
|
33639
|
-
if ((predicate4 = this._readEntity(
|
|
33639
|
+
if ((predicate4 = this._readEntity(token2)) === void 0)
|
|
33640
33640
|
return;
|
|
33641
33641
|
if (this._predicate === null)
|
|
33642
33642
|
subject6 = this._subject, this._subject = object8;
|
|
@@ -33646,10 +33646,10 @@ var PodOS = (() => {
|
|
|
33646
33646
|
return this._readPath;
|
|
33647
33647
|
}
|
|
33648
33648
|
// ### `_readBackwardPath` reads a '^' path
|
|
33649
|
-
_readBackwardPath(
|
|
33649
|
+
_readBackwardPath(token2) {
|
|
33650
33650
|
const subject6 = this._factory.blankNode();
|
|
33651
33651
|
let predicate4, object8;
|
|
33652
|
-
if ((predicate4 = this._readEntity(
|
|
33652
|
+
if ((predicate4 = this._readEntity(token2)) === void 0)
|
|
33653
33653
|
return;
|
|
33654
33654
|
if (this._predicate === null)
|
|
33655
33655
|
object8 = this._subject, this._subject = subject6;
|
|
@@ -33659,25 +33659,25 @@ var PodOS = (() => {
|
|
|
33659
33659
|
return this._readPath;
|
|
33660
33660
|
}
|
|
33661
33661
|
// ### `_readRDFStarTailOrGraph` reads the graph of a nested RDF-star quad or the end of a nested RDF-star triple
|
|
33662
|
-
_readRDFStarTailOrGraph(
|
|
33663
|
-
if (
|
|
33664
|
-
if (this._supportsQuads && this._graph === null && (this._graph = this._readEntity(
|
|
33662
|
+
_readRDFStarTailOrGraph(token2) {
|
|
33663
|
+
if (token2.type !== ">>") {
|
|
33664
|
+
if (this._supportsQuads && this._graph === null && (this._graph = this._readEntity(token2)) !== void 0)
|
|
33665
33665
|
return this._readRDFStarTail;
|
|
33666
|
-
return this._error(`Expected >> to follow "${this._object.id}"`,
|
|
33666
|
+
return this._error(`Expected >> to follow "${this._object.id}"`, token2);
|
|
33667
33667
|
}
|
|
33668
|
-
return this._readRDFStarTail(
|
|
33668
|
+
return this._readRDFStarTail(token2);
|
|
33669
33669
|
}
|
|
33670
33670
|
// ### `_readRDFStarTail` reads the end of a nested RDF-star triple
|
|
33671
|
-
_readRDFStarTail(
|
|
33672
|
-
if (
|
|
33673
|
-
return this._error(`Expected >> but got ${
|
|
33671
|
+
_readRDFStarTail(token2) {
|
|
33672
|
+
if (token2.type !== ">>")
|
|
33673
|
+
return this._error(`Expected >> but got ${token2.type}`, token2);
|
|
33674
33674
|
const quad3 = this._factory.quad(
|
|
33675
33675
|
this._subject,
|
|
33676
33676
|
this._predicate,
|
|
33677
33677
|
this._object,
|
|
33678
33678
|
this._graph || this.DEFAULTGRAPH
|
|
33679
33679
|
);
|
|
33680
|
-
this._restoreContext("<<",
|
|
33680
|
+
this._restoreContext("<<", token2);
|
|
33681
33681
|
if (this._subject === null) {
|
|
33682
33682
|
this._subject = quad3;
|
|
33683
33683
|
return this._readPredicate;
|
|
@@ -33707,11 +33707,11 @@ var PodOS = (() => {
|
|
|
33707
33707
|
this._callback(null, this._factory.quad(subject6, predicate4, object8, graph3 || this.DEFAULTGRAPH));
|
|
33708
33708
|
}
|
|
33709
33709
|
// ### `_error` emits an error message through the callback
|
|
33710
|
-
_error(message5,
|
|
33711
|
-
const err = new Error(`${message5} on line ${
|
|
33710
|
+
_error(message5, token2) {
|
|
33711
|
+
const err = new Error(`${message5} on line ${token2.line}.`);
|
|
33712
33712
|
err.context = {
|
|
33713
|
-
token,
|
|
33714
|
-
line:
|
|
33713
|
+
token: token2,
|
|
33714
|
+
line: token2.line,
|
|
33715
33715
|
previousToken: this._lexer.previousToken
|
|
33716
33716
|
};
|
|
33717
33717
|
this._callback(err);
|
|
@@ -33820,28 +33820,28 @@ var PodOS = (() => {
|
|
|
33820
33820
|
this._callback = (e, t) => {
|
|
33821
33821
|
e ? error4 = e : t && quads.push(t);
|
|
33822
33822
|
};
|
|
33823
|
-
this._lexer.tokenize(input2).every((
|
|
33824
|
-
return this._readCallback = this._readCallback(
|
|
33823
|
+
this._lexer.tokenize(input2).every((token2) => {
|
|
33824
|
+
return this._readCallback = this._readCallback(token2);
|
|
33825
33825
|
});
|
|
33826
33826
|
if (error4) throw error4;
|
|
33827
33827
|
return quads;
|
|
33828
33828
|
}
|
|
33829
|
-
let processNextToken = (error4,
|
|
33829
|
+
let processNextToken = (error4, token2) => {
|
|
33830
33830
|
if (error4 !== null)
|
|
33831
33831
|
this._callback(error4), this._callback = noop2;
|
|
33832
33832
|
else if (this._readCallback)
|
|
33833
|
-
this._readCallback = this._readCallback(
|
|
33833
|
+
this._readCallback = this._readCallback(token2);
|
|
33834
33834
|
};
|
|
33835
33835
|
if (onComment) {
|
|
33836
33836
|
this._lexer.comments = true;
|
|
33837
|
-
processNextToken = (error4,
|
|
33837
|
+
processNextToken = (error4, token2) => {
|
|
33838
33838
|
if (error4 !== null)
|
|
33839
33839
|
this._callback(error4), this._callback = noop2;
|
|
33840
33840
|
else if (this._readCallback) {
|
|
33841
|
-
if (
|
|
33842
|
-
onComment(
|
|
33841
|
+
if (token2.type === "comment")
|
|
33842
|
+
onComment(token2.value);
|
|
33843
33843
|
else
|
|
33844
|
-
this._readCallback = this._readCallback(
|
|
33844
|
+
this._readCallback = this._readCallback(token2);
|
|
33845
33845
|
}
|
|
33846
33846
|
};
|
|
33847
33847
|
}
|
|
@@ -34161,7 +34161,7 @@ var PodOS = (() => {
|
|
|
34161
34161
|
var incomplete2 = [];
|
|
34162
34162
|
var listMapping = context4.listMapping;
|
|
34163
34163
|
var listMappingDifferent = !context4.parent;
|
|
34164
|
-
var
|
|
34164
|
+
var language9 = context4.language;
|
|
34165
34165
|
var vocabulary = context4.vocabulary;
|
|
34166
34166
|
base2 = this.parseURI(removeHash(current2.baseURI));
|
|
34167
34167
|
current2.item = null;
|
|
@@ -34206,9 +34206,9 @@ var PodOS = (() => {
|
|
|
34206
34206
|
if (xmlLangAtt) {
|
|
34207
34207
|
let value7 = _RDFaProcessor.trim(xmlLangAtt.value);
|
|
34208
34208
|
if (value7.length > 0) {
|
|
34209
|
-
|
|
34209
|
+
language9 = value7;
|
|
34210
34210
|
} else {
|
|
34211
|
-
|
|
34211
|
+
language9 = null;
|
|
34212
34212
|
}
|
|
34213
34213
|
}
|
|
34214
34214
|
var relAtt = current2.getAttributeNode("rel");
|
|
@@ -34496,7 +34496,7 @@ var PodOS = (() => {
|
|
|
34496
34496
|
} : {
|
|
34497
34497
|
type: datatype3 || _RDFaProcessor.PlainLiteralURI,
|
|
34498
34498
|
value: content5,
|
|
34499
|
-
language:
|
|
34499
|
+
language: language9
|
|
34500
34500
|
});
|
|
34501
34501
|
} else {
|
|
34502
34502
|
if (datatype3 === _RDFaProcessor.XMLLiteralURI || datatype3 === _RDFaProcessor.HTMLLiteralURI) {
|
|
@@ -34508,7 +34508,7 @@ var PodOS = (() => {
|
|
|
34508
34508
|
this.addTriple(current2, newSubject, predicate5, {
|
|
34509
34509
|
type: datatype3 || _RDFaProcessor.PlainLiteralURI,
|
|
34510
34510
|
value: content5,
|
|
34511
|
-
language:
|
|
34511
|
+
language: language9
|
|
34512
34512
|
});
|
|
34513
34513
|
}
|
|
34514
34514
|
}
|
|
@@ -34541,7 +34541,7 @@ var PodOS = (() => {
|
|
|
34541
34541
|
childContext = this.push(context4, context4.subject);
|
|
34542
34542
|
childContext.parentObject = removeHash(current2.parentNode.baseURI) === context4.parentObject ? removeHash(current2.baseURI) : context4.parentObject;
|
|
34543
34543
|
childContext.incomplete = context4.incomplete;
|
|
34544
|
-
childContext.language =
|
|
34544
|
+
childContext.language = language9;
|
|
34545
34545
|
childContext.prefixes = prefixes2;
|
|
34546
34546
|
childContext.vocabulary = vocabulary;
|
|
34547
34547
|
} else {
|
|
@@ -34555,7 +34555,7 @@ var PodOS = (() => {
|
|
|
34555
34555
|
listMappingDifferent = true;
|
|
34556
34556
|
}
|
|
34557
34557
|
childContext.listMapping = listMapping;
|
|
34558
|
-
childContext.language =
|
|
34558
|
+
childContext.language = language9;
|
|
34559
34559
|
childContext.vocabulary = vocabulary;
|
|
34560
34560
|
}
|
|
34561
34561
|
if (listMappingDifferent) {
|
|
@@ -34712,11 +34712,11 @@ var PodOS = (() => {
|
|
|
34712
34712
|
return new Literal(x.value, x.language || "");
|
|
34713
34713
|
case _RDFaProcessor.XMLLiteralURI:
|
|
34714
34714
|
case _RDFaProcessor.HTMLLiteralURI:
|
|
34715
|
-
var
|
|
34715
|
+
var string3 = "";
|
|
34716
34716
|
Object.keys(x.value).forEach((i) => {
|
|
34717
|
-
|
|
34717
|
+
string3 += domToString(x.value[i], this.htmlOptions);
|
|
34718
34718
|
});
|
|
34719
|
-
return new Literal(
|
|
34719
|
+
return new Literal(string3, "", new NamedNode(x.type));
|
|
34720
34720
|
default:
|
|
34721
34721
|
return new Literal(x.value, "", new NamedNode(x.type));
|
|
34722
34722
|
}
|
|
@@ -38571,10 +38571,10 @@ _:patch
|
|
|
38571
38571
|
}
|
|
38572
38572
|
return id4;
|
|
38573
38573
|
});
|
|
38574
|
-
__publicField(this, "fmt", (format4,
|
|
38575
|
-
return this.formattedUUID(format4,
|
|
38574
|
+
__publicField(this, "fmt", (format4, date6) => {
|
|
38575
|
+
return this.formattedUUID(format4, date6);
|
|
38576
38576
|
});
|
|
38577
|
-
__publicField(this, "formattedUUID", (format4,
|
|
38577
|
+
__publicField(this, "formattedUUID", (format4, date6) => {
|
|
38578
38578
|
const fnMap = {
|
|
38579
38579
|
"$r": this.randomUUID,
|
|
38580
38580
|
"$s": this.sequentialUUID,
|
|
@@ -38588,8 +38588,8 @@ _:patch
|
|
|
38588
38588
|
if (fn2 === "$s") {
|
|
38589
38589
|
return fnMap[fn2]().padStart(len, "0");
|
|
38590
38590
|
}
|
|
38591
|
-
if (fn2 === "$t" &&
|
|
38592
|
-
return fnMap[fn2](len,
|
|
38591
|
+
if (fn2 === "$t" && date6) {
|
|
38592
|
+
return fnMap[fn2](len, date6);
|
|
38593
38593
|
}
|
|
38594
38594
|
return fnMap[fn2](len);
|
|
38595
38595
|
}
|
|
@@ -38620,8 +38620,8 @@ _:patch
|
|
|
38620
38620
|
__publicField(this, "getVersion", () => {
|
|
38621
38621
|
return this.version;
|
|
38622
38622
|
});
|
|
38623
|
-
__publicField(this, "stamp", (finalLength,
|
|
38624
|
-
const hexStamp = Math.floor(+(
|
|
38623
|
+
__publicField(this, "stamp", (finalLength, date6) => {
|
|
38624
|
+
const hexStamp = Math.floor(+(date6 || /* @__PURE__ */ new Date()) / 1e3).toString(16);
|
|
38625
38625
|
if (typeof finalLength === "number" && finalLength === 0) {
|
|
38626
38626
|
return hexStamp;
|
|
38627
38627
|
}
|
|
@@ -39929,8 +39929,8 @@ _:patch
|
|
|
39929
39929
|
return tokens;
|
|
39930
39930
|
};
|
|
39931
39931
|
lunr2.Pipeline.prototype.runString = function(str, metadata2) {
|
|
39932
|
-
var
|
|
39933
|
-
return this.run([
|
|
39932
|
+
var token2 = new lunr2.Token(str, metadata2);
|
|
39933
|
+
return this.run([token2]).map(function(t) {
|
|
39934
39934
|
return t.toString();
|
|
39935
39935
|
});
|
|
39936
39936
|
};
|
|
@@ -40189,8 +40189,8 @@ _:patch
|
|
|
40189
40189
|
}
|
|
40190
40190
|
return w;
|
|
40191
40191
|
};
|
|
40192
|
-
return function(
|
|
40193
|
-
return
|
|
40192
|
+
return function(token2) {
|
|
40193
|
+
return token2.update(porterStemmer);
|
|
40194
40194
|
};
|
|
40195
40195
|
}();
|
|
40196
40196
|
lunr2.Pipeline.registerFunction(lunr2.stemmer, "stemmer");
|
|
@@ -40199,8 +40199,8 @@ _:patch
|
|
|
40199
40199
|
memo[stopWord] = stopWord;
|
|
40200
40200
|
return memo;
|
|
40201
40201
|
}, {});
|
|
40202
|
-
return function(
|
|
40203
|
-
if (
|
|
40202
|
+
return function(token2) {
|
|
40203
|
+
if (token2 && words[token2.toString()] !== token2.toString()) return token2;
|
|
40204
40204
|
};
|
|
40205
40205
|
};
|
|
40206
40206
|
lunr2.stopWordFilter = lunr2.generateStopWordFilter([
|
|
@@ -40325,8 +40325,8 @@ _:patch
|
|
|
40325
40325
|
"your"
|
|
40326
40326
|
]);
|
|
40327
40327
|
lunr2.Pipeline.registerFunction(lunr2.stopWordFilter, "stopWordFilter");
|
|
40328
|
-
lunr2.trimmer = function(
|
|
40329
|
-
return
|
|
40328
|
+
lunr2.trimmer = function(token2) {
|
|
40329
|
+
return token2.update(function(s) {
|
|
40330
40330
|
return s.replace(/^\W+/, "").replace(/\W+$/, "");
|
|
40331
40331
|
});
|
|
40332
40332
|
};
|
|
@@ -41394,15 +41394,15 @@ _:patch
|
|
|
41394
41394
|
})("slugify", exports, function() {
|
|
41395
41395
|
var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`);
|
|
41396
41396
|
var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
|
|
41397
|
-
function replace(
|
|
41398
|
-
if (typeof
|
|
41397
|
+
function replace(string3, options) {
|
|
41398
|
+
if (typeof string3 !== "string") {
|
|
41399
41399
|
throw new Error("slugify: string argument expected");
|
|
41400
41400
|
}
|
|
41401
41401
|
options = typeof options === "string" ? { replacement: options } : options || {};
|
|
41402
41402
|
var locale = locales[options.locale] || {};
|
|
41403
41403
|
var replacement = options.replacement === void 0 ? "-" : options.replacement;
|
|
41404
41404
|
var trim = options.trim === void 0 ? true : options.trim;
|
|
41405
|
-
var slug =
|
|
41405
|
+
var slug = string3.normalize().split("").reduce(function(result6, ch) {
|
|
41406
41406
|
var appendChar = locale[ch];
|
|
41407
41407
|
if (appendChar === void 0) appendChar = charMap[ch];
|
|
41408
41408
|
if (appendChar === void 0) appendChar = ch;
|
|
@@ -43971,7 +43971,7 @@ _:patch
|
|
|
43971
43971
|
}
|
|
43972
43972
|
|
|
43973
43973
|
// ../node_modules/@inrupt/solid-client-authn-core/node_modules/jose/dist/browser/lib/epoch.js
|
|
43974
|
-
var epoch_default = (
|
|
43974
|
+
var epoch_default = (date6) => Math.floor(date6.getTime() / 1e3);
|
|
43975
43975
|
|
|
43976
43976
|
// ../node_modules/@inrupt/solid-client-authn-core/node_modules/jose/dist/browser/lib/secs.js
|
|
43977
43977
|
var minute = 60;
|
|
@@ -44359,8 +44359,8 @@ _:patch
|
|
|
44359
44359
|
}
|
|
44360
44360
|
this._jwks = clone(jwks);
|
|
44361
44361
|
}
|
|
44362
|
-
async getKey(protectedHeader,
|
|
44363
|
-
const { alg, kid } = { ...protectedHeader, ...
|
|
44362
|
+
async getKey(protectedHeader, token2) {
|
|
44363
|
+
const { alg, kid } = { ...protectedHeader, ...token2?.header };
|
|
44364
44364
|
const kty = getKtyFromAlg(alg);
|
|
44365
44365
|
const candidates = this._jwks.keys.filter((jwk2) => {
|
|
44366
44366
|
let candidate4 = kty === jwk2.kty;
|
|
@@ -44430,7 +44430,7 @@ _:patch
|
|
|
44430
44430
|
}
|
|
44431
44431
|
function createLocalJWKSet(jwks) {
|
|
44432
44432
|
const set = new LocalJWKSet(jwks);
|
|
44433
|
-
const localJWKSet = async (protectedHeader,
|
|
44433
|
+
const localJWKSet = async (protectedHeader, token2) => set.getKey(protectedHeader, token2);
|
|
44434
44434
|
Object.defineProperties(localJWKSet, {
|
|
44435
44435
|
jwks: {
|
|
44436
44436
|
value: () => clone(set._jwks),
|
|
@@ -44523,17 +44523,17 @@ _:patch
|
|
|
44523
44523
|
fresh() {
|
|
44524
44524
|
return typeof this._jwksTimestamp === "number" ? Date.now() < this._jwksTimestamp + this._cacheMaxAge : false;
|
|
44525
44525
|
}
|
|
44526
|
-
async getKey(protectedHeader,
|
|
44526
|
+
async getKey(protectedHeader, token2) {
|
|
44527
44527
|
if (!this._local || !this.fresh()) {
|
|
44528
44528
|
await this.reload();
|
|
44529
44529
|
}
|
|
44530
44530
|
try {
|
|
44531
|
-
return await this._local(protectedHeader,
|
|
44531
|
+
return await this._local(protectedHeader, token2);
|
|
44532
44532
|
} catch (err) {
|
|
44533
44533
|
if (err instanceof JWKSNoMatchingKey) {
|
|
44534
44534
|
if (this.coolingDown() === false) {
|
|
44535
44535
|
await this.reload();
|
|
44536
|
-
return this._local(protectedHeader,
|
|
44536
|
+
return this._local(protectedHeader, token2);
|
|
44537
44537
|
}
|
|
44538
44538
|
}
|
|
44539
44539
|
throw err;
|
|
@@ -44565,7 +44565,7 @@ _:patch
|
|
|
44565
44565
|
};
|
|
44566
44566
|
function createRemoteJWKSet(url7, options) {
|
|
44567
44567
|
const set = new RemoteJWKSet(url7, options);
|
|
44568
|
-
const remoteJWKSet = async (protectedHeader,
|
|
44568
|
+
const remoteJWKSet = async (protectedHeader, token2) => set.getKey(protectedHeader, token2);
|
|
44569
44569
|
Object.defineProperties(remoteJWKSet, {
|
|
44570
44570
|
coolingDown: {
|
|
44571
44571
|
get: () => set.coolingDown(),
|
|
@@ -45041,8 +45041,8 @@ _:patch
|
|
|
45041
45041
|
});
|
|
45042
45042
|
};
|
|
45043
45043
|
}
|
|
45044
|
-
function isSupportedTokenType(
|
|
45045
|
-
return typeof
|
|
45044
|
+
function isSupportedTokenType(token2) {
|
|
45045
|
+
return typeof token2 === "string" && ["DPoP", "Bearer"].includes(token2);
|
|
45046
45046
|
}
|
|
45047
45047
|
function isValidUrl(url7) {
|
|
45048
45048
|
try {
|
|
@@ -46660,13 +46660,16 @@ _:patch
|
|
|
46660
46660
|
values: values2[predicate4]
|
|
46661
46661
|
}));
|
|
46662
46662
|
}
|
|
46663
|
-
relations() {
|
|
46664
|
-
const statements = this.store.statementsMatching(
|
|
46663
|
+
relations(predicate4) {
|
|
46664
|
+
const statements = this.store.statementsMatching(
|
|
46665
|
+
namedNode(this.uri),
|
|
46666
|
+
predicate4 ? namedNode(predicate4) : null
|
|
46667
|
+
);
|
|
46665
46668
|
const values2 = statements.filter((it) => isNamedNode(it.object) && !isRdfType(it.predicate)).reduce(accumulateValues, {});
|
|
46666
|
-
return Object.keys(values2).map((
|
|
46667
|
-
predicate:
|
|
46668
|
-
label: labelFromUri(
|
|
46669
|
-
uris: values2[
|
|
46669
|
+
return Object.keys(values2).map((predicate5) => ({
|
|
46670
|
+
predicate: predicate5,
|
|
46671
|
+
label: labelFromUri(predicate5),
|
|
46672
|
+
uris: values2[predicate5]
|
|
46670
46673
|
}));
|
|
46671
46674
|
}
|
|
46672
46675
|
reverseRelations() {
|
|
@@ -47232,7 +47235,8 @@ _:patch
|
|
|
47232
47235
|
tabont: () => tabont,
|
|
47233
47236
|
trip: () => trip3,
|
|
47234
47237
|
vcard: () => vcard2,
|
|
47235
|
-
wf: () => wf
|
|
47238
|
+
wf: () => wf,
|
|
47239
|
+
xsd: () => xsd3
|
|
47236
47240
|
});
|
|
47237
47241
|
|
|
47238
47242
|
// ../node_modules/rdf-namespaces/dist/acl-6c2719b4.js
|
|
@@ -68249,6 +68253,104 @@ _:patch
|
|
|
68249
68253
|
transactionStore
|
|
68250
68254
|
});
|
|
68251
68255
|
|
|
68256
|
+
// ../node_modules/rdf-namespaces/dist/xsd-7381cf16.js
|
|
68257
|
+
var ID = "http://www.w3.org/2001/XMLSchema#ID";
|
|
68258
|
+
var IDREF = "http://www.w3.org/2001/XMLSchema#IDREF";
|
|
68259
|
+
var ENTITY = "http://www.w3.org/2001/XMLSchema#ENTITY";
|
|
68260
|
+
var NCName = "http://www.w3.org/2001/XMLSchema#NCName";
|
|
68261
|
+
var NMTOKEN = "http://www.w3.org/2001/XMLSchema#NMTOKEN";
|
|
68262
|
+
var Name2 = "http://www.w3.org/2001/XMLSchema#Name";
|
|
68263
|
+
var totalDigits = "http://www.w3.org/2001/XMLSchema#totalDigits";
|
|
68264
|
+
var fractionDigits = "http://www.w3.org/2001/XMLSchema#fractionDigits";
|
|
68265
|
+
var pattern6 = "http://www.w3.org/2001/XMLSchema#pattern";
|
|
68266
|
+
var maxInclusive2 = "http://www.w3.org/2001/XMLSchema#maxInclusive";
|
|
68267
|
+
var maxExclusive2 = "http://www.w3.org/2001/XMLSchema#maxExclusive";
|
|
68268
|
+
var minInclusive2 = "http://www.w3.org/2001/XMLSchema#minInclusive";
|
|
68269
|
+
var minExclusive2 = "http://www.w3.org/2001/XMLSchema#minExclusive";
|
|
68270
|
+
var QName = "http://www.w3.org/2001/XMLSchema#QName";
|
|
68271
|
+
var anyURI = "http://www.w3.org/2001/XMLSchema#anyURI";
|
|
68272
|
+
var base64Binary2 = "http://www.w3.org/2001/XMLSchema#base64Binary";
|
|
68273
|
+
var boolean2 = "http://www.w3.org/2001/XMLSchema#boolean";
|
|
68274
|
+
var byte = "http://www.w3.org/2001/XMLSchema#byte";
|
|
68275
|
+
var date5 = "http://www.w3.org/2001/XMLSchema#date";
|
|
68276
|
+
var dateTime2 = "http://www.w3.org/2001/XMLSchema#dateTime";
|
|
68277
|
+
var decimal2 = "http://www.w3.org/2001/XMLSchema#decimal";
|
|
68278
|
+
var double = "http://www.w3.org/2001/XMLSchema#double";
|
|
68279
|
+
var duration6 = "http://www.w3.org/2001/XMLSchema#duration";
|
|
68280
|
+
var float = "http://www.w3.org/2001/XMLSchema#float";
|
|
68281
|
+
var gDay = "http://www.w3.org/2001/XMLSchema#gDay";
|
|
68282
|
+
var gMonth = "http://www.w3.org/2001/XMLSchema#gMonth";
|
|
68283
|
+
var gMonthDay = "http://www.w3.org/2001/XMLSchema#gMonthDay";
|
|
68284
|
+
var gYear = "http://www.w3.org/2001/XMLSchema#gYear";
|
|
68285
|
+
var gYearMonth = "http://www.w3.org/2001/XMLSchema#gYearMonth";
|
|
68286
|
+
var hexBinary = "http://www.w3.org/2001/XMLSchema#hexBinary";
|
|
68287
|
+
var int = "http://www.w3.org/2001/XMLSchema#int";
|
|
68288
|
+
var integer2 = "http://www.w3.org/2001/XMLSchema#integer";
|
|
68289
|
+
var language8 = "http://www.w3.org/2001/XMLSchema#language";
|
|
68290
|
+
var long = "http://www.w3.org/2001/XMLSchema#long";
|
|
68291
|
+
var negativeInteger = "http://www.w3.org/2001/XMLSchema#negativeInteger";
|
|
68292
|
+
var nonNegativeInteger = "http://www.w3.org/2001/XMLSchema#nonNegativeInteger";
|
|
68293
|
+
var nonPositiveInteger = "http://www.w3.org/2001/XMLSchema#nonPositiveInteger";
|
|
68294
|
+
var normalizedString = "http://www.w3.org/2001/XMLSchema#normalizedString";
|
|
68295
|
+
var positiveInteger = "http://www.w3.org/2001/XMLSchema#positiveInteger";
|
|
68296
|
+
var short2 = "http://www.w3.org/2001/XMLSchema#short";
|
|
68297
|
+
var string2 = "http://www.w3.org/2001/XMLSchema#string";
|
|
68298
|
+
var time2 = "http://www.w3.org/2001/XMLSchema#time";
|
|
68299
|
+
var token = "http://www.w3.org/2001/XMLSchema#token";
|
|
68300
|
+
var unsignedByte = "http://www.w3.org/2001/XMLSchema#unsignedByte";
|
|
68301
|
+
var unsignedInt2 = "http://www.w3.org/2001/XMLSchema#unsignedInt";
|
|
68302
|
+
var unsignedLong = "http://www.w3.org/2001/XMLSchema#unsignedLong";
|
|
68303
|
+
var unsignedShort = "http://www.w3.org/2001/XMLSchema#unsignedShort";
|
|
68304
|
+
var xsdImport = /* @__PURE__ */ Object.freeze({
|
|
68305
|
+
ID,
|
|
68306
|
+
IDREF,
|
|
68307
|
+
ENTITY,
|
|
68308
|
+
NCName,
|
|
68309
|
+
NMTOKEN,
|
|
68310
|
+
Name: Name2,
|
|
68311
|
+
totalDigits,
|
|
68312
|
+
fractionDigits,
|
|
68313
|
+
pattern: pattern6,
|
|
68314
|
+
maxInclusive: maxInclusive2,
|
|
68315
|
+
maxExclusive: maxExclusive2,
|
|
68316
|
+
minInclusive: minInclusive2,
|
|
68317
|
+
minExclusive: minExclusive2,
|
|
68318
|
+
QName,
|
|
68319
|
+
anyURI,
|
|
68320
|
+
base64Binary: base64Binary2,
|
|
68321
|
+
boolean: boolean2,
|
|
68322
|
+
byte,
|
|
68323
|
+
date: date5,
|
|
68324
|
+
dateTime: dateTime2,
|
|
68325
|
+
decimal: decimal2,
|
|
68326
|
+
double,
|
|
68327
|
+
duration: duration6,
|
|
68328
|
+
float,
|
|
68329
|
+
gDay,
|
|
68330
|
+
gMonth,
|
|
68331
|
+
gMonthDay,
|
|
68332
|
+
gYear,
|
|
68333
|
+
gYearMonth,
|
|
68334
|
+
hexBinary,
|
|
68335
|
+
int,
|
|
68336
|
+
integer: integer2,
|
|
68337
|
+
language: language8,
|
|
68338
|
+
long,
|
|
68339
|
+
negativeInteger,
|
|
68340
|
+
nonNegativeInteger,
|
|
68341
|
+
nonPositiveInteger,
|
|
68342
|
+
normalizedString,
|
|
68343
|
+
positiveInteger,
|
|
68344
|
+
short: short2,
|
|
68345
|
+
string: string2,
|
|
68346
|
+
time: time2,
|
|
68347
|
+
token,
|
|
68348
|
+
unsignedByte,
|
|
68349
|
+
unsignedInt: unsignedInt2,
|
|
68350
|
+
unsignedLong,
|
|
68351
|
+
unsignedShort
|
|
68352
|
+
});
|
|
68353
|
+
|
|
68252
68354
|
// ../node_modules/rdf-namespaces/dist/index.es.js
|
|
68253
68355
|
var acl = aclImport;
|
|
68254
68356
|
var arg = argImport;
|
|
@@ -68284,6 +68386,7 @@ _:patch
|
|
|
68284
68386
|
var tabont = tabontImport;
|
|
68285
68387
|
var vcard2 = vcardImport;
|
|
68286
68388
|
var wf = wfImport;
|
|
68389
|
+
var xsd3 = xsdImport;
|
|
68287
68390
|
|
|
68288
68391
|
// src/terms/createListOfTerms.ts
|
|
68289
68392
|
var createListOfTerms = (terms) => Object.keys(terms).flatMap((prefix3) => {
|