@pod-os/core 0.11.2-fe7524c.0 → 0.12.1-6af5683.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.
@@ -2,7 +2,7 @@ import {
2
2
  __commonJS,
3
3
  __export,
4
4
  __toESM
5
- } from "./chunk-5NEDDTD5.js";
5
+ } from "./chunk-U67V476Y.js";
6
6
 
7
7
  // ../node_modules/@babel/runtime/helpers/typeof.js
8
8
  var require_typeof = __commonJS({
@@ -119,11 +119,9 @@ var require_regeneratorRuntime = __commonJS({
119
119
  function makeInvokeMethod(e2, r2, n2) {
120
120
  var o2 = h;
121
121
  return function(i2, a2) {
122
- if (o2 === f)
123
- throw new Error("Generator is already running");
122
+ if (o2 === f) throw Error("Generator is already running");
124
123
  if (o2 === s) {
125
- if ("throw" === i2)
126
- throw a2;
124
+ if ("throw" === i2) throw a2;
127
125
  return {
128
126
  value: t,
129
127
  done: true
@@ -134,24 +132,19 @@ var require_regeneratorRuntime = __commonJS({
134
132
  if (c2) {
135
133
  var u2 = maybeInvokeDelegate(c2, n2);
136
134
  if (u2) {
137
- if (u2 === y)
138
- continue;
135
+ if (u2 === y) continue;
139
136
  return u2;
140
137
  }
141
138
  }
142
- if ("next" === n2.method)
143
- n2.sent = n2._sent = n2.arg;
139
+ if ("next" === n2.method) n2.sent = n2._sent = n2.arg;
144
140
  else if ("throw" === n2.method) {
145
- if (o2 === h)
146
- throw o2 = s, n2.arg;
141
+ if (o2 === h) throw o2 = s, n2.arg;
147
142
  n2.dispatchException(n2.arg);
148
- } else
149
- "return" === n2.method && n2.abrupt("return", n2.arg);
143
+ } else "return" === n2.method && n2.abrupt("return", n2.arg);
150
144
  o2 = f;
151
145
  var p2 = tryCatch(e2, r2, n2);
152
146
  if ("normal" === p2.type) {
153
- if (o2 = n2.done ? s : l, p2.arg === y)
154
- continue;
147
+ if (o2 = n2.done ? s : l, p2.arg === y) continue;
155
148
  return {
156
149
  value: p2.arg,
157
150
  done: n2.done
@@ -163,11 +156,9 @@ var require_regeneratorRuntime = __commonJS({
163
156
  }
164
157
  function maybeInvokeDelegate(e2, r2) {
165
158
  var n2 = r2.method, o2 = e2.iterator[n2];
166
- if (o2 === t)
167
- return r2.delegate = null, "throw" === n2 && e2.iterator["return"] && (r2.method = "return", r2.arg = t, maybeInvokeDelegate(e2, r2), "throw" === r2.method) || "return" !== n2 && (r2.method = "throw", r2.arg = new TypeError("The iterator does not provide a '" + n2 + "' method")), y;
159
+ if (o2 === t) return r2.delegate = null, "throw" === n2 && e2.iterator["return"] && (r2.method = "return", r2.arg = t, maybeInvokeDelegate(e2, r2), "throw" === r2.method) || "return" !== n2 && (r2.method = "throw", r2.arg = new TypeError("The iterator does not provide a '" + n2 + "' method")), y;
168
160
  var i2 = tryCatch(o2, e2.iterator, r2.arg);
169
- if ("throw" === i2.type)
170
- return r2.method = "throw", r2.arg = i2.arg, r2.delegate = null, y;
161
+ if ("throw" === i2.type) return r2.method = "throw", r2.arg = i2.arg, r2.delegate = null, y;
171
162
  var a2 = i2.arg;
172
163
  return a2 ? a2.done ? (r2[e2.resultName] = a2.value, r2.next = e2.nextLoc, "return" !== r2.method && (r2.method = "next", r2.arg = t), r2.delegate = null, y) : a2 : (r2.method = "throw", r2.arg = new TypeError("iterator result is not an object"), r2.delegate = null, y);
173
164
  }
@@ -189,15 +180,11 @@ var require_regeneratorRuntime = __commonJS({
189
180
  function values(e2) {
190
181
  if (e2 || "" === e2) {
191
182
  var r2 = e2[a];
192
- if (r2)
193
- return r2.call(e2);
194
- if ("function" == typeof e2.next)
195
- return e2;
183
+ if (r2) return r2.call(e2);
184
+ if ("function" == typeof e2.next) return e2;
196
185
  if (!isNaN(e2.length)) {
197
186
  var o2 = -1, i2 = function next() {
198
- for (; ++o2 < e2.length; )
199
- if (n.call(e2, o2))
200
- return next.value = e2[o2], next.done = false, next;
187
+ for (; ++o2 < e2.length; ) if (n.call(e2, o2)) return next.value = e2[o2], next.done = false, next;
201
188
  return next.value = t, next.done = true, next;
202
189
  };
203
190
  return i2.next = i2;
@@ -234,56 +221,44 @@ var require_regeneratorRuntime = __commonJS({
234
221
  return "[object Generator]";
235
222
  }), e.keys = function(t2) {
236
223
  var e2 = Object(t2), r2 = [];
237
- for (var n2 in e2)
238
- r2.push(n2);
224
+ for (var n2 in e2) r2.push(n2);
239
225
  return r2.reverse(), function next() {
240
226
  for (; r2.length; ) {
241
227
  var t3 = r2.pop();
242
- if (t3 in e2)
243
- return next.value = t3, next.done = false, next;
228
+ if (t3 in e2) return next.value = t3, next.done = false, next;
244
229
  }
245
230
  return next.done = true, next;
246
231
  };
247
232
  }, e.values = values, Context.prototype = {
248
233
  constructor: Context,
249
234
  reset: function reset(e2) {
250
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e2)
251
- for (var r2 in this)
252
- "t" === r2.charAt(0) && n.call(this, r2) && !isNaN(+r2.slice(1)) && (this[r2] = t);
235
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e2) for (var r2 in this) "t" === r2.charAt(0) && n.call(this, r2) && !isNaN(+r2.slice(1)) && (this[r2] = t);
253
236
  },
254
237
  stop: function stop() {
255
238
  this.done = true;
256
239
  var t2 = this.tryEntries[0].completion;
257
- if ("throw" === t2.type)
258
- throw t2.arg;
240
+ if ("throw" === t2.type) throw t2.arg;
259
241
  return this.rval;
260
242
  },
261
243
  dispatchException: function dispatchException(e2) {
262
- if (this.done)
263
- throw e2;
244
+ if (this.done) throw e2;
264
245
  var r2 = this;
265
246
  function handle(n2, o3) {
266
247
  return a2.type = "throw", a2.arg = e2, r2.next = n2, o3 && (r2.method = "next", r2.arg = t), !!o3;
267
248
  }
268
249
  for (var o2 = this.tryEntries.length - 1; o2 >= 0; --o2) {
269
250
  var i2 = this.tryEntries[o2], a2 = i2.completion;
270
- if ("root" === i2.tryLoc)
271
- return handle("end");
251
+ if ("root" === i2.tryLoc) return handle("end");
272
252
  if (i2.tryLoc <= this.prev) {
273
253
  var c2 = n.call(i2, "catchLoc"), u2 = n.call(i2, "finallyLoc");
274
254
  if (c2 && u2) {
275
- if (this.prev < i2.catchLoc)
276
- return handle(i2.catchLoc, true);
277
- if (this.prev < i2.finallyLoc)
278
- return handle(i2.finallyLoc);
255
+ if (this.prev < i2.catchLoc) return handle(i2.catchLoc, true);
256
+ if (this.prev < i2.finallyLoc) return handle(i2.finallyLoc);
279
257
  } else if (c2) {
280
- if (this.prev < i2.catchLoc)
281
- return handle(i2.catchLoc, true);
258
+ if (this.prev < i2.catchLoc) return handle(i2.catchLoc, true);
282
259
  } else {
283
- if (!u2)
284
- throw new Error("try statement without catch or finally");
285
- if (this.prev < i2.finallyLoc)
286
- return handle(i2.finallyLoc);
260
+ if (!u2) throw Error("try statement without catch or finally");
261
+ if (this.prev < i2.finallyLoc) return handle(i2.finallyLoc);
287
262
  }
288
263
  }
289
264
  }
@@ -301,15 +276,13 @@ var require_regeneratorRuntime = __commonJS({
301
276
  return a2.type = t2, a2.arg = e2, i2 ? (this.method = "next", this.next = i2.finallyLoc, y) : this.complete(a2);
302
277
  },
303
278
  complete: function complete(t2, e2) {
304
- if ("throw" === t2.type)
305
- throw t2.arg;
279
+ if ("throw" === t2.type) throw t2.arg;
306
280
  return "break" === t2.type || "continue" === t2.type ? this.next = t2.arg : "return" === t2.type ? (this.rval = this.arg = t2.arg, this.method = "return", this.next = "end") : "normal" === t2.type && e2 && (this.next = e2), y;
307
281
  },
308
282
  finish: function finish(t2) {
309
283
  for (var e2 = this.tryEntries.length - 1; e2 >= 0; --e2) {
310
284
  var r2 = this.tryEntries[e2];
311
- if (r2.finallyLoc === t2)
312
- return this.complete(r2.completion, r2.afterLoc), resetTryEntry(r2), y;
285
+ if (r2.finallyLoc === t2) return this.complete(r2.completion, r2.afterLoc), resetTryEntry(r2), y;
313
286
  }
314
287
  },
315
288
  "catch": function _catch(t2) {
@@ -324,7 +297,7 @@ var require_regeneratorRuntime = __commonJS({
324
297
  return o2;
325
298
  }
326
299
  }
327
- throw new Error("illegal catch attempt");
300
+ throw Error("illegal catch attempt");
328
301
  },
329
302
  delegateYield: function delegateYield(e2, r2, n2) {
330
303
  return this.delegate = {
@@ -514,8 +487,7 @@ var require_dom = __commonJS({
514
487
  return current;
515
488
  }
516
489
  function toOrderedSet(input) {
517
- if (!input)
518
- return [];
490
+ if (!input) return [];
519
491
  var list = splitOnASCIIWhitespace(input);
520
492
  return Object.keys(list.reduce(orderedSetReducer, {}));
521
493
  }
@@ -587,12 +559,10 @@ var require_dom = __commonJS({
587
559
  error2 = this;
588
560
  Error.call(this, ExceptionMessage[code]);
589
561
  this.message = ExceptionMessage[code];
590
- if (Error.captureStackTrace)
591
- Error.captureStackTrace(this, DOMException);
562
+ if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
592
563
  }
593
564
  error2.code = code;
594
- if (message)
595
- this.message = this.message + ": " + message;
565
+ if (message) this.message = this.message + ": " + message;
596
566
  return error2;
597
567
  }
598
568
  DOMException.prototype = Error.prototype;
@@ -4064,8 +4034,7 @@ var require_sax = __commonJS({
4064
4034
  function ParseError(message, locator) {
4065
4035
  this.message = message;
4066
4036
  this.locator = locator;
4067
- if (Error.captureStackTrace)
4068
- Error.captureStackTrace(this, ParseError);
4037
+ if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError);
4069
4038
  }
4070
4039
  ParseError.prototype = new Error();
4071
4040
  ParseError.prototype.name = ParseError.name;
@@ -4620,8 +4589,7 @@ var require_sax = __commonJS({
4620
4589
  reg.exec(source);
4621
4590
  while (match = reg.exec(source)) {
4622
4591
  buf.push(match);
4623
- if (match[1])
4624
- return buf;
4592
+ if (match[1]) return buf;
4625
4593
  }
4626
4594
  }
4627
4595
  exports.XMLReader = XMLReader;
@@ -6700,6 +6668,7 @@ var require_utils = __commonJS({
6700
6668
  return strWithoutPlus;
6701
6669
  }
6702
6670
  };
6671
+ var limit = 1024;
6703
6672
  var encode2 = function encode3(str, defaultEncoder, charset, kind, format) {
6704
6673
  if (str.length === 0) {
6705
6674
  return str;
@@ -6716,27 +6685,32 @@ var require_utils = __commonJS({
6716
6685
  });
6717
6686
  }
6718
6687
  var out = "";
6719
- for (var i = 0; i < string.length; ++i) {
6720
- var c = string.charCodeAt(i);
6721
- if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
6722
- out += string.charAt(i);
6723
- continue;
6724
- }
6725
- if (c < 128) {
6726
- out = out + hexTable[c];
6727
- continue;
6728
- }
6729
- if (c < 2048) {
6730
- out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]);
6731
- continue;
6732
- }
6733
- if (c < 55296 || c >= 57344) {
6734
- out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]);
6735
- continue;
6688
+ for (var j = 0; j < string.length; j += limit) {
6689
+ var segment = string.length >= limit ? string.slice(j, j + limit) : string;
6690
+ var arr = [];
6691
+ for (var i = 0; i < segment.length; ++i) {
6692
+ var c = segment.charCodeAt(i);
6693
+ if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
6694
+ arr[arr.length] = segment.charAt(i);
6695
+ continue;
6696
+ }
6697
+ if (c < 128) {
6698
+ arr[arr.length] = hexTable[c];
6699
+ continue;
6700
+ }
6701
+ if (c < 2048) {
6702
+ arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
6703
+ continue;
6704
+ }
6705
+ if (c < 55296 || c >= 57344) {
6706
+ arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
6707
+ continue;
6708
+ }
6709
+ i += 1;
6710
+ c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
6711
+ arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
6736
6712
  }
6737
- i += 1;
6738
- c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
6739
- out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
6713
+ out += arr.join("");
6740
6714
  }
6741
6715
  return out;
6742
6716
  };
@@ -6826,10 +6800,13 @@ var require_stringify = __commonJS({
6826
6800
  var defaults = {
6827
6801
  addQueryPrefix: false,
6828
6802
  allowDots: false,
6803
+ allowEmptyArrays: false,
6804
+ arrayFormat: "indices",
6829
6805
  charset: "utf-8",
6830
6806
  charsetSentinel: false,
6831
6807
  delimiter: "&",
6832
6808
  encode: true,
6809
+ encodeDotInKeys: false,
6833
6810
  encoder: utils.encode,
6834
6811
  encodeValuesOnly: false,
6835
6812
  format: defaultFormat,
@@ -6846,7 +6823,7 @@ var require_stringify = __commonJS({
6846
6823
  return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
6847
6824
  };
6848
6825
  var sentinel = {};
6849
- var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
6826
+ var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
6850
6827
  var obj = object;
6851
6828
  var tmpSc = sideChannel;
6852
6829
  var step = 0;
@@ -6906,14 +6883,19 @@ var require_stringify = __commonJS({
6906
6883
  var keys = Object.keys(obj);
6907
6884
  objKeys = sort ? keys.sort(sort) : keys;
6908
6885
  }
6909
- var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + "[]" : prefix;
6886
+ var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, "%2E") : prefix;
6887
+ var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
6888
+ if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
6889
+ return adjustedPrefix + "[]";
6890
+ }
6910
6891
  for (var j = 0; j < objKeys.length; ++j) {
6911
6892
  var key = objKeys[j];
6912
6893
  var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
6913
6894
  if (skipNulls && value === null) {
6914
6895
  continue;
6915
6896
  }
6916
- var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key : "[" + key + "]");
6897
+ var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, "%2E") : key;
6898
+ var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
6917
6899
  sideChannel.set(object, step);
6918
6900
  var valueSideChannel = getSideChannel();
6919
6901
  valueSideChannel.set(sentinel, sideChannel);
@@ -6922,8 +6904,10 @@ var require_stringify = __commonJS({
6922
6904
  keyPrefix,
6923
6905
  generateArrayPrefix,
6924
6906
  commaRoundTrip,
6907
+ allowEmptyArrays,
6925
6908
  strictNullHandling,
6926
6909
  skipNulls,
6910
+ encodeDotInKeys,
6927
6911
  generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder,
6928
6912
  filter,
6929
6913
  sort,
@@ -6942,6 +6926,12 @@ var require_stringify = __commonJS({
6942
6926
  if (!opts) {
6943
6927
  return defaults;
6944
6928
  }
6929
+ if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
6930
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
6931
+ }
6932
+ if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
6933
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
6934
+ }
6945
6935
  if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
6946
6936
  throw new TypeError("Encoder has to be a function.");
6947
6937
  }
@@ -6961,13 +6951,29 @@ var require_stringify = __commonJS({
6961
6951
  if (typeof opts.filter === "function" || isArray(opts.filter)) {
6962
6952
  filter = opts.filter;
6963
6953
  }
6954
+ var arrayFormat;
6955
+ if (opts.arrayFormat in arrayPrefixGenerators) {
6956
+ arrayFormat = opts.arrayFormat;
6957
+ } else if ("indices" in opts) {
6958
+ arrayFormat = opts.indices ? "indices" : "repeat";
6959
+ } else {
6960
+ arrayFormat = defaults.arrayFormat;
6961
+ }
6962
+ if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
6963
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
6964
+ }
6965
+ var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
6964
6966
  return {
6965
6967
  addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
6966
- allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
6968
+ allowDots,
6969
+ allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
6970
+ arrayFormat,
6967
6971
  charset,
6968
6972
  charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
6973
+ commaRoundTrip: opts.commaRoundTrip,
6969
6974
  delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
6970
6975
  encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
6976
+ encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
6971
6977
  encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
6972
6978
  encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
6973
6979
  filter,
@@ -6995,19 +7001,8 @@ var require_stringify = __commonJS({
6995
7001
  if (typeof obj !== "object" || obj === null) {
6996
7002
  return "";
6997
7003
  }
6998
- var arrayFormat;
6999
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
7000
- arrayFormat = opts.arrayFormat;
7001
- } else if (opts && "indices" in opts) {
7002
- arrayFormat = opts.indices ? "indices" : "repeat";
7003
- } else {
7004
- arrayFormat = "indices";
7005
- }
7006
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
7007
- if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
7008
- throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
7009
- }
7010
- var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip;
7004
+ var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
7005
+ var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
7011
7006
  if (!objKeys) {
7012
7007
  objKeys = Object.keys(obj);
7013
7008
  }
@@ -7025,8 +7020,10 @@ var require_stringify = __commonJS({
7025
7020
  key,
7026
7021
  generateArrayPrefix,
7027
7022
  commaRoundTrip,
7023
+ options.allowEmptyArrays,
7028
7024
  options.strictNullHandling,
7029
7025
  options.skipNulls,
7026
+ options.encodeDotInKeys,
7030
7027
  options.encode ? options.encoder : null,
7031
7028
  options.filter,
7032
7029
  options.sort,
@@ -7062,15 +7059,18 @@ var require_parse = __commonJS({
7062
7059
  var isArray = Array.isArray;
7063
7060
  var defaults = {
7064
7061
  allowDots: false,
7062
+ allowEmptyArrays: false,
7065
7063
  allowPrototypes: false,
7066
7064
  allowSparse: false,
7067
7065
  arrayLimit: 20,
7068
7066
  charset: "utf-8",
7069
7067
  charsetSentinel: false,
7070
7068
  comma: false,
7069
+ decodeDotInKeys: false,
7071
7070
  decoder: utils.decode,
7072
7071
  delimiter: "&",
7073
7072
  depth: 5,
7073
+ duplicates: "combine",
7074
7074
  ignoreQueryPrefix: false,
7075
7075
  interpretNumericEntities: false,
7076
7076
  parameterLimit: 1e3,
@@ -7138,9 +7138,10 @@ var require_parse = __commonJS({
7138
7138
  if (part.indexOf("[]=") > -1) {
7139
7139
  val = isArray(val) ? [val] : val;
7140
7140
  }
7141
- if (has.call(obj, key)) {
7141
+ var existing = has.call(obj, key);
7142
+ if (existing && options.duplicates === "combine") {
7142
7143
  obj[key] = utils.combine(obj[key], val);
7143
- } else {
7144
+ } else if (!existing || options.duplicates === "last") {
7144
7145
  obj[key] = val;
7145
7146
  }
7146
7147
  }
@@ -7152,18 +7153,19 @@ var require_parse = __commonJS({
7152
7153
  var obj;
7153
7154
  var root = chain[i];
7154
7155
  if (root === "[]" && options.parseArrays) {
7155
- obj = [].concat(leaf);
7156
+ obj = options.allowEmptyArrays && leaf === "" ? [] : [].concat(leaf);
7156
7157
  } else {
7157
7158
  obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
7158
7159
  var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
7159
- var index = parseInt(cleanRoot, 10);
7160
- if (!options.parseArrays && cleanRoot === "") {
7160
+ var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
7161
+ var index = parseInt(decodedRoot, 10);
7162
+ if (!options.parseArrays && decodedRoot === "") {
7161
7163
  obj = { 0: leaf };
7162
- } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
7164
+ } else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
7163
7165
  obj = [];
7164
7166
  obj[index] = leaf;
7165
- } else if (cleanRoot !== "__proto__") {
7166
- obj[cleanRoot] = leaf;
7167
+ } else if (decodedRoot !== "__proto__") {
7168
+ obj[decodedRoot] = leaf;
7167
7169
  }
7168
7170
  }
7169
7171
  leaf = obj;
@@ -7207,25 +7209,39 @@ var require_parse = __commonJS({
7207
7209
  if (!opts) {
7208
7210
  return defaults;
7209
7211
  }
7210
- if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
7212
+ if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
7213
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
7214
+ }
7215
+ if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
7216
+ throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
7217
+ }
7218
+ if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
7211
7219
  throw new TypeError("Decoder has to be a function.");
7212
7220
  }
7213
7221
  if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
7214
7222
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
7215
7223
  }
7216
7224
  var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
7225
+ var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates;
7226
+ if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
7227
+ throw new TypeError("The duplicates option must be either combine, first, or last");
7228
+ }
7229
+ var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
7217
7230
  return {
7218
- allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
7231
+ allowDots,
7232
+ allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
7219
7233
  allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
7220
7234
  allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
7221
7235
  arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
7222
7236
  charset,
7223
7237
  charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
7224
7238
  comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
7239
+ decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
7225
7240
  decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
7226
7241
  delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
7227
7242
  // eslint-disable-next-line no-implicit-coercion, no-extra-parens
7228
7243
  depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
7244
+ duplicates,
7229
7245
  ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
7230
7246
  interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
7231
7247
  parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
@@ -7948,19 +7964,14 @@ var require_ttl2jsonld = __commonJS({
7948
7964
  return {};
7949
7965
  }, peg$c17 = /^[Bb]/, peg$c18 = peg$classExpectation(["B", "b"], false, false), peg$c19 = /^[Aa]/, peg$c20 = peg$classExpectation(["A", "a"], false, false), peg$c21 = /^[Ss]/, peg$c22 = peg$classExpectation(["S", "s"], false, false), peg$c23 = /^[Ee]/, peg$c24 = peg$classExpectation(["E", "e"], false, false), peg$c25 = /^[Pp]/, peg$c26 = peg$classExpectation(["P", "p"], false, false), peg$c27 = /^[Rr]/, peg$c28 = peg$classExpectation(["R", "r"], false, false), peg$c29 = /^[Ff]/, peg$c30 = peg$classExpectation(["F", "f"], false, false), peg$c31 = /^[Ii]/, peg$c32 = peg$classExpectation(["I", "i"], false, false), peg$c33 = /^[Xx]/, peg$c34 = peg$classExpectation(["X", "x"], false, false), peg$c35 = function(s, p) {
7950
7966
  var x = {};
7951
- if (typeof s === "string" && s !== "[]")
7952
- x["@id"] = s;
7953
- else if (typeof s === "object")
7954
- Object.assign(x, s);
7955
- if (p)
7956
- Object.assign(x, p);
7967
+ if (typeof s === "string" && s !== "[]") x["@id"] = s;
7968
+ else if (typeof s === "object") Object.assign(x, s);
7969
+ if (p) Object.assign(x, p);
7957
7970
  return [x];
7958
7971
  }, peg$c36 = function(s, p) {
7959
7972
  var x = {};
7960
- if (s)
7961
- Object.assign(x, s);
7962
- if (p)
7963
- Object.assign(x, p);
7973
+ if (s) Object.assign(x, s);
7974
+ if (p) Object.assign(x, p);
7964
7975
  return [x];
7965
7976
  }, peg$c37 = ";", peg$c38 = peg$literalExpectation(";", false), peg$c39 = function(a, b, e, f) {
7966
7977
  var x = {};
@@ -7972,18 +7983,13 @@ var require_ttl2jsonld = __commonJS({
7972
7983
  var x = {};
7973
7984
  c.unshift(createObject(a, b));
7974
7985
  c.forEach((t) => {
7975
- if (!t)
7976
- return;
7986
+ if (!t) return;
7977
7987
  Object.keys(t).forEach((key) => {
7978
7988
  t[key].forEach((val) => {
7979
- if (key === "@type" && val["@id"] !== void 0)
7980
- val = val["@id"];
7981
- if (x[key] === void 0)
7982
- x[key] = val;
7983
- else if (Array.isArray(x[key]))
7984
- x[key].push(val);
7985
- else
7986
- x[key] = [x[key], val];
7989
+ if (key === "@type" && val["@id"] !== void 0) val = val["@id"];
7990
+ if (x[key] === void 0) x[key] = val;
7991
+ else if (Array.isArray(x[key])) x[key].push(val);
7992
+ else x[key] = [x[key], val];
7987
7993
  });
7988
7994
  });
7989
7995
  });
@@ -8008,14 +8014,10 @@ var require_ttl2jsonld = __commonJS({
8008
8014
  }, peg$c62 = function(a, b) {
8009
8015
  return { "@value": a, "@language": b };
8010
8016
  }, peg$c63 = "^^", peg$c64 = peg$literalExpectation("^^", false), peg$c65 = function(a, b) {
8011
- if (b === "http://www.w3.org/2001/XMLSchema#boolean" && a === "true")
8012
- return true;
8013
- if (b === "http://www.w3.org/2001/XMLSchema#boolean" && a === "false")
8014
- return false;
8015
- if (b === "http://www.w3.org/2001/XMLSchema#integer")
8016
- return parseInt(a);
8017
- if (b === "http://www.w3.org/2001/XMLSchema#double")
8018
- return parseFloat(a);
8017
+ if (b === "http://www.w3.org/2001/XMLSchema#boolean" && a === "true") return true;
8018
+ if (b === "http://www.w3.org/2001/XMLSchema#boolean" && a === "false") return false;
8019
+ if (b === "http://www.w3.org/2001/XMLSchema#integer") return parseInt(a);
8020
+ if (b === "http://www.w3.org/2001/XMLSchema#double") return parseFloat(a);
8019
8021
  const uri = context.resolve(b, true);
8020
8022
  if (uri) {
8021
8023
  const prefix = b.split(":")[0];
@@ -8045,14 +8047,10 @@ var require_ttl2jsonld = __commonJS({
8045
8047
  return a + ":";
8046
8048
  }, peg$c73 = "<", peg$c74 = peg$literalExpectation("<", false), peg$c75 = /^[^\0- <>"{}|\^`\\]/, peg$c76 = peg$classExpectation([["\0", " "], "<", ">", '"', "{", "}", "|", "^", "`", "\\"], true, false), peg$c77 = ">", peg$c78 = peg$literalExpectation(">", false), peg$c79 = function(a) {
8047
8049
  const decoded = a.map((s) => {
8048
- if (65536 <= s.codePointAt(0) && s.codePointAt(0) <= 983039)
8049
- return "a";
8050
- if (s.length === 1)
8051
- return s;
8052
- if (s.length === 6)
8053
- return String.fromCharCode("0x" + s.substring(2));
8054
- if (s.length === 10)
8055
- return String.fromCodePoint("0x" + s.substring(2));
8050
+ if (65536 <= s.codePointAt(0) && s.codePointAt(0) <= 983039) return "a";
8051
+ if (s.length === 1) return s;
8052
+ if (s.length === 6) return String.fromCharCode("0x" + s.substring(2));
8053
+ if (s.length === 10) return String.fromCodePoint("0x" + s.substring(2));
8056
8054
  return s;
8057
8055
  }).join("");
8058
8056
  if (decoded.match(/^[^\u0000-\u0020<>"{}|^`\\]*$/)) {
@@ -8062,8 +8060,7 @@ var require_ttl2jsonld = __commonJS({
8062
8060
  } catch (e) {
8063
8061
  error2("Invalid IRIREF " + join2);
8064
8062
  }
8065
- } else
8066
- error2("Invalid IRIREF " + a.join("") + " / " + decoded);
8063
+ } else error2("Invalid IRIREF " + a.join("") + " / " + decoded);
8067
8064
  }, peg$c80 = ":", peg$c81 = peg$literalExpectation(":", false), peg$c82 = function(a) {
8068
8065
  a = a || "0";
8069
8066
  if (context.hasPrefix(a) === false)
@@ -12399,8 +12396,7 @@ var require_ttl2jsonld = __commonJS({
12399
12396
  return;
12400
12397
  }
12401
12398
  const last = context.base[context.base.length - 1];
12402
- if (last !== uri)
12403
- context.base.push(new URL(uri, last).toString());
12399
+ if (last !== uri) context.base.push(new URL(uri, last).toString());
12404
12400
  },
12405
12401
  addPrefix: function(prefix, uri) {
12406
12402
  const list = context.data[prefix];
@@ -12417,61 +12413,49 @@ var require_ttl2jsonld = __commonJS({
12417
12413
  const prefix = Object.keys(context.data).find((key) => pname.indexOf(key + ":") === 0);
12418
12414
  if (prefix !== void 0) {
12419
12415
  const list = context.data[prefix];
12420
- if (list.length === 1 && force !== true && isIRI(list[0].uri))
12421
- return pname;
12416
+ if (list.length === 1 && force !== true && isIRI(list[0].uri)) return pname;
12422
12417
  const uri = list[list.length - 1].uri;
12423
12418
  return pname.replace(prefix + ":", uri);
12424
12419
  } else {
12425
12420
  var base = context.base.length === 0 ? options.baseIRI : context.base[context.base.length - 1];
12426
- if (!base || pname.match(/^(http:|https:|urn:|file:)/))
12427
- return pname;
12428
- if (pname.indexOf("//") === 0 && base)
12429
- return base.split("//")[0] + pname;
12421
+ if (!base || pname.match(/^(http:|https:|urn:|file:)/)) return pname;
12422
+ if (pname.indexOf("//") === 0 && base) return base.split("//")[0] + pname;
12430
12423
  return new URL(pname, base).toString();
12431
12424
  }
12432
12425
  },
12433
12426
  increment: function(prefix) {
12434
12427
  const list = context.data[prefix];
12435
- if (list !== void 0)
12436
- list[list.length - 1].count++;
12428
+ if (list !== void 0) list[list.length - 1].count++;
12437
12429
  },
12438
12430
  decrement: function(prefix) {
12439
12431
  const list = context.data[prefix];
12440
- if (list !== void 0)
12441
- list[list.length - 1].count--;
12432
+ if (list !== void 0) list[list.length - 1].count--;
12442
12433
  },
12443
12434
  toJSON: function() {
12444
12435
  const root = {};
12445
12436
  if (context.base.length > 0) {
12446
- if (root["@context"] === void 0)
12447
- root["@context"] = {};
12437
+ if (root["@context"] === void 0) root["@context"] = {};
12448
12438
  root["@context"]["@base"] = context.base[0];
12449
12439
  }
12450
12440
  Object.keys(context.data).forEach((key) => {
12451
12441
  const head = context.data[key][0];
12452
- if (head.uri === "http://www.w3.org/2001/XMLSchema#" && head.count < 1)
12453
- return;
12454
- if (!isIRI(head.uri))
12455
- return;
12456
- if (root["@context"] === void 0)
12457
- root["@context"] = {};
12442
+ if (head.uri === "http://www.w3.org/2001/XMLSchema#" && head.count < 1) return;
12443
+ if (!isIRI(head.uri)) return;
12444
+ if (root["@context"] === void 0) root["@context"] = {};
12458
12445
  root["@context"][key] = head.uri;
12459
12446
  });
12460
12447
  return root;
12461
12448
  }
12462
12449
  };
12463
12450
  function expandList(container, force) {
12464
- if (container["@list"] === void 0)
12465
- return container;
12466
- if (!force && !container["@list"].find((x) => x["@list"] !== void 0))
12467
- return container;
12451
+ if (container["@list"] === void 0) return container;
12452
+ if (!force && !container["@list"].find((x) => x["@list"] !== void 0)) return container;
12468
12453
  if (container["@list"].length === 0)
12469
12454
  return { "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" };
12470
12455
  var root = {};
12471
12456
  var focus = null;
12472
12457
  container["@list"].forEach((b) => {
12473
- if (focus === null)
12474
- focus = root;
12458
+ if (focus === null) focus = root;
12475
12459
  else {
12476
12460
  focus["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"] = {};
12477
12461
  focus = focus["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"];
@@ -13092,13 +13076,11 @@ function _classCallCheck(instance, Constructor) {
13092
13076
 
13093
13077
  // ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
13094
13078
  function toPrimitive(t, r) {
13095
- if ("object" != _typeof(t) || !t)
13096
- return t;
13079
+ if ("object" != _typeof(t) || !t) return t;
13097
13080
  var e = t[Symbol.toPrimitive];
13098
13081
  if (void 0 !== e) {
13099
13082
  var i = e.call(t, r || "default");
13100
- if ("object" != _typeof(i))
13101
- return i;
13083
+ if ("object" != _typeof(i)) return i;
13102
13084
  throw new TypeError("@@toPrimitive must return a primitive value.");
13103
13085
  }
13104
13086
  return ("string" === r ? String : Number)(t);
@@ -13107,7 +13089,7 @@ function toPrimitive(t, r) {
13107
13089
  // ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
13108
13090
  function toPropertyKey(t) {
13109
13091
  var i = toPrimitive(t, "string");
13110
- return "symbol" == _typeof(i) ? i : String(i);
13092
+ return "symbol" == _typeof(i) ? i : i + "";
13111
13093
  }
13112
13094
 
13113
13095
  // ../node_modules/@babel/runtime/helpers/esm/createClass.js
@@ -13116,16 +13098,13 @@ function _defineProperties(target, props) {
13116
13098
  var descriptor = props[i];
13117
13099
  descriptor.enumerable = descriptor.enumerable || false;
13118
13100
  descriptor.configurable = true;
13119
- if ("value" in descriptor)
13120
- descriptor.writable = true;
13101
+ if ("value" in descriptor) descriptor.writable = true;
13121
13102
  Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
13122
13103
  }
13123
13104
  }
13124
13105
  function _createClass(Constructor, protoProps, staticProps) {
13125
- if (protoProps)
13126
- _defineProperties(Constructor.prototype, protoProps);
13127
- if (staticProps)
13128
- _defineProperties(Constructor, staticProps);
13106
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
13107
+ if (staticProps) _defineProperties(Constructor, staticProps);
13129
13108
  Object.defineProperty(Constructor, "prototype", {
13130
13109
  writable: false
13131
13110
  });
@@ -13159,6 +13138,24 @@ function _assertThisInitialized(self2) {
13159
13138
  return self2;
13160
13139
  }
13161
13140
 
13141
+ // ../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
13142
+ function _possibleConstructorReturn(self2, call) {
13143
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
13144
+ return call;
13145
+ } else if (call !== void 0) {
13146
+ throw new TypeError("Derived constructors may only return object or undefined");
13147
+ }
13148
+ return _assertThisInitialized(self2);
13149
+ }
13150
+
13151
+ // ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
13152
+ function _getPrototypeOf(o) {
13153
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
13154
+ return o2.__proto__ || Object.getPrototypeOf(o2);
13155
+ };
13156
+ return _getPrototypeOf(o);
13157
+ }
13158
+
13162
13159
  // ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
13163
13160
  function _setPrototypeOf(o, p) {
13164
13161
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
@@ -13183,26 +13180,7 @@ function _inherits(subClass, superClass) {
13183
13180
  Object.defineProperty(subClass, "prototype", {
13184
13181
  writable: false
13185
13182
  });
13186
- if (superClass)
13187
- _setPrototypeOf(subClass, superClass);
13188
- }
13189
-
13190
- // ../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
13191
- function _possibleConstructorReturn(self2, call) {
13192
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
13193
- return call;
13194
- } else if (call !== void 0) {
13195
- throw new TypeError("Derived constructors may only return object or undefined");
13196
- }
13197
- return _assertThisInitialized(self2);
13198
- }
13199
-
13200
- // ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
13201
- function _getPrototypeOf(o) {
13202
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
13203
- return o2.__proto__ || Object.getPrototypeOf(o2);
13204
- };
13205
- return _getPrototypeOf(o);
13183
+ if (superClass) _setPrototypeOf(subClass, superClass);
13206
13184
  }
13207
13185
 
13208
13186
  // ../node_modules/rdflib/esm/class-order.js
@@ -13225,7 +13203,7 @@ var Node2 = /* @__PURE__ */ function() {
13225
13203
  _defineProperty(this, "value", void 0);
13226
13204
  this.value = value;
13227
13205
  }
13228
- _createClass(Node3, [{
13206
+ return _createClass(Node3, [{
13229
13207
  key: "substitute",
13230
13208
  value: function substitute(bindings) {
13231
13209
  return this;
@@ -13315,54 +13293,37 @@ var Node2 = /* @__PURE__ */ function() {
13315
13293
  throw new Error("Node.toString() is abstract - see the subclasses instead");
13316
13294
  }
13317
13295
  }]);
13318
- return Node3;
13319
13296
  }();
13320
13297
  _defineProperty(Node2, "fromValue", void 0);
13321
13298
  _defineProperty(Node2, "toJS", void 0);
13322
13299
 
13323
13300
  // ../node_modules/rdflib/esm/blank-node.js
13324
- function _createSuper(Derived) {
13325
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
13326
- return function _createSuperInternal() {
13327
- var Super = _getPrototypeOf(Derived), result;
13328
- if (hasNativeReflectConstruct) {
13329
- var NewTarget = _getPrototypeOf(this).constructor;
13330
- result = Reflect.construct(Super, arguments, NewTarget);
13331
- } else {
13332
- result = Super.apply(this, arguments);
13333
- }
13334
- return _possibleConstructorReturn(this, result);
13335
- };
13301
+ function _callSuper(t, o, e) {
13302
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
13336
13303
  }
13337
13304
  function _isNativeReflectConstruct() {
13338
- if (typeof Reflect === "undefined" || !Reflect.construct)
13339
- return false;
13340
- if (Reflect.construct.sham)
13341
- return false;
13342
- if (typeof Proxy === "function")
13343
- return true;
13344
13305
  try {
13345
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13306
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13346
13307
  }));
13347
- return true;
13348
- } catch (e) {
13349
- return false;
13308
+ } catch (t2) {
13350
13309
  }
13310
+ return (_isNativeReflectConstruct = function _isNativeReflectConstruct10() {
13311
+ return !!t;
13312
+ })();
13351
13313
  }
13352
13314
  var BlankNode = /* @__PURE__ */ function(_Node) {
13353
- _inherits(BlankNode3, _Node);
13354
- var _super = _createSuper(BlankNode3);
13355
13315
  function BlankNode3(id3) {
13356
13316
  var _this;
13357
13317
  _classCallCheck(this, BlankNode3);
13358
- _this = _super.call(this, BlankNode3.getId(id3));
13359
- _defineProperty(_assertThisInitialized(_this), "termType", BlankNodeTermType);
13360
- _defineProperty(_assertThisInitialized(_this), "classOrder", class_order_default.BlankNode);
13361
- _defineProperty(_assertThisInitialized(_this), "isBlank", 1);
13362
- _defineProperty(_assertThisInitialized(_this), "isVar", 1);
13318
+ _this = _callSuper(this, BlankNode3, [BlankNode3.getId(id3)]);
13319
+ _defineProperty(_this, "termType", BlankNodeTermType);
13320
+ _defineProperty(_this, "classOrder", class_order_default.BlankNode);
13321
+ _defineProperty(_this, "isBlank", 1);
13322
+ _defineProperty(_this, "isVar", 1);
13363
13323
  return _this;
13364
13324
  }
13365
- _createClass(BlankNode3, [{
13325
+ _inherits(BlankNode3, _Node);
13326
+ return _createClass(BlankNode3, [{
13366
13327
  key: "id",
13367
13328
  get: function get() {
13368
13329
  return this.value;
@@ -13424,7 +13385,6 @@ var BlankNode = /* @__PURE__ */ function(_Node) {
13424
13385
  return "n" + BlankNode3.nextId++;
13425
13386
  }
13426
13387
  }]);
13427
- return BlankNode3;
13428
13388
  }(Node2);
13429
13389
  _defineProperty(BlankNode, "nextId", 0);
13430
13390
  _defineProperty(BlankNode, "NTAnonymousNodePrefix", "_:");
@@ -13438,43 +13398,26 @@ function termValue(node) {
13438
13398
  }
13439
13399
 
13440
13400
  // ../node_modules/rdflib/esm/named-node.js
13441
- function _createSuper2(Derived) {
13442
- var hasNativeReflectConstruct = _isNativeReflectConstruct2();
13443
- return function _createSuperInternal() {
13444
- var Super = _getPrototypeOf(Derived), result;
13445
- if (hasNativeReflectConstruct) {
13446
- var NewTarget = _getPrototypeOf(this).constructor;
13447
- result = Reflect.construct(Super, arguments, NewTarget);
13448
- } else {
13449
- result = Super.apply(this, arguments);
13450
- }
13451
- return _possibleConstructorReturn(this, result);
13452
- };
13401
+ function _callSuper2(t, o, e) {
13402
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
13453
13403
  }
13454
13404
  function _isNativeReflectConstruct2() {
13455
- if (typeof Reflect === "undefined" || !Reflect.construct)
13456
- return false;
13457
- if (Reflect.construct.sham)
13458
- return false;
13459
- if (typeof Proxy === "function")
13460
- return true;
13461
13405
  try {
13462
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13406
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13463
13407
  }));
13464
- return true;
13465
- } catch (e) {
13466
- return false;
13408
+ } catch (t2) {
13467
13409
  }
13410
+ return (_isNativeReflectConstruct2 = function _isNativeReflectConstruct10() {
13411
+ return !!t;
13412
+ })();
13468
13413
  }
13469
13414
  var NamedNode = /* @__PURE__ */ function(_Node) {
13470
- _inherits(NamedNode3, _Node);
13471
- var _super = _createSuper2(NamedNode3);
13472
13415
  function NamedNode3(iri) {
13473
13416
  var _this;
13474
13417
  _classCallCheck(this, NamedNode3);
13475
- _this = _super.call(this, termValue(iri));
13476
- _defineProperty(_assertThisInitialized(_this), "termType", NamedNodeTermType);
13477
- _defineProperty(_assertThisInitialized(_this), "classOrder", class_order_default.NamedNode);
13418
+ _this = _callSuper2(this, NamedNode3, [termValue(iri)]);
13419
+ _defineProperty(_this, "termType", NamedNodeTermType);
13420
+ _defineProperty(_this, "classOrder", class_order_default.NamedNode);
13478
13421
  if (!_this.value) {
13479
13422
  throw new Error("Missing IRI for NamedNode");
13480
13423
  }
@@ -13487,14 +13430,14 @@ var NamedNode = /* @__PURE__ */ function(_Node) {
13487
13430
  }
13488
13431
  return _this;
13489
13432
  }
13490
- _createClass(NamedNode3, [{
13433
+ _inherits(NamedNode3, _Node);
13434
+ return _createClass(NamedNode3, [{
13491
13435
  key: "dir",
13492
13436
  value: function dir() {
13493
13437
  var str = this.value.split("#")[0];
13494
13438
  var p = str.slice(0, -1).lastIndexOf("/");
13495
13439
  var q = str.indexOf("//");
13496
- if (q >= 0 && p < q + 2 || p < 0)
13497
- return null;
13440
+ if (q >= 0 && p < q + 2 || p < 0) return null;
13498
13441
  return new NamedNode3(str.slice(0, p + 1));
13499
13442
  }
13500
13443
  /**
@@ -13506,8 +13449,7 @@ var NamedNode = /* @__PURE__ */ function(_Node) {
13506
13449
  value: function site() {
13507
13450
  var str = this.value.split("#")[0];
13508
13451
  var p = str.indexOf("//");
13509
- if (p < 0)
13510
- throw new Error("This URI does not have a web site part (origin)");
13452
+ if (p < 0) throw new Error("This URI does not have a web site part (origin)");
13511
13453
  var q = str.indexOf("/", p + 2);
13512
13454
  if (q < 0) {
13513
13455
  return new NamedNode3(str.slice(0) + "/");
@@ -13567,7 +13509,6 @@ var NamedNode = /* @__PURE__ */ function(_Node) {
13567
13509
  return new NamedNode3(value);
13568
13510
  }
13569
13511
  }]);
13570
- return NamedNode3;
13571
13512
  }(Node2);
13572
13513
 
13573
13514
  // ../node_modules/rdflib/esm/xsd-internal.js
@@ -13582,46 +13523,29 @@ var xsd_internal_default = {
13582
13523
  };
13583
13524
 
13584
13525
  // ../node_modules/rdflib/esm/literal.js
13585
- function _createSuper3(Derived) {
13586
- var hasNativeReflectConstruct = _isNativeReflectConstruct3();
13587
- return function _createSuperInternal() {
13588
- var Super = _getPrototypeOf(Derived), result;
13589
- if (hasNativeReflectConstruct) {
13590
- var NewTarget = _getPrototypeOf(this).constructor;
13591
- result = Reflect.construct(Super, arguments, NewTarget);
13592
- } else {
13593
- result = Super.apply(this, arguments);
13594
- }
13595
- return _possibleConstructorReturn(this, result);
13596
- };
13526
+ function _callSuper3(t, o, e) {
13527
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
13597
13528
  }
13598
13529
  function _isNativeReflectConstruct3() {
13599
- if (typeof Reflect === "undefined" || !Reflect.construct)
13600
- return false;
13601
- if (Reflect.construct.sham)
13602
- return false;
13603
- if (typeof Proxy === "function")
13604
- return true;
13605
13530
  try {
13606
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13531
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13607
13532
  }));
13608
- return true;
13609
- } catch (e) {
13610
- return false;
13533
+ } catch (t2) {
13611
13534
  }
13535
+ return (_isNativeReflectConstruct3 = function _isNativeReflectConstruct10() {
13536
+ return !!t;
13537
+ })();
13612
13538
  }
13613
13539
  var Literal = /* @__PURE__ */ function(_Node) {
13614
- _inherits(Literal3, _Node);
13615
- var _super = _createSuper3(Literal3);
13616
13540
  function Literal3(value, language, datatype) {
13617
13541
  var _this;
13618
13542
  _classCallCheck(this, Literal3);
13619
- _this = _super.call(this, value);
13620
- _defineProperty(_assertThisInitialized(_this), "termType", LiteralTermType);
13621
- _defineProperty(_assertThisInitialized(_this), "classOrder", class_order_default.Literal);
13622
- _defineProperty(_assertThisInitialized(_this), "datatype", xsd_internal_default.string);
13623
- _defineProperty(_assertThisInitialized(_this), "isVar", 0);
13624
- _defineProperty(_assertThisInitialized(_this), "language", "");
13543
+ _this = _callSuper3(this, Literal3, [value]);
13544
+ _defineProperty(_this, "termType", LiteralTermType);
13545
+ _defineProperty(_this, "classOrder", class_order_default.Literal);
13546
+ _defineProperty(_this, "datatype", xsd_internal_default.string);
13547
+ _defineProperty(_this, "isVar", 0);
13548
+ _defineProperty(_this, "language", "");
13625
13549
  if (language) {
13626
13550
  _this.language = language;
13627
13551
  _this.datatype = xsd_internal_default.langString;
@@ -13632,7 +13556,8 @@ var Literal = /* @__PURE__ */ function(_Node) {
13632
13556
  }
13633
13557
  return _this;
13634
13558
  }
13635
- _createClass(Literal3, [{
13559
+ _inherits(Literal3, _Node);
13560
+ return _createClass(Literal3, [{
13636
13561
  key: "copy",
13637
13562
  value: function copy() {
13638
13563
  return new Literal3(this.value, this.lang, this.datatype);
@@ -13763,7 +13688,6 @@ var Literal = /* @__PURE__ */ function(_Node) {
13763
13688
  throw new Error("Can't make literal from " + value + " of type " + _typeof(value));
13764
13689
  }
13765
13690
  }]);
13766
- return Literal3;
13767
13691
  }(Node2);
13768
13692
 
13769
13693
  // ../node_modules/rdflib/esm/utils/default-graph-uri.js
@@ -13771,47 +13695,31 @@ var defaultGraphURI = "chrome:theSession";
13771
13695
  var defaultGraphNode = new NamedNode(defaultGraphURI);
13772
13696
 
13773
13697
  // ../node_modules/rdflib/esm/default-graph.js
13774
- function _createSuper4(Derived) {
13775
- var hasNativeReflectConstruct = _isNativeReflectConstruct4();
13776
- return function _createSuperInternal() {
13777
- var Super = _getPrototypeOf(Derived), result;
13778
- if (hasNativeReflectConstruct) {
13779
- var NewTarget = _getPrototypeOf(this).constructor;
13780
- result = Reflect.construct(Super, arguments, NewTarget);
13781
- } else {
13782
- result = Super.apply(this, arguments);
13783
- }
13784
- return _possibleConstructorReturn(this, result);
13785
- };
13698
+ function _callSuper4(t, o, e) {
13699
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
13786
13700
  }
13787
13701
  function _isNativeReflectConstruct4() {
13788
- if (typeof Reflect === "undefined" || !Reflect.construct)
13789
- return false;
13790
- if (Reflect.construct.sham)
13791
- return false;
13792
- if (typeof Proxy === "function")
13793
- return true;
13794
13702
  try {
13795
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13703
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13796
13704
  }));
13797
- return true;
13798
- } catch (e) {
13799
- return false;
13705
+ } catch (t2) {
13800
13706
  }
13707
+ return (_isNativeReflectConstruct4 = function _isNativeReflectConstruct10() {
13708
+ return !!t;
13709
+ })();
13801
13710
  }
13802
13711
  var DefaultGraph = /* @__PURE__ */ function(_Node) {
13803
- _inherits(DefaultGraph3, _Node);
13804
- var _super = _createSuper4(DefaultGraph3);
13805
13712
  function DefaultGraph3() {
13806
13713
  var _this;
13807
13714
  _classCallCheck(this, DefaultGraph3);
13808
- _this = _super.call(this, "");
13809
- _defineProperty(_assertThisInitialized(_this), "value", "");
13810
- _defineProperty(_assertThisInitialized(_this), "termType", DefaultGraphTermType);
13811
- _defineProperty(_assertThisInitialized(_this), "uri", defaultGraphURI);
13715
+ _this = _callSuper4(this, DefaultGraph3, [""]);
13716
+ _defineProperty(_this, "value", "");
13717
+ _defineProperty(_this, "termType", DefaultGraphTermType);
13718
+ _defineProperty(_this, "uri", defaultGraphURI);
13812
13719
  return _this;
13813
13720
  }
13814
- _createClass(DefaultGraph3, [{
13721
+ _inherits(DefaultGraph3, _Node);
13722
+ return _createClass(DefaultGraph3, [{
13815
13723
  key: "toCanonical",
13816
13724
  value: function toCanonical() {
13817
13725
  return this.value;
@@ -13822,7 +13730,6 @@ var DefaultGraph = /* @__PURE__ */ function(_Node) {
13822
13730
  return "DefaultGraph";
13823
13731
  }
13824
13732
  }]);
13825
- return DefaultGraph3;
13826
13733
  }(Node2);
13827
13734
  function isDefaultGraph(object) {
13828
13735
  return !!object && object.termType === DefaultGraphTermType;
@@ -13842,7 +13749,7 @@ var Statement = /* @__PURE__ */ function() {
13842
13749
  this.object = Node2.fromValue(object);
13843
13750
  this.graph = graph3 == void 0 ? defaultGraph : Node2.fromValue(graph3);
13844
13751
  }
13845
- _createClass(Statement2, [{
13752
+ return _createClass(Statement2, [{
13846
13753
  key: "why",
13847
13754
  get: function get() {
13848
13755
  return this.graph;
@@ -13898,7 +13805,6 @@ var Statement = /* @__PURE__ */ function() {
13898
13805
  return this.toNT();
13899
13806
  }
13900
13807
  }]);
13901
- return Statement2;
13902
13808
  }();
13903
13809
 
13904
13810
  // ../node_modules/rdflib/esm/uri.js
@@ -14071,52 +13977,36 @@ function refTo(base, uri) {
14071
13977
  }
14072
13978
 
14073
13979
  // ../node_modules/rdflib/esm/variable.js
14074
- function _createSuper5(Derived) {
14075
- var hasNativeReflectConstruct = _isNativeReflectConstruct5();
14076
- return function _createSuperInternal() {
14077
- var Super = _getPrototypeOf(Derived), result;
14078
- if (hasNativeReflectConstruct) {
14079
- var NewTarget = _getPrototypeOf(this).constructor;
14080
- result = Reflect.construct(Super, arguments, NewTarget);
14081
- } else {
14082
- result = Super.apply(this, arguments);
14083
- }
14084
- return _possibleConstructorReturn(this, result);
14085
- };
13980
+ function _callSuper5(t, o, e) {
13981
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
14086
13982
  }
14087
13983
  function _isNativeReflectConstruct5() {
14088
- if (typeof Reflect === "undefined" || !Reflect.construct)
14089
- return false;
14090
- if (Reflect.construct.sham)
14091
- return false;
14092
- if (typeof Proxy === "function")
14093
- return true;
14094
13984
  try {
14095
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13985
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14096
13986
  }));
14097
- return true;
14098
- } catch (e) {
14099
- return false;
13987
+ } catch (t2) {
14100
13988
  }
13989
+ return (_isNativeReflectConstruct5 = function _isNativeReflectConstruct10() {
13990
+ return !!t;
13991
+ })();
14101
13992
  }
14102
13993
  var Variable = /* @__PURE__ */ function(_Node) {
14103
- _inherits(Variable3, _Node);
14104
- var _super = _createSuper5(Variable3);
14105
13994
  function Variable3() {
14106
13995
  var _this;
14107
13996
  var name = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
14108
13997
  _classCallCheck(this, Variable3);
14109
- _this = _super.call(this, name);
14110
- _defineProperty(_assertThisInitialized(_this), "termType", VariableTermType);
14111
- _defineProperty(_assertThisInitialized(_this), "base", "varid:");
14112
- _defineProperty(_assertThisInitialized(_this), "classOrder", class_order_default.Variable);
14113
- _defineProperty(_assertThisInitialized(_this), "isVar", 1);
14114
- _defineProperty(_assertThisInitialized(_this), "uri", void 0);
13998
+ _this = _callSuper5(this, Variable3, [name]);
13999
+ _defineProperty(_this, "termType", VariableTermType);
14000
+ _defineProperty(_this, "base", "varid:");
14001
+ _defineProperty(_this, "classOrder", class_order_default.Variable);
14002
+ _defineProperty(_this, "isVar", 1);
14003
+ _defineProperty(_this, "uri", void 0);
14115
14004
  _this.base = "varid:";
14116
14005
  _this.uri = join(name, _this.base);
14117
14006
  return _this;
14118
14007
  }
14119
- _createClass(Variable3, [{
14008
+ _inherits(Variable3, _Node);
14009
+ return _createClass(Variable3, [{
14120
14010
  key: "equals",
14121
14011
  value: function equals2(other) {
14122
14012
  if (!other) {
@@ -14149,7 +14039,6 @@ var Variable = /* @__PURE__ */ function(_Node) {
14149
14039
  return "?".concat(variable4.uri);
14150
14040
  }
14151
14041
  }]);
14152
- return Variable3;
14153
14042
  }(Node2);
14154
14043
 
14155
14044
  // ../node_modules/rdflib/esm/factories/factory-types.js
@@ -14165,10 +14054,9 @@ var Feature = /* @__PURE__ */ function(Feature2) {
14165
14054
  }({});
14166
14055
 
14167
14056
  // ../node_modules/rdflib/esm/factories/canonical-data-factory.js
14168
- var _supports;
14169
14057
  var _defaultGraph = new DefaultGraph();
14170
14058
  var CanonicalDataFactory = {
14171
- supports: (_supports = {}, _defineProperty(_supports, Feature.collections, false), _defineProperty(_supports, Feature.defaultGraphType, false), _defineProperty(_supports, Feature.equalsMethod, true), _defineProperty(_supports, Feature.identity, false), _defineProperty(_supports, Feature.id, true), _defineProperty(_supports, Feature.reversibleId, false), _defineProperty(_supports, Feature.variableType, true), _supports),
14059
+ supports: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Feature.collections, false), Feature.defaultGraphType, false), Feature.equalsMethod, true), Feature.identity, false), Feature.id, true), Feature.reversibleId, false), Feature.variableType, true),
14172
14060
  /**
14173
14061
  * Creates a new blank node
14174
14062
  * @param value - The blank node's identifier
@@ -14319,33 +14207,18 @@ var CanonicalDataFactory = {
14319
14207
  var canonical_data_factory_default = CanonicalDataFactory;
14320
14208
 
14321
14209
  // ../node_modules/rdflib/esm/collection.js
14322
- function _createSuper6(Derived) {
14323
- var hasNativeReflectConstruct = _isNativeReflectConstruct6();
14324
- return function _createSuperInternal() {
14325
- var Super = _getPrototypeOf(Derived), result;
14326
- if (hasNativeReflectConstruct) {
14327
- var NewTarget = _getPrototypeOf(this).constructor;
14328
- result = Reflect.construct(Super, arguments, NewTarget);
14329
- } else {
14330
- result = Super.apply(this, arguments);
14331
- }
14332
- return _possibleConstructorReturn(this, result);
14333
- };
14210
+ function _callSuper6(t, o, e) {
14211
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct6() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
14334
14212
  }
14335
14213
  function _isNativeReflectConstruct6() {
14336
- if (typeof Reflect === "undefined" || !Reflect.construct)
14337
- return false;
14338
- if (Reflect.construct.sham)
14339
- return false;
14340
- if (typeof Proxy === "function")
14341
- return true;
14342
14214
  try {
14343
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14215
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14344
14216
  }));
14345
- return true;
14346
- } catch (e) {
14347
- return false;
14217
+ } catch (t2) {
14348
14218
  }
14219
+ return (_isNativeReflectConstruct6 = function _isNativeReflectConstruct10() {
14220
+ return !!t;
14221
+ })();
14349
14222
  }
14350
14223
  function fromValue(value) {
14351
14224
  if (typeof value === "undefined" || value === null) {
@@ -14360,18 +14233,16 @@ function fromValue(value) {
14360
14233
  return Literal.fromValue(value);
14361
14234
  }
14362
14235
  var Collection = /* @__PURE__ */ function(_Node) {
14363
- _inherits(Collection2, _Node);
14364
- var _super = _createSuper6(Collection2);
14365
14236
  function Collection2(initial) {
14366
14237
  var _this;
14367
14238
  _classCallCheck(this, Collection2);
14368
- _this = _super.call(this, (BlankNode.nextId++).toString());
14369
- _defineProperty(_assertThisInitialized(_this), "termType", CollectionTermType);
14370
- _defineProperty(_assertThisInitialized(_this), "classOrder", class_order_default.Collection);
14371
- _defineProperty(_assertThisInitialized(_this), "closed", false);
14372
- _defineProperty(_assertThisInitialized(_this), "compareTerm", BlankNode.prototype.compareTerm);
14373
- _defineProperty(_assertThisInitialized(_this), "elements", []);
14374
- _defineProperty(_assertThisInitialized(_this), "isVar", 0);
14239
+ _this = _callSuper6(this, Collection2, [(BlankNode.nextId++).toString()]);
14240
+ _defineProperty(_this, "termType", CollectionTermType);
14241
+ _defineProperty(_this, "classOrder", class_order_default.Collection);
14242
+ _defineProperty(_this, "closed", false);
14243
+ _defineProperty(_this, "compareTerm", BlankNode.prototype.compareTerm);
14244
+ _defineProperty(_this, "elements", []);
14245
+ _defineProperty(_this, "isVar", 0);
14375
14246
  if (initial && initial.length > 0) {
14376
14247
  initial.forEach(function(element) {
14377
14248
  _this.elements.push(fromValue(element));
@@ -14379,7 +14250,8 @@ var Collection = /* @__PURE__ */ function(_Node) {
14379
14250
  }
14380
14251
  return _this;
14381
14252
  }
14382
- _createClass(Collection2, [{
14253
+ _inherits(Collection2, _Node);
14254
+ return _createClass(Collection2, [{
14383
14255
  key: "id",
14384
14256
  get: function get() {
14385
14257
  return this.value;
@@ -14456,7 +14328,6 @@ var Collection = /* @__PURE__ */ function(_Node) {
14456
14328
  return BlankNode.NTAnonymousNodePrefix + collection2.id;
14457
14329
  }
14458
14330
  }]);
14459
- return Collection2;
14460
14331
  }(Node2);
14461
14332
  _defineProperty(Collection, "termType", CollectionTermType);
14462
14333
 
@@ -14561,8 +14432,7 @@ function dumpNode(node, options, selfClosing, skipAttributes) {
14561
14432
  var i;
14562
14433
  var out = "";
14563
14434
  var noEsc = [false];
14564
- if (typeof node.nodeType === "undefined")
14565
- return out;
14435
+ if (typeof node.nodeType === "undefined") return out;
14566
14436
  if (node.nodeType === 1) {
14567
14437
  if (node.hasAttribute("class") && options && options.classWithChildText && node.matches(options.classWithChildText.class)) {
14568
14438
  out += node.querySelector(options.classWithChildText.element).textContent;
@@ -14572,10 +14442,8 @@ function dumpNode(node, options, selfClosing, skipAttributes) {
14572
14442
  var attrList = [];
14573
14443
  for (i = node.attributes.length - 1; i >= 0; i--) {
14574
14444
  var atn = node.attributes[i];
14575
- if (skipAttributes && skipAttributes.length > 0 && skipAttributes[atn.name])
14576
- continue;
14577
- if (/^\d+$/.test(atn.name))
14578
- continue;
14445
+ if (skipAttributes && skipAttributes.length > 0 && skipAttributes[atn.name]) continue;
14446
+ if (/^\d+$/.test(atn.name)) continue;
14579
14447
  if (atn.name === "class" && options && options.replaceClassItemWith && atn.value.split(" ").indexOf(options.replaceClassItemWith.source) > -1) {
14580
14448
  var re = new RegExp(options.replaceClassItemWith.source, "g");
14581
14449
  atn.value = atn.value.replace(re, options.replaceClassItemWith.target).trim();
@@ -14598,8 +14466,7 @@ function dumpNode(node, options, selfClosing, skipAttributes) {
14598
14466
  out += ">";
14599
14467
  out += ename === "html" ? "\n " : "";
14600
14468
  noEsc.push(ename === "style" || ename === "script");
14601
- for (i = 0; i < node.childNodes.length; i++)
14602
- out += dumpNode(node.childNodes[i]);
14469
+ for (i = 0; i < node.childNodes.length; i++) out += dumpNode(node.childNodes[i]);
14603
14470
  noEsc.pop();
14604
14471
  out += ename === "body" ? "</" + ename + ">\n" : "</" + ename + ">";
14605
14472
  }
@@ -14630,12 +14497,9 @@ function heavyCompare(x, y, g, uriMap) {
14630
14497
  };
14631
14498
  var comparison = Object.prototype.hasOwnProperty.call(g, "compareTerms") ? g.compareTerms(x, y) : x.compareTerm(y);
14632
14499
  if (x.termType === "BlankNode" && y.termType === "BlankNode") {
14633
- if (comparison === 0)
14634
- return 0;
14635
- if (signature(x) > signature(y))
14636
- return 1;
14637
- if (signature(x) < signature(y))
14638
- return -1;
14500
+ if (comparison === 0) return 0;
14501
+ if (signature(x) > signature(y)) return 1;
14502
+ if (signature(x) < signature(y)) return -1;
14639
14503
  return comparison;
14640
14504
  } else {
14641
14505
  if (uriMap && x.uri && y.uri) {
@@ -14746,7 +14610,7 @@ var Serializer = /* @__PURE__ */ function() {
14746
14610
  this.rdfFactory = store.rdfFactory || canonical_data_factory_default;
14747
14611
  this.xsd = createXSD(this.rdfFactory);
14748
14612
  }
14749
- _createClass(Serializer2, [{
14613
+ return _createClass(Serializer2, [{
14750
14614
  key: "setBase",
14751
14615
  value: function setBase(base) {
14752
14616
  this.base = base;
@@ -14772,8 +14636,7 @@ var Serializer = /* @__PURE__ */ function() {
14772
14636
  value: function fromStr(s) {
14773
14637
  if (s[0] === "{") {
14774
14638
  var x = this.formulas[s];
14775
- if (!x)
14776
- console.log("No formula object for " + s);
14639
+ if (!x) console.log("No formula object for " + s);
14777
14640
  return x;
14778
14641
  }
14779
14642
  return this.store.fromNT(s);
@@ -14800,15 +14663,11 @@ var Serializer = /* @__PURE__ */ function() {
14800
14663
  }, {
14801
14664
  key: "setPrefix",
14802
14665
  value: function setPrefix(prefix, uri) {
14803
- if (prefix.slice(0, 7) === "default")
14804
- return;
14805
- if (prefix.slice(0, 2) === "ns")
14806
- return;
14807
- if (!prefix || !uri)
14808
- return;
14666
+ if (prefix.slice(0, 7) === "default") return;
14667
+ if (prefix.slice(0, 2) === "ns") return;
14668
+ if (!prefix || !uri) return;
14809
14669
  for (var existingNs in this.prefixes) {
14810
- if (this.prefixes[existingNs] == prefix)
14811
- delete this.prefixes[existingNs];
14670
+ if (this.prefixes[existingNs] == prefix) delete this.prefixes[existingNs];
14812
14671
  }
14813
14672
  this.prefixes[uri] = prefix;
14814
14673
  this.namespaces[prefix] = uri;
@@ -14821,14 +14680,10 @@ var Serializer = /* @__PURE__ */ function() {
14821
14680
  }, {
14822
14681
  key: "suggestPrefix",
14823
14682
  value: function suggestPrefix(prefix, uri) {
14824
- if (prefix.slice(0, 7) === "default")
14825
- return;
14826
- if (prefix.slice(0, 2) === "ns")
14827
- return;
14828
- if (!prefix || !uri)
14829
- return;
14830
- if (prefix in this.namespaces || uri in this.prefixes)
14831
- return;
14683
+ if (prefix.slice(0, 7) === "default") return;
14684
+ if (prefix.slice(0, 2) === "ns") return;
14685
+ if (!prefix || !uri) return;
14686
+ if (prefix in this.namespaces || uri in this.prefixes) return;
14832
14687
  this.prefixes[uri] = prefix;
14833
14688
  this.namespaces[prefix] = uri;
14834
14689
  }
@@ -14862,22 +14717,17 @@ var Serializer = /* @__PURE__ */ function() {
14862
14717
  value: function makeUpPrefix(uri) {
14863
14718
  var p = uri;
14864
14719
  function canUseMethod(pp) {
14865
- if (!this.validPrefix.test(pp))
14866
- return false;
14867
- if (pp === "ns")
14868
- return false;
14869
- if (pp in this.namespaces)
14870
- return false;
14720
+ if (!this.validPrefix.test(pp)) return false;
14721
+ if (pp === "ns") return false;
14722
+ if (pp in this.namespaces) return false;
14871
14723
  this.prefixes[uri] = pp;
14872
14724
  this.namespaces[pp] = uri;
14873
14725
  return pp;
14874
14726
  }
14875
14727
  var canUse = canUseMethod.bind(this);
14876
- if ("#/".indexOf(p[p.length - 1]) >= 0)
14877
- p = p.slice(0, -1);
14728
+ if ("#/".indexOf(p[p.length - 1]) >= 0) p = p.slice(0, -1);
14878
14729
  var slash = p.lastIndexOf("/");
14879
- if (slash >= 0)
14880
- p = p.slice(slash + 1);
14730
+ if (slash >= 0) p = p.slice(slash + 1);
14881
14731
  var i = 0;
14882
14732
  while (i < p.length) {
14883
14733
  if (this.prefixchars.indexOf(p[i])) {
@@ -14887,24 +14737,16 @@ var Serializer = /* @__PURE__ */ function() {
14887
14737
  }
14888
14738
  }
14889
14739
  p = p.slice(0, i);
14890
- if (p.length < 6 && canUse(p))
14891
- return p;
14892
- if (canUse(p.slice(0, 3)))
14893
- return p.slice(0, 3);
14894
- if (canUse(p.slice(0, 2)))
14895
- return p.slice(0, 2);
14896
- if (canUse(p.slice(0, 4)))
14897
- return p.slice(0, 4);
14898
- if (canUse(p.slice(0, 1)))
14899
- return p.slice(0, 1);
14900
- if (canUse(p.slice(0, 5)))
14901
- return p.slice(0, 5);
14740
+ if (p.length < 6 && canUse(p)) return p;
14741
+ if (canUse(p.slice(0, 3))) return p.slice(0, 3);
14742
+ if (canUse(p.slice(0, 2))) return p.slice(0, 2);
14743
+ if (canUse(p.slice(0, 4))) return p.slice(0, 4);
14744
+ if (canUse(p.slice(0, 1))) return p.slice(0, 1);
14745
+ if (canUse(p.slice(0, 5))) return p.slice(0, 5);
14902
14746
  if (!this.validPrefix.test(p)) {
14903
14747
  p = "n";
14904
14748
  }
14905
- for (var j = 0; ; j++)
14906
- if (canUse(p.slice(0, 3) + j))
14907
- return p.slice(0, 3) + j;
14749
+ for (var j = 0; ; j++) if (canUse(p.slice(0, 3) + j)) return p.slice(0, 3) + j;
14908
14750
  }
14909
14751
  }, {
14910
14752
  key: "rootSubjects",
@@ -14915,8 +14757,7 @@ var Serializer = /* @__PURE__ */ function() {
14915
14757
  for (var i = 0; i < sts.length; i++) {
14916
14758
  var st3 = sts[i];
14917
14759
  var checkMentions = function checkMentions2(x) {
14918
- if (!incoming.hasOwnProperty(x))
14919
- incoming[x] = [];
14760
+ if (!incoming.hasOwnProperty(x)) incoming[x] = [];
14920
14761
  incoming[x].push(st3.subject);
14921
14762
  };
14922
14763
  var st22 = [st3.subject, st3.predicate, st3.object];
@@ -14931,15 +14772,13 @@ var Serializer = /* @__PURE__ */ function() {
14931
14772
  });
14932
14773
  checkMentions(sts[i].object);
14933
14774
  var ss = subjects[this.toStr(st3.subject)];
14934
- if (!ss)
14935
- ss = [];
14775
+ if (!ss) ss = [];
14936
14776
  ss.push(st3);
14937
14777
  subjects[this.toStr(st3.subject)] = ss;
14938
14778
  }
14939
14779
  var roots = [];
14940
14780
  for (var xNT in subjects) {
14941
- if (!subjects.hasOwnProperty(xNT))
14942
- continue;
14781
+ if (!subjects.hasOwnProperty(xNT)) continue;
14943
14782
  var y = this.fromStr(xNT);
14944
14783
  if (y.termType !== "BlankNode" || !incoming[y] || incoming[y].length !== 1) {
14945
14784
  roots.push(y);
@@ -15042,8 +14881,7 @@ var Serializer = /* @__PURE__ */ function() {
15042
14881
  }
15043
14882
  var spaces = function spaces2(n) {
15044
14883
  var s = "";
15045
- for (var i = 0; i < n; i++)
15046
- s += " ";
14884
+ for (var i = 0; i < n; i++) s += " ";
15047
14885
  return s;
15048
14886
  };
15049
14887
  var treeToLine = function treeToLine2(tree2) {
@@ -15066,8 +14904,7 @@ var Serializer = /* @__PURE__ */ function() {
15066
14904
  var treeToString = function treeToString2(tree2, level) {
15067
14905
  var str = "";
15068
14906
  var lastLength = 1e5;
15069
- if (level === void 0)
15070
- level = -1;
14907
+ if (level === void 0) level = -1;
15071
14908
  for (var i = 0; i < tree2.length; i++) {
15072
14909
  var branch = tree2[i];
15073
14910
  if (typeof branch !== "string") {
@@ -15079,8 +14916,7 @@ var Serializer = /* @__PURE__ */ function() {
15079
14916
  substr = "";
15080
14917
  }
15081
14918
  }
15082
- if (substr)
15083
- lastLength = 1e4;
14919
+ if (substr) lastLength = 1e4;
15084
14920
  str += substr;
15085
14921
  }
15086
14922
  if (typeof branch === "string") {
@@ -15193,10 +15029,8 @@ var Serializer = /* @__PURE__ */ function() {
15193
15029
  str += "@prefix : " + this.explicitURI(this.defaultNamespace) + ".\n";
15194
15030
  }
15195
15031
  for (var ns3 in this.prefixes) {
15196
- if (!this.prefixes.hasOwnProperty(ns3))
15197
- continue;
15198
- if (!this.namespacesUsed[ns3])
15199
- continue;
15032
+ if (!this.prefixes.hasOwnProperty(ns3)) continue;
15033
+ if (!this.namespacesUsed[ns3]) continue;
15200
15034
  str += "@prefix " + this.prefixes[ns3] + ": " + this.explicitURI(ns3) + ".\n";
15201
15035
  }
15202
15036
  return str + "\n";
@@ -15224,15 +15058,12 @@ var Serializer = /* @__PURE__ */ function() {
15224
15058
  case "http://www.w3.org/2001/XMLSchema#integer":
15225
15059
  return val;
15226
15060
  case "http://www.w3.org/2001/XMLSchema#decimal":
15227
- if (val.indexOf(".") < 0)
15228
- val += ".0";
15061
+ if (val.indexOf(".") < 0) val += ".0";
15229
15062
  return val;
15230
15063
  case "http://www.w3.org/2001/XMLSchema#double": {
15231
15064
  var eNotation = val.toLowerCase().indexOf("e") > 0;
15232
- if (val.indexOf(".") < 0 && !eNotation)
15233
- val += ".0";
15234
- if (!eNotation)
15235
- val += "e0";
15065
+ if (val.indexOf(".") < 0 && !eNotation) val += ".0";
15066
+ if (!eNotation) val += "e0";
15236
15067
  return val;
15237
15068
  }
15238
15069
  case "http://www.w3.org/2001/XMLSchema#boolean":
@@ -15257,8 +15088,7 @@ var Serializer = /* @__PURE__ */ function() {
15257
15088
  }, {
15258
15089
  key: "stringToN3",
15259
15090
  value: function stringToN3(str, flags) {
15260
- if (!flags)
15261
- flags = "e";
15091
+ if (!flags) flags = "e";
15262
15092
  var res = "";
15263
15093
  var i, j, k;
15264
15094
  var delim;
@@ -15276,8 +15106,7 @@ var Serializer = /* @__PURE__ */ function() {
15276
15106
  for (i = 0; i < str.length; ) {
15277
15107
  forbidden.lastIndex = 0;
15278
15108
  var m = forbidden.exec(str.slice(i));
15279
- if (m == null)
15280
- break;
15109
+ if (m == null) break;
15281
15110
  j = i + forbidden.lastIndex - 1;
15282
15111
  res += str.slice(i, j);
15283
15112
  var ch = str[j];
@@ -15327,8 +15156,7 @@ var Serializer = /* @__PURE__ */ function() {
15327
15156
  return ":" + localid;
15328
15157
  }
15329
15158
  var prefix = this.prefixes[namesp];
15330
- if (!prefix)
15331
- prefix = this.makeUpPrefix(namesp);
15159
+ if (!prefix) prefix = this.makeUpPrefix(namesp);
15332
15160
  if (prefix) {
15333
15161
  this.namespacesUsed[namesp] = true;
15334
15162
  return prefix + ":" + localid;
@@ -15349,8 +15177,7 @@ var Serializer = /* @__PURE__ */ function() {
15349
15177
  var sources = this.store.index[3];
15350
15178
  for (var s in sources) {
15351
15179
  var source = kb.fromNT(s);
15352
- if (session && source.equals(session))
15353
- continue;
15180
+ if (session && source.equals(session)) continue;
15354
15181
  write("\n" + this.atomicTermToN3(source) + " " + this.atomicTermToN3(kb.sym("http://www.w3.org/2000/10/swap/log#semantics")) + " { " + this.statementsToN3(kb.statementsMatching(void 0, void 0, void 0, source)) + " }.\n");
15355
15182
  }
15356
15183
  kb.statementsMatching(void 0, kb.sym("http://www.w3.org/2007/ont/link#requestedURI")).map(function(st3) {
@@ -15360,8 +15187,7 @@ var Serializer = /* @__PURE__ */ function() {
15360
15187
  write("}.\n");
15361
15188
  });
15362
15189
  var metaSources = [];
15363
- if (session)
15364
- metaSources.push(session);
15190
+ if (session) metaSources.push(session);
15365
15191
  var metadata = [];
15366
15192
  metaSources.map(function(source2) {
15367
15193
  metadata = metadata.concat(kb.statementsMatching(void 0, void 0, void 0, source2));
@@ -15379,8 +15205,7 @@ var Serializer = /* @__PURE__ */ function() {
15379
15205
  var liPrefix = "http://www.w3.org/1999/02/22-rdf-syntax-ns#_";
15380
15206
  var spaces = function spaces2(n) {
15381
15207
  var s = "";
15382
- for (var i = 0; i < n; i++)
15383
- s += " ";
15208
+ for (var i = 0; i < n; i++) s += " ";
15384
15209
  return s;
15385
15210
  };
15386
15211
  var XMLtreeToLine = function XMLtreeToLine2(tree3) {
@@ -15396,8 +15221,7 @@ var Serializer = /* @__PURE__ */ function() {
15396
15221
  var str2 = "";
15397
15222
  var line;
15398
15223
  var lastLength = 1e5;
15399
- if (!level)
15400
- level = 0;
15224
+ if (!level) level = 0;
15401
15225
  for (var i = 0; i < tree3.length; i++) {
15402
15226
  var branch = tree3[i];
15403
15227
  if (typeof branch !== "string") {
@@ -15409,8 +15233,7 @@ var Serializer = /* @__PURE__ */ function() {
15409
15233
  substr = "";
15410
15234
  }
15411
15235
  }
15412
- if (substr)
15413
- lastLength = 1e4;
15236
+ if (substr) lastLength = 1e4;
15414
15237
  str2 += substr;
15415
15238
  }
15416
15239
  if (typeof branch === "string") {
@@ -15440,8 +15263,7 @@ var Serializer = /* @__PURE__ */ function() {
15440
15263
  }
15441
15264
  var statementListToXMLTree = statementListToXMLTreeMethod.bind(this);
15442
15265
  function escapeForXML(str2) {
15443
- if (typeof str2 === "undefined")
15444
- return "@@@undefined@@@@";
15266
+ if (typeof str2 === "undefined") return "@@@undefined@@@@";
15445
15267
  return str2.replace(/[&<"]/g, function(m) {
15446
15268
  switch (m[0]) {
15447
15269
  case "&":
@@ -15537,8 +15359,7 @@ var Serializer = /* @__PURE__ */ function() {
15537
15359
  function propertyXMLTreeMethod(subject, stats) {
15538
15360
  var results = [];
15539
15361
  var sts2 = stats.subjects[this.toStr(subject)];
15540
- if (!sts2)
15541
- return results;
15362
+ if (!sts2) return results;
15542
15363
  sts2.sort();
15543
15364
  for (var i = 0; i < sts2.length; i++) {
15544
15365
  var st3 = sts2[i];
@@ -15572,8 +15393,7 @@ var Serializer = /* @__PURE__ */ function() {
15572
15393
  if (j < 0 && this.flags.indexOf("/") < 0) {
15573
15394
  j = uri.lastIndexOf("/");
15574
15395
  }
15575
- if (j < 0)
15576
- throw new Error("Cannot make qname out of <" + uri + ">");
15396
+ if (j < 0) throw new Error("Cannot make qname out of <" + uri + ">");
15577
15397
  for (var k = j + 1; k < uri.length; k++) {
15578
15398
  if (this._notNameChars.indexOf(uri[k]) >= 0) {
15579
15399
  throw new Error('Invalid character "' + uri[k] + '" cannot be in XML qname for URI: ' + uri);
@@ -15585,8 +15405,7 @@ var Serializer = /* @__PURE__ */ function() {
15585
15405
  return localid;
15586
15406
  }
15587
15407
  var prefix = this.prefixes[namesp];
15588
- if (!prefix)
15589
- prefix = this.makeUpPrefix(namesp);
15408
+ if (!prefix) prefix = this.makeUpPrefix(namesp);
15590
15409
  namespaceCounts[namesp] = true;
15591
15410
  return prefix + ":" + localid;
15592
15411
  }
@@ -15597,8 +15416,7 @@ var Serializer = /* @__PURE__ */ function() {
15597
15416
  str += ' xmlns="' + escapeForXML(this.defaultNamespace) + '"';
15598
15417
  }
15599
15418
  for (var ns3 in namespaceCounts) {
15600
- if (!namespaceCounts.hasOwnProperty(ns3))
15601
- continue;
15419
+ if (!namespaceCounts.hasOwnProperty(ns3)) continue;
15602
15420
  var ns22 = this.base && this.flags.includes("z") ? uri_exports.refTo(this.base, ns3) : ns3;
15603
15421
  str += "\n xmlns:" + this.prefixes[ns3] + '="' + escapeForXML(ns22) + '"';
15604
15422
  }
@@ -15615,7 +15433,6 @@ var Serializer = /* @__PURE__ */ function() {
15615
15433
  return JSON.stringify(jsonldObj, null, 2);
15616
15434
  }
15617
15435
  }]);
15618
- return Serializer2;
15619
15436
  }();
15620
15437
  function hexify(str) {
15621
15438
  return encodeURI(str);
@@ -15644,8 +15461,7 @@ function serialize(target, kb, base, contentType, callback, options) {
15644
15461
  var documentString = void 0;
15645
15462
  try {
15646
15463
  var sz = createSerializer(kb);
15647
- if (opts.flags)
15648
- sz.setFlags(opts.flags);
15464
+ if (opts.flags) sz.setFlags(opts.flags);
15649
15465
  var newSts = kb.statementsMatching(void 0, void 0, void 0, target);
15650
15466
  if ("namespaces" in kb) {
15651
15467
  sz.suggestNamespaces(kb.namespaces);
@@ -15724,8 +15540,7 @@ function arrayToStatements(rdfFactory, subject, data) {
15724
15540
  function ArrayIndexOf(arr, item) {
15725
15541
  var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
15726
15542
  var length = arr.length;
15727
- if (i < 0)
15728
- i = length + i;
15543
+ if (i < 0) i = length + i;
15729
15544
  for (; i < length; i++) {
15730
15545
  if (arr[i] === item) {
15731
15546
  return i;
@@ -15739,14 +15554,12 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
15739
15554
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
15740
15555
  if (!it) {
15741
15556
  if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
15742
- if (it)
15743
- o = it;
15557
+ if (it) o = it;
15744
15558
  var i = 0;
15745
15559
  var F = function F2() {
15746
15560
  };
15747
15561
  return { s: F, n: function n() {
15748
- if (i >= o.length)
15749
- return { done: true };
15562
+ if (i >= o.length) return { done: true };
15750
15563
  return { done: false, value: o[i++] };
15751
15564
  }, e: function e(_e) {
15752
15565
  throw _e;
@@ -15766,65 +15579,39 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
15766
15579
  err = _e2;
15767
15580
  }, f: function f() {
15768
15581
  try {
15769
- if (!normalCompletion && it.return != null)
15770
- it.return();
15582
+ if (!normalCompletion && it.return != null) it.return();
15771
15583
  } finally {
15772
- if (didErr)
15773
- throw err;
15584
+ if (didErr) throw err;
15774
15585
  }
15775
15586
  } };
15776
15587
  }
15777
15588
  function _unsupportedIterableToArray(o, minLen) {
15778
- if (!o)
15779
- return;
15780
- if (typeof o === "string")
15781
- return _arrayLikeToArray(o, minLen);
15589
+ if (!o) return;
15590
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
15782
15591
  var n = Object.prototype.toString.call(o).slice(8, -1);
15783
- if (n === "Object" && o.constructor)
15784
- n = o.constructor.name;
15785
- if (n === "Map" || n === "Set")
15786
- return Array.from(o);
15787
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
15788
- return _arrayLikeToArray(o, minLen);
15592
+ if (n === "Object" && o.constructor) n = o.constructor.name;
15593
+ if (n === "Map" || n === "Set") return Array.from(o);
15594
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
15789
15595
  }
15790
15596
  function _arrayLikeToArray(arr, len) {
15791
- if (len == null || len > arr.length)
15792
- len = arr.length;
15793
- for (var i = 0, arr2 = new Array(len); i < len; i++)
15794
- arr2[i] = arr[i];
15597
+ if (len == null || len > arr.length) len = arr.length;
15598
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
15795
15599
  return arr2;
15796
15600
  }
15797
- function _createSuper7(Derived) {
15798
- var hasNativeReflectConstruct = _isNativeReflectConstruct7();
15799
- return function _createSuperInternal() {
15800
- var Super = _getPrototypeOf(Derived), result;
15801
- if (hasNativeReflectConstruct) {
15802
- var NewTarget = _getPrototypeOf(this).constructor;
15803
- result = Reflect.construct(Super, arguments, NewTarget);
15804
- } else {
15805
- result = Super.apply(this, arguments);
15806
- }
15807
- return _possibleConstructorReturn(this, result);
15808
- };
15601
+ function _callSuper7(t, o, e) {
15602
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct7() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
15809
15603
  }
15810
15604
  function _isNativeReflectConstruct7() {
15811
- if (typeof Reflect === "undefined" || !Reflect.construct)
15812
- return false;
15813
- if (Reflect.construct.sham)
15814
- return false;
15815
- if (typeof Proxy === "function")
15816
- return true;
15817
15605
  try {
15818
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
15606
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
15819
15607
  }));
15820
- return true;
15821
- } catch (e) {
15822
- return false;
15608
+ } catch (t2) {
15823
15609
  }
15610
+ return (_isNativeReflectConstruct7 = function _isNativeReflectConstruct10() {
15611
+ return !!t;
15612
+ })();
15824
15613
  }
15825
15614
  var Formula = /* @__PURE__ */ function(_Node) {
15826
- _inherits(Formula2, _Node);
15827
- var _super = _createSuper7(Formula2);
15828
15615
  function Formula2() {
15829
15616
  var _this;
15830
15617
  var statements = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
@@ -15833,17 +15620,17 @@ var Formula = /* @__PURE__ */ function(_Node) {
15833
15620
  var optional = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
15834
15621
  var opts = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
15835
15622
  _classCallCheck(this, Formula2);
15836
- _this = _super.call(this, "");
15623
+ _this = _callSuper7(this, Formula2, [""]);
15837
15624
  _this.statements = statements;
15838
15625
  _this.constraints = constraints;
15839
15626
  _this.initBindings = initBindings;
15840
15627
  _this.optional = optional;
15841
- _defineProperty(_assertThisInitialized(_this), "termType", GraphTermType);
15842
- _defineProperty(_assertThisInitialized(_this), "classOrder", class_order_default.Graph);
15843
- _defineProperty(_assertThisInitialized(_this), "fetcher", void 0);
15844
- _defineProperty(_assertThisInitialized(_this), "isVar", 0);
15845
- _defineProperty(_assertThisInitialized(_this), "ns", Namespace);
15846
- _defineProperty(_assertThisInitialized(_this), "rdfFactory", void 0);
15628
+ _defineProperty(_this, "termType", GraphTermType);
15629
+ _defineProperty(_this, "classOrder", class_order_default.Graph);
15630
+ _defineProperty(_this, "fetcher", void 0);
15631
+ _defineProperty(_this, "isVar", 0);
15632
+ _defineProperty(_this, "ns", Namespace);
15633
+ _defineProperty(_this, "rdfFactory", void 0);
15847
15634
  _this.rdfFactory = opts && opts.rdfFactory || canonical_data_factory_default;
15848
15635
  var _iterator = _createForOfIteratorHelper(appliedFactoryMethods), _step;
15849
15636
  try {
@@ -15864,7 +15651,8 @@ var Formula = /* @__PURE__ */ function(_Node) {
15864
15651
  }
15865
15652
  return _this;
15866
15653
  }
15867
- _createClass(Formula2, [{
15654
+ _inherits(Formula2, _Node);
15655
+ return _createClass(Formula2, [{
15868
15656
  key: "add",
15869
15657
  value: function add(subject, predicate, object, graph3) {
15870
15658
  var _this2 = this;
@@ -16021,8 +15809,7 @@ var Formula = /* @__PURE__ */ function(_Node) {
16021
15809
  var v;
16022
15810
  bots = [];
16023
15811
  for (var _k in types) {
16024
- if (!types.hasOwnProperty(_k))
16025
- continue;
15812
+ if (!types.hasOwnProperty(_k)) continue;
16026
15813
  v = types[_k];
16027
15814
  subs = this.each(void 0, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), this.rdfFactory.namedNode(_k));
16028
15815
  bottom = true;
@@ -16126,8 +15913,7 @@ var Formula = /* @__PURE__ */ function(_Node) {
16126
15913
  members = {};
16127
15914
  ref = this.transitiveClosure(seeds, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), true);
16128
15915
  for (var t in ref) {
16129
- if (!ref.hasOwnProperty(t))
16130
- continue;
15916
+ if (!ref.hasOwnProperty(t)) continue;
16131
15917
  ref1 = this.statementsMatching(void 0, this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), this.fromNT(t));
16132
15918
  for (var i = 0, len = ref1.length; i < len; i++) {
16133
15919
  st3 = ref1[i];
@@ -16283,11 +16069,9 @@ var Formula = /* @__PURE__ */ function(_Node) {
16283
16069
  };
16284
16070
  var sts = self2.statementsMatching(null, null, x, doc).concat(self2.statementsMatching(x, null, null, doc));
16285
16071
  sts = sts.filter(function(st3) {
16286
- if (excludePredicateURIs[st3.predicate.value])
16287
- return false;
16072
+ if (excludePredicateURIs[st3.predicate.value]) return false;
16288
16073
  var hash = st3.toNT();
16289
- if (doneArcs[hash])
16290
- return false;
16074
+ if (doneArcs[hash]) return false;
16291
16075
  doneArcs[hash] = true;
16292
16076
  return true;
16293
16077
  });
@@ -16417,8 +16201,7 @@ var Formula = /* @__PURE__ */ function(_Node) {
16417
16201
  var k, v;
16418
16202
  var uris = {};
16419
16203
  for (k in t) {
16420
- if (!t.hasOwnProperty(k))
16421
- continue;
16204
+ if (!t.hasOwnProperty(k)) continue;
16422
16205
  v = t[k];
16423
16206
  if (k[0] === "<") {
16424
16207
  uris[k.slice(1, -1)] = v;
@@ -16494,8 +16277,7 @@ var Formula = /* @__PURE__ */ function(_Node) {
16494
16277
  while (true) {
16495
16278
  t = function() {
16496
16279
  for (var p in agenda) {
16497
- if (!agenda.hasOwnProperty(p))
16498
- continue;
16280
+ if (!agenda.hasOwnProperty(p)) continue;
16499
16281
  return p;
16500
16282
  }
16501
16283
  }();
@@ -16537,8 +16319,7 @@ var Formula = /* @__PURE__ */ function(_Node) {
16537
16319
  var v;
16538
16320
  tops = [];
16539
16321
  for (k in types) {
16540
- if (!types.hasOwnProperty(k))
16541
- continue;
16322
+ if (!types.hasOwnProperty(k)) continue;
16542
16323
  v = types[k];
16543
16324
  n = 0;
16544
16325
  ref = this.each(this.rdfFactory.namedNode(k), this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"));
@@ -16591,7 +16372,6 @@ var Formula = /* @__PURE__ */ function(_Node) {
16591
16372
  return this.statementsMatching(s, p, o, g, false).length;
16592
16373
  }
16593
16374
  }]);
16594
- return Formula2;
16595
16375
  }(Node2);
16596
16376
 
16597
16377
  // ../node_modules/rdflib/esm/node.js
@@ -16604,8 +16384,7 @@ Node2.toJS = function(term2) {
16604
16384
  if (isCollection(term2)) {
16605
16385
  return term2.elements.map(Node2.toJS);
16606
16386
  }
16607
- if (!isLiteral(term2))
16608
- return term2;
16387
+ if (!isLiteral(term2)) return term2;
16609
16388
  if (term2.datatype.equals(ns.xsd("boolean"))) {
16610
16389
  return term2.value === "1" || term2.value === "true";
16611
16390
  }
@@ -17010,14 +16789,12 @@ function _createForOfIteratorHelper2(o, allowArrayLike) {
17010
16789
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
17011
16790
  if (!it) {
17012
16791
  if (Array.isArray(o) || (it = _unsupportedIterableToArray2(o)) || allowArrayLike && o && typeof o.length === "number") {
17013
- if (it)
17014
- o = it;
16792
+ if (it) o = it;
17015
16793
  var i = 0;
17016
16794
  var F = function F2() {
17017
16795
  };
17018
16796
  return { s: F, n: function n() {
17019
- if (i >= o.length)
17020
- return { done: true };
16797
+ if (i >= o.length) return { done: true };
17021
16798
  return { done: false, value: o[i++] };
17022
16799
  }, e: function e(_e) {
17023
16800
  throw _e;
@@ -17037,32 +16814,23 @@ function _createForOfIteratorHelper2(o, allowArrayLike) {
17037
16814
  err = _e2;
17038
16815
  }, f: function f() {
17039
16816
  try {
17040
- if (!normalCompletion && it.return != null)
17041
- it.return();
16817
+ if (!normalCompletion && it.return != null) it.return();
17042
16818
  } finally {
17043
- if (didErr)
17044
- throw err;
16819
+ if (didErr) throw err;
17045
16820
  }
17046
16821
  } };
17047
16822
  }
17048
16823
  function _unsupportedIterableToArray2(o, minLen) {
17049
- if (!o)
17050
- return;
17051
- if (typeof o === "string")
17052
- return _arrayLikeToArray2(o, minLen);
16824
+ if (!o) return;
16825
+ if (typeof o === "string") return _arrayLikeToArray2(o, minLen);
17053
16826
  var n = Object.prototype.toString.call(o).slice(8, -1);
17054
- if (n === "Object" && o.constructor)
17055
- n = o.constructor.name;
17056
- if (n === "Map" || n === "Set")
17057
- return Array.from(o);
17058
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
17059
- return _arrayLikeToArray2(o, minLen);
16827
+ if (n === "Object" && o.constructor) n = o.constructor.name;
16828
+ if (n === "Map" || n === "Set") return Array.from(o);
16829
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray2(o, minLen);
17060
16830
  }
17061
16831
  function _arrayLikeToArray2(arr, len) {
17062
- if (len == null || len > arr.length)
17063
- len = arr.length;
17064
- for (var i = 0, arr2 = new Array(len); i < len; i++)
17065
- arr2[i] = arr[i];
16832
+ if (len == null || len > arr.length) len = arr.length;
16833
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
17066
16834
  return arr2;
17067
16835
  }
17068
16836
  var RDF = Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
@@ -17139,11 +16907,9 @@ function substituteNillsInDoc(store, doc) {
17139
16907
  function convertFirstRestNil(store, doc) {
17140
16908
  function preceding(ele, listSoFar, trash) {
17141
16909
  var rests = store.statementsMatching(ele, RDF("rest"), null, doc);
17142
- if (rests.length !== 1)
17143
- throw new Error("Bad list structure: no rest at ".concat(ele));
16910
+ if (rests.length !== 1) throw new Error("Bad list structure: no rest at ".concat(ele));
17144
16911
  var firsts = store.statementsMatching(ele, RDF("first"), null, doc);
17145
- if (firsts.length !== 1)
17146
- throw new Error("Bad list structure: rest but ".concat(firsts.length, " firsts at ").concat(ele));
16912
+ if (firsts.length !== 1) throw new Error("Bad list structure: rest but ".concat(firsts.length, " firsts at ").concat(ele));
17147
16913
  var value = firsts[0].object;
17148
16914
  var total = [value].concat(listSoFar);
17149
16915
  var totalTrash = trash.concat(rests).concat(firsts);
@@ -17154,19 +16920,16 @@ function convertFirstRestNil(store, doc) {
17154
16920
  substituteInDoc(store, newList, ele, doc);
17155
16921
  return;
17156
16922
  }
17157
- if (pres.length !== 1)
17158
- throw new Error("Bad list structure: ".concat(pres.length, " pres at ").concat(ele));
16923
+ if (pres.length !== 1) throw new Error("Bad list structure: ".concat(pres.length, " pres at ").concat(ele));
17159
16924
  var pre = pres[0].subject;
17160
- if (pre.termType !== "BlankNode")
17161
- throw new Error("Bad list element node ".concat(pre, " type: ").concat(pre.termType, " "));
16925
+ if (pre.termType !== "BlankNode") throw new Error("Bad list element node ".concat(pre, " type: ").concat(pre.termType, " "));
17162
16926
  preceding(pre, total, totalTrash);
17163
16927
  return;
17164
16928
  }
17165
16929
  substituteNillsInDoc(store, doc);
17166
16930
  var tails = store.statementsMatching(null, RDF("rest"), RDF("nil"), doc);
17167
16931
  tails.forEach(function(tail) {
17168
- if (tail.subject.termType !== "BlankNode")
17169
- throw new Error("Bad list element node ".concat(tail.subject, " type: ").concat(tail.subject.termType, " "));
16932
+ if (tail.subject.termType !== "BlankNode") throw new Error("Bad list element node ".concat(tail.subject, " type: ").concat(tail.subject.termType, " "));
17170
16933
  preceding(tail.subject, [], []);
17171
16934
  });
17172
16935
  }
@@ -17223,18 +16986,15 @@ var pyjslib_List = function pyjslib_List2(theList) {
17223
16986
  return theList;
17224
16987
  };
17225
16988
  var pyjslib_Dict = function pyjslib_Dict2(listOfPairs) {
17226
- if (listOfPairs.length > 0)
17227
- throw "missing.js: oops nnonempty dict not imp";
16989
+ if (listOfPairs.length > 0) throw "missing.js: oops nnonempty dict not imp";
17228
16990
  return [];
17229
16991
  };
17230
16992
  var pyjslib_len = function pyjslib_len2(s) {
17231
16993
  return s.length;
17232
16994
  };
17233
16995
  var pyjslib_slice = function pyjslib_slice2(str, i, j) {
17234
- if (typeof str.slice == "undefined")
17235
- throw "@@ mising.js: No .slice function for " + str + " of type " + _typeof(str);
17236
- if (typeof j == "undefined" || j == null)
17237
- return str.slice(i);
16996
+ if (typeof str.slice == "undefined") throw "@@ mising.js: No .slice function for " + str + " of type " + _typeof(str);
16997
+ if (typeof j == "undefined" || j == null) return str.slice(i);
17238
16998
  return str.slice(i, j);
17239
16999
  };
17240
17000
  var StopIteration = Error("dummy error stop iteration");
@@ -17242,8 +17002,7 @@ var pyjslib_Iterator = function pyjslib_Iterator2(theList) {
17242
17002
  this.last = 0;
17243
17003
  this.li = theList;
17244
17004
  this.next = function() {
17245
- if (this.last == this.li.length)
17246
- throw StopIteration;
17005
+ if (this.last == this.li.length) throw StopIteration;
17247
17006
  return this.li[this.last++];
17248
17007
  };
17249
17008
  return this;
@@ -17252,23 +17011,19 @@ var string_find = function string_find2(str, s) {
17252
17011
  return str.indexOf(s);
17253
17012
  };
17254
17013
  var assertFudge = function assertFudge2(condition, desc) {
17255
- if (condition)
17256
- return;
17257
- if (desc)
17258
- throw "python Assertion failed: " + desc;
17014
+ if (condition) return;
17015
+ if (desc) throw "python Assertion failed: " + desc;
17259
17016
  throw "(python) Assertion failed.";
17260
17017
  };
17261
17018
  var stringFromCharCode = function stringFromCharCode2(uesc) {
17262
17019
  return String.fromCharCode(uesc);
17263
17020
  };
17264
17021
  String.prototype.encode = function(encoding) {
17265
- if (encoding != "utf-8")
17266
- throw "UTF8_converter: can only do utf-8";
17022
+ if (encoding != "utf-8") throw "UTF8_converter: can only do utf-8";
17267
17023
  return Utf8.encode(this);
17268
17024
  };
17269
17025
  String.prototype.decode = function(encoding) {
17270
- if (encoding != "utf-8")
17271
- throw "UTF8_converter: can only do utf-8";
17026
+ if (encoding != "utf-8") throw "UTF8_converter: can only do utf-8";
17272
17027
  return this;
17273
17028
  };
17274
17029
  var uripath_join = function uripath_join2(base, given) {
@@ -17306,20 +17061,13 @@ var n3parser_default = createSinkParser;
17306
17061
  var SinkParser = /* @__PURE__ */ function() {
17307
17062
  function SinkParser2(store, openFormula, thisDoc, baseURI, genPrefix, metaURI, flags, why) {
17308
17063
  _classCallCheck(this, SinkParser2);
17309
- if (typeof openFormula == "undefined")
17310
- openFormula = null;
17311
- if (typeof thisDoc == "undefined")
17312
- thisDoc = "";
17313
- if (typeof baseURI == "undefined")
17314
- baseURI = null;
17315
- if (typeof genPrefix == "undefined")
17316
- genPrefix = "";
17317
- if (typeof metaURI == "undefined")
17318
- metaURI = null;
17319
- if (typeof flags == "undefined")
17320
- flags = "";
17321
- if (typeof why == "undefined")
17322
- why = null;
17064
+ if (typeof openFormula == "undefined") openFormula = null;
17065
+ if (typeof thisDoc == "undefined") thisDoc = "";
17066
+ if (typeof baseURI == "undefined") baseURI = null;
17067
+ if (typeof genPrefix == "undefined") genPrefix = "";
17068
+ if (typeof metaURI == "undefined") metaURI = null;
17069
+ if (typeof flags == "undefined") flags = "";
17070
+ if (typeof why == "undefined") why = null;
17323
17071
  this._bindings = new pyjslib_Dict([]);
17324
17072
  this._flags = flags;
17325
17073
  if (thisDoc != "") {
@@ -17377,7 +17125,7 @@ var SinkParser = /* @__PURE__ */ function() {
17377
17125
  this._context = this._formula;
17378
17126
  this._parentContext = null;
17379
17127
  }
17380
- _createClass(SinkParser2, [{
17128
+ return _createClass(SinkParser2, [{
17381
17129
  key: "here",
17382
17130
  value: function here(i) {
17383
17131
  return this._genPrefix + "_L" + this.lines + "C" + (i - this.startOfLine + 1);
@@ -17743,8 +17491,7 @@ var SinkParser = /* @__PURE__ */ function() {
17743
17491
  }, {
17744
17492
  key: "node",
17745
17493
  value: function node(str, i, res, subjectAlready) {
17746
- if (typeof subjectAlready == "undefined")
17747
- subjectAlready = null;
17494
+ if (typeof subjectAlready == "undefined") subjectAlready = null;
17748
17495
  var subj = subjectAlready;
17749
17496
  var j = this.skipSpace(str, i);
17750
17497
  if (j < 0) {
@@ -18503,7 +18250,6 @@ var SinkParser = /* @__PURE__ */ function() {
18503
18250
  return new pyjslib_Tuple([j, uch]);
18504
18251
  }
18505
18252
  }]);
18506
- return SinkParser2;
18507
18253
  }();
18508
18254
  function __OLD_BadSyntax(uri, lines, str, i, why) {
18509
18255
  this._str = str.encode("utf-8");
@@ -18541,30 +18287,29 @@ function BadSyntax(uri, lines, str, i, why) {
18541
18287
  }
18542
18288
 
18543
18289
  // ../node_modules/rdflib/esm/factories/extended-term-factory.js
18544
- var _supports2;
18545
- function ownKeys(object, enumerableOnly) {
18546
- var keys = Object.keys(object);
18290
+ function ownKeys(e, r) {
18291
+ var t = Object.keys(e);
18547
18292
  if (Object.getOwnPropertySymbols) {
18548
- var symbols = Object.getOwnPropertySymbols(object);
18549
- enumerableOnly && (symbols = symbols.filter(function(sym) {
18550
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
18551
- })), keys.push.apply(keys, symbols);
18293
+ var o = Object.getOwnPropertySymbols(e);
18294
+ r && (o = o.filter(function(r2) {
18295
+ return Object.getOwnPropertyDescriptor(e, r2).enumerable;
18296
+ })), t.push.apply(t, o);
18552
18297
  }
18553
- return keys;
18298
+ return t;
18554
18299
  }
18555
- function _objectSpread(target) {
18556
- for (var i = 1; i < arguments.length; i++) {
18557
- var source = null != arguments[i] ? arguments[i] : {};
18558
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
18559
- _defineProperty(target, key, source[key]);
18560
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
18561
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
18300
+ function _objectSpread(e) {
18301
+ for (var r = 1; r < arguments.length; r++) {
18302
+ var t = null != arguments[r] ? arguments[r] : {};
18303
+ r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
18304
+ _defineProperty(e, r2, t[r2]);
18305
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
18306
+ Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
18562
18307
  });
18563
18308
  }
18564
- return target;
18309
+ return e;
18565
18310
  }
18566
18311
  var ExtendedTermFactory = _objectSpread(_objectSpread({}, canonical_data_factory_default), {}, {
18567
- supports: (_supports2 = {}, _defineProperty(_supports2, Feature.collections, true), _defineProperty(_supports2, Feature.defaultGraphType, false), _defineProperty(_supports2, Feature.equalsMethod, true), _defineProperty(_supports2, Feature.identity, false), _defineProperty(_supports2, Feature.id, true), _defineProperty(_supports2, Feature.reversibleId, false), _defineProperty(_supports2, Feature.variableType, true), _supports2),
18312
+ supports: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Feature.collections, true), Feature.defaultGraphType, false), Feature.equalsMethod, true), Feature.identity, false), Feature.id, true), Feature.reversibleId, false), Feature.variableType, true),
18568
18313
  /**
18569
18314
  * Creates a new collection
18570
18315
  * @param elements - The initial element
@@ -18637,7 +18382,7 @@ function listToCollection(kb, obj) {
18637
18382
  }
18638
18383
  function jsonldParser(str, kb, base, callback) {
18639
18384
  var baseString = base && Object.prototype.hasOwnProperty.call(base, "termType") ? base.value : base;
18640
- return import("./jsonld-REJIJLLT.js").then(function(jsonld) {
18385
+ return import("./jsonld-ECVURSS6.js").then(function(jsonld) {
18641
18386
  return jsonld.flatten(JSON.parse(str), null, {
18642
18387
  base: baseString
18643
18388
  });
@@ -18691,6 +18436,9 @@ function createStatement(kb, id3, property, value, base) {
18691
18436
  return kb.rdfFactory.quad(id3, predicate, object, kb.rdfFactory.namedNode(base));
18692
18437
  }
18693
18438
 
18439
+ // ../node_modules/n3/src/N3Lexer.js
18440
+ var import_queue_microtask = __toESM(require_queue_microtask());
18441
+
18694
18442
  // ../node_modules/n3/src/IRIs.js
18695
18443
  var RDF2 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
18696
18444
  var XSD = "http://www.w3.org/2001/XMLSchema#";
@@ -18723,7 +18471,6 @@ var IRIs_default = {
18723
18471
  };
18724
18472
 
18725
18473
  // ../node_modules/n3/src/N3Lexer.js
18726
- var import_queue_microtask = __toESM(require_queue_microtask());
18727
18474
  var { xsd } = IRIs_default;
18728
18475
  var escapeSequence = /\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g;
18729
18476
  var escapeReplacements = {
@@ -19102,8 +18849,7 @@ var N3Lexer = class {
19102
18849
  const tokens = [];
19103
18850
  let error2;
19104
18851
  this._tokenizeToEnd((e, t) => e ? error2 = e : tokens.push(t), true);
19105
- if (error2)
19106
- throw error2;
18852
+ if (error2) throw error2;
19107
18853
  return tokens;
19108
18854
  }
19109
18855
  } else {
@@ -19780,8 +19526,7 @@ var N3Parser = class {
19780
19526
  case "type":
19781
19527
  case "typeIRI":
19782
19528
  const datatype = this._readEntity(token);
19783
- if (datatype === void 0)
19784
- return;
19529
+ if (datatype === void 0) return;
19785
19530
  literal4 = this._literal(this._literalValue, datatype);
19786
19531
  token = null;
19787
19532
  break;
@@ -19835,8 +19580,7 @@ var N3Parser = class {
19835
19580
  case ".":
19836
19581
  this._subject = null;
19837
19582
  next = this._contextStack.length ? this._readSubject : this._readInTopContext;
19838
- if (inversePredicate)
19839
- this._inversePredicate = false;
19583
+ if (inversePredicate) this._inversePredicate = false;
19840
19584
  break;
19841
19585
  case ";":
19842
19586
  next = this._readPredicate;
@@ -20188,8 +19932,7 @@ var N3Parser = class {
20188
19932
  this._lexer.tokenize(input).every((token) => {
20189
19933
  return this._readCallback = this._readCallback(token);
20190
19934
  });
20191
- if (error2)
20192
- throw error2;
19935
+ if (error2) throw error2;
20193
19936
  return quads;
20194
19937
  }
20195
19938
  this._callback = quadCallback;
@@ -20272,7 +20015,7 @@ var RDFaProcessor = /* @__PURE__ */ function() {
20272
20015
  this.finishedHandlers = [];
20273
20016
  this.init();
20274
20017
  }
20275
- _createClass(RDFaProcessor2, [{
20018
+ return _createClass(RDFaProcessor2, [{
20276
20019
  key: "addTriple",
20277
20020
  value: function addTriple(origin, subject, predicate, object) {
20278
20021
  var su, ob, pr, or;
@@ -21086,8 +20829,7 @@ var RDFaProcessor = /* @__PURE__ */ function() {
21086
20829
  key: "toRDFNodeObject",
21087
20830
  value: function toRDFNodeObject(x) {
21088
20831
  var _this = this;
21089
- if (typeof x === "undefined")
21090
- return void 0;
20832
+ if (typeof x === "undefined") return void 0;
21091
20833
  if (typeof x === "string") {
21092
20834
  if (x.substring(0, 2) === "_:") {
21093
20835
  if (typeof this.blankNodes[x.substring(2)] === "undefined") {
@@ -21148,7 +20890,6 @@ var RDFaProcessor = /* @__PURE__ */ function() {
21148
20890
  return str.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
21149
20891
  }
21150
20892
  }]);
21151
- return RDFaProcessor2;
21152
20893
  }();
21153
20894
  RDFaProcessor.XMLLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral";
21154
20895
  RDFaProcessor.HTMLLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML";
@@ -21188,7 +20929,7 @@ var RDFParser = /* @__PURE__ */ function() {
21188
20929
  this.why = null;
21189
20930
  this.reify = false;
21190
20931
  }
21191
- _createClass(RDFParser2, [{
20932
+ return _createClass(RDFParser2, [{
21192
20933
  key: "frameFactory",
21193
20934
  value: (
21194
20935
  /**
@@ -21375,10 +21116,8 @@ var RDFParser = /* @__PURE__ */ function() {
21375
21116
  if (el.localName) {
21376
21117
  result = result + el.localName;
21377
21118
  } else if (el.nodeName) {
21378
- if (el.nodeName.indexOf(":") >= 0)
21379
- result = result + el.nodeName.split(":")[1];
21380
- else
21381
- result = result + el.nodeName;
21119
+ if (el.nodeName.indexOf(":") >= 0) result = result + el.nodeName.split(":")[1];
21120
+ else result = result + el.nodeName;
21382
21121
  }
21383
21122
  return result;
21384
21123
  }.bind(this);
@@ -21454,7 +21193,7 @@ var RDFParser = /* @__PURE__ */ function() {
21454
21193
  if (nv === "Literal") {
21455
21194
  frame.datatype = RDFParser2.ns.RDF + "XMLLiteral";
21456
21195
  frame = this.buildFrame(frame);
21457
- frame.addLiteral(dom.childNodes);
21196
+ frame.addLiteral(dom.innerHTML || dom.childNodes);
21458
21197
  dig = false;
21459
21198
  } else if (nv === "Resource") {
21460
21199
  frame = this.buildFrame(frame, frame.element);
@@ -21561,8 +21300,7 @@ var RDFParser = /* @__PURE__ */ function() {
21561
21300
  if (attrs[x].nodeName.substr(0, 3) === "xml") {
21562
21301
  if (attrs[x].name.slice(0, 6) === "xmlns:") {
21563
21302
  var uri = attrs[x].nodeValue;
21564
- if (this.base)
21565
- uri = join(uri, this.base);
21303
+ if (this.base) uri = join(uri, this.base);
21566
21304
  this.store.setPrefixForURI(attrs[x].name.slice(6), uri);
21567
21305
  }
21568
21306
  element.removeAttributeNode(attrs[x]);
@@ -21571,7 +21309,6 @@ var RDFParser = /* @__PURE__ */ function() {
21571
21309
  return frame;
21572
21310
  }
21573
21311
  }]);
21574
- return RDFParser2;
21575
21312
  }();
21576
21313
  _defineProperty(RDFParser, "ns", {
21577
21314
  "RDF": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
@@ -21760,14 +21497,12 @@ function _createForOfIteratorHelper3(o, allowArrayLike) {
21760
21497
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
21761
21498
  if (!it) {
21762
21499
  if (Array.isArray(o) || (it = _unsupportedIterableToArray3(o)) || allowArrayLike && o && typeof o.length === "number") {
21763
- if (it)
21764
- o = it;
21500
+ if (it) o = it;
21765
21501
  var i = 0;
21766
21502
  var F = function F2() {
21767
21503
  };
21768
21504
  return { s: F, n: function n() {
21769
- if (i >= o.length)
21770
- return { done: true };
21505
+ if (i >= o.length) return { done: true };
21771
21506
  return { done: false, value: o[i++] };
21772
21507
  }, e: function e(_e) {
21773
21508
  throw _e;
@@ -21787,61 +21522,37 @@ function _createForOfIteratorHelper3(o, allowArrayLike) {
21787
21522
  err = _e2;
21788
21523
  }, f: function f() {
21789
21524
  try {
21790
- if (!normalCompletion && it.return != null)
21791
- it.return();
21525
+ if (!normalCompletion && it.return != null) it.return();
21792
21526
  } finally {
21793
- if (didErr)
21794
- throw err;
21527
+ if (didErr) throw err;
21795
21528
  }
21796
21529
  } };
21797
21530
  }
21798
21531
  function _unsupportedIterableToArray3(o, minLen) {
21799
- if (!o)
21800
- return;
21801
- if (typeof o === "string")
21802
- return _arrayLikeToArray3(o, minLen);
21532
+ if (!o) return;
21533
+ if (typeof o === "string") return _arrayLikeToArray3(o, minLen);
21803
21534
  var n = Object.prototype.toString.call(o).slice(8, -1);
21804
- if (n === "Object" && o.constructor)
21805
- n = o.constructor.name;
21806
- if (n === "Map" || n === "Set")
21807
- return Array.from(o);
21808
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
21809
- return _arrayLikeToArray3(o, minLen);
21535
+ if (n === "Object" && o.constructor) n = o.constructor.name;
21536
+ if (n === "Map" || n === "Set") return Array.from(o);
21537
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray3(o, minLen);
21810
21538
  }
21811
21539
  function _arrayLikeToArray3(arr, len) {
21812
- if (len == null || len > arr.length)
21813
- len = arr.length;
21814
- for (var i = 0, arr2 = new Array(len); i < len; i++)
21815
- arr2[i] = arr[i];
21540
+ if (len == null || len > arr.length) len = arr.length;
21541
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
21816
21542
  return arr2;
21817
21543
  }
21818
- function _createSuper8(Derived) {
21819
- var hasNativeReflectConstruct = _isNativeReflectConstruct8();
21820
- return function _createSuperInternal() {
21821
- var Super = _getPrototypeOf(Derived), result;
21822
- if (hasNativeReflectConstruct) {
21823
- var NewTarget = _getPrototypeOf(this).constructor;
21824
- result = Reflect.construct(Super, arguments, NewTarget);
21825
- } else {
21826
- result = Super.apply(this, arguments);
21827
- }
21828
- return _possibleConstructorReturn(this, result);
21829
- };
21544
+ function _callSuper8(t, o, e) {
21545
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct8() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
21830
21546
  }
21831
21547
  function _isNativeReflectConstruct8() {
21832
- if (typeof Reflect === "undefined" || !Reflect.construct)
21833
- return false;
21834
- if (Reflect.construct.sham)
21835
- return false;
21836
- if (typeof Proxy === "function")
21837
- return true;
21838
21548
  try {
21839
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
21549
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
21840
21550
  }));
21841
- return true;
21842
- } catch (e) {
21843
- return false;
21551
+ } catch (t2) {
21844
21552
  }
21553
+ return (_isNativeReflectConstruct8 = function _isNativeReflectConstruct10() {
21554
+ return !!t;
21555
+ })();
21845
21556
  }
21846
21557
  var Parsable = {
21847
21558
  "text/n3": true,
@@ -21882,14 +21593,13 @@ var Handler = /* @__PURE__ */ _createClass(function Handler2(response, dom) {
21882
21593
  this.dom = dom;
21883
21594
  });
21884
21595
  _defineProperty(Handler, "pattern", void 0);
21885
- var RDFXMLHandler = /* @__PURE__ */ function(_Handler) {
21886
- _inherits(RDFXMLHandler2, _Handler);
21887
- var _super = _createSuper8(RDFXMLHandler2);
21596
+ var RDFXMLHandler = /* @__PURE__ */ function(_Handler2) {
21888
21597
  function RDFXMLHandler2() {
21889
21598
  _classCallCheck(this, RDFXMLHandler2);
21890
- return _super.apply(this, arguments);
21599
+ return _callSuper8(this, RDFXMLHandler2, arguments);
21891
21600
  }
21892
- _createClass(RDFXMLHandler2, [{
21601
+ _inherits(RDFXMLHandler2, _Handler2);
21602
+ return _createClass(RDFXMLHandler2, [{
21893
21603
  key: "parse",
21894
21604
  value: function parse3(fetcher3, responseText, options) {
21895
21605
  var kb = fetcher3.store;
@@ -21924,17 +21634,15 @@ var RDFXMLHandler = /* @__PURE__ */ function(_Handler) {
21924
21634
  };
21925
21635
  }
21926
21636
  }]);
21927
- return RDFXMLHandler2;
21928
21637
  }(Handler);
21929
21638
  RDFXMLHandler.pattern = new RegExp("application/rdf\\+xml");
21930
- var XHTMLHandler = /* @__PURE__ */ function(_Handler2) {
21931
- _inherits(XHTMLHandler2, _Handler2);
21932
- var _super2 = _createSuper8(XHTMLHandler2);
21639
+ var XHTMLHandler = /* @__PURE__ */ function(_Handler3) {
21933
21640
  function XHTMLHandler2() {
21934
21641
  _classCallCheck(this, XHTMLHandler2);
21935
- return _super2.apply(this, arguments);
21642
+ return _callSuper8(this, XHTMLHandler2, arguments);
21936
21643
  }
21937
- _createClass(XHTMLHandler2, [{
21644
+ _inherits(XHTMLHandler2, _Handler3);
21645
+ return _createClass(XHTMLHandler2, [{
21938
21646
  key: "parse",
21939
21647
  value: function parse3(fetcher3, responseText, options) {
21940
21648
  var relation, reverse;
@@ -21990,17 +21698,15 @@ var XHTMLHandler = /* @__PURE__ */ function(_Handler2) {
21990
21698
  fetcher3.mediatypes[XHTMLContentType] = {};
21991
21699
  }
21992
21700
  }]);
21993
- return XHTMLHandler2;
21994
21701
  }(Handler);
21995
21702
  XHTMLHandler.pattern = new RegExp("application/xhtml");
21996
- var XMLHandler = /* @__PURE__ */ function(_Handler3) {
21997
- _inherits(XMLHandler2, _Handler3);
21998
- var _super3 = _createSuper8(XMLHandler2);
21703
+ var XMLHandler = /* @__PURE__ */ function(_Handler4) {
21999
21704
  function XMLHandler2() {
22000
21705
  _classCallCheck(this, XMLHandler2);
22001
- return _super3.apply(this, arguments);
21706
+ return _callSuper8(this, XMLHandler2, arguments);
22002
21707
  }
22003
- _createClass(XMLHandler2, [{
21708
+ _inherits(XMLHandler2, _Handler4);
21709
+ return _createClass(XMLHandler2, [{
22004
21710
  key: "parse",
22005
21711
  value: function parse3(fetcher3, responseText, options) {
22006
21712
  var dom = parseXML(responseText);
@@ -22055,17 +21761,15 @@ var XMLHandler = /* @__PURE__ */ function(_Handler3) {
22055
21761
  return node.nodeType === Node.ELEMENT_NODE;
22056
21762
  }
22057
21763
  }]);
22058
- return XMLHandler2;
22059
21764
  }(Handler);
22060
21765
  XMLHandler.pattern = new RegExp("(text|application)/(.*)xml");
22061
- var HTMLHandler = /* @__PURE__ */ function(_Handler4) {
22062
- _inherits(HTMLHandler2, _Handler4);
22063
- var _super4 = _createSuper8(HTMLHandler2);
21766
+ var HTMLHandler = /* @__PURE__ */ function(_Handler5) {
22064
21767
  function HTMLHandler2() {
22065
21768
  _classCallCheck(this, HTMLHandler2);
22066
- return _super4.apply(this, arguments);
21769
+ return _callSuper8(this, HTMLHandler2, arguments);
22067
21770
  }
22068
- _createClass(HTMLHandler2, [{
21771
+ _inherits(HTMLHandler2, _Handler5);
21772
+ return _createClass(HTMLHandler2, [{
22069
21773
  key: "parse",
22070
21774
  value: function parse3(fetcher3, responseText, options) {
22071
21775
  var kb = fetcher3.store;
@@ -22105,17 +21809,15 @@ var HTMLHandler = /* @__PURE__ */ function(_Handler4) {
22105
21809
  };
22106
21810
  }
22107
21811
  }]);
22108
- return HTMLHandler2;
22109
21812
  }(Handler);
22110
21813
  HTMLHandler.pattern = new RegExp("text/html");
22111
- var JsonLdHandler = /* @__PURE__ */ function(_Handler5) {
22112
- _inherits(JsonLdHandler2, _Handler5);
22113
- var _super5 = _createSuper8(JsonLdHandler2);
21814
+ var JsonLdHandler = /* @__PURE__ */ function(_Handler6) {
22114
21815
  function JsonLdHandler2() {
22115
21816
  _classCallCheck(this, JsonLdHandler2);
22116
- return _super5.apply(this, arguments);
21817
+ return _callSuper8(this, JsonLdHandler2, arguments);
22117
21818
  }
22118
- _createClass(JsonLdHandler2, [{
21819
+ _inherits(JsonLdHandler2, _Handler6);
21820
+ return _createClass(JsonLdHandler2, [{
22119
21821
  key: "parse",
22120
21822
  value: function parse3(fetcher3, responseText, options, response) {
22121
21823
  var kb = fetcher3.store;
@@ -22143,17 +21845,15 @@ var JsonLdHandler = /* @__PURE__ */ function(_Handler5) {
22143
21845
  };
22144
21846
  }
22145
21847
  }]);
22146
- return JsonLdHandler2;
22147
21848
  }(Handler);
22148
21849
  JsonLdHandler.pattern = /application\/ld\+json/;
22149
- var TextHandler = /* @__PURE__ */ function(_Handler6) {
22150
- _inherits(TextHandler2, _Handler6);
22151
- var _super6 = _createSuper8(TextHandler2);
21850
+ var TextHandler = /* @__PURE__ */ function(_Handler7) {
22152
21851
  function TextHandler2() {
22153
21852
  _classCallCheck(this, TextHandler2);
22154
- return _super6.apply(this, arguments);
21853
+ return _callSuper8(this, TextHandler2, arguments);
22155
21854
  }
22156
- _createClass(TextHandler2, [{
21855
+ _inherits(TextHandler2, _Handler7);
21856
+ return _createClass(TextHandler2, [{
22157
21857
  key: "parse",
22158
21858
  value: function parse3(fetcher3, responseText, options) {
22159
21859
  if (isXML(responseText)) {
@@ -22182,17 +21882,15 @@ var TextHandler = /* @__PURE__ */ function(_Handler6) {
22182
21882
  };
22183
21883
  }
22184
21884
  }]);
22185
- return TextHandler2;
22186
21885
  }(Handler);
22187
21886
  TextHandler.pattern = new RegExp("text/plain");
22188
- var N3Handler = /* @__PURE__ */ function(_Handler7) {
22189
- _inherits(N3Handler2, _Handler7);
22190
- var _super7 = _createSuper8(N3Handler2);
21887
+ var N3Handler = /* @__PURE__ */ function(_Handler8) {
22191
21888
  function N3Handler2() {
22192
21889
  _classCallCheck(this, N3Handler2);
22193
- return _super7.apply(this, arguments);
21890
+ return _callSuper8(this, N3Handler2, arguments);
22194
21891
  }
22195
- _createClass(N3Handler2, [{
21892
+ _inherits(N3Handler2, _Handler8);
21893
+ return _createClass(N3Handler2, [{
22196
21894
  key: "parse",
22197
21895
  value: function parse3(fetcher3, responseText, options, response) {
22198
21896
  var kb = fetcher3.store;
@@ -22223,7 +21921,6 @@ var N3Handler = /* @__PURE__ */ function(_Handler7) {
22223
21921
  };
22224
21922
  }
22225
21923
  }]);
22226
- return N3Handler2;
22227
21924
  }(Handler);
22228
21925
  N3Handler.pattern = new RegExp("(application|text)/(x-)?(rdf\\+)?(n3|turtle)");
22229
21926
  var defaultHandlers = {
@@ -22302,7 +21999,7 @@ var Fetcher = /* @__PURE__ */ function() {
22302
21999
  return _this.addHandler(defaultHandlers[key]);
22303
22000
  });
22304
22001
  }
22305
- _createClass(Fetcher2, [{
22002
+ return _createClass(Fetcher2, [{
22306
22003
  key: "load",
22307
22004
  value: (
22308
22005
  /**
@@ -22373,7 +22070,7 @@ var Fetcher = /* @__PURE__ */ function() {
22373
22070
  for (_iterator.s(); !(_step = _iterator.n()).done; ) {
22374
22071
  var request = _step.value;
22375
22072
  var _response = kb.any(request, this.ns.link("response"), null, meta);
22376
- if (_response !== void 0) {
22073
+ if (_response != void 0) {
22377
22074
  var quad4 = kb.statementsMatching(_response, this.ns.link("outOfDate"), true, meta);
22378
22075
  kb.remove(quad4);
22379
22076
  options.force = true;
@@ -22396,42 +22093,41 @@ var Fetcher = /* @__PURE__ */ function() {
22396
22093
  var _this3 = this;
22397
22094
  var pendingPromise;
22398
22095
  return import_regenerator.default.wrap(function _callee$(_context) {
22399
- while (1)
22400
- switch (_context.prev = _context.next) {
22401
- case 0:
22402
- _context.t0 = !options.force;
22403
- if (!_context.t0) {
22404
- _context.next = 5;
22405
- break;
22406
- }
22407
- _context.next = 4;
22408
- return this.fetchQueue[originalUri];
22409
- case 4:
22410
- _context.t0 = _context.sent;
22411
- case 5:
22412
- if (!_context.t0) {
22413
- _context.next = 9;
22414
- break;
22415
- }
22416
- pendingPromise = this.fetchQueue[originalUri];
22417
- _context.next = 12;
22096
+ while (1) switch (_context.prev = _context.next) {
22097
+ case 0:
22098
+ _context.t0 = !options.force;
22099
+ if (!_context.t0) {
22100
+ _context.next = 5;
22418
22101
  break;
22419
- case 9:
22420
- pendingPromise = Promise.race([this.setRequestTimeout(uri, options), this.fetchUri(uri, options)]);
22421
- this.fetchQueue[originalUri] = pendingPromise;
22422
- this.cleanupFetchRequest(originalUri, void 0, this.timeout);
22423
- case 12:
22424
- return _context.abrupt("return", pendingPromise.then(function(x) {
22425
- if (uri in _this3.timeouts) {
22426
- _this3.timeouts[uri].forEach(clearTimeout);
22427
- delete _this3.timeouts[uri];
22428
- }
22429
- return x;
22430
- }));
22431
- case 13:
22432
- case "end":
22433
- return _context.stop();
22434
- }
22102
+ }
22103
+ _context.next = 4;
22104
+ return this.fetchQueue[originalUri];
22105
+ case 4:
22106
+ _context.t0 = _context.sent;
22107
+ case 5:
22108
+ if (!_context.t0) {
22109
+ _context.next = 9;
22110
+ break;
22111
+ }
22112
+ pendingPromise = this.fetchQueue[originalUri];
22113
+ _context.next = 12;
22114
+ break;
22115
+ case 9:
22116
+ pendingPromise = Promise.race([this.setRequestTimeout(uri, options), this.fetchUri(uri, options)]);
22117
+ this.fetchQueue[originalUri] = pendingPromise;
22118
+ this.cleanupFetchRequest(originalUri, void 0, this.timeout);
22119
+ case 12:
22120
+ return _context.abrupt("return", pendingPromise.then(function(x) {
22121
+ if (uri in _this3.timeouts) {
22122
+ _this3.timeouts[uri].forEach(clearTimeout);
22123
+ delete _this3.timeouts[uri];
22124
+ }
22125
+ return x;
22126
+ }));
22127
+ case 13:
22128
+ case "end":
22129
+ return _context.stop();
22130
+ }
22435
22131
  }, _callee, this);
22436
22132
  }));
22437
22133
  function pendingFetchPromise(_x, _x2, _x3) {
@@ -22682,8 +22378,7 @@ var Fetcher = /* @__PURE__ */ function() {
22682
22378
  }, {
22683
22379
  key: "linkData",
22684
22380
  value: function linkData(originalUri, rel, uri, why, reverse) {
22685
- if (!uri)
22686
- return;
22381
+ if (!uri) return;
22687
22382
  var kb = this.store;
22688
22383
  var predicate;
22689
22384
  var obj = kb.rdfFactory.namedNode(join(uri, originalUri.value));
@@ -22712,15 +22407,13 @@ var Fetcher = /* @__PURE__ */ function() {
22712
22407
  var linkexp = /<[^>]*>\s*(\s*;\s*[^()<>@,;:"/[\]?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g;
22713
22408
  var paramexp = /[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g;
22714
22409
  var matches = linkHeader.match(linkexp);
22715
- if (matches == null)
22716
- return;
22410
+ if (matches == null) return;
22717
22411
  for (var i = 0; i < matches.length; i++) {
22718
22412
  var split = matches[i].split(">");
22719
22413
  var href = split[0].substring(1);
22720
22414
  var ps = split[1];
22721
22415
  var s = ps.match(paramexp);
22722
- if (s == null)
22723
- return;
22416
+ if (s == null) return;
22724
22417
  for (var j = 0; j < s.length; j++) {
22725
22418
  var p = s[j];
22726
22419
  var paramsplit = p.split("=");
@@ -22824,51 +22517,50 @@ var Fetcher = /* @__PURE__ */ function() {
22824
22517
  var _createIfNotExists = _asyncToGenerator(/* @__PURE__ */ import_regenerator.default.mark(function _callee2(doc) {
22825
22518
  var contentType, data, fetcher3, response, _args2 = arguments;
22826
22519
  return import_regenerator.default.wrap(function _callee2$(_context2) {
22827
- while (1)
22828
- switch (_context2.prev = _context2.next) {
22829
- case 0:
22830
- contentType = _args2.length > 1 && _args2[1] !== void 0 ? _args2[1] : TurtleContentType;
22831
- data = _args2.length > 2 && _args2[2] !== void 0 ? _args2[2] : "";
22832
- fetcher3 = this;
22833
- _context2.prev = 3;
22834
- _context2.next = 6;
22835
- return fetcher3.load(doc);
22836
- case 6:
22837
- response = _context2.sent;
22838
- _context2.next = 26;
22839
- break;
22840
- case 9:
22841
- _context2.prev = 9;
22842
- _context2.t0 = _context2["catch"](3);
22843
- if (!(_context2.t0.response.status === 404)) {
22844
- _context2.next = 25;
22845
- break;
22846
- }
22847
- _context2.prev = 12;
22848
- _context2.next = 15;
22849
- return fetcher3.webOperation("PUT", doc.value, {
22850
- data,
22851
- contentType
22852
- });
22853
- case 15:
22854
- response = _context2.sent;
22855
- _context2.next = 21;
22520
+ while (1) switch (_context2.prev = _context2.next) {
22521
+ case 0:
22522
+ contentType = _args2.length > 1 && _args2[1] !== void 0 ? _args2[1] : TurtleContentType;
22523
+ data = _args2.length > 2 && _args2[2] !== void 0 ? _args2[2] : "";
22524
+ fetcher3 = this;
22525
+ _context2.prev = 3;
22526
+ _context2.next = 6;
22527
+ return fetcher3.load(doc);
22528
+ case 6:
22529
+ response = _context2.sent;
22530
+ _context2.next = 26;
22531
+ break;
22532
+ case 9:
22533
+ _context2.prev = 9;
22534
+ _context2.t0 = _context2["catch"](3);
22535
+ if (!(_context2.t0.response.status === 404)) {
22536
+ _context2.next = 25;
22856
22537
  break;
22857
- case 18:
22858
- _context2.prev = 18;
22859
- _context2.t1 = _context2["catch"](12);
22860
- throw _context2.t1;
22861
- case 21:
22862
- delete fetcher3.requested[doc.value];
22863
- return _context2.abrupt("return", response);
22864
- case 25:
22865
- throw _context2.t0;
22866
- case 26:
22867
- return _context2.abrupt("return", response);
22868
- case 27:
22869
- case "end":
22870
- return _context2.stop();
22871
- }
22538
+ }
22539
+ _context2.prev = 12;
22540
+ _context2.next = 15;
22541
+ return fetcher3.webOperation("PUT", doc.value, {
22542
+ data,
22543
+ contentType
22544
+ });
22545
+ case 15:
22546
+ response = _context2.sent;
22547
+ _context2.next = 21;
22548
+ break;
22549
+ case 18:
22550
+ _context2.prev = 18;
22551
+ _context2.t1 = _context2["catch"](12);
22552
+ throw _context2.t1;
22553
+ case 21:
22554
+ delete fetcher3.requested[doc.value];
22555
+ return _context2.abrupt("return", response);
22556
+ case 25:
22557
+ throw _context2.t0;
22558
+ case 26:
22559
+ return _context2.abrupt("return", response);
22560
+ case 27:
22561
+ case "end":
22562
+ return _context2.stop();
22563
+ }
22872
22564
  }, _callee2, this, [[3, 9], [12, 18]]);
22873
22565
  }));
22874
22566
  function createIfNotExists(_x4) {
@@ -22876,11 +22568,6 @@ var Fetcher = /* @__PURE__ */ function() {
22876
22568
  }
22877
22569
  return createIfNotExists;
22878
22570
  }()
22879
- /**
22880
- * @param parentURI URI of parent container
22881
- * @param folderName - Optional folder name (slug)
22882
- * @param data - Optional folder metadata
22883
- */
22884
22571
  }, {
22885
22572
  key: "createContainer",
22886
22573
  value: function createContainer(parentURI, folderName, data) {
@@ -22961,11 +22648,9 @@ var Fetcher = /* @__PURE__ */ function() {
22961
22648
  }
22962
22649
  } else {
22963
22650
  var msg2 = "Web error: " + response.status;
22964
- if (response.statusText)
22965
- msg2 += " (" + response.statusText + ")";
22651
+ if (response.statusText) msg2 += " (" + response.statusText + ")";
22966
22652
  msg2 += " on " + method + " of <" + uri + ">";
22967
- if (response.responseText)
22968
- msg2 += ": " + response.responseText;
22653
+ if (response.responseText) msg2 += ": " + response.responseText;
22969
22654
  var e2 = new Error(msg2);
22970
22655
  e2.response = response;
22971
22656
  reject(e2);
@@ -23279,7 +22964,10 @@ var Fetcher = /* @__PURE__ */ function() {
23279
22964
  this.addType(this.ns.link("Document"), reqNode, kb, diffLocation);
23280
22965
  }
23281
22966
  if (options.clearPreviousData) {
23282
- kb.removeDocument(options.resource);
22967
+ var sts = kb.statementsMatching(void 0, void 0, void 0, options.resource).slice();
22968
+ for (var i = 0; i < sts.length; i++) {
22969
+ kb.removeStatement(sts[i]);
22970
+ }
23283
22971
  }
23284
22972
  var isImage = contentType.includes("image/") || contentType.includes("application/pdf");
23285
22973
  if (contentType && isImage) {
@@ -23501,7 +23189,6 @@ var Fetcher = /* @__PURE__ */ function() {
23501
23189
  }
23502
23190
  }
23503
23191
  }]);
23504
- return Fetcher2;
23505
23192
  }();
23506
23193
  _defineProperty(Fetcher, "HANDLERS", void 0);
23507
23194
  _defineProperty(Fetcher, "CONTENT_TYPE_BY_EXT", void 0);
@@ -23510,26 +23197,26 @@ Fetcher.HANDLERS = defaultHandlers;
23510
23197
  Fetcher.CONTENT_TYPE_BY_EXT = CONTENT_TYPE_BY_EXT;
23511
23198
 
23512
23199
  // ../node_modules/rdflib/esm/factories/rdflib-data-factory.js
23513
- function ownKeys2(object, enumerableOnly) {
23514
- var keys = Object.keys(object);
23200
+ function ownKeys2(e, r) {
23201
+ var t = Object.keys(e);
23515
23202
  if (Object.getOwnPropertySymbols) {
23516
- var symbols = Object.getOwnPropertySymbols(object);
23517
- enumerableOnly && (symbols = symbols.filter(function(sym) {
23518
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
23519
- })), keys.push.apply(keys, symbols);
23203
+ var o = Object.getOwnPropertySymbols(e);
23204
+ r && (o = o.filter(function(r2) {
23205
+ return Object.getOwnPropertyDescriptor(e, r2).enumerable;
23206
+ })), t.push.apply(t, o);
23520
23207
  }
23521
- return keys;
23208
+ return t;
23522
23209
  }
23523
- function _objectSpread2(target) {
23524
- for (var i = 1; i < arguments.length; i++) {
23525
- var source = null != arguments[i] ? arguments[i] : {};
23526
- i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
23527
- _defineProperty(target, key, source[key]);
23528
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
23529
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
23210
+ function _objectSpread2(e) {
23211
+ for (var r = 1; r < arguments.length; r++) {
23212
+ var t = null != arguments[r] ? arguments[r] : {};
23213
+ r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) {
23214
+ _defineProperty(e, r2, t[r2]);
23215
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) {
23216
+ Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
23530
23217
  });
23531
23218
  }
23532
- return target;
23219
+ return e;
23533
23220
  }
23534
23221
  var RDFlibDataFactory = _objectSpread2(_objectSpread2({}, extended_term_factory_default), {}, {
23535
23222
  /**
@@ -23575,8 +23262,7 @@ var rdflib_data_factory_default = RDFlibDataFactory;
23575
23262
  // ../node_modules/rdflib/esm/index.js
23576
23263
  var boundDataFactory = {};
23577
23264
  for (name in rdflib_data_factory_default) {
23578
- if (typeof rdflib_data_factory_default[name] === "function")
23579
- boundDataFactory[name] = rdflib_data_factory_default[name].bind(rdflib_data_factory_default);
23265
+ if (typeof rdflib_data_factory_default[name] === "function") boundDataFactory[name] = rdflib_data_factory_default[name].bind(rdflib_data_factory_default);
23580
23266
  }
23581
23267
  var name;
23582
23268
  var fetcher2 = boundDataFactory.fetcher;
@@ -23595,39 +23281,37 @@ var term = node_default.fromValue;
23595
23281
  var NextId = BlankNode.nextId;
23596
23282
 
23597
23283
  // ../node_modules/rdflib/esm/store.js
23598
- function ownKeys3(object, enumerableOnly) {
23599
- var keys = Object.keys(object);
23284
+ function ownKeys3(e, r) {
23285
+ var t = Object.keys(e);
23600
23286
  if (Object.getOwnPropertySymbols) {
23601
- var symbols = Object.getOwnPropertySymbols(object);
23602
- enumerableOnly && (symbols = symbols.filter(function(sym) {
23603
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
23604
- })), keys.push.apply(keys, symbols);
23287
+ var o = Object.getOwnPropertySymbols(e);
23288
+ r && (o = o.filter(function(r2) {
23289
+ return Object.getOwnPropertyDescriptor(e, r2).enumerable;
23290
+ })), t.push.apply(t, o);
23605
23291
  }
23606
- return keys;
23292
+ return t;
23607
23293
  }
23608
- function _objectSpread3(target) {
23609
- for (var i = 1; i < arguments.length; i++) {
23610
- var source = null != arguments[i] ? arguments[i] : {};
23611
- i % 2 ? ownKeys3(Object(source), true).forEach(function(key) {
23612
- _defineProperty(target, key, source[key]);
23613
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys3(Object(source)).forEach(function(key) {
23614
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
23294
+ function _objectSpread3(e) {
23295
+ for (var r = 1; r < arguments.length; r++) {
23296
+ var t = null != arguments[r] ? arguments[r] : {};
23297
+ r % 2 ? ownKeys3(Object(t), true).forEach(function(r2) {
23298
+ _defineProperty(e, r2, t[r2]);
23299
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys3(Object(t)).forEach(function(r2) {
23300
+ Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
23615
23301
  });
23616
23302
  }
23617
- return target;
23303
+ return e;
23618
23304
  }
23619
23305
  function _createForOfIteratorHelper4(o, allowArrayLike) {
23620
23306
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
23621
23307
  if (!it) {
23622
23308
  if (Array.isArray(o) || (it = _unsupportedIterableToArray4(o)) || allowArrayLike && o && typeof o.length === "number") {
23623
- if (it)
23624
- o = it;
23309
+ if (it) o = it;
23625
23310
  var i = 0;
23626
23311
  var F = function F2() {
23627
23312
  };
23628
23313
  return { s: F, n: function n() {
23629
- if (i >= o.length)
23630
- return { done: true };
23314
+ if (i >= o.length) return { done: true };
23631
23315
  return { done: false, value: o[i++] };
23632
23316
  }, e: function e(_e) {
23633
23317
  throw _e;
@@ -23647,61 +23331,37 @@ function _createForOfIteratorHelper4(o, allowArrayLike) {
23647
23331
  err = _e2;
23648
23332
  }, f: function f() {
23649
23333
  try {
23650
- if (!normalCompletion && it.return != null)
23651
- it.return();
23334
+ if (!normalCompletion && it.return != null) it.return();
23652
23335
  } finally {
23653
- if (didErr)
23654
- throw err;
23336
+ if (didErr) throw err;
23655
23337
  }
23656
23338
  } };
23657
23339
  }
23658
23340
  function _unsupportedIterableToArray4(o, minLen) {
23659
- if (!o)
23660
- return;
23661
- if (typeof o === "string")
23662
- return _arrayLikeToArray4(o, minLen);
23341
+ if (!o) return;
23342
+ if (typeof o === "string") return _arrayLikeToArray4(o, minLen);
23663
23343
  var n = Object.prototype.toString.call(o).slice(8, -1);
23664
- if (n === "Object" && o.constructor)
23665
- n = o.constructor.name;
23666
- if (n === "Map" || n === "Set")
23667
- return Array.from(o);
23668
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
23669
- return _arrayLikeToArray4(o, minLen);
23344
+ if (n === "Object" && o.constructor) n = o.constructor.name;
23345
+ if (n === "Map" || n === "Set") return Array.from(o);
23346
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray4(o, minLen);
23670
23347
  }
23671
23348
  function _arrayLikeToArray4(arr, len) {
23672
- if (len == null || len > arr.length)
23673
- len = arr.length;
23674
- for (var i = 0, arr2 = new Array(len); i < len; i++)
23675
- arr2[i] = arr[i];
23349
+ if (len == null || len > arr.length) len = arr.length;
23350
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
23676
23351
  return arr2;
23677
23352
  }
23678
- function _createSuper9(Derived) {
23679
- var hasNativeReflectConstruct = _isNativeReflectConstruct9();
23680
- return function _createSuperInternal() {
23681
- var Super = _getPrototypeOf(Derived), result;
23682
- if (hasNativeReflectConstruct) {
23683
- var NewTarget = _getPrototypeOf(this).constructor;
23684
- result = Reflect.construct(Super, arguments, NewTarget);
23685
- } else {
23686
- result = Super.apply(this, arguments);
23687
- }
23688
- return _possibleConstructorReturn(this, result);
23689
- };
23353
+ function _callSuper9(t, o, e) {
23354
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct9() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
23690
23355
  }
23691
23356
  function _isNativeReflectConstruct9() {
23692
- if (typeof Reflect === "undefined" || !Reflect.construct)
23693
- return false;
23694
- if (Reflect.construct.sham)
23695
- return false;
23696
- if (typeof Proxy === "function")
23697
- return true;
23698
23357
  try {
23699
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
23358
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
23700
23359
  }));
23701
- return true;
23702
- } catch (e) {
23703
- return false;
23360
+ } catch (t2) {
23704
23361
  }
23362
+ return (_isNativeReflectConstruct9 = function _isNativeReflectConstruct10() {
23363
+ return !!t;
23364
+ })();
23705
23365
  }
23706
23366
  var owlNamespaceURI = "http://www.w3.org/2002/07/owl#";
23707
23367
  function handleFP(formula2, subj, pred, obj) {
@@ -23734,30 +23394,28 @@ function handleRDFType(formula2, subj, pred, obj, why) {
23734
23394
  return done;
23735
23395
  }
23736
23396
  var IndexedFormula = /* @__PURE__ */ function(_Formula) {
23737
- _inherits(IndexedFormula2, _Formula);
23738
- var _super = _createSuper9(IndexedFormula2);
23739
23397
  function IndexedFormula2(features) {
23740
23398
  var _this;
23741
23399
  var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
23742
23400
  _classCallCheck(this, IndexedFormula2);
23743
- _this = _super.call(this, void 0, void 0, void 0, void 0, opts);
23744
- _defineProperty(_assertThisInitialized(_this), "updater", void 0);
23745
- _defineProperty(_assertThisInitialized(_this), "namespaces", void 0);
23746
- _defineProperty(_assertThisInitialized(_this), "classActions", void 0);
23747
- _defineProperty(_assertThisInitialized(_this), "propertyActions", void 0);
23748
- _defineProperty(_assertThisInitialized(_this), "redirections", void 0);
23749
- _defineProperty(_assertThisInitialized(_this), "aliases", void 0);
23750
- _defineProperty(_assertThisInitialized(_this), "HTTPRedirects", void 0);
23751
- _defineProperty(_assertThisInitialized(_this), "subjectIndex", void 0);
23752
- _defineProperty(_assertThisInitialized(_this), "predicateIndex", void 0);
23753
- _defineProperty(_assertThisInitialized(_this), "objectIndex", void 0);
23754
- _defineProperty(_assertThisInitialized(_this), "whyIndex", void 0);
23755
- _defineProperty(_assertThisInitialized(_this), "index", void 0);
23756
- _defineProperty(_assertThisInitialized(_this), "features", void 0);
23757
- _defineProperty(_assertThisInitialized(_this), "_universalVariables", void 0);
23758
- _defineProperty(_assertThisInitialized(_this), "_existentialVariables", void 0);
23759
- _defineProperty(_assertThisInitialized(_this), "rdfArrayRemove", void 0);
23760
- _defineProperty(_assertThisInitialized(_this), "dataCallbacks", void 0);
23401
+ _this = _callSuper9(this, IndexedFormula2, [void 0, void 0, void 0, void 0, opts]);
23402
+ _defineProperty(_this, "updater", void 0);
23403
+ _defineProperty(_this, "namespaces", void 0);
23404
+ _defineProperty(_this, "classActions", void 0);
23405
+ _defineProperty(_this, "propertyActions", void 0);
23406
+ _defineProperty(_this, "redirections", void 0);
23407
+ _defineProperty(_this, "aliases", void 0);
23408
+ _defineProperty(_this, "HTTPRedirects", void 0);
23409
+ _defineProperty(_this, "subjectIndex", void 0);
23410
+ _defineProperty(_this, "predicateIndex", void 0);
23411
+ _defineProperty(_this, "objectIndex", void 0);
23412
+ _defineProperty(_this, "whyIndex", void 0);
23413
+ _defineProperty(_this, "index", void 0);
23414
+ _defineProperty(_this, "features", void 0);
23415
+ _defineProperty(_this, "_universalVariables", void 0);
23416
+ _defineProperty(_this, "_existentialVariables", void 0);
23417
+ _defineProperty(_this, "rdfArrayRemove", void 0);
23418
+ _defineProperty(_this, "dataCallbacks", void 0);
23761
23419
  _this.propertyActions = {};
23762
23420
  _this.classActions = {};
23763
23421
  _this.redirections = [];
@@ -23783,7 +23441,8 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
23783
23441
  _this.initPropertyActions(_this.features);
23784
23442
  return _this;
23785
23443
  }
23786
- _createClass(IndexedFormula2, [{
23444
+ _inherits(IndexedFormula2, _Formula);
23445
+ return _createClass(IndexedFormula2, [{
23787
23446
  key: "substitute",
23788
23447
  value: (
23789
23448
  /**
@@ -23827,8 +23486,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
23827
23486
  function doPatch(onDonePatch) {
23828
23487
  if (patch["delete"]) {
23829
23488
  ds = patch["delete"];
23830
- if (binding)
23831
- ds = ds.substitute(binding);
23489
+ if (binding) ds = ds.substitute(binding);
23832
23490
  ds = ds.statements;
23833
23491
  var bad = [];
23834
23492
  var ds2 = ds.map(function(st3) {
@@ -23849,8 +23507,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
23849
23507
  }
23850
23508
  if (patch["insert"]) {
23851
23509
  ds = patch["insert"];
23852
- if (binding)
23853
- ds = ds.substitute(binding);
23510
+ if (binding) ds = ds.substitute(binding);
23854
23511
  ds = ds.statements;
23855
23512
  ds.map(function(st3) {
23856
23513
  st3.graph = target;
@@ -23891,8 +23548,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
23891
23548
  }, {
23892
23549
  key: "declareExistential",
23893
23550
  value: function declareExistential(x) {
23894
- if (!this._existentialVariables)
23895
- this._existentialVariables = [];
23551
+ if (!this._existentialVariables) this._existentialVariables = [];
23896
23552
  this._existentialVariables.push(x);
23897
23553
  return x;
23898
23554
  }
@@ -24143,8 +23799,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24143
23799
  }, {
24144
23800
  key: "copyTo",
24145
23801
  value: function copyTo(template, target, flags) {
24146
- if (!flags)
24147
- flags = [];
23802
+ if (!flags) flags = [];
24148
23803
  var statList = this.statementsMatching(template);
24149
23804
  if (ArrayIndexOf(flags, "two-direction") !== -1) {
24150
23805
  statList.concat(this.statementsMatching(void 0, void 0, template));
@@ -24242,8 +23897,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24242
23897
  }, {
24243
23898
  key: "newExistential",
24244
23899
  value: function newExistential(uri) {
24245
- if (!uri)
24246
- return this.bnode();
23900
+ if (!uri) return this.bnode();
24247
23901
  var x = this.sym(uri);
24248
23902
  return this.declareExistential(x);
24249
23903
  }
@@ -24276,8 +23930,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24276
23930
  key: "newUniversal",
24277
23931
  value: function newUniversal(uri) {
24278
23932
  var x = this.sym(uri);
24279
- if (!this._universalVariables)
24280
- this._universalVariables = [];
23933
+ if (!this._universalVariables) this._universalVariables = [];
24281
23934
  this._universalVariables.push(x);
24282
23935
  return x;
24283
23936
  }
@@ -24297,8 +23950,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24297
23950
  value: function nextSymbol(doc) {
24298
23951
  for (var i = 0; ; i++) {
24299
23952
  var uri = doc.value + "#n" + i;
24300
- if (!this.mentionsURI(uri))
24301
- return this.sym(uri);
23953
+ if (!this.mentionsURI(uri)) return this.sym(uri);
24302
23954
  }
24303
23955
  }
24304
23956
  /**
@@ -24361,12 +24013,23 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24361
24013
  return this;
24362
24014
  }
24363
24015
  /**
24364
- * Removes all statements in a doc, along with the related metadata including request/response
24016
+ * Removes all statements in a doc, along with the related metadata including request/response/status
24365
24017
  * @param doc - The document / graph
24366
24018
  */
24367
24019
  }, {
24368
24020
  key: "removeDocument",
24369
24021
  value: function removeDocument(doc) {
24022
+ this.removeMetadata(doc);
24023
+ var sts = this.statementsMatching(void 0, void 0, void 0, doc).slice();
24024
+ for (var i = 0; i < sts.length; i++) {
24025
+ this.removeStatement(sts[i]);
24026
+ }
24027
+ this.removeMatches(doc, null, null);
24028
+ return this;
24029
+ }
24030
+ }, {
24031
+ key: "removeMetadata",
24032
+ value: function removeMetadata(doc) {
24370
24033
  var meta = this.sym("chrome://TheCurrentSession");
24371
24034
  var linkNamespaceURI = "http://www.w3.org/2007/ont/link#";
24372
24035
  var requests = this.statementsMatching(void 0, this.sym("".concat(linkNamespaceURI, "requestedURI")), this.rdfFactory.literal(doc.value), meta).map(function(st3) {
@@ -24374,19 +24037,29 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24374
24037
  });
24375
24038
  for (var r = 0; r < requests.length; r++) {
24376
24039
  var request = requests[r];
24377
- if (request !== void 0) {
24378
- this.removeMatches(request, null, null, meta);
24040
+ if (request != void 0) {
24041
+ var sts = void 0;
24042
+ var status = this.any(request, this.sym("".concat(linkNamespaceURI, "status")), null, meta);
24043
+ if (status != void 0) {
24044
+ sts = this.statementsMatching(status, this.sym("".concat(linkNamespaceURI, "status")), null, meta).slice();
24045
+ for (var i = 0; i < sts.length; i++) {
24046
+ this.removeStatement(sts[i]);
24047
+ }
24048
+ }
24379
24049
  var response = this.any(request, this.sym("".concat(linkNamespaceURI, "response")), null, meta);
24380
- if (response !== void 0) {
24381
- this.removeMatches(response, null, null, meta);
24050
+ if (response != void 0) {
24051
+ sts = this.statementsMatching(response, null, null, meta).slice();
24052
+ for (var i = 0; i < sts.length; i++) {
24053
+ this.removeStatement(sts[i]);
24054
+ }
24055
+ }
24056
+ sts = this.statementsMatching(request, null, null, meta).slice();
24057
+ for (var i = 0; i < sts.length; i++) {
24058
+ this.removeStatement(sts[i]);
24382
24059
  }
24383
24060
  }
24384
24061
  }
24385
24062
  this.removeMatches(this.sym(doc.value), null, null, meta);
24386
- var sts = this.statementsMatching(void 0, void 0, void 0, doc).slice();
24387
- for (var i = 0; i < sts.length; i++) {
24388
- this.removeStatement(sts[i]);
24389
- }
24390
24063
  return this;
24391
24064
  }
24392
24065
  /**
@@ -24402,12 +24075,9 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24402
24075
  value: function removeMany(subj, pred, obj, why, limit) {
24403
24076
  var sts = this.statementsMatching(subj, pred, obj, why, false);
24404
24077
  var statements = [];
24405
- for (var i = 0; i < sts.length; i++)
24406
- statements.push(sts[i]);
24407
- if (limit)
24408
- statements = statements.slice(0, limit);
24409
- for (i = 0; i < statements.length; i++)
24410
- this.remove(statements[i]);
24078
+ for (var i = 0; i < sts.length; i++) statements.push(sts[i]);
24079
+ if (limit) statements = statements.slice(0, limit);
24080
+ for (i = 0; i < statements.length; i++) this.remove(statements[i]);
24411
24081
  }
24412
24082
  /**
24413
24083
  * Remove all matching statements
@@ -24524,11 +24194,9 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24524
24194
  return true;
24525
24195
  }
24526
24196
  var x1 = this.canon(x);
24527
- if (!x1)
24528
- return false;
24197
+ if (!x1) return false;
24529
24198
  var y1 = this.canon(y);
24530
- if (!y1)
24531
- return false;
24199
+ if (!y1) return false;
24532
24200
  return x1.value === y1.value;
24533
24201
  }
24534
24202
  }, {
@@ -24541,8 +24209,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24541
24209
  return;
24542
24210
  }
24543
24211
  for (var existingPrefix in this.namespaces) {
24544
- if (this.namespaces[existingPrefix] == nsuri)
24545
- delete this.namespaces[existingPrefix];
24212
+ if (this.namespaces[existingPrefix] == nsuri) delete this.namespaces[existingPrefix];
24546
24213
  }
24547
24214
  this.namespaces[prefix] = nsuri;
24548
24215
  }
@@ -24619,8 +24286,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24619
24286
  }
24620
24287
  if (st3 != null) {
24621
24288
  results.push(st3);
24622
- if (justOne)
24623
- break;
24289
+ if (justOne) break;
24624
24290
  }
24625
24291
  }
24626
24292
  return results;
@@ -24634,8 +24300,7 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24634
24300
  value: function uris(term2) {
24635
24301
  var cterm = this.canon(term2);
24636
24302
  var terms = this.aliases[this.id(cterm)];
24637
- if (!cterm.value)
24638
- return [];
24303
+ if (!cterm.value) return [];
24639
24304
  var res = [cterm.value];
24640
24305
  if (terms) {
24641
24306
  for (var i = 0; i < terms.length; i++) {
@@ -24660,7 +24325,6 @@ var IndexedFormula = /* @__PURE__ */ function(_Formula) {
24660
24325
  return defaultGraphURI;
24661
24326
  }
24662
24327
  }]);
24663
- return IndexedFormula2;
24664
24328
  }(Formula);
24665
24329
  _defineProperty(IndexedFormula, "handleRDFType", void 0);
24666
24330
  IndexedFormula.handleRDFType = handleRDFType;
@@ -24670,14 +24334,12 @@ function _createForOfIteratorHelper5(o, allowArrayLike) {
24670
24334
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
24671
24335
  if (!it) {
24672
24336
  if (Array.isArray(o) || (it = _unsupportedIterableToArray5(o)) || allowArrayLike && o && typeof o.length === "number") {
24673
- if (it)
24674
- o = it;
24337
+ if (it) o = it;
24675
24338
  var i = 0;
24676
24339
  var F = function F2() {
24677
24340
  };
24678
24341
  return { s: F, n: function n() {
24679
- if (i >= o.length)
24680
- return { done: true };
24342
+ if (i >= o.length) return { done: true };
24681
24343
  return { done: false, value: o[i++] };
24682
24344
  }, e: function e(_e) {
24683
24345
  throw _e;
@@ -24697,32 +24359,23 @@ function _createForOfIteratorHelper5(o, allowArrayLike) {
24697
24359
  err = _e2;
24698
24360
  }, f: function f() {
24699
24361
  try {
24700
- if (!normalCompletion && it.return != null)
24701
- it.return();
24362
+ if (!normalCompletion && it.return != null) it.return();
24702
24363
  } finally {
24703
- if (didErr)
24704
- throw err;
24364
+ if (didErr) throw err;
24705
24365
  }
24706
24366
  } };
24707
24367
  }
24708
24368
  function _unsupportedIterableToArray5(o, minLen) {
24709
- if (!o)
24710
- return;
24711
- if (typeof o === "string")
24712
- return _arrayLikeToArray5(o, minLen);
24369
+ if (!o) return;
24370
+ if (typeof o === "string") return _arrayLikeToArray5(o, minLen);
24713
24371
  var n = Object.prototype.toString.call(o).slice(8, -1);
24714
- if (n === "Object" && o.constructor)
24715
- n = o.constructor.name;
24716
- if (n === "Map" || n === "Set")
24717
- return Array.from(o);
24718
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
24719
- return _arrayLikeToArray5(o, minLen);
24372
+ if (n === "Object" && o.constructor) n = o.constructor.name;
24373
+ if (n === "Map" || n === "Set") return Array.from(o);
24374
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray5(o, minLen);
24720
24375
  }
24721
24376
  function _arrayLikeToArray5(arr, len) {
24722
- if (len == null || len > arr.length)
24723
- len = arr.length;
24724
- for (var i = 0, arr2 = new Array(len); i < len; i++)
24725
- arr2[i] = arr[i];
24377
+ if (len == null || len > arr.length) len = arr.length;
24378
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
24726
24379
  return arr2;
24727
24380
  }
24728
24381
  var UpdateManager = /* @__PURE__ */ function() {
@@ -24755,7 +24408,7 @@ var UpdateManager = /* @__PURE__ */ function() {
24755
24408
  this.ns.owl = Namespace("http://www.w3.org/2002/07/owl#");
24756
24409
  this.patchControl = [];
24757
24410
  }
24758
- _createClass(UpdateManager2, [{
24411
+ return _createClass(UpdateManager2, [{
24759
24412
  key: "patchControlFor",
24760
24413
  value: function patchControlFor(doc) {
24761
24414
  if (!this.patchControl[doc.value]) {
@@ -24790,7 +24443,7 @@ var UpdateManager = /* @__PURE__ */ function() {
24790
24443
  for (_iterator.s(); !(_step = _iterator.n()).done; ) {
24791
24444
  var request = _step.value;
24792
24445
  var _response = kb.any(request, this.ns.link("response"), null, meta);
24793
- if (_response !== void 0) {
24446
+ if (_response != void 0) {
24794
24447
  kb.add(_response, this.ns.link("outOfDate"), true, meta);
24795
24448
  }
24796
24449
  }
@@ -24818,34 +24471,33 @@ var UpdateManager = /* @__PURE__ */ function() {
24818
24471
  var _kb$fetcher2;
24819
24472
  var initial, final;
24820
24473
  return import_regenerator2.default.wrap(function _callee$(_context) {
24821
- while (1)
24822
- switch (_context.prev = _context.next) {
24823
- case 0:
24824
- if (uri) {
24825
- _context.next = 2;
24826
- break;
24827
- }
24828
- return _context.abrupt("return", false);
24829
- case 2:
24830
- if (!kb) {
24831
- kb = this.store;
24832
- }
24833
- initial = this.editable(uri, kb);
24834
- if (!(initial !== void 0)) {
24835
- _context.next = 6;
24836
- break;
24837
- }
24838
- return _context.abrupt("return", initial);
24839
- case 6:
24840
- _context.next = 8;
24841
- return (_kb$fetcher2 = kb.fetcher) === null || _kb$fetcher2 === void 0 ? void 0 : _kb$fetcher2.load(uri);
24842
- case 8:
24843
- final = this.editable(uri, kb);
24844
- return _context.abrupt("return", final);
24845
- case 10:
24846
- case "end":
24847
- return _context.stop();
24848
- }
24474
+ while (1) switch (_context.prev = _context.next) {
24475
+ case 0:
24476
+ if (uri) {
24477
+ _context.next = 2;
24478
+ break;
24479
+ }
24480
+ return _context.abrupt("return", false);
24481
+ case 2:
24482
+ if (!kb) {
24483
+ kb = this.store;
24484
+ }
24485
+ initial = this.editable(uri, kb);
24486
+ if (!(initial !== void 0)) {
24487
+ _context.next = 6;
24488
+ break;
24489
+ }
24490
+ return _context.abrupt("return", initial);
24491
+ case 6:
24492
+ _context.next = 8;
24493
+ return (_kb$fetcher2 = kb.fetcher) === null || _kb$fetcher2 === void 0 ? void 0 : _kb$fetcher2.load(uri);
24494
+ case 8:
24495
+ final = this.editable(uri, kb);
24496
+ return _context.abrupt("return", final);
24497
+ case 10:
24498
+ case "end":
24499
+ return _context.stop();
24500
+ }
24849
24501
  }, _callee, this);
24850
24502
  }));
24851
24503
  function checkEditable(_x, _x2) {
@@ -24853,17 +24505,6 @@ var UpdateManager = /* @__PURE__ */ function() {
24853
24505
  }
24854
24506
  return checkEditable;
24855
24507
  }()
24856
- /**
24857
- * Tests whether a file is editable.
24858
- * If the file has a specific annotation that it is machine written,
24859
- * for safety, it is editable (this doesn't actually check for write access)
24860
- * If the file has wac-allow and accept patch headers, those are respected.
24861
- * and local write access is determined by those headers.
24862
- * This synchronous version only looks at past HTTP requests, does not make new ones.
24863
- *
24864
- * @returns The method string SPARQL or DAV or
24865
- * LOCALFILE or false if known, undefined if not known.
24866
- */
24867
24508
  }, {
24868
24509
  key: "editable",
24869
24510
  value: function editable(uri, kb) {
@@ -24891,8 +24532,7 @@ var UpdateManager = /* @__PURE__ */ function() {
24891
24532
  var _response2 = kb.any(request, this.ns.link("response"), null, meta);
24892
24533
  if (_response2 !== void 0) {
24893
24534
  var outOfDate = kb.anyJS(_response2, this.ns.link("outOfDate"), null, meta);
24894
- if (outOfDate)
24895
- continue;
24535
+ if (outOfDate) continue;
24896
24536
  var wacAllow = kb.anyValue(_response2, this.ns.httph("wac-allow"));
24897
24537
  if (wacAllow) {
24898
24538
  var _iterator2 = _createForOfIteratorHelper5(wacAllow.split(",")), _step2;
@@ -24914,12 +24554,9 @@ var UpdateManager = /* @__PURE__ */ function() {
24914
24554
  if (acceptPatch.length) {
24915
24555
  for (var i = 0; i < acceptPatch.length; i++) {
24916
24556
  method = acceptPatch[i].value.trim();
24917
- if (method.indexOf("text/n3") >= 0)
24918
- return "N3PATCH";
24919
- if (method.indexOf("application/sparql-update") >= 0)
24920
- return "SPARQL";
24921
- if (method.indexOf("application/sparql-update-single-match") >= 0)
24922
- return "SPARQL";
24557
+ if (method.indexOf("text/n3") >= 0) return "N3PATCH";
24558
+ if (method.indexOf("application/sparql-update") >= 0) return "SPARQL";
24559
+ if (method.indexOf("application/sparql-update-single-match") >= 0) return "SPARQL";
24923
24560
  }
24924
24561
  }
24925
24562
  var authorVia = kb.each(_response2, this.ns.httph("ms-author-via"));
@@ -24935,10 +24572,8 @@ var UpdateManager = /* @__PURE__ */ function() {
24935
24572
  }
24936
24573
  }
24937
24574
  if (!this.isHttpUri(uri)) {
24938
- if (!wacAllow)
24939
- return false;
24940
- else
24941
- return "LOCALFILE";
24575
+ if (!wacAllow) return false;
24576
+ else return "LOCALFILE";
24942
24577
  }
24943
24578
  var status = kb.each(_response2, this.ns.http("status"));
24944
24579
  if (status.length) {
@@ -25075,8 +24710,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25075
24710
  value: function bnodeContext1(x, source) {
25076
24711
  for (var depth = 0; depth < 3; depth++) {
25077
24712
  var con = this.bnodeContext2(x, source, depth);
25078
- if (con !== null)
25079
- return con;
24713
+ if (con !== null) return con;
25080
24714
  }
25081
24715
  return this.store.connectedStatements(x, source);
25082
24716
  }
@@ -25100,8 +24734,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25100
24734
  this.cacheIfps();
25101
24735
  for (var i = 0; i < bnodes.length; i++) {
25102
24736
  var bnode = bnodes[i];
25103
- if (!this.mentioned(bnode))
25104
- continue;
24737
+ if (!this.mentioned(bnode)) continue;
25105
24738
  context = context.concat(this.bnodeContext1(bnode, doc));
25106
24739
  }
25107
24740
  }
@@ -25191,8 +24824,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25191
24824
  var query = this.contextWhere(this.statementContext(st0));
25192
24825
  if (st3 instanceof Array) {
25193
24826
  var stText = "";
25194
- for (var i = 0; i < st3.length; i++)
25195
- stText += st3[i] + "\n";
24827
+ for (var i = 0; i < st3.length; i++) stText += st3[i] + "\n";
25196
24828
  query += "INSERT DATA { " + stText + " }\n";
25197
24829
  } else {
25198
24830
  query += "INSERT DATA { " + this.anonymize(st3.subject) + " " + this.anonymize(st3.predicate) + " " + this.anonymize(st3.object) + " . }\n";
@@ -25206,8 +24838,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25206
24838
  var query = this.contextWhere(this.statementContext(st0));
25207
24839
  if (st3 instanceof Array) {
25208
24840
  var stText = "";
25209
- for (var i = 0; i < st3.length; i++)
25210
- stText += st3[i] + "\n";
24841
+ for (var i = 0; i < st3.length; i++) stText += st3[i] + "\n";
25211
24842
  query += "DELETE DATA { " + stText + " }\n";
25212
24843
  } else {
25213
24844
  query += "DELETE DATA { " + this.anonymize(st3.subject) + " " + this.anonymize(st3.predicate) + " " + this.anonymize(st3.object) + " . }\n";
@@ -25254,8 +24885,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25254
24885
  key: "getUpdatesVia",
25255
24886
  value: function getUpdatesVia(doc) {
25256
24887
  var linkHeaders = this.store.fetcher.getHeader(doc, "updates-via");
25257
- if (!linkHeaders || !linkHeaders.length)
25258
- return null;
24888
+ if (!linkHeaders || !linkHeaders.length) return null;
25259
24889
  return linkHeaders[0].trim();
25260
24890
  }
25261
24891
  }, {
@@ -25297,7 +24927,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25297
24927
  }
25298
24928
  } else {
25299
24929
  control.reloading = false;
25300
- if (response.status === 0) {
24930
+ if (response && response.status === 0) {
25301
24931
  control.reloading = true;
25302
24932
  retryTimeout = retryTimeout * 2;
25303
24933
  setTimeout(tryReload2, retryTimeout);
@@ -25403,8 +25033,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25403
25033
  docs.forEach(function(doc) {
25404
25034
  if (!uniqueDocs.find(function(uniqueDoc) {
25405
25035
  return uniqueDoc.equals(doc);
25406
- }))
25407
- uniqueDocs.push(doc);
25036
+ })) uniqueDocs.push(doc);
25408
25037
  });
25409
25038
  var updates = uniqueDocs.map(function(doc) {
25410
25039
  return thisUpdater.update(deletions.filter(function(st3) {
@@ -25456,8 +25085,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25456
25085
  query += " } \n";
25457
25086
  }
25458
25087
  if (is.length) {
25459
- if (ds.length)
25460
- query += " ; ";
25088
+ if (ds.length) query += " ; ";
25461
25089
  query += "INSERT DATA { ";
25462
25090
  for (var _i7 = 0; _i7 < is.length; _i7++) {
25463
25091
  query += this.nTriples(is[_i7]) + "\n";
@@ -25589,10 +25217,8 @@ var UpdateManager = /* @__PURE__ */ function() {
25589
25217
  } else if (protocol2.indexOf("SPARQL") >= 0 || protocol2.indexOf("N3PATCH") >= 0) {
25590
25218
  var isSparql = protocol2.indexOf("SPARQL") >= 0;
25591
25219
  var bnodes = [];
25592
- if (ds.length)
25593
- bnodes = this.statementArrayBnodes(ds);
25594
- if (is.length)
25595
- bnodes = bnodes.concat(this.statementArrayBnodes(is));
25220
+ if (ds.length) bnodes = this.statementArrayBnodes(ds);
25221
+ if (is.length) bnodes = bnodes.concat(this.statementArrayBnodes(is));
25596
25222
  var context = this.bnodeContext(bnodes, doc);
25597
25223
  var query = isSparql ? this.constructSparqlUpdateQuery(ds, is, context) : this.constructN3PatchQuery(ds, is, context);
25598
25224
  options.contentType = isSparql ? "application/sparql-update" : "text/n3";
@@ -25721,8 +25347,7 @@ var UpdateManager = /* @__PURE__ */ function() {
25721
25347
  options.body = this.serialize(doc.value, newSts, contentType);
25722
25348
  options.contentType = contentType;
25723
25349
  kb.fetcher.webOperation("PUT", doc.value, options).then(function(response) {
25724
- if (!response.ok)
25725
- return callbackFunction(doc.value, false, response.error);
25350
+ if (!response.ok) return callbackFunction(doc.value, false, response.error);
25726
25351
  for (var _i12 = 0; _i12 < ds.length; _i12++) {
25727
25352
  kb.remove(ds[_i12]);
25728
25353
  }
@@ -25823,10 +25448,8 @@ var UpdateManager = /* @__PURE__ */ function() {
25823
25448
  callbackFunction(false, "Non-HTTP error reloading data: " + body, response);
25824
25449
  } else {
25825
25450
  var elapsedTimeMs = Date.now() - startTime;
25826
- if (!doc.reloadTimeTotal)
25827
- doc.reloadTimeTotal = 0;
25828
- if (!doc.reloadTimeCount)
25829
- doc.reloadTimeCount = 0;
25451
+ if (!doc.reloadTimeTotal) doc.reloadTimeTotal = 0;
25452
+ if (!doc.reloadTimeCount) doc.reloadTimeCount = 0;
25830
25453
  doc.reloadTimeTotal += elapsedTimeMs;
25831
25454
  doc.reloadTimeCount += 1;
25832
25455
  callbackFunction(true);
@@ -25834,59 +25457,9 @@ var UpdateManager = /* @__PURE__ */ function() {
25834
25457
  });
25835
25458
  }
25836
25459
  }]);
25837
- return UpdateManager2;
25838
25460
  }();
25839
25461
 
25840
- // ../node_modules/uuid/dist/esm-browser/native.js
25841
- var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
25842
- var native_default = {
25843
- randomUUID
25844
- };
25845
-
25846
- // ../node_modules/uuid/dist/esm-browser/rng.js
25847
- var getRandomValues;
25848
- var rnds8 = new Uint8Array(16);
25849
- function rng() {
25850
- if (!getRandomValues) {
25851
- getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
25852
- if (!getRandomValues) {
25853
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
25854
- }
25855
- }
25856
- return getRandomValues(rnds8);
25857
- }
25858
-
25859
- // ../node_modules/uuid/dist/esm-browser/stringify.js
25860
- var byteToHex = [];
25861
- for (let i = 0; i < 256; ++i) {
25862
- byteToHex.push((i + 256).toString(16).slice(1));
25863
- }
25864
- function unsafeStringify(arr, offset = 0) {
25865
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
25866
- }
25867
-
25868
- // ../node_modules/uuid/dist/esm-browser/v4.js
25869
- function v4(options, buf, offset) {
25870
- if (native_default.randomUUID && !buf && !options) {
25871
- return native_default.randomUUID();
25872
- }
25873
- options = options || {};
25874
- const rnds = options.random || (options.rng || rng)();
25875
- rnds[6] = rnds[6] & 15 | 64;
25876
- rnds[8] = rnds[8] & 63 | 128;
25877
- if (buf) {
25878
- offset = offset || 0;
25879
- for (let i = 0; i < 16; ++i) {
25880
- buf[offset + i] = rnds[i];
25881
- }
25882
- return buf;
25883
- }
25884
- return unsafeStringify(rnds);
25885
- }
25886
- var v4_default = v4;
25887
-
25888
25462
  export {
25889
- v4_default,
25890
25463
  isLiteral,
25891
25464
  isNamedNode,
25892
25465
  isBlankNode,