@pod-os/core 0.11.2-5fc2580.0 → 0.11.2-d3dc448.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -16,11 +16,11 @@ var PodOS = (() => {
16
16
  for (var name7 in all)
17
17
  __defProp(target5, name7, { get: all[name7], enumerable: true });
18
18
  };
19
- var __copyProps = (to2, from, except, desc) => {
20
- if (from && typeof from === "object" || typeof from === "function") {
21
- for (let key3 of __getOwnPropNames(from))
19
+ var __copyProps = (to2, from2, except, desc) => {
20
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
21
+ for (let key3 of __getOwnPropNames(from2))
22
22
  if (!__hasOwnProp.call(to2, key3) && key3 !== except)
23
- __defProp(to2, key3, { get: () => from[key3], enumerable: !(desc = __getOwnPropDesc(from, key3)) || desc.enumerable });
23
+ __defProp(to2, key3, { get: () => from2[key3], enumerable: !(desc = __getOwnPropDesc(from2, key3)) || desc.enumerable });
24
24
  }
25
25
  return to2;
26
26
  };
@@ -406,83 +406,6 @@ var PodOS = (() => {
406
406
  }
407
407
  });
408
408
 
409
- // ../node_modules/uuid/dist/esm-browser/rng.js
410
- function rng() {
411
- if (!getRandomValues) {
412
- getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
413
- if (!getRandomValues) {
414
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
415
- }
416
- }
417
- return getRandomValues(rnds8);
418
- }
419
- var getRandomValues, rnds8;
420
- var init_rng = __esm({
421
- "../node_modules/uuid/dist/esm-browser/rng.js"() {
422
- rnds8 = new Uint8Array(16);
423
- }
424
- });
425
-
426
- // ../node_modules/uuid/dist/esm-browser/stringify.js
427
- function unsafeStringify(arr, offset3 = 0) {
428
- return byteToHex[arr[offset3 + 0]] + byteToHex[arr[offset3 + 1]] + byteToHex[arr[offset3 + 2]] + byteToHex[arr[offset3 + 3]] + "-" + byteToHex[arr[offset3 + 4]] + byteToHex[arr[offset3 + 5]] + "-" + byteToHex[arr[offset3 + 6]] + byteToHex[arr[offset3 + 7]] + "-" + byteToHex[arr[offset3 + 8]] + byteToHex[arr[offset3 + 9]] + "-" + byteToHex[arr[offset3 + 10]] + byteToHex[arr[offset3 + 11]] + byteToHex[arr[offset3 + 12]] + byteToHex[arr[offset3 + 13]] + byteToHex[arr[offset3 + 14]] + byteToHex[arr[offset3 + 15]];
429
- }
430
- var byteToHex;
431
- var init_stringify = __esm({
432
- "../node_modules/uuid/dist/esm-browser/stringify.js"() {
433
- byteToHex = [];
434
- for (let i = 0; i < 256; ++i) {
435
- byteToHex.push((i + 256).toString(16).slice(1));
436
- }
437
- }
438
- });
439
-
440
- // ../node_modules/uuid/dist/esm-browser/native.js
441
- var randomUUID, native_default;
442
- var init_native = __esm({
443
- "../node_modules/uuid/dist/esm-browser/native.js"() {
444
- randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
445
- native_default = {
446
- randomUUID
447
- };
448
- }
449
- });
450
-
451
- // ../node_modules/uuid/dist/esm-browser/v4.js
452
- function v4(options, buf, offset3) {
453
- if (native_default.randomUUID && !buf && !options) {
454
- return native_default.randomUUID();
455
- }
456
- options = options || {};
457
- const rnds = options.random || (options.rng || rng)();
458
- rnds[6] = rnds[6] & 15 | 64;
459
- rnds[8] = rnds[8] & 63 | 128;
460
- if (buf) {
461
- offset3 = offset3 || 0;
462
- for (let i = 0; i < 16; ++i) {
463
- buf[offset3 + i] = rnds[i];
464
- }
465
- return buf;
466
- }
467
- return unsafeStringify(rnds);
468
- }
469
- var v4_default;
470
- var init_v4 = __esm({
471
- "../node_modules/uuid/dist/esm-browser/v4.js"() {
472
- init_native();
473
- init_rng();
474
- init_stringify();
475
- v4_default = v4;
476
- }
477
- });
478
-
479
- // ../node_modules/uuid/dist/esm-browser/index.js
480
- var init_esm_browser = __esm({
481
- "../node_modules/uuid/dist/esm-browser/index.js"() {
482
- init_v4();
483
- }
484
- });
485
-
486
409
  // ../node_modules/@inrupt/oidc-client/lib/oidc-client.min.js
487
410
  var require_oidc_client_min = __commonJS({
488
411
  "../node_modules/@inrupt/oidc-client/lib/oidc-client.min.js"(exports, module3) {
@@ -10354,10 +10277,10 @@ var PodOS = (() => {
10354
10277
  lookupPrefix: function(namespaceURI) {
10355
10278
  var el = this;
10356
10279
  while (el) {
10357
- var map4 = el._nsMap;
10358
- if (map4) {
10359
- for (var n2 in map4) {
10360
- if (Object.prototype.hasOwnProperty.call(map4, n2) && map4[n2] === namespaceURI) {
10280
+ var map5 = el._nsMap;
10281
+ if (map5) {
10282
+ for (var n2 in map5) {
10283
+ if (Object.prototype.hasOwnProperty.call(map5, n2) && map5[n2] === namespaceURI) {
10361
10284
  return n2;
10362
10285
  }
10363
10286
  }
@@ -10370,10 +10293,10 @@ var PodOS = (() => {
10370
10293
  lookupNamespaceURI: function(prefix2) {
10371
10294
  var el = this;
10372
10295
  while (el) {
10373
- var map4 = el._nsMap;
10374
- if (map4) {
10375
- if (Object.prototype.hasOwnProperty.call(map4, prefix2)) {
10376
- return map4[prefix2];
10296
+ var map5 = el._nsMap;
10297
+ if (map5) {
10298
+ if (Object.prototype.hasOwnProperty.call(map5, prefix2)) {
10299
+ return map5[prefix2];
10377
10300
  }
10378
10301
  }
10379
10302
  el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;
@@ -13576,21 +13499,21 @@ var PodOS = (() => {
13576
13499
  case "/":
13577
13500
  var end2 = source8.indexOf(">", tagStart + 3);
13578
13501
  var tagName = source8.substring(tagStart + 2, end2).replace(/[ \t\n\r]+$/g, "");
13579
- var config = parseStack.pop();
13502
+ var config2 = parseStack.pop();
13580
13503
  if (end2 < 0) {
13581
13504
  tagName = source8.substring(tagStart + 2).replace(/[\s<].*/, "");
13582
- errorHandler.error("end tag name: " + tagName + " is not complete:" + config.tagName);
13505
+ errorHandler.error("end tag name: " + tagName + " is not complete:" + config2.tagName);
13583
13506
  end2 = tagStart + 1 + tagName.length;
13584
13507
  } else if (tagName.match(/\s</)) {
13585
13508
  tagName = tagName.replace(/[\s<].*/, "");
13586
13509
  errorHandler.error("end tag name: " + tagName + " maybe not complete");
13587
13510
  end2 = tagStart + 1 + tagName.length;
13588
13511
  }
13589
- var localNSMap = config.localNSMap;
13590
- var endMatch = config.tagName == tagName;
13591
- var endIgnoreCaseMach = endMatch || config.tagName && config.tagName.toLowerCase() == tagName.toLowerCase();
13512
+ var localNSMap = config2.localNSMap;
13513
+ var endMatch = config2.tagName == tagName;
13514
+ var endIgnoreCaseMach = endMatch || config2.tagName && config2.tagName.toLowerCase() == tagName.toLowerCase();
13592
13515
  if (endIgnoreCaseMach) {
13593
- domBuilder.endElement(config.uri, config.localName, tagName);
13516
+ domBuilder.endElement(config2.uri, config2.localName, tagName);
13594
13517
  if (localNSMap) {
13595
13518
  for (var prefix2 in localNSMap) {
13596
13519
  if (Object.prototype.hasOwnProperty.call(localNSMap, prefix2)) {
@@ -13599,10 +13522,10 @@ var PodOS = (() => {
13599
13522
  }
13600
13523
  }
13601
13524
  if (!endMatch) {
13602
- errorHandler.fatalError("end tag name: " + tagName + " is not match the current start tagName:" + config.tagName);
13525
+ errorHandler.fatalError("end tag name: " + tagName + " is not match the current start tagName:" + config2.tagName);
13603
13526
  }
13604
13527
  } else {
13605
- parseStack.push(config);
13528
+ parseStack.push(config2);
13606
13529
  }
13607
13530
  end2++;
13608
13531
  break;
@@ -14602,7 +14525,7 @@ var PodOS = (() => {
14602
14525
  function error5(type5) {
14603
14526
  throw new RangeError(errors[type5]);
14604
14527
  }
14605
- function map4(array, fn2) {
14528
+ function map5(array, fn2) {
14606
14529
  var length2 = array.length;
14607
14530
  var result5 = [];
14608
14531
  while (length2--) {
@@ -14619,7 +14542,7 @@ var PodOS = (() => {
14619
14542
  }
14620
14543
  string2 = string2.replace(regexSeparators, ".");
14621
14544
  var labels = string2.split(".");
14622
- var encoded = map4(labels, fn2).join(".");
14545
+ var encoded = map5(labels, fn2).join(".");
14623
14546
  return result5 + encoded;
14624
14547
  }
14625
14548
  function ucs2decode(string2) {
@@ -14641,7 +14564,7 @@ var PodOS = (() => {
14641
14564
  return output2;
14642
14565
  }
14643
14566
  function ucs2encode(array) {
14644
- return map4(array, function(value6) {
14567
+ return map5(array, function(value6) {
14645
14568
  var output2 = "";
14646
14569
  if (value6 > 65535) {
14647
14570
  value6 -= 65536;
@@ -14830,6 +14753,62 @@ var PodOS = (() => {
14830
14753
  }
14831
14754
  });
14832
14755
 
14756
+ // ../node_modules/es-errors/index.js
14757
+ var require_es_errors = __commonJS({
14758
+ "../node_modules/es-errors/index.js"(exports, module3) {
14759
+ "use strict";
14760
+ module3.exports = Error;
14761
+ }
14762
+ });
14763
+
14764
+ // ../node_modules/es-errors/eval.js
14765
+ var require_eval = __commonJS({
14766
+ "../node_modules/es-errors/eval.js"(exports, module3) {
14767
+ "use strict";
14768
+ module3.exports = EvalError;
14769
+ }
14770
+ });
14771
+
14772
+ // ../node_modules/es-errors/range.js
14773
+ var require_range = __commonJS({
14774
+ "../node_modules/es-errors/range.js"(exports, module3) {
14775
+ "use strict";
14776
+ module3.exports = RangeError;
14777
+ }
14778
+ });
14779
+
14780
+ // ../node_modules/es-errors/ref.js
14781
+ var require_ref = __commonJS({
14782
+ "../node_modules/es-errors/ref.js"(exports, module3) {
14783
+ "use strict";
14784
+ module3.exports = ReferenceError;
14785
+ }
14786
+ });
14787
+
14788
+ // ../node_modules/es-errors/syntax.js
14789
+ var require_syntax = __commonJS({
14790
+ "../node_modules/es-errors/syntax.js"(exports, module3) {
14791
+ "use strict";
14792
+ module3.exports = SyntaxError;
14793
+ }
14794
+ });
14795
+
14796
+ // ../node_modules/es-errors/type.js
14797
+ var require_type = __commonJS({
14798
+ "../node_modules/es-errors/type.js"(exports, module3) {
14799
+ "use strict";
14800
+ module3.exports = TypeError;
14801
+ }
14802
+ });
14803
+
14804
+ // ../node_modules/es-errors/uri.js
14805
+ var require_uri = __commonJS({
14806
+ "../node_modules/es-errors/uri.js"(exports, module3) {
14807
+ "use strict";
14808
+ module3.exports = URIError;
14809
+ }
14810
+ });
14811
+
14833
14812
  // ../node_modules/has-symbols/shams.js
14834
14813
  var require_shams = __commonJS({
14835
14814
  "../node_modules/has-symbols/shams.js"(exports, module3) {
@@ -14911,11 +14890,12 @@ var PodOS = (() => {
14911
14890
  "../node_modules/has-proto/index.js"(exports, module3) {
14912
14891
  "use strict";
14913
14892
  var test2 = {
14893
+ __proto__: null,
14914
14894
  foo: {}
14915
14895
  };
14916
14896
  var $Object = Object;
14917
14897
  module3.exports = function hasProto() {
14918
- return { __proto__: test2 }.foo === test2.foo && !({ __proto__: null } instanceof $Object);
14898
+ return { __proto__: test2 }.foo === test2.foo && !(test2 instanceof $Object);
14919
14899
  };
14920
14900
  }
14921
14901
  });
@@ -14955,7 +14935,7 @@ var PodOS = (() => {
14955
14935
  }
14956
14936
  return str;
14957
14937
  };
14958
- module3.exports = function bind(that) {
14938
+ module3.exports = function bind2(that) {
14959
14939
  var target5 = this;
14960
14940
  if (typeof target5 !== "function" || toStr.apply(target5) !== funcType) {
14961
14941
  throw new TypeError(ERROR_MESSAGE + target5);
@@ -15011,8 +14991,8 @@ var PodOS = (() => {
15011
14991
  "use strict";
15012
14992
  var call = Function.prototype.call;
15013
14993
  var $hasOwn = Object.prototype.hasOwnProperty;
15014
- var bind = require_function_bind();
15015
- module3.exports = bind.call(call, $hasOwn);
14994
+ var bind2 = require_function_bind();
14995
+ module3.exports = bind2.call(call, $hasOwn);
15016
14996
  }
15017
14997
  });
15018
14998
 
@@ -15021,9 +15001,14 @@ var PodOS = (() => {
15021
15001
  "../node_modules/get-intrinsic/index.js"(exports, module3) {
15022
15002
  "use strict";
15023
15003
  var undefined2;
15024
- var $SyntaxError = SyntaxError;
15004
+ var $Error = require_es_errors();
15005
+ var $EvalError = require_eval();
15006
+ var $RangeError = require_range();
15007
+ var $ReferenceError = require_ref();
15008
+ var $SyntaxError = require_syntax();
15009
+ var $TypeError = require_type();
15010
+ var $URIError = require_uri();
15025
15011
  var $Function = Function;
15026
- var $TypeError = TypeError;
15027
15012
  var getEvalledConstructor = function(expressionSyntax) {
15028
15013
  try {
15029
15014
  return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
@@ -15061,6 +15046,7 @@ var PodOS = (() => {
15061
15046
  var needsEval = {};
15062
15047
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
15063
15048
  var INTRINSICS = {
15049
+ __proto__: null,
15064
15050
  "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
15065
15051
  "%Array%": Array,
15066
15052
  "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
@@ -15081,10 +15067,10 @@ var PodOS = (() => {
15081
15067
  "%decodeURIComponent%": decodeURIComponent,
15082
15068
  "%encodeURI%": encodeURI,
15083
15069
  "%encodeURIComponent%": encodeURIComponent,
15084
- "%Error%": Error,
15070
+ "%Error%": $Error,
15085
15071
  "%eval%": eval,
15086
15072
  // eslint-disable-line no-eval
15087
- "%EvalError%": EvalError,
15073
+ "%EvalError%": $EvalError,
15088
15074
  "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
15089
15075
  "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
15090
15076
  "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
@@ -15106,8 +15092,8 @@ var PodOS = (() => {
15106
15092
  "%parseInt%": parseInt,
15107
15093
  "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
15108
15094
  "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
15109
- "%RangeError%": RangeError,
15110
- "%ReferenceError%": ReferenceError,
15095
+ "%RangeError%": $RangeError,
15096
+ "%ReferenceError%": $ReferenceError,
15111
15097
  "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
15112
15098
  "%RegExp%": RegExp,
15113
15099
  "%Set%": typeof Set === "undefined" ? undefined2 : Set,
@@ -15124,7 +15110,7 @@ var PodOS = (() => {
15124
15110
  "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
15125
15111
  "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
15126
15112
  "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
15127
- "%URIError%": URIError,
15113
+ "%URIError%": $URIError,
15128
15114
  "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
15129
15115
  "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
15130
15116
  "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
@@ -15161,6 +15147,7 @@ var PodOS = (() => {
15161
15147
  return value6;
15162
15148
  };
15163
15149
  var LEGACY_ALIASES = {
15150
+ __proto__: null,
15164
15151
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
15165
15152
  "%ArrayPrototype%": ["Array", "prototype"],
15166
15153
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
@@ -15213,21 +15200,21 @@ var PodOS = (() => {
15213
15200
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
15214
15201
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
15215
15202
  };
15216
- var bind = require_function_bind();
15203
+ var bind2 = require_function_bind();
15217
15204
  var hasOwn = require_hasown();
15218
- var $concat = bind.call(Function.call, Array.prototype.concat);
15219
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
15220
- var $replace = bind.call(Function.call, String.prototype.replace);
15221
- var $strSlice = bind.call(Function.call, String.prototype.slice);
15222
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
15205
+ var $concat = bind2.call(Function.call, Array.prototype.concat);
15206
+ var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
15207
+ var $replace = bind2.call(Function.call, String.prototype.replace);
15208
+ var $strSlice = bind2.call(Function.call, String.prototype.slice);
15209
+ var $exec = bind2.call(Function.call, RegExp.prototype.exec);
15223
15210
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
15224
15211
  var reEscapeChar = /\\(\\)?/g;
15225
15212
  var stringToPath = function stringToPath2(string2) {
15226
15213
  var first3 = $strSlice(string2, 0, 1);
15227
- var last2 = $strSlice(string2, -1);
15228
- if (first3 === "%" && last2 !== "%") {
15214
+ var last3 = $strSlice(string2, -1);
15215
+ if (first3 === "%" && last3 !== "%") {
15229
15216
  throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
15230
- } else if (last2 === "%" && first3 !== "%") {
15217
+ } else if (last3 === "%" && first3 !== "%") {
15231
15218
  throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
15232
15219
  }
15233
15220
  var result5 = [];
@@ -15283,8 +15270,8 @@ var PodOS = (() => {
15283
15270
  for (var i = 1, isOwn = true; i < parts.length; i += 1) {
15284
15271
  var part3 = parts[i];
15285
15272
  var first3 = $strSlice(part3, 0, 1);
15286
- var last2 = $strSlice(part3, -1);
15287
- if ((first3 === '"' || first3 === "'" || first3 === "`" || (last2 === '"' || last2 === "'" || last2 === "`")) && first3 !== last2) {
15273
+ var last3 = $strSlice(part3, -1);
15274
+ if ((first3 === '"' || first3 === "'" || first3 === "`" || (last3 === '"' || last3 === "'" || last3 === "`")) && first3 !== last3) {
15288
15275
  throw new $SyntaxError("property names with quotes must have matching quotes");
15289
15276
  }
15290
15277
  if (part3 === "constructor" || !isOwn) {
@@ -15323,34 +15310,20 @@ var PodOS = (() => {
15323
15310
  }
15324
15311
  });
15325
15312
 
15326
- // ../node_modules/has-property-descriptors/index.js
15327
- var require_has_property_descriptors = __commonJS({
15328
- "../node_modules/has-property-descriptors/index.js"(exports, module3) {
15313
+ // ../node_modules/es-define-property/index.js
15314
+ var require_es_define_property = __commonJS({
15315
+ "../node_modules/es-define-property/index.js"(exports, module3) {
15329
15316
  "use strict";
15330
15317
  var GetIntrinsic = require_get_intrinsic();
15331
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
15332
- var hasPropertyDescriptors = function hasPropertyDescriptors2() {
15333
- if ($defineProperty) {
15334
- try {
15335
- $defineProperty({}, "a", { value: 1 });
15336
- return true;
15337
- } catch (e) {
15338
- return false;
15339
- }
15340
- }
15341
- return false;
15342
- };
15343
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
15344
- if (!hasPropertyDescriptors()) {
15345
- return null;
15346
- }
15318
+ var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
15319
+ if ($defineProperty) {
15347
15320
  try {
15348
- return $defineProperty([], "length", { value: 1 }).length !== 1;
15321
+ $defineProperty({}, "a", { value: 1 });
15349
15322
  } catch (e) {
15350
- return true;
15323
+ $defineProperty = false;
15351
15324
  }
15352
- };
15353
- module3.exports = hasPropertyDescriptors;
15325
+ }
15326
+ module3.exports = $defineProperty;
15354
15327
  }
15355
15328
  });
15356
15329
 
@@ -15375,18 +15348,9 @@ var PodOS = (() => {
15375
15348
  var require_define_data_property = __commonJS({
15376
15349
  "../node_modules/define-data-property/index.js"(exports, module3) {
15377
15350
  "use strict";
15378
- var hasPropertyDescriptors = require_has_property_descriptors()();
15379
- var GetIntrinsic = require_get_intrinsic();
15380
- var $defineProperty = hasPropertyDescriptors && GetIntrinsic("%Object.defineProperty%", true);
15381
- if ($defineProperty) {
15382
- try {
15383
- $defineProperty({}, "a", { value: 1 });
15384
- } catch (e) {
15385
- $defineProperty = false;
15386
- }
15387
- }
15388
- var $SyntaxError = GetIntrinsic("%SyntaxError%");
15389
- var $TypeError = GetIntrinsic("%TypeError%");
15351
+ var $defineProperty = require_es_define_property();
15352
+ var $SyntaxError = require_syntax();
15353
+ var $TypeError = require_type();
15390
15354
  var gopd = require_gopd();
15391
15355
  module3.exports = function defineDataProperty(obj, property3, value6) {
15392
15356
  if (!obj || typeof obj !== "object" && typeof obj !== "function") {
@@ -15428,6 +15392,28 @@ var PodOS = (() => {
15428
15392
  }
15429
15393
  });
15430
15394
 
15395
+ // ../node_modules/has-property-descriptors/index.js
15396
+ var require_has_property_descriptors = __commonJS({
15397
+ "../node_modules/has-property-descriptors/index.js"(exports, module3) {
15398
+ "use strict";
15399
+ var $defineProperty = require_es_define_property();
15400
+ var hasPropertyDescriptors = function hasPropertyDescriptors2() {
15401
+ return !!$defineProperty;
15402
+ };
15403
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
15404
+ if (!$defineProperty) {
15405
+ return null;
15406
+ }
15407
+ try {
15408
+ return $defineProperty([], "length", { value: 1 }).length !== 1;
15409
+ } catch (e) {
15410
+ return true;
15411
+ }
15412
+ };
15413
+ module3.exports = hasPropertyDescriptors;
15414
+ }
15415
+ });
15416
+
15431
15417
  // ../node_modules/set-function-length/index.js
15432
15418
  var require_set_function_length = __commonJS({
15433
15419
  "../node_modules/set-function-length/index.js"(exports, module3) {
@@ -15436,7 +15422,7 @@ var PodOS = (() => {
15436
15422
  var define2 = require_define_data_property();
15437
15423
  var hasDescriptors = require_has_property_descriptors()();
15438
15424
  var gOPD = require_gopd();
15439
- var $TypeError = GetIntrinsic("%TypeError%");
15425
+ var $TypeError = require_type();
15440
15426
  var $floor = GetIntrinsic("%Math.floor%");
15441
15427
  module3.exports = function setFunctionLength(fn2, length2) {
15442
15428
  if (typeof fn2 !== "function") {
@@ -15485,27 +15471,20 @@ var PodOS = (() => {
15485
15471
  var require_call_bind = __commonJS({
15486
15472
  "../node_modules/call-bind/index.js"(exports, module3) {
15487
15473
  "use strict";
15488
- var bind = require_function_bind();
15474
+ var bind2 = require_function_bind();
15489
15475
  var GetIntrinsic = require_get_intrinsic();
15490
15476
  var setFunctionLength = require_set_function_length();
15491
- var $TypeError = GetIntrinsic("%TypeError%");
15477
+ var $TypeError = require_type();
15492
15478
  var $apply = GetIntrinsic("%Function.prototype.apply%");
15493
15479
  var $call = GetIntrinsic("%Function.prototype.call%");
15494
- var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
15495
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
15480
+ var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply);
15481
+ var $defineProperty = require_es_define_property();
15496
15482
  var $max = GetIntrinsic("%Math.max%");
15497
- if ($defineProperty) {
15498
- try {
15499
- $defineProperty({}, "a", { value: 1 });
15500
- } catch (e) {
15501
- $defineProperty = null;
15502
- }
15503
- }
15504
15483
  module3.exports = function callBind(originalFunction) {
15505
15484
  if (typeof originalFunction !== "function") {
15506
15485
  throw new $TypeError("a function is required");
15507
15486
  }
15508
- var func = $reflectApply(bind, $call, arguments);
15487
+ var func = $reflectApply(bind2, $call, arguments);
15509
15488
  return setFunctionLength(
15510
15489
  func,
15511
15490
  1 + $max(0, originalFunction.length - (arguments.length - 1)),
@@ -15513,7 +15492,7 @@ var PodOS = (() => {
15513
15492
  );
15514
15493
  };
15515
15494
  var applyBind = function applyBind2() {
15516
- return $reflectApply(bind, $apply, arguments);
15495
+ return $reflectApply(bind2, $apply, arguments);
15517
15496
  };
15518
15497
  if ($defineProperty) {
15519
15498
  $defineProperty(module3.exports, "apply", { value: applyBind });
@@ -15650,7 +15629,7 @@ var PodOS = (() => {
15650
15629
  depth3 = 0;
15651
15630
  }
15652
15631
  if (depth3 >= maxDepth && maxDepth > 0 && typeof obj === "object") {
15653
- return isArray(obj) ? "[Array]" : "[Object]";
15632
+ return isArray2(obj) ? "[Array]" : "[Object]";
15654
15633
  }
15655
15634
  var indent = getIndent(opts, depth3);
15656
15635
  if (typeof seen === "undefined") {
@@ -15658,10 +15637,10 @@ var PodOS = (() => {
15658
15637
  } else if (indexOf(seen, obj) >= 0) {
15659
15638
  return "[Circular]";
15660
15639
  }
15661
- function inspect(value6, from, noIndent) {
15662
- if (from) {
15640
+ function inspect(value6, from2, noIndent) {
15641
+ if (from2) {
15663
15642
  seen = $arrSlice.call(seen);
15664
- seen.push(from);
15643
+ seen.push(from2);
15665
15644
  }
15666
15645
  if (noIndent) {
15667
15646
  var newOpts = {
@@ -15696,7 +15675,7 @@ var PodOS = (() => {
15696
15675
  s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
15697
15676
  return s;
15698
15677
  }
15699
- if (isArray(obj)) {
15678
+ if (isArray2(obj)) {
15700
15679
  if (obj.length === 0) {
15701
15680
  return "[]";
15702
15681
  }
@@ -15792,7 +15771,7 @@ var PodOS = (() => {
15792
15771
  function quote(s) {
15793
15772
  return $replace.call(String(s), /"/g, "&quot;");
15794
15773
  }
15795
- function isArray(obj) {
15774
+ function isArray2(obj) {
15796
15775
  return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15797
15776
  }
15798
15777
  function isDate(obj) {
@@ -16018,7 +15997,7 @@ var PodOS = (() => {
16018
15997
  return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
16019
15998
  }
16020
15999
  function arrObjKeys(obj, inspect) {
16021
- var isArr = isArray(obj);
16000
+ var isArr = isArray2(obj);
16022
16001
  var xs = [];
16023
16002
  if (isArr) {
16024
16003
  xs.length = obj.length;
@@ -16068,7 +16047,7 @@ var PodOS = (() => {
16068
16047
  var GetIntrinsic = require_get_intrinsic();
16069
16048
  var callBound = require_callBound();
16070
16049
  var inspect = require_object_inspect();
16071
- var $TypeError = GetIntrinsic("%TypeError%");
16050
+ var $TypeError = require_type();
16072
16051
  var $WeakMap = GetIntrinsic("%WeakMap%", true);
16073
16052
  var $Map = GetIntrinsic("%Map%", true);
16074
16053
  var $weakMapGet = callBound("WeakMap.prototype.get", true);
@@ -16078,10 +16057,13 @@ var PodOS = (() => {
16078
16057
  var $mapSet = callBound("Map.prototype.set", true);
16079
16058
  var $mapHas = callBound("Map.prototype.has", true);
16080
16059
  var listGetNode = function(list, key3) {
16081
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
16060
+ var prev = list;
16061
+ var curr;
16062
+ for (; (curr = prev.next) !== null; prev = curr) {
16082
16063
  if (curr.key === key3) {
16083
16064
  prev.next = curr.next;
16084
- curr.next = list.next;
16065
+ curr.next = /** @type {NonNullable<typeof list.next>} */
16066
+ list.next;
16085
16067
  list.next = curr;
16086
16068
  return curr;
16087
16069
  }
@@ -16096,8 +16078,9 @@ var PodOS = (() => {
16096
16078
  if (node2) {
16097
16079
  node2.value = value6;
16098
16080
  } else {
16099
- objects.next = {
16100
- // eslint-disable-line no-param-reassign
16081
+ objects.next = /** @type {import('.').ListNode<typeof value>} */
16082
+ {
16083
+ // eslint-disable-line no-param-reassign, no-extra-parens
16101
16084
  key: key3,
16102
16085
  next: objects.next,
16103
16086
  value: value6
@@ -16204,7 +16187,7 @@ var PodOS = (() => {
16204
16187
  "use strict";
16205
16188
  var formats = require_formats();
16206
16189
  var has = Object.prototype.hasOwnProperty;
16207
- var isArray = Array.isArray;
16190
+ var isArray2 = Array.isArray;
16208
16191
  var hexTable = function() {
16209
16192
  var array = [];
16210
16193
  for (var i = 0; i < 256; ++i) {
@@ -16216,7 +16199,7 @@ var PodOS = (() => {
16216
16199
  while (queue.length > 1) {
16217
16200
  var item4 = queue.pop();
16218
16201
  var obj = item4.obj[item4.prop];
16219
- if (isArray(obj)) {
16202
+ if (isArray2(obj)) {
16220
16203
  var compacted = [];
16221
16204
  for (var j = 0; j < obj.length; ++j) {
16222
16205
  if (typeof obj[j] !== "undefined") {
@@ -16236,12 +16219,12 @@ var PodOS = (() => {
16236
16219
  }
16237
16220
  return obj;
16238
16221
  };
16239
- var merge = function merge2(target5, source8, options) {
16222
+ var merge2 = function merge3(target5, source8, options) {
16240
16223
  if (!source8) {
16241
16224
  return target5;
16242
16225
  }
16243
16226
  if (typeof source8 !== "object") {
16244
- if (isArray(target5)) {
16227
+ if (isArray2(target5)) {
16245
16228
  target5.push(source8);
16246
16229
  } else if (target5 && typeof target5 === "object") {
16247
16230
  if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source8)) {
@@ -16256,15 +16239,15 @@ var PodOS = (() => {
16256
16239
  return [target5].concat(source8);
16257
16240
  }
16258
16241
  var mergeTarget = target5;
16259
- if (isArray(target5) && !isArray(source8)) {
16242
+ if (isArray2(target5) && !isArray2(source8)) {
16260
16243
  mergeTarget = arrayToObject(target5, options);
16261
16244
  }
16262
- if (isArray(target5) && isArray(source8)) {
16245
+ if (isArray2(target5) && isArray2(source8)) {
16263
16246
  source8.forEach(function(item4, i) {
16264
16247
  if (has.call(target5, i)) {
16265
16248
  var targetItem2 = target5[i];
16266
16249
  if (targetItem2 && typeof targetItem2 === "object" && item4 && typeof item4 === "object") {
16267
- target5[i] = merge2(targetItem2, item4, options);
16250
+ target5[i] = merge3(targetItem2, item4, options);
16268
16251
  } else {
16269
16252
  target5.push(item4);
16270
16253
  }
@@ -16277,7 +16260,7 @@ var PodOS = (() => {
16277
16260
  return Object.keys(source8).reduce(function(acc, key3) {
16278
16261
  var value6 = source8[key3];
16279
16262
  if (has.call(acc, key3)) {
16280
- acc[key3] = merge2(acc[key3], value6, options);
16263
+ acc[key3] = merge3(acc[key3], value6, options);
16281
16264
  } else {
16282
16265
  acc[key3] = value6;
16283
16266
  }
@@ -16373,7 +16356,7 @@ var PodOS = (() => {
16373
16356
  return [].concat(a, b);
16374
16357
  };
16375
16358
  var maybeMap = function maybeMap2(val, fn2) {
16376
- if (isArray(val)) {
16359
+ if (isArray2(val)) {
16377
16360
  var mapped = [];
16378
16361
  for (var i = 0; i < val.length; i += 1) {
16379
16362
  mapped.push(fn2(val[i]));
@@ -16392,7 +16375,7 @@ var PodOS = (() => {
16392
16375
  isBuffer,
16393
16376
  isRegExp,
16394
16377
  maybeMap,
16395
- merge
16378
+ merge: merge2
16396
16379
  };
16397
16380
  }
16398
16381
  });
@@ -16417,10 +16400,10 @@ var PodOS = (() => {
16417
16400
  return prefix2;
16418
16401
  }
16419
16402
  };
16420
- var isArray = Array.isArray;
16403
+ var isArray2 = Array.isArray;
16421
16404
  var push = Array.prototype.push;
16422
16405
  var pushToArray = function(arr, valueOrArray) {
16423
- push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
16406
+ push.apply(arr, isArray2(valueOrArray) ? valueOrArray : [valueOrArray]);
16424
16407
  };
16425
16408
  var toISO = Date.prototype.toISOString;
16426
16409
  var defaultFormat = formats["default"];
@@ -16470,7 +16453,7 @@ var PodOS = (() => {
16470
16453
  obj = filter2(prefix2, obj);
16471
16454
  } else if (obj instanceof Date) {
16472
16455
  obj = serializeDate(obj);
16473
- } else if (generateArrayPrefix === "comma" && isArray(obj)) {
16456
+ } else if (generateArrayPrefix === "comma" && isArray2(obj)) {
16474
16457
  obj = utils.maybeMap(obj, function(value7) {
16475
16458
  if (value7 instanceof Date) {
16476
16459
  return serializeDate(value7);
@@ -16496,25 +16479,25 @@ var PodOS = (() => {
16496
16479
  return values;
16497
16480
  }
16498
16481
  var objKeys;
16499
- if (generateArrayPrefix === "comma" && isArray(obj)) {
16482
+ if (generateArrayPrefix === "comma" && isArray2(obj)) {
16500
16483
  if (encodeValuesOnly && encoder2) {
16501
16484
  obj = utils.maybeMap(obj, encoder2);
16502
16485
  }
16503
16486
  objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
16504
- } else if (isArray(filter2)) {
16487
+ } else if (isArray2(filter2)) {
16505
16488
  objKeys = filter2;
16506
16489
  } else {
16507
16490
  var keys = Object.keys(obj);
16508
16491
  objKeys = sort2 ? keys.sort(sort2) : keys;
16509
16492
  }
16510
- var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix2 + "[]" : prefix2;
16493
+ var adjustedPrefix = commaRoundTrip && isArray2(obj) && obj.length === 1 ? prefix2 + "[]" : prefix2;
16511
16494
  for (var j = 0; j < objKeys.length; ++j) {
16512
16495
  var key3 = objKeys[j];
16513
16496
  var value6 = typeof key3 === "object" && typeof key3.value !== "undefined" ? key3.value : obj[key3];
16514
16497
  if (skipNulls && value6 === null) {
16515
16498
  continue;
16516
16499
  }
16517
- var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key3) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key3 : "[" + key3 + "]");
16500
+ var keyPrefix = isArray2(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key3) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key3 : "[" + key3 + "]");
16518
16501
  sideChannel.set(object6, step4);
16519
16502
  var valueSideChannel = getSideChannel();
16520
16503
  valueSideChannel.set(sentinel, sideChannel);
@@ -16525,7 +16508,7 @@ var PodOS = (() => {
16525
16508
  commaRoundTrip,
16526
16509
  strictNullHandling,
16527
16510
  skipNulls,
16528
- generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder2,
16511
+ generateArrayPrefix === "comma" && encodeValuesOnly && isArray2(obj) ? null : encoder2,
16529
16512
  filter2,
16530
16513
  sort2,
16531
16514
  allowDots,
@@ -16559,7 +16542,7 @@ var PodOS = (() => {
16559
16542
  }
16560
16543
  var formatter = formats.formatters[format4];
16561
16544
  var filter2 = defaults.filter;
16562
- if (typeof opts.filter === "function" || isArray(opts.filter)) {
16545
+ if (typeof opts.filter === "function" || isArray2(opts.filter)) {
16563
16546
  filter2 = opts.filter;
16564
16547
  }
16565
16548
  return {
@@ -16588,7 +16571,7 @@ var PodOS = (() => {
16588
16571
  if (typeof options.filter === "function") {
16589
16572
  filter2 = options.filter;
16590
16573
  obj = filter2("", obj);
16591
- } else if (isArray(options.filter)) {
16574
+ } else if (isArray2(options.filter)) {
16592
16575
  filter2 = options.filter;
16593
16576
  objKeys = filter2;
16594
16577
  }
@@ -16660,7 +16643,7 @@ var PodOS = (() => {
16660
16643
  "use strict";
16661
16644
  var utils = require_utils();
16662
16645
  var has = Object.prototype.hasOwnProperty;
16663
- var isArray = Array.isArray;
16646
+ var isArray2 = Array.isArray;
16664
16647
  var defaults = {
16665
16648
  allowDots: false,
16666
16649
  allowPrototypes: false,
@@ -16737,7 +16720,7 @@ var PodOS = (() => {
16737
16720
  val = interpretNumericEntities(val);
16738
16721
  }
16739
16722
  if (part3.indexOf("[]=") > -1) {
16740
- val = isArray(val) ? [val] : val;
16723
+ val = isArray2(val) ? [val] : val;
16741
16724
  }
16742
16725
  if (has.call(obj, key3)) {
16743
16726
  obj[key3] = utils.combine(obj[key3], val);
@@ -17343,14 +17326,14 @@ var PodOS = (() => {
17343
17326
  result5.href = result5.format();
17344
17327
  return result5;
17345
17328
  }
17346
- var last2 = srcPath.slice(-1)[0];
17347
- var hasTrailingSlash = (result5.host || relative2.host || srcPath.length > 1) && (last2 === "." || last2 === "..") || last2 === "";
17329
+ var last3 = srcPath.slice(-1)[0];
17330
+ var hasTrailingSlash = (result5.host || relative2.host || srcPath.length > 1) && (last3 === "." || last3 === "..") || last3 === "";
17348
17331
  var up = 0;
17349
17332
  for (var i = srcPath.length; i >= 0; i--) {
17350
- last2 = srcPath[i];
17351
- if (last2 === ".") {
17333
+ last3 = srcPath[i];
17334
+ if (last3 === ".") {
17352
17335
  srcPath.splice(i, 1);
17353
- } else if (last2 === "..") {
17336
+ } else if (last3 === "..") {
17354
17337
  srcPath.splice(i, 1);
17355
17338
  up++;
17356
17339
  } else if (up) {
@@ -17525,7 +17508,7 @@ var PodOS = (() => {
17525
17508
  function peg$parse(input2, options) {
17526
17509
  options = options !== void 0 ? options : {};
17527
17510
  var peg$FAILED = {}, peg$startRuleFunctions = { turtleDoc: peg$parseturtleDoc }, peg$startRuleFunction = peg$parseturtleDoc, peg$c0 = function(statements) {
17528
- var jsonld = context3.toJSON();
17511
+ var jsonld = context4.toJSON();
17529
17512
  jsonld["@graph"] = [];
17530
17513
  statements.filter((a) => Array.isArray(a)).forEach((a) => {
17531
17514
  a.forEach((b) => {
@@ -17542,10 +17525,10 @@ var PodOS = (() => {
17542
17525
  }, peg$c4 = "#", peg$c5 = peg$literalExpectation("#", false), peg$c6 = /^[^\n]/, peg$c7 = peg$classExpectation(["\n"], true, false), peg$c8 = "\n", peg$c9 = peg$literalExpectation("\n", false), peg$c10 = function(a) {
17543
17526
  return a.join("");
17544
17527
  }, peg$c11 = "@prefix", peg$c12 = peg$literalExpectation("@prefix", false), peg$c13 = function(a, b) {
17545
- context3.addPrefix(a === "" ? "0" : a, b);
17528
+ context4.addPrefix(a === "" ? "0" : a, b);
17546
17529
  return {};
17547
17530
  }, peg$c14 = "@base", peg$c15 = peg$literalExpectation("@base", false), peg$c16 = function(a) {
17548
- context3.addBase(a);
17531
+ context4.addBase(a);
17549
17532
  return {};
17550
17533
  }, 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) {
17551
17534
  var x = {};
@@ -17617,23 +17600,23 @@ var PodOS = (() => {
17617
17600
  return parseInt(a);
17618
17601
  if (b === "http://www.w3.org/2001/XMLSchema#double")
17619
17602
  return parseFloat(a);
17620
- const uri6 = context3.resolve(b, true);
17603
+ const uri6 = context4.resolve(b, true);
17621
17604
  if (uri6) {
17622
17605
  const prefix2 = b.split(":")[0];
17623
17606
  if (uri6 === "http://www.w3.org/2001/XMLSchema#boolean" && a === "true") {
17624
- context3.decrement(prefix2);
17607
+ context4.decrement(prefix2);
17625
17608
  return true;
17626
17609
  }
17627
17610
  if (uri6 === "http://www.w3.org/2001/XMLSchema#boolean" && a === "false") {
17628
- context3.decrement(prefix2);
17611
+ context4.decrement(prefix2);
17629
17612
  return false;
17630
17613
  }
17631
17614
  if (uri6 === "http://www.w3.org/2001/XMLSchema#integer") {
17632
- context3.decrement(prefix2);
17615
+ context4.decrement(prefix2);
17633
17616
  return parseInt(a);
17634
17617
  }
17635
17618
  if (uri6 === "http://www.w3.org/2001/XMLSchema#double") {
17636
- context3.decrement(prefix2);
17619
+ context4.decrement(prefix2);
17637
17620
  return parseFloat(a);
17638
17621
  }
17639
17622
  }
@@ -17659,7 +17642,7 @@ var PodOS = (() => {
17659
17642
  if (decoded.match(/^[^\u0000-\u0020<>"{}|^`\\]*$/)) {
17660
17643
  var join2 = a.join("");
17661
17644
  try {
17662
- return context3.resolve(join2);
17645
+ return context4.resolve(join2);
17663
17646
  } catch (e) {
17664
17647
  error5("Invalid IRIREF " + join2);
17665
17648
  }
@@ -17667,14 +17650,14 @@ var PodOS = (() => {
17667
17650
  error5("Invalid IRIREF " + a.join("") + " / " + decoded);
17668
17651
  }, peg$c80 = ":", peg$c81 = peg$literalExpectation(":", false), peg$c82 = function(a) {
17669
17652
  a = a || "0";
17670
- if (context3.hasPrefix(a) === false)
17653
+ if (context4.hasPrefix(a) === false)
17671
17654
  error5("undefined prefix " + a);
17672
17655
  return a;
17673
17656
  }, peg$c83 = function(a) {
17674
17657
  return a || "";
17675
17658
  }, peg$c84 = function(a, b) {
17676
- context3.increment(a);
17677
- return context3.resolve(a + ":" + b);
17659
+ context4.increment(a);
17660
+ return context4.resolve(a + ":" + b);
17678
17661
  }, peg$c85 = "_:", peg$c86 = peg$literalExpectation("_:", false), peg$c87 = /^[0-9]/, peg$c88 = peg$classExpectation([["0", "9"]], false, false), peg$c89 = "@", peg$c90 = peg$literalExpectation("@", false), peg$c91 = /^[a-zA-Z]/, peg$c92 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false), peg$c93 = "-", peg$c94 = peg$literalExpectation("-", false), peg$c95 = /^[a-zA-Z0-9]/, peg$c96 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false), peg$c97 = function(a, s) {
17679
17662
  return "-" + s.join("");
17680
17663
  }, peg$c98 = function(a, b) {
@@ -21991,22 +21974,22 @@ var PodOS = (() => {
21991
21974
  a[property3] = value6;
21992
21975
  return a;
21993
21976
  }
21994
- var context3 = {
21977
+ var context4 = {
21995
21978
  base: [],
21996
21979
  data: {},
21997
21980
  addBase: function(uri6) {
21998
- if (context3.base.length === 0) {
21999
- context3.base.push(uri6);
21981
+ if (context4.base.length === 0) {
21982
+ context4.base.push(uri6);
22000
21983
  return;
22001
21984
  }
22002
- const last2 = context3.base[context3.base.length - 1];
22003
- if (last2 !== uri6)
22004
- context3.base.push(new URL4(uri6, last2).toString());
21985
+ const last3 = context4.base[context4.base.length - 1];
21986
+ if (last3 !== uri6)
21987
+ context4.base.push(new URL4(uri6, last3).toString());
22005
21988
  },
22006
21989
  addPrefix: function(prefix2, uri6) {
22007
- const list = context3.data[prefix2];
21990
+ const list = context4.data[prefix2];
22008
21991
  if (list === void 0) {
22009
- context3.data[prefix2] = [{ uri: uri6, count: 0 }];
21992
+ context4.data[prefix2] = [{ uri: uri6, count: 0 }];
22010
21993
  } else if (list[list.length - 1].uri !== uri6) {
22011
21994
  list.push({ uri: uri6, count: 0 });
22012
21995
  }
@@ -22015,15 +21998,15 @@ var PodOS = (() => {
22015
21998
  return this.data[prefix2] !== void 0;
22016
21999
  },
22017
22000
  resolve: function(pname, force) {
22018
- const prefix2 = Object.keys(context3.data).find((key3) => pname.indexOf(key3 + ":") === 0);
22001
+ const prefix2 = Object.keys(context4.data).find((key3) => pname.indexOf(key3 + ":") === 0);
22019
22002
  if (prefix2 !== void 0) {
22020
- const list = context3.data[prefix2];
22003
+ const list = context4.data[prefix2];
22021
22004
  if (list.length === 1 && force !== true && isIRI(list[0].uri))
22022
22005
  return pname;
22023
22006
  const uri6 = list[list.length - 1].uri;
22024
22007
  return pname.replace(prefix2 + ":", uri6);
22025
22008
  } else {
22026
- var base2 = context3.base.length === 0 ? options.baseIRI : context3.base[context3.base.length - 1];
22009
+ var base2 = context4.base.length === 0 ? options.baseIRI : context4.base[context4.base.length - 1];
22027
22010
  if (!base2 || pname.match(/^(http:|https:|urn:|file:)/))
22028
22011
  return pname;
22029
22012
  if (pname.indexOf("//") === 0 && base2)
@@ -22032,24 +22015,24 @@ var PodOS = (() => {
22032
22015
  }
22033
22016
  },
22034
22017
  increment: function(prefix2) {
22035
- const list = context3.data[prefix2];
22018
+ const list = context4.data[prefix2];
22036
22019
  if (list !== void 0)
22037
22020
  list[list.length - 1].count++;
22038
22021
  },
22039
22022
  decrement: function(prefix2) {
22040
- const list = context3.data[prefix2];
22023
+ const list = context4.data[prefix2];
22041
22024
  if (list !== void 0)
22042
22025
  list[list.length - 1].count--;
22043
22026
  },
22044
22027
  toJSON: function() {
22045
22028
  const root = {};
22046
- if (context3.base.length > 0) {
22029
+ if (context4.base.length > 0) {
22047
22030
  if (root["@context"] === void 0)
22048
22031
  root["@context"] = {};
22049
- root["@context"]["@base"] = context3.base[0];
22032
+ root["@context"]["@base"] = context4.base[0];
22050
22033
  }
22051
- Object.keys(context3.data).forEach((key3) => {
22052
- const head = context3.data[key3][0];
22034
+ Object.keys(context4.data).forEach((key3) => {
22035
+ const head = context4.data[key3][0];
22053
22036
  if (head.uri === "http://www.w3.org/2001/XMLSchema#" && head.count < 1)
22054
22037
  return;
22055
22038
  if (!isIRI(head.uri))
@@ -23832,17 +23815,17 @@ var PodOS = (() => {
23832
23815
  */
23833
23816
  }, {
23834
23817
  key: "list",
23835
- value: function list(values, context3) {
23836
- if (context3.rdfFactory.supports["COLLECTIONS"]) {
23837
- var collection6 = context3.rdfFactory.collection();
23818
+ value: function list(values, context4) {
23819
+ if (context4.rdfFactory.supports["COLLECTIONS"]) {
23820
+ var collection6 = context4.rdfFactory.collection();
23838
23821
  values.forEach(function(val) {
23839
23822
  collection6.append(val);
23840
23823
  });
23841
23824
  return collection6;
23842
23825
  } else {
23843
- var node2 = context3.rdfFactory.blankNode();
23844
- var statements = arrayToStatements(context3.rdfFactory, node2, values);
23845
- context3.addAll(statements);
23826
+ var node2 = context4.rdfFactory.blankNode();
23827
+ var statements = arrayToStatements(context4.rdfFactory, node2, values);
23828
+ context4.addAll(statements);
23846
23829
  return node2;
23847
23830
  }
23848
23831
  }
@@ -24169,7 +24152,7 @@ var PodOS = (() => {
24169
24152
  }
24170
24153
  return res;
24171
24154
  }
24172
- function bind(x, binding2) {
24155
+ function bind2(x, binding2) {
24173
24156
  var y = binding2[x];
24174
24157
  if (y === void 0) {
24175
24158
  return x;
@@ -24267,7 +24250,7 @@ var PodOS = (() => {
24267
24250
  } else if (t.isVar && !(bindings[t] !== void 0)) {
24268
24251
  item4.nvars++;
24269
24252
  } else {
24270
- t = bind(terms[i], bindings);
24253
+ t = bind2(terms[i], bindings);
24271
24254
  if (f2.redirections[f2.id(t)]) {
24272
24255
  t = f2.redirections[f2.id(t)];
24273
24256
  }
@@ -24971,12 +24954,12 @@ var PodOS = (() => {
24971
24954
  */
24972
24955
  }, {
24973
24956
  key: "checkStatementList",
24974
- value: function checkStatementList(sts, from) {
24975
- if (from === void 0) {
24976
- from = 0;
24957
+ value: function checkStatementList(sts, from2) {
24958
+ if (from2 === void 0) {
24959
+ from2 = 0;
24977
24960
  }
24978
24961
  var names = ["subject", "predicate", "object", "why"];
24979
- var origin4 = " found in " + names[from] + " index.";
24962
+ var origin4 = " found in " + names[from2] + " index.";
24980
24963
  var st3;
24981
24964
  for (var j = 0; j < sts.length; j++) {
24982
24965
  st3 = sts[j];
@@ -26150,7 +26133,7 @@ var PodOS = (() => {
26150
26133
  }
26151
26134
  }, {
26152
26135
  key: "bind",
26153
- value: function bind(qn, uri6) {
26136
+ value: function bind2(qn, uri6) {
26154
26137
  if (qn == "") {
26155
26138
  } else {
26156
26139
  this._store.setPrefixForURI(qn, uri6);
@@ -29222,8 +29205,8 @@ var PodOS = (() => {
29222
29205
  const rel2 = api.parse(iri.substr(root.length));
29223
29206
  const baseSegments = base2.normalizedPath.split("/");
29224
29207
  const iriSegments = rel2.normalizedPath.split("/");
29225
- const last2 = rel2.fragment || rel2.query ? 0 : 1;
29226
- while (baseSegments.length > 0 && iriSegments.length > last2) {
29208
+ const last3 = rel2.fragment || rel2.query ? 0 : 1;
29209
+ while (baseSegments.length > 0 && iriSegments.length > last3) {
29227
29210
  if (baseSegments[0] !== iriSegments[0]) {
29228
29211
  break;
29229
29212
  }
@@ -29651,26 +29634,26 @@ var PodOS = (() => {
29651
29634
  }
29652
29635
  return arr;
29653
29636
  };
29654
- Yallist.prototype.slice = function(from, to2) {
29637
+ Yallist.prototype.slice = function(from2, to2) {
29655
29638
  to2 = to2 || this.length;
29656
29639
  if (to2 < 0) {
29657
29640
  to2 += this.length;
29658
29641
  }
29659
- from = from || 0;
29660
- if (from < 0) {
29661
- from += this.length;
29642
+ from2 = from2 || 0;
29643
+ if (from2 < 0) {
29644
+ from2 += this.length;
29662
29645
  }
29663
29646
  var ret = new Yallist();
29664
- if (to2 < from || to2 < 0) {
29647
+ if (to2 < from2 || to2 < 0) {
29665
29648
  return ret;
29666
29649
  }
29667
- if (from < 0) {
29668
- from = 0;
29650
+ if (from2 < 0) {
29651
+ from2 = 0;
29669
29652
  }
29670
29653
  if (to2 > this.length) {
29671
29654
  to2 = this.length;
29672
29655
  }
29673
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
29656
+ for (var i = 0, walker = this.head; walker !== null && i < from2; i++) {
29674
29657
  walker = walker.next;
29675
29658
  }
29676
29659
  for (; walker !== null && i < to2; i++, walker = walker.next) {
@@ -29678,21 +29661,21 @@ var PodOS = (() => {
29678
29661
  }
29679
29662
  return ret;
29680
29663
  };
29681
- Yallist.prototype.sliceReverse = function(from, to2) {
29664
+ Yallist.prototype.sliceReverse = function(from2, to2) {
29682
29665
  to2 = to2 || this.length;
29683
29666
  if (to2 < 0) {
29684
29667
  to2 += this.length;
29685
29668
  }
29686
- from = from || 0;
29687
- if (from < 0) {
29688
- from += this.length;
29669
+ from2 = from2 || 0;
29670
+ if (from2 < 0) {
29671
+ from2 += this.length;
29689
29672
  }
29690
29673
  var ret = new Yallist();
29691
- if (to2 < from || to2 < 0) {
29674
+ if (to2 < from2 || to2 < 0) {
29692
29675
  return ret;
29693
29676
  }
29694
- if (from < 0) {
29695
- from = 0;
29677
+ if (from2 < 0) {
29678
+ from2 = 0;
29696
29679
  }
29697
29680
  if (to2 > this.length) {
29698
29681
  to2 = this.length;
@@ -29700,7 +29683,7 @@ var PodOS = (() => {
29700
29683
  for (var i = this.length, walker = this.tail; walker !== null && i > to2; i--) {
29701
29684
  walker = walker.prev;
29702
29685
  }
29703
- for (; walker !== null && i > from; i--, walker = walker.prev) {
29686
+ for (; walker !== null && i > from2; i--, walker = walker.prev) {
29704
29687
  ret.push(walker.value);
29705
29688
  }
29706
29689
  return ret;
@@ -30118,17 +30101,17 @@ var PodOS = (() => {
30118
30101
  }
30119
30102
  async resolve({
30120
30103
  activeCtx,
30121
- context: context3,
30104
+ context: context4,
30122
30105
  documentLoader,
30123
30106
  base: base2,
30124
30107
  cycles = /* @__PURE__ */ new Set()
30125
30108
  }) {
30126
- if (context3 && _isObject(context3) && context3["@context"]) {
30127
- context3 = context3["@context"];
30109
+ if (context4 && _isObject(context4) && context4["@context"]) {
30110
+ context4 = context4["@context"];
30128
30111
  }
30129
- context3 = _asArray(context3);
30112
+ context4 = _asArray(context4);
30130
30113
  const allResolved = [];
30131
- for (const ctx of context3) {
30114
+ for (const ctx of context4) {
30132
30115
  if (_isString(ctx)) {
30133
30116
  let resolved2 = this._get(ctx);
30134
30117
  if (!resolved2) {
@@ -30148,7 +30131,7 @@ var PodOS = (() => {
30148
30131
  continue;
30149
30132
  }
30150
30133
  if (!_isObject(ctx)) {
30151
- _throwInvalidLocalContext(context3);
30134
+ _throwInvalidLocalContext(context4);
30152
30135
  }
30153
30136
  const key3 = JSON.stringify(ctx);
30154
30137
  let resolved = this._get(key3);
@@ -30187,13 +30170,13 @@ var PodOS = (() => {
30187
30170
  }
30188
30171
  async _resolveRemoteContext({ activeCtx, url: url7, documentLoader, base: base2, cycles }) {
30189
30172
  url7 = prependBase(base2, url7);
30190
- const { context: context3, remoteDoc } = await this._fetchContext(
30173
+ const { context: context4, remoteDoc } = await this._fetchContext(
30191
30174
  { activeCtx, url: url7, documentLoader, cycles }
30192
30175
  );
30193
30176
  base2 = remoteDoc.documentUrl || url7;
30194
- _resolveContextUrls({ context: context3, base: base2 });
30177
+ _resolveContextUrls({ context: context4, base: base2 });
30195
30178
  const resolved = await this.resolve(
30196
- { activeCtx, context: context3, documentLoader, base: base2, cycles }
30179
+ { activeCtx, context: context4, documentLoader, base: base2, cycles }
30197
30180
  );
30198
30181
  this._cacheResolvedContext({ key: url7, resolved, tag: remoteDoc.tag });
30199
30182
  return resolved;
@@ -30220,13 +30203,13 @@ var PodOS = (() => {
30220
30203
  );
30221
30204
  }
30222
30205
  cycles.add(url7);
30223
- let context3;
30206
+ let context4;
30224
30207
  let remoteDoc;
30225
30208
  try {
30226
30209
  remoteDoc = await documentLoader(url7);
30227
- context3 = remoteDoc.document || null;
30228
- if (_isString(context3)) {
30229
- context3 = JSON.parse(context3);
30210
+ context4 = remoteDoc.document || null;
30211
+ if (_isString(context4)) {
30212
+ context4 = JSON.parse(context4);
30230
30213
  }
30231
30214
  } catch (e) {
30232
30215
  throw new JsonLdError(
@@ -30235,25 +30218,25 @@ var PodOS = (() => {
30235
30218
  { code: "loading remote context failed", url: url7, cause: e }
30236
30219
  );
30237
30220
  }
30238
- if (!_isObject(context3)) {
30221
+ if (!_isObject(context4)) {
30239
30222
  throw new JsonLdError(
30240
30223
  "Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.",
30241
30224
  "jsonld.InvalidUrl",
30242
30225
  { code: "invalid remote context", url: url7 }
30243
30226
  );
30244
30227
  }
30245
- if (!("@context" in context3)) {
30246
- context3 = { "@context": {} };
30228
+ if (!("@context" in context4)) {
30229
+ context4 = { "@context": {} };
30247
30230
  } else {
30248
- context3 = { "@context": context3["@context"] };
30231
+ context4 = { "@context": context4["@context"] };
30249
30232
  }
30250
30233
  if (remoteDoc.contextUrl) {
30251
- if (!_isArray(context3["@context"])) {
30252
- context3["@context"] = [context3["@context"]];
30234
+ if (!_isArray(context4["@context"])) {
30235
+ context4["@context"] = [context4["@context"]];
30253
30236
  }
30254
- context3["@context"].push(remoteDoc.contextUrl);
30237
+ context4["@context"].push(remoteDoc.contextUrl);
30255
30238
  }
30256
- return { context: context3, remoteDoc };
30239
+ return { context: context4, remoteDoc };
30257
30240
  }
30258
30241
  };
30259
30242
  function _throwInvalidLocalContext(ctx) {
@@ -30266,13 +30249,13 @@ var PodOS = (() => {
30266
30249
  }
30267
30250
  );
30268
30251
  }
30269
- function _resolveContextUrls({ context: context3, base: base2 }) {
30270
- if (!context3) {
30252
+ function _resolveContextUrls({ context: context4, base: base2 }) {
30253
+ if (!context4) {
30271
30254
  return;
30272
30255
  }
30273
- const ctx = context3["@context"];
30256
+ const ctx = context4["@context"];
30274
30257
  if (_isString(ctx)) {
30275
- context3["@context"] = prependBase(base2, ctx);
30258
+ context4["@context"] = prependBase(base2, ctx);
30276
30259
  return;
30277
30260
  }
30278
30261
  if (_isArray(ctx)) {
@@ -30743,16 +30726,16 @@ var PodOS = (() => {
30743
30726
  });
30744
30727
  if (_isObject(ctx[key3]) && "@context" in ctx[key3]) {
30745
30728
  const keyCtx = ctx[key3]["@context"];
30746
- let process3 = true;
30729
+ let process4 = true;
30747
30730
  if (_isString(keyCtx)) {
30748
30731
  const url7 = prependBase(options.base, keyCtx);
30749
30732
  if (cycles.has(url7)) {
30750
- process3 = false;
30733
+ process4 = false;
30751
30734
  } else {
30752
30735
  cycles.add(url7);
30753
30736
  }
30754
30737
  }
30755
- if (process3) {
30738
+ if (process4) {
30756
30739
  try {
30757
30740
  await api.process({
30758
30741
  activeCtx: rval.clone(),
@@ -33396,8 +33379,8 @@ var PodOS = (() => {
33396
33379
  const first3 = { termType: "NamedNode", value: RDF_FIRST };
33397
33380
  const rest3 = { termType: "NamedNode", value: RDF_REST };
33398
33381
  const nil = { termType: "NamedNode", value: RDF_NIL };
33399
- const last2 = list.pop();
33400
- const result5 = last2 ? { termType: "BlankNode", value: issuer2.getId() } : nil;
33382
+ const last3 = list.pop();
33383
+ const result5 = last3 ? { termType: "BlankNode", value: issuer2.getId() } : nil;
33401
33384
  let subject5 = result5;
33402
33385
  for (const item4 of list) {
33403
33386
  const object6 = _objectToRDF(
@@ -33423,9 +33406,9 @@ var PodOS = (() => {
33423
33406
  });
33424
33407
  subject5 = next3;
33425
33408
  }
33426
- if (last2) {
33409
+ if (last3) {
33427
33410
  const object6 = _objectToRDF(
33428
- last2,
33411
+ last3,
33429
33412
  issuer2,
33430
33413
  dataset3,
33431
33414
  graphTerm,
@@ -34292,8 +34275,8 @@ var PodOS = (() => {
34292
34275
  "@container"
34293
34276
  ) || [];
34294
34277
  const typeAsSet = container2.includes("@set") && _processingMode2(activeCtx, 1.1);
34295
- const isArray = typeAsSet || _isArray(compactedValue) && expandedValue.length === 0;
34296
- _addValue(rval, alias2, compactedValue, { propertyIsArray: isArray });
34278
+ const isArray2 = typeAsSet || _isArray(compactedValue) && expandedValue.length === 0;
34279
+ _addValue(rval, alias2, compactedValue, { propertyIsArray: isArray2 });
34297
34280
  continue;
34298
34281
  }
34299
34282
  if (expandedProperty === "@reverse") {
@@ -34627,12 +34610,12 @@ var PodOS = (() => {
34627
34610
  }
34628
34611
  );
34629
34612
  } else {
34630
- const isArray = !options.compactArrays || container2.includes("@set") || container2.includes("@list") || _isArray(compactedItem) && compactedItem.length === 0 || expandedProperty === "@list" || expandedProperty === "@graph";
34613
+ const isArray2 = !options.compactArrays || container2.includes("@set") || container2.includes("@list") || _isArray(compactedItem) && compactedItem.length === 0 || expandedProperty === "@list" || expandedProperty === "@graph";
34631
34614
  _addValue(
34632
34615
  nestResult,
34633
34616
  itemActiveProperty,
34634
34617
  compactedItem,
34635
- { propertyIsArray: isArray }
34618
+ { propertyIsArray: isArray2 }
34636
34619
  );
34637
34620
  }
34638
34621
  }
@@ -36418,7 +36401,7 @@ var PodOS = (() => {
36418
36401
  });
36419
36402
 
36420
36403
  // ../node_modules/n3/src/N3Parser.js
36421
- function noop() {
36404
+ function noop2() {
36422
36405
  }
36423
36406
  function initDataFactory(parser, factory) {
36424
36407
  const namedNode4 = factory.namedNode;
@@ -36512,17 +36495,17 @@ var PodOS = (() => {
36512
36495
  // ### `_restoreContext` restores the parent context
36513
36496
  // when leaving a scope (list, blank node, formula)
36514
36497
  _restoreContext(type5, token) {
36515
- const context3 = this._contextStack.pop();
36516
- if (!context3 || context3.type !== type5)
36498
+ const context4 = this._contextStack.pop();
36499
+ if (!context4 || context4.type !== type5)
36517
36500
  return this._error(`Unexpected ${token.type}`, token);
36518
- this._subject = context3.subject;
36519
- this._predicate = context3.predicate;
36520
- this._object = context3.object;
36521
- this._graph = context3.graph;
36501
+ this._subject = context4.subject;
36502
+ this._predicate = context4.predicate;
36503
+ this._object = context4.object;
36504
+ this._graph = context4.graph;
36522
36505
  if (this._n3Mode) {
36523
- this._inversePredicate = context3.inverse;
36524
- this._prefixes._ = context3.blankPrefix;
36525
- this._quantified = context3.quantified;
36506
+ this._inversePredicate = context4.inverse;
36507
+ this._prefixes._ = context4.blankPrefix;
36508
+ this._quantified = context4.quantified;
36526
36509
  }
36527
36510
  }
36528
36511
  // ### `_readInTopContext` reads a token when in the top context
@@ -37203,7 +37186,7 @@ var PodOS = (() => {
37203
37186
  previousToken: this._lexer.previousToken
37204
37187
  };
37205
37188
  this._callback(err);
37206
- this._callback = noop;
37189
+ this._callback = noop2;
37207
37190
  }
37208
37191
  // ### `_resolveIRI` resolves an IRI against the base path
37209
37192
  _resolveIRI(iri) {
@@ -37280,7 +37263,7 @@ var PodOS = (() => {
37280
37263
  this._sparqlStyle = false;
37281
37264
  this._prefixes = /* @__PURE__ */ Object.create(null);
37282
37265
  this._prefixes._ = this._blankNodePrefix ? this._blankNodePrefix.substr(2) : `b${blankNodePrefix++}_`;
37283
- this._prefixCallback = prefixCallback || noop;
37266
+ this._prefixCallback = prefixCallback || noop2;
37284
37267
  this._inversePredicate = false;
37285
37268
  this._quantified = /* @__PURE__ */ Object.create(null);
37286
37269
  if (!quadCallback) {
@@ -37299,7 +37282,7 @@ var PodOS = (() => {
37299
37282
  this._callback = quadCallback;
37300
37283
  this._lexer.tokenize(input2, (error5, token) => {
37301
37284
  if (error5 !== null)
37302
- this._callback(error5), this._callback = noop;
37285
+ this._callback(error5), this._callback = noop2;
37303
37286
  else if (this._readCallback)
37304
37287
  this._readCallback = this._readCallback(token);
37305
37288
  });
@@ -37565,7 +37548,7 @@ var PodOS = (() => {
37565
37548
  }
37566
37549
  }, {
37567
37550
  key: "process",
37568
- value: function process3(node2, options) {
37551
+ value: function process4(node2, options) {
37569
37552
  options = options || {};
37570
37553
  var base2;
37571
37554
  if (node2.nodeType === Node3.DOCUMENT_NODE) {
@@ -37633,18 +37616,18 @@ var PodOS = (() => {
37633
37616
  continue;
37634
37617
  }
37635
37618
  var current2 = item4.current;
37636
- var context3 = item4.context;
37619
+ var context4 = item4.context;
37637
37620
  var skip = false;
37638
37621
  var newSubject = null;
37639
37622
  var currentObjectResource = null;
37640
37623
  var typedResource = null;
37641
- var prefixes = context3.prefixes;
37624
+ var prefixes = context4.prefixes;
37642
37625
  var prefixesCopied = false;
37643
37626
  var incomplete2 = [];
37644
- var listMapping = context3.listMapping;
37645
- var listMappingDifferent = !context3.parent;
37646
- var language8 = context3.language;
37647
- var vocabulary = context3.vocabulary;
37627
+ var listMapping = context4.listMapping;
37628
+ var listMappingDifferent = !context4.parent;
37629
+ var language8 = context4.language;
37630
+ var vocabulary = context4.vocabulary;
37648
37631
  base2 = this.parseURI(removeHash(current2.baseURI));
37649
37632
  current2.item = null;
37650
37633
  var vocabAtt = current2.getAttributeNode("vocab");
@@ -37710,7 +37693,7 @@ var PodOS = (() => {
37710
37693
  if (relAtt) {
37711
37694
  values = this.tokenize(relAtt.value);
37712
37695
  for (var _i4 = 0; _i4 < values.length; _i4++) {
37713
- predicate2 = this.parsePredicate(values[_i4], vocabulary, context3.terms, prefixes, base2, this.inHTMLMode && propertyAtt !== null);
37696
+ predicate2 = this.parsePredicate(values[_i4], vocabulary, context4.terms, prefixes, base2, this.inHTMLMode && propertyAtt !== null);
37714
37697
  if (predicate2) {
37715
37698
  relAttPredicates.push(predicate2);
37716
37699
  }
@@ -37720,7 +37703,7 @@ var PodOS = (() => {
37720
37703
  if (revAtt) {
37721
37704
  values = this.tokenize(revAtt.value);
37722
37705
  for (var _i5 = 0; _i5 < values.length; _i5++) {
37723
- predicate2 = this.parsePredicate(values[_i5], vocabulary, context3.terms, prefixes, base2, this.inHTMLMode && propertyAtt);
37706
+ predicate2 = this.parsePredicate(values[_i5], vocabulary, context4.terms, prefixes, base2, this.inHTMLMode && propertyAtt);
37724
37707
  if (predicate2) {
37725
37708
  revAttPredicates.push(predicate2);
37726
37709
  }
@@ -37744,8 +37727,8 @@ var PodOS = (() => {
37744
37727
  if (!newSubject) {
37745
37728
  if (current2.parentNode.nodeType === Node3.DOCUMENT_NODE) {
37746
37729
  newSubject = removeHash(current2.baseURI);
37747
- } else if (context3.parentObject) {
37748
- newSubject = removeHash(current2.parentNode.baseURI) === context3.parentObject ? removeHash(current2.baseURI) : context3.parentObject;
37730
+ } else if (context4.parentObject) {
37731
+ newSubject = removeHash(current2.parentNode.baseURI) === context4.parentObject ? removeHash(current2.baseURI) : context4.parentObject;
37749
37732
  }
37750
37733
  }
37751
37734
  if (resourceAtt) {
@@ -37777,8 +37760,8 @@ var PodOS = (() => {
37777
37760
  if (typeofAtt) {
37778
37761
  typedResource = newSubject;
37779
37762
  }
37780
- } else if (!newSubject && context3.parentObject) {
37781
- newSubject = removeHash(current2.parentNode.baseURI) === context3.parentObject ? removeHash(current2.baseURI) : context3.parentObject;
37763
+ } else if (!newSubject && context4.parentObject) {
37764
+ newSubject = removeHash(current2.parentNode.baseURI) === context4.parentObject ? removeHash(current2.baseURI) : context4.parentObject;
37782
37765
  }
37783
37766
  if (typeofAtt && !typedResource) {
37784
37767
  if (resourceAtt) {
@@ -37815,11 +37798,11 @@ var PodOS = (() => {
37815
37798
  if (current2.parentNode.nodeType === Node3.DOCUMENT_NODE) {
37816
37799
  newSubject = removeHash(current2.baseURI);
37817
37800
  } else if ((this.inXHTMLMode || this.inHTMLMode) && (current2.localName === "head" || current2.localName === "body")) {
37818
- newSubject = removeHash(current2.parentNode.baseURI) === context3.parentObject ? removeHash(current2.baseURI) : context3.parentObject;
37801
+ newSubject = removeHash(current2.parentNode.baseURI) === context4.parentObject ? removeHash(current2.baseURI) : context4.parentObject;
37819
37802
  } else if (typeofAtt) {
37820
37803
  newSubject = this.newBlankNode();
37821
- } else if (context3.parentObject) {
37822
- newSubject = removeHash(current2.parentNode.baseURI) === context3.parentObject ? removeHash(current2.baseURI) : context3.parentObject;
37804
+ } else if (context4.parentObject) {
37805
+ newSubject = removeHash(current2.parentNode.baseURI) === context4.parentObject ? removeHash(current2.baseURI) : context4.parentObject;
37823
37806
  if (!propertyAtt) {
37824
37807
  skip = true;
37825
37808
  }
@@ -37841,7 +37824,7 @@ var PodOS = (() => {
37841
37824
  if (typedResource) {
37842
37825
  values = this.tokenize(typeofAtt.value);
37843
37826
  for (var _i6 = 0; _i6 < values.length; _i6++) {
37844
- var object6 = this.parseTermOrCURIEOrAbsURI(values[_i6], vocabulary, context3.terms, prefixes, base2);
37827
+ var object6 = this.parseTermOrCURIEOrAbsURI(values[_i6], vocabulary, context4.terms, prefixes, base2);
37845
37828
  if (object6) {
37846
37829
  this.addTriple(current2, typedResource, RDFaProcessor2.typeURI, {
37847
37830
  type: RDFaProcessor2.objectURI,
@@ -37850,7 +37833,7 @@ var PodOS = (() => {
37850
37833
  }
37851
37834
  }
37852
37835
  }
37853
- if (newSubject && newSubject !== context3.parentObject) {
37836
+ if (newSubject && newSubject !== context4.parentObject) {
37854
37837
  listMapping = {};
37855
37838
  listMappingDifferent = true;
37856
37839
  }
@@ -37920,7 +37903,7 @@ var PodOS = (() => {
37920
37903
  var datatype = null;
37921
37904
  var content5 = null;
37922
37905
  if (datatypeAtt) {
37923
- datatype = datatypeAtt.value === "" ? RDFaProcessor2.PlainLiteralURI : this.parseTermOrCURIEOrAbsURI(datatypeAtt.value, vocabulary, context3.terms, prefixes, base2);
37906
+ datatype = datatypeAtt.value === "" ? RDFaProcessor2.PlainLiteralURI : this.parseTermOrCURIEOrAbsURI(datatypeAtt.value, vocabulary, context4.terms, prefixes, base2);
37924
37907
  if (datetimeAtt && !contentAtt) {
37925
37908
  content5 = datetimeAtt.value;
37926
37909
  } else {
@@ -37964,7 +37947,7 @@ var PodOS = (() => {
37964
37947
  }
37965
37948
  values = this.tokenize(propertyAtt.value);
37966
37949
  for (var _i13 = 0; _i13 < values.length; _i13++) {
37967
- var _predicate2 = this.parsePredicate(values[_i13], vocabulary, context3.terms, prefixes, base2);
37950
+ var _predicate2 = this.parsePredicate(values[_i13], vocabulary, context4.terms, prefixes, base2);
37968
37951
  if (_predicate2) {
37969
37952
  if (inlistAtt) {
37970
37953
  var _list3 = listMapping[_predicate2];
@@ -37998,21 +37981,21 @@ var PodOS = (() => {
37998
37981
  }
37999
37982
  }
38000
37983
  if (newSubject && !skip) {
38001
- for (var _i14 = 0; _i14 < context3.incomplete.length; _i14++) {
38002
- if (context3.incomplete[_i14].list) {
38003
- context3.incomplete[_i14].list.push({
37984
+ for (var _i14 = 0; _i14 < context4.incomplete.length; _i14++) {
37985
+ if (context4.incomplete[_i14].list) {
37986
+ context4.incomplete[_i14].list.push({
38004
37987
  type: RDFaProcessor2.objectURI,
38005
37988
  value: newSubject
38006
37989
  });
38007
- } else if (context3.incomplete[_i14].forward) {
38008
- this.addTriple(current2, context3.subject, context3.incomplete[_i14].predicate, {
37990
+ } else if (context4.incomplete[_i14].forward) {
37991
+ this.addTriple(current2, context4.subject, context4.incomplete[_i14].predicate, {
38009
37992
  type: RDFaProcessor2.objectURI,
38010
37993
  value: newSubject
38011
37994
  });
38012
37995
  } else {
38013
- this.addTriple(current2, newSubject, context3.incomplete[_i14].predicate, {
37996
+ this.addTriple(current2, newSubject, context4.incomplete[_i14].predicate, {
38014
37997
  type: RDFaProcessor2.objectURI,
38015
- value: context3.subject
37998
+ value: context4.subject
38016
37999
  });
38017
38000
  }
38018
38001
  }
@@ -38020,15 +38003,15 @@ var PodOS = (() => {
38020
38003
  var childContext = null;
38021
38004
  var listSubject = newSubject;
38022
38005
  if (skip) {
38023
- childContext = this.push(context3, context3.subject);
38024
- childContext.parentObject = removeHash(current2.parentNode.baseURI) === context3.parentObject ? removeHash(current2.baseURI) : context3.parentObject;
38025
- childContext.incomplete = context3.incomplete;
38006
+ childContext = this.push(context4, context4.subject);
38007
+ childContext.parentObject = removeHash(current2.parentNode.baseURI) === context4.parentObject ? removeHash(current2.baseURI) : context4.parentObject;
38008
+ childContext.incomplete = context4.incomplete;
38026
38009
  childContext.language = language8;
38027
38010
  childContext.prefixes = prefixes;
38028
38011
  childContext.vocabulary = vocabulary;
38029
38012
  } else {
38030
- childContext = this.push(context3, newSubject);
38031
- childContext.parentObject = currentObjectResource || newSubject || context3.subject;
38013
+ childContext = this.push(context4, newSubject);
38014
+ childContext.parentObject = currentObjectResource || newSubject || context4.subject;
38032
38015
  childContext.prefixes = prefixes;
38033
38016
  childContext.incomplete = incomplete2;
38034
38017
  if (currentObjectResource) {
@@ -38043,7 +38026,7 @@ var PodOS = (() => {
38043
38026
  if (listMappingDifferent) {
38044
38027
  queue.unshift({
38045
38028
  parent: current2,
38046
- context: context3,
38029
+ context: context4,
38047
38030
  subject: listSubject,
38048
38031
  listMapping
38049
38032
  });
@@ -38948,18 +38931,18 @@ var PodOS = (() => {
38948
38931
  return value6;
38949
38932
  }
38950
38933
  function iteratorFor(items2) {
38951
- var iterator = {
38934
+ var iterator2 = {
38952
38935
  next: function() {
38953
38936
  var value6 = items2.shift();
38954
38937
  return { done: value6 === void 0, value: value6 };
38955
38938
  }
38956
38939
  };
38957
38940
  if (support2.iterable) {
38958
- iterator[Symbol.iterator] = function() {
38959
- return iterator;
38941
+ iterator2[Symbol.iterator] = function() {
38942
+ return iterator2;
38960
38943
  };
38961
38944
  }
38962
- return iterator;
38945
+ return iterator2;
38963
38946
  }
38964
38947
  function Headers3(headers) {
38965
38948
  this.map = {};
@@ -41578,17 +41561,17 @@ var PodOS = (() => {
41578
41561
  }, {
41579
41562
  key: "bnodeContext",
41580
41563
  value: function bnodeContext(bnodes, doc) {
41581
- var context3 = [];
41564
+ var context4 = [];
41582
41565
  if (bnodes.length) {
41583
41566
  this.cacheIfps();
41584
41567
  for (var i = 0; i < bnodes.length; i++) {
41585
41568
  var bnode = bnodes[i];
41586
41569
  if (!this.mentioned(bnode))
41587
41570
  continue;
41588
- context3 = context3.concat(this.bnodeContext1(bnode, doc));
41571
+ context4 = context4.concat(this.bnodeContext1(bnode, doc));
41589
41572
  }
41590
41573
  }
41591
- return context3;
41574
+ return context4;
41592
41575
  }
41593
41576
  /**
41594
41577
  * Returns the best context for a single statement
@@ -41605,9 +41588,9 @@ var PodOS = (() => {
41605
41588
  */
41606
41589
  }, {
41607
41590
  key: "contextWhere",
41608
- value: function contextWhere(context3) {
41591
+ value: function contextWhere(context4) {
41609
41592
  var updater = this;
41610
- return !context3 || context3.length === 0 ? "" : "WHERE { " + context3.map(function(x) {
41593
+ return !context4 || context4.length === 0 ? "" : "WHERE { " + context4.map(function(x) {
41611
41594
  return updater.anonymizeNT(x);
41612
41595
  }).join("\n") + " }\n";
41613
41596
  }
@@ -41651,11 +41634,11 @@ var PodOS = (() => {
41651
41634
  return;
41652
41635
  }
41653
41636
  var updater = this;
41654
- var context3 = this.statementContext(statement2);
41637
+ var context4 = this.statementContext(statement2);
41655
41638
  return {
41656
41639
  statement: statement2 ? [statement2.subject, statement2.predicate, statement2.object, statement2.graph] : void 0,
41657
41640
  statementNT: statement2 ? this.anonymizeNT(statement2) : void 0,
41658
- where: updater.contextWhere(context3),
41641
+ where: updater.contextWhere(context4),
41659
41642
  set_object: function set_object(obj, callbackFunction) {
41660
41643
  var query4 = this.where;
41661
41644
  query4 += "DELETE DATA { " + this.statementNT + " } ;\n";
@@ -42076,8 +42059,8 @@ var PodOS = (() => {
42076
42059
  bnodes = this.statementArrayBnodes(ds);
42077
42060
  if (is.length)
42078
42061
  bnodes = bnodes.concat(this.statementArrayBnodes(is));
42079
- var context3 = this.bnodeContext(bnodes, doc);
42080
- var query4 = isSparql ? this.constructSparqlUpdateQuery(ds, is, context3) : this.constructN3PatchQuery(ds, is, context3);
42062
+ var context4 = this.bnodeContext(bnodes, doc);
42063
+ var query4 = isSparql ? this.constructSparqlUpdateQuery(ds, is, context4) : this.constructN3PatchQuery(ds, is, context4);
42081
42064
  options.contentType = isSparql ? "application/sparql-update" : "text/n3";
42082
42065
  control2.pendingUpstream = control2.pendingUpstream ? control2.pendingUpstream + 1 : 1;
42083
42066
  if ("upstreamCount" in control2) {
@@ -42435,23 +42418,372 @@ var PodOS = (() => {
42435
42418
  });
42436
42419
 
42437
42420
  // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/namespaces.js
42438
- var rdf3, vcard, dc;
42421
+ var rdf3, vcard, solid, pim, dc;
42439
42422
  var init_namespaces = __esm({
42440
42423
  "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/namespaces.js"() {
42441
42424
  init_esm();
42442
42425
  rdf3 = Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
42443
42426
  vcard = Namespace("http://www.w3.org/2006/vcard/ns#");
42427
+ solid = Namespace("http://www.w3.org/ns/solid/terms#");
42428
+ pim = Namespace("http://www.w3.org/ns/pim/space#");
42444
42429
  dc = Namespace("http://purl.org/dc/elements/1.1/");
42445
42430
  }
42446
42431
  });
42447
42432
 
42433
+ // ../node_modules/short-unique-id/dist/short-unique-id.js
42434
+ var require_short_unique_id = __commonJS({
42435
+ "../node_modules/short-unique-id/dist/short-unique-id.js"(exports, module3) {
42436
+ "use strict";
42437
+ var ShortUniqueId2 = (() => {
42438
+ var __defProp2 = Object.defineProperty;
42439
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
42440
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
42441
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
42442
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
42443
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
42444
+ var __defNormalProp = (obj, key3, value6) => key3 in obj ? __defProp2(obj, key3, { enumerable: true, configurable: true, writable: true, value: value6 }) : obj[key3] = value6;
42445
+ var __spreadValues = (a, b) => {
42446
+ for (var prop in b || (b = {}))
42447
+ if (__hasOwnProp2.call(b, prop))
42448
+ __defNormalProp(a, prop, b[prop]);
42449
+ if (__getOwnPropSymbols)
42450
+ for (var prop of __getOwnPropSymbols(b)) {
42451
+ if (__propIsEnum.call(b, prop))
42452
+ __defNormalProp(a, prop, b[prop]);
42453
+ }
42454
+ return a;
42455
+ };
42456
+ var __export2 = (target5, all) => {
42457
+ for (var name7 in all)
42458
+ __defProp2(target5, name7, { get: all[name7], enumerable: true });
42459
+ };
42460
+ var __copyProps2 = (to2, from2, except, desc) => {
42461
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
42462
+ for (let key3 of __getOwnPropNames2(from2))
42463
+ if (!__hasOwnProp2.call(to2, key3) && key3 !== except)
42464
+ __defProp2(to2, key3, { get: () => from2[key3], enumerable: !(desc = __getOwnPropDesc2(from2, key3)) || desc.enumerable });
42465
+ }
42466
+ return to2;
42467
+ };
42468
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
42469
+ var __publicField = (obj, key3, value6) => {
42470
+ __defNormalProp(obj, typeof key3 !== "symbol" ? key3 + "" : key3, value6);
42471
+ return value6;
42472
+ };
42473
+ var src_exports2 = {};
42474
+ __export2(src_exports2, {
42475
+ DEFAULT_OPTIONS: () => DEFAULT_OPTIONS,
42476
+ DEFAULT_UUID_LENGTH: () => DEFAULT_UUID_LENGTH,
42477
+ default: () => ShortUniqueId3
42478
+ });
42479
+ var version6 = "5.0.3";
42480
+ var DEFAULT_UUID_LENGTH = 6;
42481
+ var DEFAULT_OPTIONS = {
42482
+ dictionary: "alphanum",
42483
+ shuffle: true,
42484
+ debug: false,
42485
+ length: DEFAULT_UUID_LENGTH,
42486
+ counter: 0
42487
+ };
42488
+ var _ShortUniqueId = class _ShortUniqueId {
42489
+ constructor(argOptions = {}) {
42490
+ __publicField(this, "counter");
42491
+ __publicField(this, "debug");
42492
+ __publicField(this, "dict");
42493
+ __publicField(this, "version");
42494
+ __publicField(this, "dictIndex", 0);
42495
+ __publicField(this, "dictRange", []);
42496
+ __publicField(this, "lowerBound", 0);
42497
+ __publicField(this, "upperBound", 0);
42498
+ __publicField(this, "dictLength", 0);
42499
+ __publicField(this, "uuidLength");
42500
+ __publicField(this, "_digit_first_ascii", 48);
42501
+ __publicField(this, "_digit_last_ascii", 58);
42502
+ __publicField(this, "_alpha_lower_first_ascii", 97);
42503
+ __publicField(this, "_alpha_lower_last_ascii", 123);
42504
+ __publicField(this, "_hex_last_ascii", 103);
42505
+ __publicField(this, "_alpha_upper_first_ascii", 65);
42506
+ __publicField(this, "_alpha_upper_last_ascii", 91);
42507
+ __publicField(this, "_number_dict_ranges", {
42508
+ digits: [this._digit_first_ascii, this._digit_last_ascii]
42509
+ });
42510
+ __publicField(this, "_alpha_dict_ranges", {
42511
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
42512
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
42513
+ });
42514
+ __publicField(this, "_alpha_lower_dict_ranges", {
42515
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
42516
+ });
42517
+ __publicField(this, "_alpha_upper_dict_ranges", {
42518
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
42519
+ });
42520
+ __publicField(this, "_alphanum_dict_ranges", {
42521
+ digits: [this._digit_first_ascii, this._digit_last_ascii],
42522
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
42523
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
42524
+ });
42525
+ __publicField(this, "_alphanum_lower_dict_ranges", {
42526
+ digits: [this._digit_first_ascii, this._digit_last_ascii],
42527
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
42528
+ });
42529
+ __publicField(this, "_alphanum_upper_dict_ranges", {
42530
+ digits: [this._digit_first_ascii, this._digit_last_ascii],
42531
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
42532
+ });
42533
+ __publicField(this, "_hex_dict_ranges", {
42534
+ decDigits: [this._digit_first_ascii, this._digit_last_ascii],
42535
+ alphaDigits: [this._alpha_lower_first_ascii, this._hex_last_ascii]
42536
+ });
42537
+ __publicField(this, "_dict_ranges", {
42538
+ _number_dict_ranges: this._number_dict_ranges,
42539
+ _alpha_dict_ranges: this._alpha_dict_ranges,
42540
+ _alpha_lower_dict_ranges: this._alpha_lower_dict_ranges,
42541
+ _alpha_upper_dict_ranges: this._alpha_upper_dict_ranges,
42542
+ _alphanum_dict_ranges: this._alphanum_dict_ranges,
42543
+ _alphanum_lower_dict_ranges: this._alphanum_lower_dict_ranges,
42544
+ _alphanum_upper_dict_ranges: this._alphanum_upper_dict_ranges,
42545
+ _hex_dict_ranges: this._hex_dict_ranges
42546
+ });
42547
+ __publicField(this, "log", (...args) => {
42548
+ const finalArgs = [...args];
42549
+ finalArgs[0] = `[short-unique-id] ${args[0]}`;
42550
+ if (this.debug === true) {
42551
+ if (typeof console !== "undefined" && console !== null) {
42552
+ return console.log(...finalArgs);
42553
+ }
42554
+ }
42555
+ });
42556
+ __publicField(this, "setDictionary", (dictionary2, shuffle2) => {
42557
+ let finalDict;
42558
+ if (dictionary2 && Array.isArray(dictionary2) && dictionary2.length > 1) {
42559
+ finalDict = dictionary2;
42560
+ } else {
42561
+ finalDict = [];
42562
+ let i;
42563
+ this.dictIndex = i = 0;
42564
+ const rangesName = `_${dictionary2}_dict_ranges`;
42565
+ const ranges = this._dict_ranges[rangesName];
42566
+ Object.keys(ranges).forEach((rangeType) => {
42567
+ const rangeTypeKey = rangeType;
42568
+ this.dictRange = ranges[rangeTypeKey];
42569
+ this.lowerBound = this.dictRange[0];
42570
+ this.upperBound = this.dictRange[1];
42571
+ for (this.dictIndex = i = this.lowerBound; this.lowerBound <= this.upperBound ? i < this.upperBound : i > this.upperBound; this.dictIndex = this.lowerBound <= this.upperBound ? i += 1 : i -= 1) {
42572
+ finalDict.push(String.fromCharCode(this.dictIndex));
42573
+ }
42574
+ });
42575
+ }
42576
+ if (shuffle2) {
42577
+ const PROBABILITY = 0.5;
42578
+ finalDict = finalDict.sort(() => Math.random() - PROBABILITY);
42579
+ }
42580
+ this.dict = finalDict;
42581
+ this.dictLength = this.dict.length;
42582
+ this.setCounter(0);
42583
+ });
42584
+ __publicField(this, "seq", () => {
42585
+ return this.sequentialUUID();
42586
+ });
42587
+ __publicField(this, "sequentialUUID", () => {
42588
+ let counterDiv;
42589
+ let counterRem;
42590
+ let id6 = "";
42591
+ counterDiv = this.counter;
42592
+ do {
42593
+ counterRem = counterDiv % this.dictLength;
42594
+ counterDiv = Math.trunc(counterDiv / this.dictLength);
42595
+ id6 += this.dict[counterRem];
42596
+ } while (counterDiv !== 0);
42597
+ this.counter += 1;
42598
+ return id6;
42599
+ });
42600
+ __publicField(this, "rnd", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
42601
+ return this.randomUUID(uuidLength);
42602
+ });
42603
+ __publicField(this, "randomUUID", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
42604
+ let id6;
42605
+ let randomPartIdx;
42606
+ let j;
42607
+ if (uuidLength === null || typeof uuidLength === "undefined" || uuidLength < 1) {
42608
+ throw new Error("Invalid UUID Length Provided");
42609
+ }
42610
+ const isPositive = uuidLength >= 0;
42611
+ id6 = "";
42612
+ for (j = 0; j < uuidLength; j += 1) {
42613
+ randomPartIdx = parseInt(
42614
+ (Math.random() * this.dictLength).toFixed(0),
42615
+ 10
42616
+ ) % this.dictLength;
42617
+ id6 += this.dict[randomPartIdx];
42618
+ }
42619
+ return id6;
42620
+ });
42621
+ __publicField(this, "fmt", (format4, date5) => {
42622
+ return this.formattedUUID(format4, date5);
42623
+ });
42624
+ __publicField(this, "formattedUUID", (format4, date5) => {
42625
+ const fnMap = {
42626
+ "$r": this.randomUUID,
42627
+ "$s": this.sequentialUUID,
42628
+ "$t": this.stamp
42629
+ };
42630
+ const result5 = format4.replace(
42631
+ /\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
42632
+ (m) => {
42633
+ const fn2 = m.slice(0, 2);
42634
+ const len = parseInt(m.slice(2), 10);
42635
+ if (fn2 === "$s") {
42636
+ return fnMap[fn2]().padStart(len, "0");
42637
+ }
42638
+ if (fn2 === "$t" && date5) {
42639
+ return fnMap[fn2](len, date5);
42640
+ }
42641
+ return fnMap[fn2](len);
42642
+ }
42643
+ );
42644
+ return result5;
42645
+ });
42646
+ __publicField(this, "availableUUIDs", (uuidLength = this.uuidLength) => {
42647
+ return parseFloat(
42648
+ Math.pow([...new Set(this.dict)].length, uuidLength).toFixed(0)
42649
+ );
42650
+ });
42651
+ __publicField(this, "approxMaxBeforeCollision", (rounds = this.availableUUIDs(this.uuidLength)) => {
42652
+ return parseFloat(
42653
+ Math.sqrt(Math.PI / 2 * rounds).toFixed(20)
42654
+ );
42655
+ });
42656
+ __publicField(this, "collisionProbability", (rounds = this.availableUUIDs(this.uuidLength), uuidLength = this.uuidLength) => {
42657
+ return parseFloat(
42658
+ (this.approxMaxBeforeCollision(rounds) / this.availableUUIDs(uuidLength)).toFixed(20)
42659
+ );
42660
+ });
42661
+ __publicField(this, "uniqueness", (rounds = this.availableUUIDs(this.uuidLength)) => {
42662
+ const score2 = parseFloat(
42663
+ (1 - this.approxMaxBeforeCollision(rounds) / rounds).toFixed(20)
42664
+ );
42665
+ return score2 > 1 ? 1 : score2 < 0 ? 0 : score2;
42666
+ });
42667
+ __publicField(this, "getVersion", () => {
42668
+ return this.version;
42669
+ });
42670
+ __publicField(this, "stamp", (finalLength, date5) => {
42671
+ const hexStamp = Math.floor(+(date5 || /* @__PURE__ */ new Date()) / 1e3).toString(16);
42672
+ if (typeof finalLength === "number" && finalLength === 0) {
42673
+ return hexStamp;
42674
+ }
42675
+ if (typeof finalLength !== "number" || finalLength < 10) {
42676
+ throw new Error(
42677
+ [
42678
+ "Param finalLength must be a number greater than or equal to 10,",
42679
+ "or 0 if you want the raw hexadecimal timestamp"
42680
+ ].join("\n")
42681
+ );
42682
+ }
42683
+ const idLength = finalLength - 9;
42684
+ const rndIdx = Math.round(Math.random() * (idLength > 15 ? 15 : idLength));
42685
+ const id6 = this.randomUUID(idLength);
42686
+ return `${id6.substring(0, rndIdx)}${hexStamp}${id6.substring(rndIdx)}${rndIdx.toString(16)}`;
42687
+ });
42688
+ __publicField(this, "parseStamp", (suid, format4) => {
42689
+ if (format4 && !/t0|t[1-9]\d{1,}/.test(format4)) {
42690
+ throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");
42691
+ }
42692
+ const stamp = format4 ? format4.replace(
42693
+ /\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
42694
+ (m) => {
42695
+ const fnMap = {
42696
+ "$r": (len2) => [...Array(len2)].map(() => "r").join(""),
42697
+ "$s": (len2) => [...Array(len2)].map(() => "s").join(""),
42698
+ "$t": (len2) => [...Array(len2)].map(() => "t").join("")
42699
+ };
42700
+ const fn2 = m.slice(0, 2);
42701
+ const len = parseInt(m.slice(2), 10);
42702
+ return fnMap[fn2](len);
42703
+ }
42704
+ ).replace(
42705
+ /^(.*?)(t{8,})(.*)$/g,
42706
+ (_m, p1, p2) => {
42707
+ return suid.substring(p1.length, p1.length + p2.length);
42708
+ }
42709
+ ) : suid;
42710
+ if (stamp.length === 8) {
42711
+ return new Date(parseInt(stamp, 16) * 1e3);
42712
+ }
42713
+ if (stamp.length < 10) {
42714
+ throw new Error("Stamp length invalid");
42715
+ }
42716
+ const rndIdx = parseInt(stamp.substring(stamp.length - 1), 16);
42717
+ return new Date(parseInt(stamp.substring(rndIdx, rndIdx + 8), 16) * 1e3);
42718
+ });
42719
+ __publicField(this, "setCounter", (counter2) => {
42720
+ this.counter = counter2;
42721
+ });
42722
+ const options = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), argOptions);
42723
+ this.counter = 0;
42724
+ this.debug = false;
42725
+ this.dict = [];
42726
+ this.version = version6;
42727
+ const {
42728
+ dictionary,
42729
+ shuffle,
42730
+ length: length2,
42731
+ counter
42732
+ } = options;
42733
+ this.uuidLength = length2;
42734
+ this.setDictionary(dictionary, shuffle);
42735
+ this.setCounter(counter);
42736
+ this.debug = options.debug;
42737
+ this.log(this.dict);
42738
+ this.log(
42739
+ `Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`
42740
+ );
42741
+ this.log = this.log.bind(this);
42742
+ this.setDictionary = this.setDictionary.bind(this);
42743
+ this.setCounter = this.setCounter.bind(this);
42744
+ this.seq = this.seq.bind(this);
42745
+ this.sequentialUUID = this.sequentialUUID.bind(this);
42746
+ this.rnd = this.rnd.bind(this);
42747
+ this.randomUUID = this.randomUUID.bind(this);
42748
+ this.fmt = this.fmt.bind(this);
42749
+ this.formattedUUID = this.formattedUUID.bind(this);
42750
+ this.availableUUIDs = this.availableUUIDs.bind(this);
42751
+ this.approxMaxBeforeCollision = this.approxMaxBeforeCollision.bind(this);
42752
+ this.collisionProbability = this.collisionProbability.bind(this);
42753
+ this.uniqueness = this.uniqueness.bind(this);
42754
+ this.getVersion = this.getVersion.bind(this);
42755
+ this.stamp = this.stamp.bind(this);
42756
+ this.parseStamp = this.parseStamp.bind(this);
42757
+ return this;
42758
+ }
42759
+ };
42760
+ __publicField(_ShortUniqueId, "default", _ShortUniqueId);
42761
+ var ShortUniqueId3 = _ShortUniqueId;
42762
+ return __toCommonJS2(src_exports2);
42763
+ })();
42764
+ "undefined" != typeof module3 && (module3.exports = ShortUniqueId2.default), "undefined" != typeof window && (ShortUniqueId2 = ShortUniqueId2.default);
42765
+ }
42766
+ });
42767
+
42768
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/generate-id.js
42769
+ function generateId() {
42770
+ return uid.rnd(6);
42771
+ }
42772
+ var import_short_unique_id, uid;
42773
+ var init_generate_id = __esm({
42774
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/generate-id.js"() {
42775
+ import_short_unique_id = __toESM(require_short_unique_id(), 1);
42776
+ uid = new import_short_unique_id.default({ length: 10 });
42777
+ }
42778
+ });
42779
+
42448
42780
  // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/AddressBookQuery.js
42449
42781
  var AddressBookQuery;
42450
42782
  var init_AddressBookQuery = __esm({
42451
42783
  "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/AddressBookQuery.js"() {
42452
42784
  init_esm();
42453
42785
  init_namespaces();
42454
- init_esm_browser();
42786
+ init_generate_id();
42455
42787
  AddressBookQuery = class {
42456
42788
  constructor(store, addressBookNode) {
42457
42789
  this.store = store;
@@ -42465,7 +42797,7 @@ var PodOS = (() => {
42465
42797
  return this.proposeNewNode("Group");
42466
42798
  }
42467
42799
  proposeNewNode(containerPath) {
42468
- const id6 = v4_default();
42800
+ const id6 = generateId();
42469
42801
  const baseUri = this.addressBookNode.dir()?.uri;
42470
42802
  return namedNode2(`${baseUri}${containerPath}/${id6}/index.ttl#this`);
42471
42803
  }
@@ -42579,7 +42911,7 @@ var PodOS = (() => {
42579
42911
 
42580
42912
  // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/createAddressBook.js
42581
42913
  function createAddressBook(container2, name7) {
42582
- const id6 = v4_default();
42914
+ const id6 = generateId();
42583
42915
  const uri6 = `${container2}${id6}/index.ttl#this`;
42584
42916
  const nameEmailIndexUri = `${container2}${id6}/people.ttl`;
42585
42917
  const groupIndexUri = `${container2}${id6}/groups.ttl`;
@@ -42599,8 +42931,8 @@ var PodOS = (() => {
42599
42931
  var init_createAddressBook = __esm({
42600
42932
  "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/createAddressBook.js"() {
42601
42933
  init_esm();
42602
- init_esm_browser();
42603
42934
  init_namespaces();
42935
+ init_generate_id();
42604
42936
  }
42605
42937
  });
42606
42938
 
@@ -42771,6 +43103,169 @@ var PodOS = (() => {
42771
43103
  }
42772
43104
  });
42773
43105
 
43106
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/addNewPhoneNumber.js
43107
+ function addNewPhoneNumber(contactNode, phoneNumber) {
43108
+ const id6 = generateId();
43109
+ const uri6 = `${contactNode.doc().uri}#${id6}`;
43110
+ return {
43111
+ uri: uri6,
43112
+ insertions: [
43113
+ st2(contactNode, vcard("hasTelephone"), namedNode2(uri6), contactNode.doc()),
43114
+ st2(namedNode2(uri6), vcard("value"), namedNode2("tel:" + phoneNumber), contactNode.doc())
43115
+ ],
43116
+ deletions: [],
43117
+ filesToCreate: []
43118
+ };
43119
+ }
43120
+ var init_addNewPhoneNumber = __esm({
43121
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/addNewPhoneNumber.js"() {
43122
+ init_esm();
43123
+ init_generate_id();
43124
+ init_namespaces();
43125
+ }
43126
+ });
43127
+
43128
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/addNewEmailAddress.js
43129
+ function addNewEmailAddress(contactNode, emailAddress) {
43130
+ const id6 = generateId();
43131
+ const uri6 = `${contactNode.doc().uri}#${id6}`;
43132
+ return {
43133
+ uri: uri6,
43134
+ insertions: [
43135
+ st2(contactNode, vcard("hasEmail"), namedNode2(uri6), contactNode.doc()),
43136
+ st2(namedNode2(uri6), vcard("value"), namedNode2("mailto:" + emailAddress), contactNode.doc())
43137
+ ],
43138
+ deletions: [],
43139
+ filesToCreate: []
43140
+ };
43141
+ }
43142
+ var init_addNewEmailAddress = __esm({
43143
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/addNewEmailAddress.js"() {
43144
+ init_esm();
43145
+ init_generate_id();
43146
+ init_namespaces();
43147
+ }
43148
+ });
43149
+
43150
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/removePhoneNumber.js
43151
+ function removePhoneNumber(contactNode, phoneNode, store) {
43152
+ const phoneStatements = store.statementsMatching(phoneNode, null, null, phoneNode.doc());
43153
+ return {
43154
+ uri: "",
43155
+ insertions: [],
43156
+ deletions: [
43157
+ ...phoneStatements,
43158
+ st2(contactNode, vcard("hasTelephone"), phoneNode, contactNode.doc())
43159
+ ],
43160
+ filesToCreate: []
43161
+ };
43162
+ }
43163
+ var init_removePhoneNumber = __esm({
43164
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/removePhoneNumber.js"() {
43165
+ init_esm();
43166
+ init_namespaces();
43167
+ }
43168
+ });
43169
+
43170
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/removeEmailAddress.js
43171
+ function removeEmailAddress(contactNode, emailNode, store) {
43172
+ const emailStatements = store.statementsMatching(emailNode, null, null, emailNode.doc());
43173
+ return {
43174
+ uri: "",
43175
+ insertions: [],
43176
+ deletions: [
43177
+ ...emailStatements,
43178
+ st2(contactNode, vcard("hasEmail"), emailNode, contactNode.doc())
43179
+ ],
43180
+ filesToCreate: []
43181
+ };
43182
+ }
43183
+ var init_removeEmailAddress = __esm({
43184
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/update-operations/removeEmailAddress.js"() {
43185
+ init_esm();
43186
+ init_namespaces();
43187
+ }
43188
+ });
43189
+
43190
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/ProfileQuery.js
43191
+ var ProfileQuery;
43192
+ var init_ProfileQuery = __esm({
43193
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/ProfileQuery.js"() {
43194
+ init_esm();
43195
+ init_namespaces();
43196
+ ProfileQuery = class {
43197
+ constructor(webIdNode, store) {
43198
+ this.webIdNode = webIdNode;
43199
+ this.store = store;
43200
+ }
43201
+ queryPublicTypeIndex() {
43202
+ const predicate2 = solid("publicTypeIndex");
43203
+ return this.queryNamedNode(predicate2);
43204
+ }
43205
+ queryPreferencesFile() {
43206
+ const predicate2 = pim("preferencesFile");
43207
+ return this.queryNamedNode(predicate2);
43208
+ }
43209
+ queryNamedNode(predicate2) {
43210
+ const node2 = this.store.any(this.webIdNode, predicate2, null, this.webIdNode.doc());
43211
+ if (isNamedNode(node2)) {
43212
+ return node2;
43213
+ }
43214
+ return null;
43215
+ }
43216
+ };
43217
+ }
43218
+ });
43219
+
43220
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/TypeIndexQuery.js
43221
+ var TypeIndexQuery;
43222
+ var init_TypeIndexQuery = __esm({
43223
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/TypeIndexQuery.js"() {
43224
+ init_esm();
43225
+ init_namespaces();
43226
+ TypeIndexQuery = class {
43227
+ constructor(store, typeIndexDoc) {
43228
+ this.store = store;
43229
+ this.typeIndexDoc = typeIndexDoc;
43230
+ }
43231
+ queryAddressBookInstances() {
43232
+ const addressBookRegistrations = this.store.each(null, solid("forClass"), vcard("AddressBook"), this.typeIndexDoc);
43233
+ return addressBookRegistrations.flatMap((registration) => {
43234
+ if (!isNamedNode(registration))
43235
+ return [];
43236
+ return this.getInstanceValues(registration);
43237
+ });
43238
+ }
43239
+ getInstanceValues(registration) {
43240
+ return this.store.each(registration, solid("instance"), null, this.typeIndexDoc).map((it) => it.value);
43241
+ }
43242
+ };
43243
+ }
43244
+ });
43245
+
43246
+ // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/PreferencesQuery.js
43247
+ var PreferencesQuery;
43248
+ var init_PreferencesQuery = __esm({
43249
+ "../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/queries/PreferencesQuery.js"() {
43250
+ init_esm();
43251
+ init_namespaces();
43252
+ PreferencesQuery = class {
43253
+ constructor(store, webIdNode, preferencesDoc) {
43254
+ this.store = store;
43255
+ this.webIdNode = webIdNode;
43256
+ this.preferencesDoc = preferencesDoc;
43257
+ }
43258
+ queryPrivateTypeIndex() {
43259
+ const node2 = this.store.any(this.webIdNode, solid("privateTypeIndex"), null, this.preferencesDoc);
43260
+ if (isNamedNode(node2)) {
43261
+ return node2;
43262
+ }
43263
+ return null;
43264
+ }
43265
+ };
43266
+ }
43267
+ });
43268
+
42774
43269
  // ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/ContactsModuleRdfLib.js
42775
43270
  var ContactsModuleRdfLib;
42776
43271
  var init_ContactsModuleRdfLib = __esm({
@@ -42784,11 +43279,18 @@ var PodOS = (() => {
42784
43279
  init_GroupQuery();
42785
43280
  init_addContactToGroup();
42786
43281
  init_removeContactFromGroup();
43282
+ init_addNewPhoneNumber();
43283
+ init_addNewEmailAddress();
43284
+ init_removePhoneNumber();
43285
+ init_removeEmailAddress();
43286
+ init_ProfileQuery();
43287
+ init_TypeIndexQuery();
43288
+ init_PreferencesQuery();
42787
43289
  ContactsModuleRdfLib = class {
42788
- constructor(config) {
42789
- this.store = config.store;
42790
- this.fetcher = config.fetcher;
42791
- this.updater = config.updater;
43290
+ constructor(config2) {
43291
+ this.store = config2.store;
43292
+ this.fetcher = config2.fetcher;
43293
+ this.updater = config2.updater;
42792
43294
  }
42793
43295
  async readAddressBook(uri6) {
42794
43296
  const addressBookNode = namedNode2(uri6);
@@ -42896,6 +43398,65 @@ var PodOS = (() => {
42896
43398
  const operation3 = removeContactFromGroup(contactQuery, groupQuery);
42897
43399
  await executeUpdate(this.fetcher, this.updater, operation3);
42898
43400
  }
43401
+ async addNewPhoneNumber({ contactUri, newPhoneNumber }) {
43402
+ const contactNode = namedNode2(contactUri);
43403
+ const operation3 = addNewPhoneNumber(contactNode, newPhoneNumber);
43404
+ await executeUpdate(this.fetcher, this.updater, operation3);
43405
+ return operation3.uri;
43406
+ }
43407
+ async addNewEmailAddress({ contactUri, newEmailAddress }) {
43408
+ const contactNode = namedNode2(contactUri);
43409
+ const operation3 = addNewEmailAddress(contactNode, newEmailAddress);
43410
+ await executeUpdate(this.fetcher, this.updater, operation3);
43411
+ return operation3.uri;
43412
+ }
43413
+ async removePhoneNumber({ contactUri, phoneNumberUri }) {
43414
+ const contactNode = namedNode2(contactUri);
43415
+ const phoneNumberNode = namedNode2(phoneNumberUri);
43416
+ await this.fetchNode(phoneNumberNode);
43417
+ const operation3 = removePhoneNumber(contactNode, phoneNumberNode, this.store);
43418
+ await executeUpdate(this.fetcher, this.updater, operation3);
43419
+ }
43420
+ async removeEmailAddress({ contactUri, emailAddressUri }) {
43421
+ const contactNode = namedNode2(contactUri);
43422
+ const emailAddressNode = namedNode2(emailAddressUri);
43423
+ await this.fetchNode(emailAddressNode);
43424
+ const operation3 = removeEmailAddress(contactNode, emailAddressNode, this.store);
43425
+ await executeUpdate(this.fetcher, this.updater, operation3);
43426
+ }
43427
+ async listAddressBooks(webId) {
43428
+ const profileNode = namedNode2(webId);
43429
+ await this.fetchNode(profileNode);
43430
+ const profileQuery = new ProfileQuery(profileNode, this.store);
43431
+ const publicTypeIndexNode = profileQuery.queryPublicTypeIndex();
43432
+ const preferencesFile2 = profileQuery.queryPreferencesFile();
43433
+ const promisePublicUris = this.fetchIndexedAddressBooks(publicTypeIndexNode);
43434
+ const promisePrivateTypeIndex = this.fetchPrivateTypeIndex(profileNode, preferencesFile2);
43435
+ const [publicUris, privateTypeIndex2] = await Promise.allSettled([
43436
+ promisePublicUris,
43437
+ promisePrivateTypeIndex
43438
+ ]);
43439
+ const privateUris = privateTypeIndex2.status === "fulfilled" ? await this.fetchIndexedAddressBooks(privateTypeIndex2.value) : [];
43440
+ return {
43441
+ publicUris: publicUris.status === "fulfilled" ? publicUris.value : [],
43442
+ privateUris
43443
+ };
43444
+ }
43445
+ async fetchIndexedAddressBooks(publicTypeIndexNode) {
43446
+ if (!publicTypeIndexNode) {
43447
+ return [];
43448
+ }
43449
+ await this.fetchNode(publicTypeIndexNode);
43450
+ return new TypeIndexQuery(this.store, publicTypeIndexNode).queryAddressBookInstances();
43451
+ }
43452
+ async fetchPrivateTypeIndex(profileNode, preferencesFile2) {
43453
+ if (!preferencesFile2) {
43454
+ return null;
43455
+ }
43456
+ await this.fetchNode(preferencesFile2);
43457
+ const preferencesQuery = new PreferencesQuery(this.store, profileNode, preferencesFile2);
43458
+ return preferencesQuery.queryPrivateTypeIndex();
43459
+ }
42899
43460
  };
42900
43461
  }
42901
43462
  });
@@ -42917,7 +43478,7 @@ var PodOS = (() => {
42917
43478
  var require_lunr = __commonJS({
42918
43479
  "../node_modules/lunr/lunr.js"(exports, module3) {
42919
43480
  (function() {
42920
- var lunr2 = function(config) {
43481
+ var lunr2 = function(config2) {
42921
43482
  var builder = new lunr2.Builder();
42922
43483
  builder.pipeline.add(
42923
43484
  lunr2.trimmer,
@@ -42927,7 +43488,7 @@ var PodOS = (() => {
42927
43488
  builder.searchPipeline.add(
42928
43489
  lunr2.stemmer
42929
43490
  );
42930
- config.call(builder, builder);
43491
+ config2.call(builder, builder);
42931
43492
  return builder.build();
42932
43493
  };
42933
43494
  lunr2.version = "2.3.9";
@@ -44892,8 +45453,8 @@ var PodOS = (() => {
44892
45453
  if (usages.length && !usages.some((expected) => key3.usages.includes(expected))) {
44893
45454
  let msg2 = "CryptoKey does not support this operation, its usages must include ";
44894
45455
  if (usages.length > 2) {
44895
- const last2 = usages.pop();
44896
- msg2 += `one of ${usages.join(", ")}, or ${last2}.`;
45456
+ const last3 = usages.pop();
45457
+ msg2 += `one of ${usages.join(", ")}, or ${last3}.`;
44897
45458
  } else if (usages.length === 2) {
44898
45459
  msg2 += `one of ${usages[0]} or ${usages[1]}.`;
44899
45460
  } else {
@@ -44963,8 +45524,8 @@ var PodOS = (() => {
44963
45524
  // ../node_modules/jose/dist/browser/lib/invalid_key_input.js
44964
45525
  function message(msg2, actual2, ...types2) {
44965
45526
  if (types2.length > 2) {
44966
- const last2 = types2.pop();
44967
- msg2 += `one of type ${types2.join(", ")}, or ${last2}.`;
45527
+ const last3 = types2.pop();
45528
+ msg2 += `one of type ${types2.join(", ")}, or ${last3}.`;
44968
45529
  } else if (types2.length === 2) {
44969
45530
  msg2 += `one of type ${types2[0]} or ${types2[1]}.`;
44970
45531
  } else {
@@ -45938,8 +46499,55 @@ var PodOS = (() => {
45938
46499
  return generateKeyPair(alg, options);
45939
46500
  }
45940
46501
 
46502
+ // ../node_modules/uuid/dist/esm-browser/rng.js
46503
+ var getRandomValues;
46504
+ var rnds8 = new Uint8Array(16);
46505
+ function rng() {
46506
+ if (!getRandomValues) {
46507
+ getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
46508
+ if (!getRandomValues) {
46509
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
46510
+ }
46511
+ }
46512
+ return getRandomValues(rnds8);
46513
+ }
46514
+
46515
+ // ../node_modules/uuid/dist/esm-browser/stringify.js
46516
+ var byteToHex = [];
46517
+ for (let i = 0; i < 256; ++i) {
46518
+ byteToHex.push((i + 256).toString(16).slice(1));
46519
+ }
46520
+ function unsafeStringify(arr, offset3 = 0) {
46521
+ return byteToHex[arr[offset3 + 0]] + byteToHex[arr[offset3 + 1]] + byteToHex[arr[offset3 + 2]] + byteToHex[arr[offset3 + 3]] + "-" + byteToHex[arr[offset3 + 4]] + byteToHex[arr[offset3 + 5]] + "-" + byteToHex[arr[offset3 + 6]] + byteToHex[arr[offset3 + 7]] + "-" + byteToHex[arr[offset3 + 8]] + byteToHex[arr[offset3 + 9]] + "-" + byteToHex[arr[offset3 + 10]] + byteToHex[arr[offset3 + 11]] + byteToHex[arr[offset3 + 12]] + byteToHex[arr[offset3 + 13]] + byteToHex[arr[offset3 + 14]] + byteToHex[arr[offset3 + 15]];
46522
+ }
46523
+
46524
+ // ../node_modules/uuid/dist/esm-browser/native.js
46525
+ var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
46526
+ var native_default = {
46527
+ randomUUID
46528
+ };
46529
+
46530
+ // ../node_modules/uuid/dist/esm-browser/v4.js
46531
+ function v4(options, buf, offset3) {
46532
+ if (native_default.randomUUID && !buf && !options) {
46533
+ return native_default.randomUUID();
46534
+ }
46535
+ options = options || {};
46536
+ const rnds = options.random || (options.rng || rng)();
46537
+ rnds[6] = rnds[6] & 15 | 64;
46538
+ rnds[8] = rnds[8] & 63 | 128;
46539
+ if (buf) {
46540
+ offset3 = offset3 || 0;
46541
+ for (let i = 0; i < 16; ++i) {
46542
+ buf[offset3 + i] = rnds[i];
46543
+ }
46544
+ return buf;
46545
+ }
46546
+ return unsafeStringify(rnds);
46547
+ }
46548
+ var v4_default = v4;
46549
+
45941
46550
  // ../node_modules/@inrupt/solid-client-authn-core/dist/index.mjs
45942
- init_esm_browser();
45943
46551
  var SOLID_CLIENT_AUTHN_KEY_PREFIX = "solidClientAuthn:";
45944
46552
  var PREFERRED_SIGNING_ALG = ["ES256", "RS256"];
45945
46553
  var EVENTS = {
@@ -46591,7 +47199,6 @@ var PodOS = (() => {
46591
47199
  }
46592
47200
 
46593
47201
  // ../node_modules/@inrupt/solid-client-authn-browser/dist/index.mjs
46594
- init_esm_browser();
46595
47202
  var import_events2 = __toESM(require_events(), 1);
46596
47203
 
46597
47204
  // ../node_modules/@inrupt/oidc-client-ext/dist/index.es.js
@@ -46626,7 +47233,7 @@ var PodOS = (() => {
46626
47233
  throw new Error("The OIDC issuer discovery profile is missing the 'id_token_signing_alg_values_supported' value, which is mandatory.");
46627
47234
  }
46628
47235
  const signingAlg = determineSigningAlg(issuerConfig.idTokenSigningAlgValuesSupported, PREFERRED_SIGNING_ALG);
46629
- const config = {
47236
+ const config2 = {
46630
47237
  /* eslint-disable camelcase */
46631
47238
  client_name: options.clientName,
46632
47239
  application_type: "web",
@@ -46643,7 +47250,7 @@ var PodOS = (() => {
46643
47250
  const registerResponse = await fetch(issuerConfig.registrationEndpoint.toString(), {
46644
47251
  method: "POST",
46645
47252
  headers,
46646
- body: JSON.stringify(config)
47253
+ body: JSON.stringify(config2)
46647
47254
  });
46648
47255
  if (registerResponse.ok) {
46649
47256
  const responseBody = await registerResponse.json();
@@ -47140,11 +47747,11 @@ var PodOS = (() => {
47140
47747
  convertToUrl: true
47141
47748
  }
47142
47749
  };
47143
- function processConfig(config) {
47750
+ function processConfig(config2) {
47144
47751
  const parsedConfig = {};
47145
- Object.keys(config).forEach((key3) => {
47752
+ Object.keys(config2).forEach((key3) => {
47146
47753
  if (issuerConfigKeyMap[key3]) {
47147
- parsedConfig[issuerConfigKeyMap[key3].toKey] = config[key3];
47754
+ parsedConfig[issuerConfigKeyMap[key3].toKey] = config2[key3];
47148
47755
  }
47149
47756
  });
47150
47757
  if (!Array.isArray(parsedConfig.scopesSupported)) {
@@ -47686,6 +48293,1654 @@ var PodOS = (() => {
47686
48293
  }
47687
48294
  };
47688
48295
 
48296
+ // ../node_modules/tslib/tslib.es6.mjs
48297
+ var extendStatics = function(d, b) {
48298
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
48299
+ d2.__proto__ = b2;
48300
+ } || function(d2, b2) {
48301
+ for (var p in b2)
48302
+ if (Object.prototype.hasOwnProperty.call(b2, p))
48303
+ d2[p] = b2[p];
48304
+ };
48305
+ return extendStatics(d, b);
48306
+ };
48307
+ function __extends(d, b) {
48308
+ if (typeof b !== "function" && b !== null)
48309
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
48310
+ extendStatics(d, b);
48311
+ function __() {
48312
+ this.constructor = d;
48313
+ }
48314
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48315
+ }
48316
+ function __awaiter(thisArg, _arguments, P, generator3) {
48317
+ function adopt(value6) {
48318
+ return value6 instanceof P ? value6 : new P(function(resolve) {
48319
+ resolve(value6);
48320
+ });
48321
+ }
48322
+ return new (P || (P = Promise))(function(resolve, reject2) {
48323
+ function fulfilled(value6) {
48324
+ try {
48325
+ step4(generator3.next(value6));
48326
+ } catch (e) {
48327
+ reject2(e);
48328
+ }
48329
+ }
48330
+ function rejected(value6) {
48331
+ try {
48332
+ step4(generator3["throw"](value6));
48333
+ } catch (e) {
48334
+ reject2(e);
48335
+ }
48336
+ }
48337
+ function step4(result5) {
48338
+ result5.done ? resolve(result5.value) : adopt(result5.value).then(fulfilled, rejected);
48339
+ }
48340
+ step4((generator3 = generator3.apply(thisArg, _arguments || [])).next());
48341
+ });
48342
+ }
48343
+ function __generator(thisArg, body) {
48344
+ var _ = { label: 0, sent: function() {
48345
+ if (t[0] & 1)
48346
+ throw t[1];
48347
+ return t[1];
48348
+ }, trys: [], ops: [] }, f, y, t, g;
48349
+ return g = { next: verb2(0), "throw": verb2(1), "return": verb2(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
48350
+ return this;
48351
+ }), g;
48352
+ function verb2(n2) {
48353
+ return function(v2) {
48354
+ return step4([n2, v2]);
48355
+ };
48356
+ }
48357
+ function step4(op2) {
48358
+ if (f)
48359
+ throw new TypeError("Generator is already executing.");
48360
+ while (g && (g = 0, op2[0] && (_ = 0)), _)
48361
+ try {
48362
+ if (f = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done)
48363
+ return t;
48364
+ if (y = 0, t)
48365
+ op2 = [op2[0] & 2, t.value];
48366
+ switch (op2[0]) {
48367
+ case 0:
48368
+ case 1:
48369
+ t = op2;
48370
+ break;
48371
+ case 4:
48372
+ _.label++;
48373
+ return { value: op2[1], done: false };
48374
+ case 5:
48375
+ _.label++;
48376
+ y = op2[1];
48377
+ op2 = [0];
48378
+ continue;
48379
+ case 7:
48380
+ op2 = _.ops.pop();
48381
+ _.trys.pop();
48382
+ continue;
48383
+ default:
48384
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) {
48385
+ _ = 0;
48386
+ continue;
48387
+ }
48388
+ if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) {
48389
+ _.label = op2[1];
48390
+ break;
48391
+ }
48392
+ if (op2[0] === 6 && _.label < t[1]) {
48393
+ _.label = t[1];
48394
+ t = op2;
48395
+ break;
48396
+ }
48397
+ if (t && _.label < t[2]) {
48398
+ _.label = t[2];
48399
+ _.ops.push(op2);
48400
+ break;
48401
+ }
48402
+ if (t[2])
48403
+ _.ops.pop();
48404
+ _.trys.pop();
48405
+ continue;
48406
+ }
48407
+ op2 = body.call(thisArg, _);
48408
+ } catch (e) {
48409
+ op2 = [6, e];
48410
+ y = 0;
48411
+ } finally {
48412
+ f = t = 0;
48413
+ }
48414
+ if (op2[0] & 5)
48415
+ throw op2[1];
48416
+ return { value: op2[0] ? op2[1] : void 0, done: true };
48417
+ }
48418
+ }
48419
+ function __values(o) {
48420
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
48421
+ if (m)
48422
+ return m.call(o);
48423
+ if (o && typeof o.length === "number")
48424
+ return {
48425
+ next: function() {
48426
+ if (o && i >= o.length)
48427
+ o = void 0;
48428
+ return { value: o && o[i++], done: !o };
48429
+ }
48430
+ };
48431
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
48432
+ }
48433
+ function __read(o, n2) {
48434
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
48435
+ if (!m)
48436
+ return o;
48437
+ var i = m.call(o), r, ar = [], e;
48438
+ try {
48439
+ while ((n2 === void 0 || n2-- > 0) && !(r = i.next()).done)
48440
+ ar.push(r.value);
48441
+ } catch (error5) {
48442
+ e = { error: error5 };
48443
+ } finally {
48444
+ try {
48445
+ if (r && !r.done && (m = i["return"]))
48446
+ m.call(i);
48447
+ } finally {
48448
+ if (e)
48449
+ throw e.error;
48450
+ }
48451
+ }
48452
+ return ar;
48453
+ }
48454
+ function __spreadArray(to2, from2, pack) {
48455
+ if (pack || arguments.length === 2)
48456
+ for (var i = 0, l = from2.length, ar; i < l; i++) {
48457
+ if (ar || !(i in from2)) {
48458
+ if (!ar)
48459
+ ar = Array.prototype.slice.call(from2, 0, i);
48460
+ ar[i] = from2[i];
48461
+ }
48462
+ }
48463
+ return to2.concat(ar || Array.prototype.slice.call(from2));
48464
+ }
48465
+ function __await(v2) {
48466
+ return this instanceof __await ? (this.v = v2, this) : new __await(v2);
48467
+ }
48468
+ function __asyncGenerator(thisArg, _arguments, generator3) {
48469
+ if (!Symbol.asyncIterator)
48470
+ throw new TypeError("Symbol.asyncIterator is not defined.");
48471
+ var g = generator3.apply(thisArg, _arguments || []), i, q = [];
48472
+ return i = {}, verb2("next"), verb2("throw"), verb2("return"), i[Symbol.asyncIterator] = function() {
48473
+ return this;
48474
+ }, i;
48475
+ function verb2(n2) {
48476
+ if (g[n2])
48477
+ i[n2] = function(v2) {
48478
+ return new Promise(function(a, b) {
48479
+ q.push([n2, v2, a, b]) > 1 || resume(n2, v2);
48480
+ });
48481
+ };
48482
+ }
48483
+ function resume(n2, v2) {
48484
+ try {
48485
+ step4(g[n2](v2));
48486
+ } catch (e) {
48487
+ settle(q[0][3], e);
48488
+ }
48489
+ }
48490
+ function step4(r) {
48491
+ r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject2) : settle(q[0][2], r);
48492
+ }
48493
+ function fulfill(value6) {
48494
+ resume("next", value6);
48495
+ }
48496
+ function reject2(value6) {
48497
+ resume("throw", value6);
48498
+ }
48499
+ function settle(f, v2) {
48500
+ if (f(v2), q.shift(), q.length)
48501
+ resume(q[0][0], q[0][1]);
48502
+ }
48503
+ }
48504
+ function __asyncValues(o) {
48505
+ if (!Symbol.asyncIterator)
48506
+ throw new TypeError("Symbol.asyncIterator is not defined.");
48507
+ var m = o[Symbol.asyncIterator], i;
48508
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb2("next"), verb2("throw"), verb2("return"), i[Symbol.asyncIterator] = function() {
48509
+ return this;
48510
+ }, i);
48511
+ function verb2(n2) {
48512
+ i[n2] = o[n2] && function(v2) {
48513
+ return new Promise(function(resolve, reject2) {
48514
+ v2 = o[n2](v2), settle(resolve, reject2, v2.done, v2.value);
48515
+ });
48516
+ };
48517
+ }
48518
+ function settle(resolve, reject2, d, v2) {
48519
+ Promise.resolve(v2).then(function(v3) {
48520
+ resolve({ value: v3, done: d });
48521
+ }, reject2);
48522
+ }
48523
+ }
48524
+
48525
+ // ../node_modules/rxjs/dist/esm5/internal/util/isFunction.js
48526
+ function isFunction(value6) {
48527
+ return typeof value6 === "function";
48528
+ }
48529
+
48530
+ // ../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
48531
+ function createErrorClass(createImpl) {
48532
+ var _super = function(instance3) {
48533
+ Error.call(instance3);
48534
+ instance3.stack = new Error().stack;
48535
+ };
48536
+ var ctorFunc = createImpl(_super);
48537
+ ctorFunc.prototype = Object.create(Error.prototype);
48538
+ ctorFunc.prototype.constructor = ctorFunc;
48539
+ return ctorFunc;
48540
+ }
48541
+
48542
+ // ../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
48543
+ var UnsubscriptionError = createErrorClass(function(_super) {
48544
+ return function UnsubscriptionErrorImpl(errors) {
48545
+ _super(this);
48546
+ this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) {
48547
+ return i + 1 + ") " + err.toString();
48548
+ }).join("\n ") : "";
48549
+ this.name = "UnsubscriptionError";
48550
+ this.errors = errors;
48551
+ };
48552
+ });
48553
+
48554
+ // ../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
48555
+ function arrRemove(arr, item4) {
48556
+ if (arr) {
48557
+ var index2 = arr.indexOf(item4);
48558
+ 0 <= index2 && arr.splice(index2, 1);
48559
+ }
48560
+ }
48561
+
48562
+ // ../node_modules/rxjs/dist/esm5/internal/Subscription.js
48563
+ var Subscription = function() {
48564
+ function Subscription3(initialTeardown) {
48565
+ this.initialTeardown = initialTeardown;
48566
+ this.closed = false;
48567
+ this._parentage = null;
48568
+ this._finalizers = null;
48569
+ }
48570
+ Subscription3.prototype.unsubscribe = function() {
48571
+ var e_1, _a, e_2, _b;
48572
+ var errors;
48573
+ if (!this.closed) {
48574
+ this.closed = true;
48575
+ var _parentage = this._parentage;
48576
+ if (_parentage) {
48577
+ this._parentage = null;
48578
+ if (Array.isArray(_parentage)) {
48579
+ try {
48580
+ for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
48581
+ var parent_1 = _parentage_1_1.value;
48582
+ parent_1.remove(this);
48583
+ }
48584
+ } catch (e_1_1) {
48585
+ e_1 = { error: e_1_1 };
48586
+ } finally {
48587
+ try {
48588
+ if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return))
48589
+ _a.call(_parentage_1);
48590
+ } finally {
48591
+ if (e_1)
48592
+ throw e_1.error;
48593
+ }
48594
+ }
48595
+ } else {
48596
+ _parentage.remove(this);
48597
+ }
48598
+ }
48599
+ var initialFinalizer = this.initialTeardown;
48600
+ if (isFunction(initialFinalizer)) {
48601
+ try {
48602
+ initialFinalizer();
48603
+ } catch (e) {
48604
+ errors = e instanceof UnsubscriptionError ? e.errors : [e];
48605
+ }
48606
+ }
48607
+ var _finalizers = this._finalizers;
48608
+ if (_finalizers) {
48609
+ this._finalizers = null;
48610
+ try {
48611
+ for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
48612
+ var finalizer = _finalizers_1_1.value;
48613
+ try {
48614
+ execFinalizer(finalizer);
48615
+ } catch (err) {
48616
+ errors = errors !== null && errors !== void 0 ? errors : [];
48617
+ if (err instanceof UnsubscriptionError) {
48618
+ errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
48619
+ } else {
48620
+ errors.push(err);
48621
+ }
48622
+ }
48623
+ }
48624
+ } catch (e_2_1) {
48625
+ e_2 = { error: e_2_1 };
48626
+ } finally {
48627
+ try {
48628
+ if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return))
48629
+ _b.call(_finalizers_1);
48630
+ } finally {
48631
+ if (e_2)
48632
+ throw e_2.error;
48633
+ }
48634
+ }
48635
+ }
48636
+ if (errors) {
48637
+ throw new UnsubscriptionError(errors);
48638
+ }
48639
+ }
48640
+ };
48641
+ Subscription3.prototype.add = function(teardown2) {
48642
+ var _a;
48643
+ if (teardown2 && teardown2 !== this) {
48644
+ if (this.closed) {
48645
+ execFinalizer(teardown2);
48646
+ } else {
48647
+ if (teardown2 instanceof Subscription3) {
48648
+ if (teardown2.closed || teardown2._hasParent(this)) {
48649
+ return;
48650
+ }
48651
+ teardown2._addParent(this);
48652
+ }
48653
+ (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown2);
48654
+ }
48655
+ }
48656
+ };
48657
+ Subscription3.prototype._hasParent = function(parent4) {
48658
+ var _parentage = this._parentage;
48659
+ return _parentage === parent4 || Array.isArray(_parentage) && _parentage.includes(parent4);
48660
+ };
48661
+ Subscription3.prototype._addParent = function(parent4) {
48662
+ var _parentage = this._parentage;
48663
+ this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent4), _parentage) : _parentage ? [_parentage, parent4] : parent4;
48664
+ };
48665
+ Subscription3.prototype._removeParent = function(parent4) {
48666
+ var _parentage = this._parentage;
48667
+ if (_parentage === parent4) {
48668
+ this._parentage = null;
48669
+ } else if (Array.isArray(_parentage)) {
48670
+ arrRemove(_parentage, parent4);
48671
+ }
48672
+ };
48673
+ Subscription3.prototype.remove = function(teardown2) {
48674
+ var _finalizers = this._finalizers;
48675
+ _finalizers && arrRemove(_finalizers, teardown2);
48676
+ if (teardown2 instanceof Subscription3) {
48677
+ teardown2._removeParent(this);
48678
+ }
48679
+ };
48680
+ Subscription3.EMPTY = function() {
48681
+ var empty = new Subscription3();
48682
+ empty.closed = true;
48683
+ return empty;
48684
+ }();
48685
+ return Subscription3;
48686
+ }();
48687
+ var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
48688
+ function isSubscription(value6) {
48689
+ return value6 instanceof Subscription || value6 && "closed" in value6 && isFunction(value6.remove) && isFunction(value6.add) && isFunction(value6.unsubscribe);
48690
+ }
48691
+ function execFinalizer(finalizer) {
48692
+ if (isFunction(finalizer)) {
48693
+ finalizer();
48694
+ } else {
48695
+ finalizer.unsubscribe();
48696
+ }
48697
+ }
48698
+
48699
+ // ../node_modules/rxjs/dist/esm5/internal/config.js
48700
+ var config = {
48701
+ onUnhandledError: null,
48702
+ onStoppedNotification: null,
48703
+ Promise: void 0,
48704
+ useDeprecatedSynchronousErrorHandling: false,
48705
+ useDeprecatedNextContext: false
48706
+ };
48707
+
48708
+ // ../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js
48709
+ var timeoutProvider = {
48710
+ setTimeout: function(handler, timeout2) {
48711
+ var args = [];
48712
+ for (var _i = 2; _i < arguments.length; _i++) {
48713
+ args[_i - 2] = arguments[_i];
48714
+ }
48715
+ var delegate = timeoutProvider.delegate;
48716
+ if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
48717
+ return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout2], __read(args)));
48718
+ }
48719
+ return setTimeout.apply(void 0, __spreadArray([handler, timeout2], __read(args)));
48720
+ },
48721
+ clearTimeout: function(handle) {
48722
+ var delegate = timeoutProvider.delegate;
48723
+ return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
48724
+ },
48725
+ delegate: void 0
48726
+ };
48727
+
48728
+ // ../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
48729
+ function reportUnhandledError(err) {
48730
+ timeoutProvider.setTimeout(function() {
48731
+ var onUnhandledError = config.onUnhandledError;
48732
+ if (onUnhandledError) {
48733
+ onUnhandledError(err);
48734
+ } else {
48735
+ throw err;
48736
+ }
48737
+ });
48738
+ }
48739
+
48740
+ // ../node_modules/rxjs/dist/esm5/internal/util/noop.js
48741
+ function noop() {
48742
+ }
48743
+
48744
+ // ../node_modules/rxjs/dist/esm5/internal/NotificationFactories.js
48745
+ var COMPLETE_NOTIFICATION = function() {
48746
+ return createNotification("C", void 0, void 0);
48747
+ }();
48748
+ function errorNotification(error5) {
48749
+ return createNotification("E", void 0, error5);
48750
+ }
48751
+ function nextNotification(value6) {
48752
+ return createNotification("N", value6, void 0);
48753
+ }
48754
+ function createNotification(kind2, value6, error5) {
48755
+ return {
48756
+ kind: kind2,
48757
+ value: value6,
48758
+ error: error5
48759
+ };
48760
+ }
48761
+
48762
+ // ../node_modules/rxjs/dist/esm5/internal/util/errorContext.js
48763
+ var context = null;
48764
+ function errorContext(cb) {
48765
+ if (config.useDeprecatedSynchronousErrorHandling) {
48766
+ var isRoot = !context;
48767
+ if (isRoot) {
48768
+ context = { errorThrown: false, error: null };
48769
+ }
48770
+ cb();
48771
+ if (isRoot) {
48772
+ var _a = context, errorThrown = _a.errorThrown, error5 = _a.error;
48773
+ context = null;
48774
+ if (errorThrown) {
48775
+ throw error5;
48776
+ }
48777
+ }
48778
+ } else {
48779
+ cb();
48780
+ }
48781
+ }
48782
+ function captureError(err) {
48783
+ if (config.useDeprecatedSynchronousErrorHandling && context) {
48784
+ context.errorThrown = true;
48785
+ context.error = err;
48786
+ }
48787
+ }
48788
+
48789
+ // ../node_modules/rxjs/dist/esm5/internal/Subscriber.js
48790
+ var Subscriber = function(_super) {
48791
+ __extends(Subscriber2, _super);
48792
+ function Subscriber2(destination2) {
48793
+ var _this = _super.call(this) || this;
48794
+ _this.isStopped = false;
48795
+ if (destination2) {
48796
+ _this.destination = destination2;
48797
+ if (isSubscription(destination2)) {
48798
+ destination2.add(_this);
48799
+ }
48800
+ } else {
48801
+ _this.destination = EMPTY_OBSERVER;
48802
+ }
48803
+ return _this;
48804
+ }
48805
+ Subscriber2.create = function(next3, error5, complete2) {
48806
+ return new SafeSubscriber(next3, error5, complete2);
48807
+ };
48808
+ Subscriber2.prototype.next = function(value6) {
48809
+ if (this.isStopped) {
48810
+ handleStoppedNotification(nextNotification(value6), this);
48811
+ } else {
48812
+ this._next(value6);
48813
+ }
48814
+ };
48815
+ Subscriber2.prototype.error = function(err) {
48816
+ if (this.isStopped) {
48817
+ handleStoppedNotification(errorNotification(err), this);
48818
+ } else {
48819
+ this.isStopped = true;
48820
+ this._error(err);
48821
+ }
48822
+ };
48823
+ Subscriber2.prototype.complete = function() {
48824
+ if (this.isStopped) {
48825
+ handleStoppedNotification(COMPLETE_NOTIFICATION, this);
48826
+ } else {
48827
+ this.isStopped = true;
48828
+ this._complete();
48829
+ }
48830
+ };
48831
+ Subscriber2.prototype.unsubscribe = function() {
48832
+ if (!this.closed) {
48833
+ this.isStopped = true;
48834
+ _super.prototype.unsubscribe.call(this);
48835
+ this.destination = null;
48836
+ }
48837
+ };
48838
+ Subscriber2.prototype._next = function(value6) {
48839
+ this.destination.next(value6);
48840
+ };
48841
+ Subscriber2.prototype._error = function(err) {
48842
+ try {
48843
+ this.destination.error(err);
48844
+ } finally {
48845
+ this.unsubscribe();
48846
+ }
48847
+ };
48848
+ Subscriber2.prototype._complete = function() {
48849
+ try {
48850
+ this.destination.complete();
48851
+ } finally {
48852
+ this.unsubscribe();
48853
+ }
48854
+ };
48855
+ return Subscriber2;
48856
+ }(Subscription);
48857
+ var _bind = Function.prototype.bind;
48858
+ function bind(fn2, thisArg) {
48859
+ return _bind.call(fn2, thisArg);
48860
+ }
48861
+ var ConsumerObserver = function() {
48862
+ function ConsumerObserver2(partialObserver) {
48863
+ this.partialObserver = partialObserver;
48864
+ }
48865
+ ConsumerObserver2.prototype.next = function(value6) {
48866
+ var partialObserver = this.partialObserver;
48867
+ if (partialObserver.next) {
48868
+ try {
48869
+ partialObserver.next(value6);
48870
+ } catch (error5) {
48871
+ handleUnhandledError(error5);
48872
+ }
48873
+ }
48874
+ };
48875
+ ConsumerObserver2.prototype.error = function(err) {
48876
+ var partialObserver = this.partialObserver;
48877
+ if (partialObserver.error) {
48878
+ try {
48879
+ partialObserver.error(err);
48880
+ } catch (error5) {
48881
+ handleUnhandledError(error5);
48882
+ }
48883
+ } else {
48884
+ handleUnhandledError(err);
48885
+ }
48886
+ };
48887
+ ConsumerObserver2.prototype.complete = function() {
48888
+ var partialObserver = this.partialObserver;
48889
+ if (partialObserver.complete) {
48890
+ try {
48891
+ partialObserver.complete();
48892
+ } catch (error5) {
48893
+ handleUnhandledError(error5);
48894
+ }
48895
+ }
48896
+ };
48897
+ return ConsumerObserver2;
48898
+ }();
48899
+ var SafeSubscriber = function(_super) {
48900
+ __extends(SafeSubscriber2, _super);
48901
+ function SafeSubscriber2(observerOrNext, error5, complete2) {
48902
+ var _this = _super.call(this) || this;
48903
+ var partialObserver;
48904
+ if (isFunction(observerOrNext) || !observerOrNext) {
48905
+ partialObserver = {
48906
+ next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0,
48907
+ error: error5 !== null && error5 !== void 0 ? error5 : void 0,
48908
+ complete: complete2 !== null && complete2 !== void 0 ? complete2 : void 0
48909
+ };
48910
+ } else {
48911
+ var context_1;
48912
+ if (_this && config.useDeprecatedNextContext) {
48913
+ context_1 = Object.create(observerOrNext);
48914
+ context_1.unsubscribe = function() {
48915
+ return _this.unsubscribe();
48916
+ };
48917
+ partialObserver = {
48918
+ next: observerOrNext.next && bind(observerOrNext.next, context_1),
48919
+ error: observerOrNext.error && bind(observerOrNext.error, context_1),
48920
+ complete: observerOrNext.complete && bind(observerOrNext.complete, context_1)
48921
+ };
48922
+ } else {
48923
+ partialObserver = observerOrNext;
48924
+ }
48925
+ }
48926
+ _this.destination = new ConsumerObserver(partialObserver);
48927
+ return _this;
48928
+ }
48929
+ return SafeSubscriber2;
48930
+ }(Subscriber);
48931
+ function handleUnhandledError(error5) {
48932
+ if (config.useDeprecatedSynchronousErrorHandling) {
48933
+ captureError(error5);
48934
+ } else {
48935
+ reportUnhandledError(error5);
48936
+ }
48937
+ }
48938
+ function defaultErrorHandler(err) {
48939
+ throw err;
48940
+ }
48941
+ function handleStoppedNotification(notification2, subscriber3) {
48942
+ var onStoppedNotification = config.onStoppedNotification;
48943
+ onStoppedNotification && timeoutProvider.setTimeout(function() {
48944
+ return onStoppedNotification(notification2, subscriber3);
48945
+ });
48946
+ }
48947
+ var EMPTY_OBSERVER = {
48948
+ closed: true,
48949
+ next: noop,
48950
+ error: defaultErrorHandler,
48951
+ complete: noop
48952
+ };
48953
+
48954
+ // ../node_modules/rxjs/dist/esm5/internal/symbol/observable.js
48955
+ var observable = function() {
48956
+ return typeof Symbol === "function" && Symbol.observable || "@@observable";
48957
+ }();
48958
+
48959
+ // ../node_modules/rxjs/dist/esm5/internal/util/identity.js
48960
+ function identity(x) {
48961
+ return x;
48962
+ }
48963
+
48964
+ // ../node_modules/rxjs/dist/esm5/internal/util/pipe.js
48965
+ function pipeFromArray(fns) {
48966
+ if (fns.length === 0) {
48967
+ return identity;
48968
+ }
48969
+ if (fns.length === 1) {
48970
+ return fns[0];
48971
+ }
48972
+ return function piped(input2) {
48973
+ return fns.reduce(function(prev, fn2) {
48974
+ return fn2(prev);
48975
+ }, input2);
48976
+ };
48977
+ }
48978
+
48979
+ // ../node_modules/rxjs/dist/esm5/internal/Observable.js
48980
+ var Observable = function() {
48981
+ function Observable2(subscribe) {
48982
+ if (subscribe) {
48983
+ this._subscribe = subscribe;
48984
+ }
48985
+ }
48986
+ Observable2.prototype.lift = function(operator2) {
48987
+ var observable2 = new Observable2();
48988
+ observable2.source = this;
48989
+ observable2.operator = operator2;
48990
+ return observable2;
48991
+ };
48992
+ Observable2.prototype.subscribe = function(observerOrNext, error5, complete2) {
48993
+ var _this = this;
48994
+ var subscriber3 = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error5, complete2);
48995
+ errorContext(function() {
48996
+ var _a = _this, operator2 = _a.operator, source8 = _a.source;
48997
+ subscriber3.add(operator2 ? operator2.call(subscriber3, source8) : source8 ? _this._subscribe(subscriber3) : _this._trySubscribe(subscriber3));
48998
+ });
48999
+ return subscriber3;
49000
+ };
49001
+ Observable2.prototype._trySubscribe = function(sink) {
49002
+ try {
49003
+ return this._subscribe(sink);
49004
+ } catch (err) {
49005
+ sink.error(err);
49006
+ }
49007
+ };
49008
+ Observable2.prototype.forEach = function(next3, promiseCtor) {
49009
+ var _this = this;
49010
+ promiseCtor = getPromiseCtor(promiseCtor);
49011
+ return new promiseCtor(function(resolve, reject2) {
49012
+ var subscriber3 = new SafeSubscriber({
49013
+ next: function(value6) {
49014
+ try {
49015
+ next3(value6);
49016
+ } catch (err) {
49017
+ reject2(err);
49018
+ subscriber3.unsubscribe();
49019
+ }
49020
+ },
49021
+ error: reject2,
49022
+ complete: resolve
49023
+ });
49024
+ _this.subscribe(subscriber3);
49025
+ });
49026
+ };
49027
+ Observable2.prototype._subscribe = function(subscriber3) {
49028
+ var _a;
49029
+ return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber3);
49030
+ };
49031
+ Observable2.prototype[observable] = function() {
49032
+ return this;
49033
+ };
49034
+ Observable2.prototype.pipe = function() {
49035
+ var operations = [];
49036
+ for (var _i = 0; _i < arguments.length; _i++) {
49037
+ operations[_i] = arguments[_i];
49038
+ }
49039
+ return pipeFromArray(operations)(this);
49040
+ };
49041
+ Observable2.prototype.toPromise = function(promiseCtor) {
49042
+ var _this = this;
49043
+ promiseCtor = getPromiseCtor(promiseCtor);
49044
+ return new promiseCtor(function(resolve, reject2) {
49045
+ var value6;
49046
+ _this.subscribe(function(x) {
49047
+ return value6 = x;
49048
+ }, function(err) {
49049
+ return reject2(err);
49050
+ }, function() {
49051
+ return resolve(value6);
49052
+ });
49053
+ });
49054
+ };
49055
+ Observable2.create = function(subscribe) {
49056
+ return new Observable2(subscribe);
49057
+ };
49058
+ return Observable2;
49059
+ }();
49060
+ function getPromiseCtor(promiseCtor) {
49061
+ var _a;
49062
+ return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
49063
+ }
49064
+ function isObserver(value6) {
49065
+ return value6 && isFunction(value6.next) && isFunction(value6.error) && isFunction(value6.complete);
49066
+ }
49067
+ function isSubscriber(value6) {
49068
+ return value6 && value6 instanceof Subscriber || isObserver(value6) && isSubscription(value6);
49069
+ }
49070
+
49071
+ // ../node_modules/rxjs/dist/esm5/internal/util/lift.js
49072
+ function hasLift(source8) {
49073
+ return isFunction(source8 === null || source8 === void 0 ? void 0 : source8.lift);
49074
+ }
49075
+ function operate(init) {
49076
+ return function(source8) {
49077
+ if (hasLift(source8)) {
49078
+ return source8.lift(function(liftedSource) {
49079
+ try {
49080
+ return init(liftedSource, this);
49081
+ } catch (err) {
49082
+ this.error(err);
49083
+ }
49084
+ });
49085
+ }
49086
+ throw new TypeError("Unable to lift unknown Observable type");
49087
+ };
49088
+ }
49089
+
49090
+ // ../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js
49091
+ function createOperatorSubscriber(destination2, onNext, onComplete, onError, onFinalize) {
49092
+ return new OperatorSubscriber(destination2, onNext, onComplete, onError, onFinalize);
49093
+ }
49094
+ var OperatorSubscriber = function(_super) {
49095
+ __extends(OperatorSubscriber2, _super);
49096
+ function OperatorSubscriber2(destination2, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
49097
+ var _this = _super.call(this, destination2) || this;
49098
+ _this.onFinalize = onFinalize;
49099
+ _this.shouldUnsubscribe = shouldUnsubscribe;
49100
+ _this._next = onNext ? function(value6) {
49101
+ try {
49102
+ onNext(value6);
49103
+ } catch (err) {
49104
+ destination2.error(err);
49105
+ }
49106
+ } : _super.prototype._next;
49107
+ _this._error = onError ? function(err) {
49108
+ try {
49109
+ onError(err);
49110
+ } catch (err2) {
49111
+ destination2.error(err2);
49112
+ } finally {
49113
+ this.unsubscribe();
49114
+ }
49115
+ } : _super.prototype._error;
49116
+ _this._complete = onComplete ? function() {
49117
+ try {
49118
+ onComplete();
49119
+ } catch (err) {
49120
+ destination2.error(err);
49121
+ } finally {
49122
+ this.unsubscribe();
49123
+ }
49124
+ } : _super.prototype._complete;
49125
+ return _this;
49126
+ }
49127
+ OperatorSubscriber2.prototype.unsubscribe = function() {
49128
+ var _a;
49129
+ if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
49130
+ var closed_1 = this.closed;
49131
+ _super.prototype.unsubscribe.call(this);
49132
+ !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));
49133
+ }
49134
+ };
49135
+ return OperatorSubscriber2;
49136
+ }(Subscriber);
49137
+
49138
+ // ../node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js
49139
+ var ObjectUnsubscribedError = createErrorClass(function(_super) {
49140
+ return function ObjectUnsubscribedErrorImpl() {
49141
+ _super(this);
49142
+ this.name = "ObjectUnsubscribedError";
49143
+ this.message = "object unsubscribed";
49144
+ };
49145
+ });
49146
+
49147
+ // ../node_modules/rxjs/dist/esm5/internal/Subject.js
49148
+ var Subject = function(_super) {
49149
+ __extends(Subject2, _super);
49150
+ function Subject2() {
49151
+ var _this = _super.call(this) || this;
49152
+ _this.closed = false;
49153
+ _this.currentObservers = null;
49154
+ _this.observers = [];
49155
+ _this.isStopped = false;
49156
+ _this.hasError = false;
49157
+ _this.thrownError = null;
49158
+ return _this;
49159
+ }
49160
+ Subject2.prototype.lift = function(operator2) {
49161
+ var subject5 = new AnonymousSubject(this, this);
49162
+ subject5.operator = operator2;
49163
+ return subject5;
49164
+ };
49165
+ Subject2.prototype._throwIfClosed = function() {
49166
+ if (this.closed) {
49167
+ throw new ObjectUnsubscribedError();
49168
+ }
49169
+ };
49170
+ Subject2.prototype.next = function(value6) {
49171
+ var _this = this;
49172
+ errorContext(function() {
49173
+ var e_1, _a;
49174
+ _this._throwIfClosed();
49175
+ if (!_this.isStopped) {
49176
+ if (!_this.currentObservers) {
49177
+ _this.currentObservers = Array.from(_this.observers);
49178
+ }
49179
+ try {
49180
+ for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
49181
+ var observer2 = _c.value;
49182
+ observer2.next(value6);
49183
+ }
49184
+ } catch (e_1_1) {
49185
+ e_1 = { error: e_1_1 };
49186
+ } finally {
49187
+ try {
49188
+ if (_c && !_c.done && (_a = _b.return))
49189
+ _a.call(_b);
49190
+ } finally {
49191
+ if (e_1)
49192
+ throw e_1.error;
49193
+ }
49194
+ }
49195
+ }
49196
+ });
49197
+ };
49198
+ Subject2.prototype.error = function(err) {
49199
+ var _this = this;
49200
+ errorContext(function() {
49201
+ _this._throwIfClosed();
49202
+ if (!_this.isStopped) {
49203
+ _this.hasError = _this.isStopped = true;
49204
+ _this.thrownError = err;
49205
+ var observers = _this.observers;
49206
+ while (observers.length) {
49207
+ observers.shift().error(err);
49208
+ }
49209
+ }
49210
+ });
49211
+ };
49212
+ Subject2.prototype.complete = function() {
49213
+ var _this = this;
49214
+ errorContext(function() {
49215
+ _this._throwIfClosed();
49216
+ if (!_this.isStopped) {
49217
+ _this.isStopped = true;
49218
+ var observers = _this.observers;
49219
+ while (observers.length) {
49220
+ observers.shift().complete();
49221
+ }
49222
+ }
49223
+ });
49224
+ };
49225
+ Subject2.prototype.unsubscribe = function() {
49226
+ this.isStopped = this.closed = true;
49227
+ this.observers = this.currentObservers = null;
49228
+ };
49229
+ Object.defineProperty(Subject2.prototype, "observed", {
49230
+ get: function() {
49231
+ var _a;
49232
+ return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
49233
+ },
49234
+ enumerable: false,
49235
+ configurable: true
49236
+ });
49237
+ Subject2.prototype._trySubscribe = function(subscriber3) {
49238
+ this._throwIfClosed();
49239
+ return _super.prototype._trySubscribe.call(this, subscriber3);
49240
+ };
49241
+ Subject2.prototype._subscribe = function(subscriber3) {
49242
+ this._throwIfClosed();
49243
+ this._checkFinalizedStatuses(subscriber3);
49244
+ return this._innerSubscribe(subscriber3);
49245
+ };
49246
+ Subject2.prototype._innerSubscribe = function(subscriber3) {
49247
+ var _this = this;
49248
+ var _a = this, hasError2 = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
49249
+ if (hasError2 || isStopped) {
49250
+ return EMPTY_SUBSCRIPTION;
49251
+ }
49252
+ this.currentObservers = null;
49253
+ observers.push(subscriber3);
49254
+ return new Subscription(function() {
49255
+ _this.currentObservers = null;
49256
+ arrRemove(observers, subscriber3);
49257
+ });
49258
+ };
49259
+ Subject2.prototype._checkFinalizedStatuses = function(subscriber3) {
49260
+ var _a = this, hasError2 = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
49261
+ if (hasError2) {
49262
+ subscriber3.error(thrownError);
49263
+ } else if (isStopped) {
49264
+ subscriber3.complete();
49265
+ }
49266
+ };
49267
+ Subject2.prototype.asObservable = function() {
49268
+ var observable2 = new Observable();
49269
+ observable2.source = this;
49270
+ return observable2;
49271
+ };
49272
+ Subject2.create = function(destination2, source8) {
49273
+ return new AnonymousSubject(destination2, source8);
49274
+ };
49275
+ return Subject2;
49276
+ }(Observable);
49277
+ var AnonymousSubject = function(_super) {
49278
+ __extends(AnonymousSubject2, _super);
49279
+ function AnonymousSubject2(destination2, source8) {
49280
+ var _this = _super.call(this) || this;
49281
+ _this.destination = destination2;
49282
+ _this.source = source8;
49283
+ return _this;
49284
+ }
49285
+ AnonymousSubject2.prototype.next = function(value6) {
49286
+ var _a, _b;
49287
+ (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value6);
49288
+ };
49289
+ AnonymousSubject2.prototype.error = function(err) {
49290
+ var _a, _b;
49291
+ (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
49292
+ };
49293
+ AnonymousSubject2.prototype.complete = function() {
49294
+ var _a, _b;
49295
+ (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
49296
+ };
49297
+ AnonymousSubject2.prototype._subscribe = function(subscriber3) {
49298
+ var _a, _b;
49299
+ return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber3)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
49300
+ };
49301
+ return AnonymousSubject2;
49302
+ }(Subject);
49303
+
49304
+ // ../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js
49305
+ var BehaviorSubject = function(_super) {
49306
+ __extends(BehaviorSubject2, _super);
49307
+ function BehaviorSubject2(_value2) {
49308
+ var _this = _super.call(this) || this;
49309
+ _this._value = _value2;
49310
+ return _this;
49311
+ }
49312
+ Object.defineProperty(BehaviorSubject2.prototype, "value", {
49313
+ get: function() {
49314
+ return this.getValue();
49315
+ },
49316
+ enumerable: false,
49317
+ configurable: true
49318
+ });
49319
+ BehaviorSubject2.prototype._subscribe = function(subscriber3) {
49320
+ var subscription2 = _super.prototype._subscribe.call(this, subscriber3);
49321
+ !subscription2.closed && subscriber3.next(this._value);
49322
+ return subscription2;
49323
+ };
49324
+ BehaviorSubject2.prototype.getValue = function() {
49325
+ var _a = this, hasError2 = _a.hasError, thrownError = _a.thrownError, _value2 = _a._value;
49326
+ if (hasError2) {
49327
+ throw thrownError;
49328
+ }
49329
+ this._throwIfClosed();
49330
+ return _value2;
49331
+ };
49332
+ BehaviorSubject2.prototype.next = function(value6) {
49333
+ _super.prototype.next.call(this, this._value = value6);
49334
+ };
49335
+ return BehaviorSubject2;
49336
+ }(Subject);
49337
+
49338
+ // ../node_modules/rxjs/dist/esm5/internal/observable/empty.js
49339
+ var EMPTY = new Observable(function(subscriber3) {
49340
+ return subscriber3.complete();
49341
+ });
49342
+
49343
+ // ../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js
49344
+ function isScheduler(value6) {
49345
+ return value6 && isFunction(value6.schedule);
49346
+ }
49347
+
49348
+ // ../node_modules/rxjs/dist/esm5/internal/util/args.js
49349
+ function last(arr) {
49350
+ return arr[arr.length - 1];
49351
+ }
49352
+ function popScheduler(args) {
49353
+ return isScheduler(last(args)) ? args.pop() : void 0;
49354
+ }
49355
+ function popNumber(args, defaultValue4) {
49356
+ return typeof last(args) === "number" ? args.pop() : defaultValue4;
49357
+ }
49358
+
49359
+ // ../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js
49360
+ var isArrayLike = function(x) {
49361
+ return x && typeof x.length === "number" && typeof x !== "function";
49362
+ };
49363
+
49364
+ // ../node_modules/rxjs/dist/esm5/internal/util/isPromise.js
49365
+ function isPromise(value6) {
49366
+ return isFunction(value6 === null || value6 === void 0 ? void 0 : value6.then);
49367
+ }
49368
+
49369
+ // ../node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js
49370
+ function isInteropObservable(input2) {
49371
+ return isFunction(input2[observable]);
49372
+ }
49373
+
49374
+ // ../node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js
49375
+ function isAsyncIterable(obj) {
49376
+ return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
49377
+ }
49378
+
49379
+ // ../node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js
49380
+ function createInvalidObservableTypeError(input2) {
49381
+ return new TypeError("You provided " + (input2 !== null && typeof input2 === "object" ? "an invalid object" : "'" + input2 + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
49382
+ }
49383
+
49384
+ // ../node_modules/rxjs/dist/esm5/internal/symbol/iterator.js
49385
+ function getSymbolIterator() {
49386
+ if (typeof Symbol !== "function" || !Symbol.iterator) {
49387
+ return "@@iterator";
49388
+ }
49389
+ return Symbol.iterator;
49390
+ }
49391
+ var iterator = getSymbolIterator();
49392
+
49393
+ // ../node_modules/rxjs/dist/esm5/internal/util/isIterable.js
49394
+ function isIterable(input2) {
49395
+ return isFunction(input2 === null || input2 === void 0 ? void 0 : input2[iterator]);
49396
+ }
49397
+
49398
+ // ../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js
49399
+ function readableStreamLikeToAsyncGenerator(readableStream) {
49400
+ return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {
49401
+ var reader, _a, value6, done;
49402
+ return __generator(this, function(_b) {
49403
+ switch (_b.label) {
49404
+ case 0:
49405
+ reader = readableStream.getReader();
49406
+ _b.label = 1;
49407
+ case 1:
49408
+ _b.trys.push([1, , 9, 10]);
49409
+ _b.label = 2;
49410
+ case 2:
49411
+ if (false)
49412
+ return [3, 8];
49413
+ return [4, __await(reader.read())];
49414
+ case 3:
49415
+ _a = _b.sent(), value6 = _a.value, done = _a.done;
49416
+ if (!done)
49417
+ return [3, 5];
49418
+ return [4, __await(void 0)];
49419
+ case 4:
49420
+ return [2, _b.sent()];
49421
+ case 5:
49422
+ return [4, __await(value6)];
49423
+ case 6:
49424
+ return [4, _b.sent()];
49425
+ case 7:
49426
+ _b.sent();
49427
+ return [3, 2];
49428
+ case 8:
49429
+ return [3, 10];
49430
+ case 9:
49431
+ reader.releaseLock();
49432
+ return [7];
49433
+ case 10:
49434
+ return [2];
49435
+ }
49436
+ });
49437
+ });
49438
+ }
49439
+ function isReadableStreamLike(obj) {
49440
+ return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);
49441
+ }
49442
+
49443
+ // ../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js
49444
+ function innerFrom(input2) {
49445
+ if (input2 instanceof Observable) {
49446
+ return input2;
49447
+ }
49448
+ if (input2 != null) {
49449
+ if (isInteropObservable(input2)) {
49450
+ return fromInteropObservable(input2);
49451
+ }
49452
+ if (isArrayLike(input2)) {
49453
+ return fromArrayLike(input2);
49454
+ }
49455
+ if (isPromise(input2)) {
49456
+ return fromPromise(input2);
49457
+ }
49458
+ if (isAsyncIterable(input2)) {
49459
+ return fromAsyncIterable(input2);
49460
+ }
49461
+ if (isIterable(input2)) {
49462
+ return fromIterable(input2);
49463
+ }
49464
+ if (isReadableStreamLike(input2)) {
49465
+ return fromReadableStreamLike(input2);
49466
+ }
49467
+ }
49468
+ throw createInvalidObservableTypeError(input2);
49469
+ }
49470
+ function fromInteropObservable(obj) {
49471
+ return new Observable(function(subscriber3) {
49472
+ var obs = obj[observable]();
49473
+ if (isFunction(obs.subscribe)) {
49474
+ return obs.subscribe(subscriber3);
49475
+ }
49476
+ throw new TypeError("Provided object does not correctly implement Symbol.observable");
49477
+ });
49478
+ }
49479
+ function fromArrayLike(array) {
49480
+ return new Observable(function(subscriber3) {
49481
+ for (var i = 0; i < array.length && !subscriber3.closed; i++) {
49482
+ subscriber3.next(array[i]);
49483
+ }
49484
+ subscriber3.complete();
49485
+ });
49486
+ }
49487
+ function fromPromise(promise) {
49488
+ return new Observable(function(subscriber3) {
49489
+ promise.then(function(value6) {
49490
+ if (!subscriber3.closed) {
49491
+ subscriber3.next(value6);
49492
+ subscriber3.complete();
49493
+ }
49494
+ }, function(err) {
49495
+ return subscriber3.error(err);
49496
+ }).then(null, reportUnhandledError);
49497
+ });
49498
+ }
49499
+ function fromIterable(iterable) {
49500
+ return new Observable(function(subscriber3) {
49501
+ var e_1, _a;
49502
+ try {
49503
+ for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {
49504
+ var value6 = iterable_1_1.value;
49505
+ subscriber3.next(value6);
49506
+ if (subscriber3.closed) {
49507
+ return;
49508
+ }
49509
+ }
49510
+ } catch (e_1_1) {
49511
+ e_1 = { error: e_1_1 };
49512
+ } finally {
49513
+ try {
49514
+ if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return))
49515
+ _a.call(iterable_1);
49516
+ } finally {
49517
+ if (e_1)
49518
+ throw e_1.error;
49519
+ }
49520
+ }
49521
+ subscriber3.complete();
49522
+ });
49523
+ }
49524
+ function fromAsyncIterable(asyncIterable) {
49525
+ return new Observable(function(subscriber3) {
49526
+ process2(asyncIterable, subscriber3).catch(function(err) {
49527
+ return subscriber3.error(err);
49528
+ });
49529
+ });
49530
+ }
49531
+ function fromReadableStreamLike(readableStream) {
49532
+ return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
49533
+ }
49534
+ function process2(asyncIterable, subscriber3) {
49535
+ var asyncIterable_1, asyncIterable_1_1;
49536
+ var e_2, _a;
49537
+ return __awaiter(this, void 0, void 0, function() {
49538
+ var value6, e_2_1;
49539
+ return __generator(this, function(_b) {
49540
+ switch (_b.label) {
49541
+ case 0:
49542
+ _b.trys.push([0, 5, 6, 11]);
49543
+ asyncIterable_1 = __asyncValues(asyncIterable);
49544
+ _b.label = 1;
49545
+ case 1:
49546
+ return [4, asyncIterable_1.next()];
49547
+ case 2:
49548
+ if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done))
49549
+ return [3, 4];
49550
+ value6 = asyncIterable_1_1.value;
49551
+ subscriber3.next(value6);
49552
+ if (subscriber3.closed) {
49553
+ return [2];
49554
+ }
49555
+ _b.label = 3;
49556
+ case 3:
49557
+ return [3, 1];
49558
+ case 4:
49559
+ return [3, 11];
49560
+ case 5:
49561
+ e_2_1 = _b.sent();
49562
+ e_2 = { error: e_2_1 };
49563
+ return [3, 11];
49564
+ case 6:
49565
+ _b.trys.push([6, , 9, 10]);
49566
+ if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)))
49567
+ return [3, 8];
49568
+ return [4, _a.call(asyncIterable_1)];
49569
+ case 7:
49570
+ _b.sent();
49571
+ _b.label = 8;
49572
+ case 8:
49573
+ return [3, 10];
49574
+ case 9:
49575
+ if (e_2)
49576
+ throw e_2.error;
49577
+ return [7];
49578
+ case 10:
49579
+ return [7];
49580
+ case 11:
49581
+ subscriber3.complete();
49582
+ return [2];
49583
+ }
49584
+ });
49585
+ });
49586
+ }
49587
+
49588
+ // ../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js
49589
+ function executeSchedule(parentSubscription, scheduler, work, delay, repeat3) {
49590
+ if (delay === void 0) {
49591
+ delay = 0;
49592
+ }
49593
+ if (repeat3 === void 0) {
49594
+ repeat3 = false;
49595
+ }
49596
+ var scheduleSubscription = scheduler.schedule(function() {
49597
+ work();
49598
+ if (repeat3) {
49599
+ parentSubscription.add(this.schedule(null, delay));
49600
+ } else {
49601
+ this.unsubscribe();
49602
+ }
49603
+ }, delay);
49604
+ parentSubscription.add(scheduleSubscription);
49605
+ if (!repeat3) {
49606
+ return scheduleSubscription;
49607
+ }
49608
+ }
49609
+
49610
+ // ../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js
49611
+ function observeOn(scheduler, delay) {
49612
+ if (delay === void 0) {
49613
+ delay = 0;
49614
+ }
49615
+ return operate(function(source8, subscriber3) {
49616
+ source8.subscribe(createOperatorSubscriber(subscriber3, function(value6) {
49617
+ return executeSchedule(subscriber3, scheduler, function() {
49618
+ return subscriber3.next(value6);
49619
+ }, delay);
49620
+ }, function() {
49621
+ return executeSchedule(subscriber3, scheduler, function() {
49622
+ return subscriber3.complete();
49623
+ }, delay);
49624
+ }, function(err) {
49625
+ return executeSchedule(subscriber3, scheduler, function() {
49626
+ return subscriber3.error(err);
49627
+ }, delay);
49628
+ }));
49629
+ });
49630
+ }
49631
+
49632
+ // ../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js
49633
+ function subscribeOn(scheduler, delay) {
49634
+ if (delay === void 0) {
49635
+ delay = 0;
49636
+ }
49637
+ return operate(function(source8, subscriber3) {
49638
+ subscriber3.add(scheduler.schedule(function() {
49639
+ return source8.subscribe(subscriber3);
49640
+ }, delay));
49641
+ });
49642
+ }
49643
+
49644
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js
49645
+ function scheduleObservable(input2, scheduler) {
49646
+ return innerFrom(input2).pipe(subscribeOn(scheduler), observeOn(scheduler));
49647
+ }
49648
+
49649
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js
49650
+ function schedulePromise(input2, scheduler) {
49651
+ return innerFrom(input2).pipe(subscribeOn(scheduler), observeOn(scheduler));
49652
+ }
49653
+
49654
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js
49655
+ function scheduleArray(input2, scheduler) {
49656
+ return new Observable(function(subscriber3) {
49657
+ var i = 0;
49658
+ return scheduler.schedule(function() {
49659
+ if (i === input2.length) {
49660
+ subscriber3.complete();
49661
+ } else {
49662
+ subscriber3.next(input2[i++]);
49663
+ if (!subscriber3.closed) {
49664
+ this.schedule();
49665
+ }
49666
+ }
49667
+ });
49668
+ });
49669
+ }
49670
+
49671
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js
49672
+ function scheduleIterable(input2, scheduler) {
49673
+ return new Observable(function(subscriber3) {
49674
+ var iterator2;
49675
+ executeSchedule(subscriber3, scheduler, function() {
49676
+ iterator2 = input2[iterator]();
49677
+ executeSchedule(subscriber3, scheduler, function() {
49678
+ var _a;
49679
+ var value6;
49680
+ var done;
49681
+ try {
49682
+ _a = iterator2.next(), value6 = _a.value, done = _a.done;
49683
+ } catch (err) {
49684
+ subscriber3.error(err);
49685
+ return;
49686
+ }
49687
+ if (done) {
49688
+ subscriber3.complete();
49689
+ } else {
49690
+ subscriber3.next(value6);
49691
+ }
49692
+ }, 0, true);
49693
+ });
49694
+ return function() {
49695
+ return isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return();
49696
+ };
49697
+ });
49698
+ }
49699
+
49700
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js
49701
+ function scheduleAsyncIterable(input2, scheduler) {
49702
+ if (!input2) {
49703
+ throw new Error("Iterable cannot be null");
49704
+ }
49705
+ return new Observable(function(subscriber3) {
49706
+ executeSchedule(subscriber3, scheduler, function() {
49707
+ var iterator2 = input2[Symbol.asyncIterator]();
49708
+ executeSchedule(subscriber3, scheduler, function() {
49709
+ iterator2.next().then(function(result5) {
49710
+ if (result5.done) {
49711
+ subscriber3.complete();
49712
+ } else {
49713
+ subscriber3.next(result5.value);
49714
+ }
49715
+ });
49716
+ }, 0, true);
49717
+ });
49718
+ });
49719
+ }
49720
+
49721
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js
49722
+ function scheduleReadableStreamLike(input2, scheduler) {
49723
+ return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input2), scheduler);
49724
+ }
49725
+
49726
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js
49727
+ function scheduled(input2, scheduler) {
49728
+ if (input2 != null) {
49729
+ if (isInteropObservable(input2)) {
49730
+ return scheduleObservable(input2, scheduler);
49731
+ }
49732
+ if (isArrayLike(input2)) {
49733
+ return scheduleArray(input2, scheduler);
49734
+ }
49735
+ if (isPromise(input2)) {
49736
+ return schedulePromise(input2, scheduler);
49737
+ }
49738
+ if (isAsyncIterable(input2)) {
49739
+ return scheduleAsyncIterable(input2, scheduler);
49740
+ }
49741
+ if (isIterable(input2)) {
49742
+ return scheduleIterable(input2, scheduler);
49743
+ }
49744
+ if (isReadableStreamLike(input2)) {
49745
+ return scheduleReadableStreamLike(input2, scheduler);
49746
+ }
49747
+ }
49748
+ throw createInvalidObservableTypeError(input2);
49749
+ }
49750
+
49751
+ // ../node_modules/rxjs/dist/esm5/internal/observable/from.js
49752
+ function from(input2, scheduler) {
49753
+ return scheduler ? scheduled(input2, scheduler) : innerFrom(input2);
49754
+ }
49755
+
49756
+ // ../node_modules/rxjs/dist/esm5/internal/operators/map.js
49757
+ function map(project, thisArg) {
49758
+ return operate(function(source8, subscriber3) {
49759
+ var index2 = 0;
49760
+ source8.subscribe(createOperatorSubscriber(subscriber3, function(value6) {
49761
+ subscriber3.next(project.call(thisArg, value6, index2++));
49762
+ }));
49763
+ });
49764
+ }
49765
+
49766
+ // ../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js
49767
+ var isArray = Array.isArray;
49768
+ function callOrApply(fn2, args) {
49769
+ return isArray(args) ? fn2.apply(void 0, __spreadArray([], __read(args))) : fn2(args);
49770
+ }
49771
+ function mapOneOrManyArgs(fn2) {
49772
+ return map(function(args) {
49773
+ return callOrApply(fn2, args);
49774
+ });
49775
+ }
49776
+
49777
+ // ../node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js
49778
+ function mergeInternals(source8, subscriber3, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
49779
+ var buffer = [];
49780
+ var active2 = 0;
49781
+ var index2 = 0;
49782
+ var isComplete = false;
49783
+ var checkComplete = function() {
49784
+ if (isComplete && !buffer.length && !active2) {
49785
+ subscriber3.complete();
49786
+ }
49787
+ };
49788
+ var outerNext = function(value6) {
49789
+ return active2 < concurrent ? doInnerSub(value6) : buffer.push(value6);
49790
+ };
49791
+ var doInnerSub = function(value6) {
49792
+ expand && subscriber3.next(value6);
49793
+ active2++;
49794
+ var innerComplete = false;
49795
+ innerFrom(project(value6, index2++)).subscribe(createOperatorSubscriber(subscriber3, function(innerValue) {
49796
+ onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
49797
+ if (expand) {
49798
+ outerNext(innerValue);
49799
+ } else {
49800
+ subscriber3.next(innerValue);
49801
+ }
49802
+ }, function() {
49803
+ innerComplete = true;
49804
+ }, void 0, function() {
49805
+ if (innerComplete) {
49806
+ try {
49807
+ active2--;
49808
+ var _loop_1 = function() {
49809
+ var bufferedValue = buffer.shift();
49810
+ if (innerSubScheduler) {
49811
+ executeSchedule(subscriber3, innerSubScheduler, function() {
49812
+ return doInnerSub(bufferedValue);
49813
+ });
49814
+ } else {
49815
+ doInnerSub(bufferedValue);
49816
+ }
49817
+ };
49818
+ while (buffer.length && active2 < concurrent) {
49819
+ _loop_1();
49820
+ }
49821
+ checkComplete();
49822
+ } catch (err) {
49823
+ subscriber3.error(err);
49824
+ }
49825
+ }
49826
+ }));
49827
+ };
49828
+ source8.subscribe(createOperatorSubscriber(subscriber3, outerNext, function() {
49829
+ isComplete = true;
49830
+ checkComplete();
49831
+ }));
49832
+ return function() {
49833
+ additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
49834
+ };
49835
+ }
49836
+
49837
+ // ../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js
49838
+ function mergeMap(project, resultSelector, concurrent) {
49839
+ if (concurrent === void 0) {
49840
+ concurrent = Infinity;
49841
+ }
49842
+ if (isFunction(resultSelector)) {
49843
+ return mergeMap(function(a, i) {
49844
+ return map(function(b, ii) {
49845
+ return resultSelector(a, b, i, ii);
49846
+ })(innerFrom(project(a, i)));
49847
+ }, concurrent);
49848
+ } else if (typeof resultSelector === "number") {
49849
+ concurrent = resultSelector;
49850
+ }
49851
+ return operate(function(source8, subscriber3) {
49852
+ return mergeInternals(source8, subscriber3, project, concurrent);
49853
+ });
49854
+ }
49855
+
49856
+ // ../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js
49857
+ function mergeAll(concurrent) {
49858
+ if (concurrent === void 0) {
49859
+ concurrent = Infinity;
49860
+ }
49861
+ return mergeMap(identity, concurrent);
49862
+ }
49863
+
49864
+ // ../node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js
49865
+ var nodeEventEmitterMethods = ["addListener", "removeListener"];
49866
+ var eventTargetMethods = ["addEventListener", "removeEventListener"];
49867
+ var jqueryMethods = ["on", "off"];
49868
+ function fromEvent(target5, eventName, options, resultSelector) {
49869
+ if (isFunction(options)) {
49870
+ resultSelector = options;
49871
+ options = void 0;
49872
+ }
49873
+ if (resultSelector) {
49874
+ return fromEvent(target5, eventName, options).pipe(mapOneOrManyArgs(resultSelector));
49875
+ }
49876
+ var _a = __read(isEventTarget(target5) ? eventTargetMethods.map(function(methodName) {
49877
+ return function(handler) {
49878
+ return target5[methodName](eventName, handler, options);
49879
+ };
49880
+ }) : isNodeStyleEventEmitter(target5) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target5, eventName)) : isJQueryStyleEventEmitter(target5) ? jqueryMethods.map(toCommonHandlerRegistry(target5, eventName)) : [], 2), add2 = _a[0], remove = _a[1];
49881
+ if (!add2) {
49882
+ if (isArrayLike(target5)) {
49883
+ return mergeMap(function(subTarget) {
49884
+ return fromEvent(subTarget, eventName, options);
49885
+ })(innerFrom(target5));
49886
+ }
49887
+ }
49888
+ if (!add2) {
49889
+ throw new TypeError("Invalid event target");
49890
+ }
49891
+ return new Observable(function(subscriber3) {
49892
+ var handler = function() {
49893
+ var args = [];
49894
+ for (var _i = 0; _i < arguments.length; _i++) {
49895
+ args[_i] = arguments[_i];
49896
+ }
49897
+ return subscriber3.next(1 < args.length ? args : args[0]);
49898
+ };
49899
+ add2(handler);
49900
+ return function() {
49901
+ return remove(handler);
49902
+ };
49903
+ });
49904
+ }
49905
+ function toCommonHandlerRegistry(target5, eventName) {
49906
+ return function(methodName) {
49907
+ return function(handler) {
49908
+ return target5[methodName](eventName, handler);
49909
+ };
49910
+ };
49911
+ }
49912
+ function isNodeStyleEventEmitter(target5) {
49913
+ return isFunction(target5.addListener) && isFunction(target5.removeListener);
49914
+ }
49915
+ function isJQueryStyleEventEmitter(target5) {
49916
+ return isFunction(target5.on) && isFunction(target5.off);
49917
+ }
49918
+ function isEventTarget(target5) {
49919
+ return isFunction(target5.addEventListener) && isFunction(target5.removeEventListener);
49920
+ }
49921
+
49922
+ // ../node_modules/rxjs/dist/esm5/internal/observable/merge.js
49923
+ function merge() {
49924
+ var args = [];
49925
+ for (var _i = 0; _i < arguments.length; _i++) {
49926
+ args[_i] = arguments[_i];
49927
+ }
49928
+ var scheduler = popScheduler(args);
49929
+ var concurrent = popNumber(args, Infinity);
49930
+ var sources = args;
49931
+ return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler));
49932
+ }
49933
+
49934
+ // src/authentication/observeSession.ts
49935
+ function observeSession(session4) {
49936
+ const sessionInfoSubject = new BehaviorSubject(session4.info);
49937
+ const login = fromEvent(session4.events, EVENTS.LOGIN);
49938
+ const logout = fromEvent(session4.events, EVENTS.LOGOUT);
49939
+ const sessionRestored = fromEvent(session4.events, EVENTS.SESSION_RESTORED);
49940
+ merge(login, logout, sessionRestored).pipe(map(() => sessionInfoSubject.next(session4.info))).subscribe();
49941
+ return sessionInfoSubject;
49942
+ }
49943
+
47689
49944
  // src/authentication/index.ts
47690
49945
  var BrowserSession = class {
47691
49946
  get authenticatedFetch() {
@@ -47693,6 +49948,7 @@ var PodOS = (() => {
47693
49948
  }
47694
49949
  constructor() {
47695
49950
  this.session = new Session();
49951
+ this.sessionInfo$ = observeSession(this.session);
47696
49952
  this._authenticatedFetch = this.session.fetch;
47697
49953
  }
47698
49954
  async handleIncomingRedirect() {
@@ -47713,11 +49969,14 @@ var PodOS = (() => {
47713
49969
  return this.session.logout();
47714
49970
  }
47715
49971
  trackSession(callback) {
47716
- this.session.onLogin(() => callback(this.session.info));
47717
- this.session.onLogout(() => callback(this.session.info));
47718
- this.session.onSessionRestore(() => callback(this.session.info));
49972
+ this.session.on(EVENTS.LOGIN, () => callback(this.session.info));
49973
+ this.session.on(EVENTS.LOGOUT, () => callback(this.session.info));
49974
+ this.session.on(EVENTS.SESSION_RESTORED, () => callback(this.session.info));
47719
49975
  callback(this.session.info);
47720
49976
  }
49977
+ observeSession() {
49978
+ return this.sessionInfo$;
49979
+ }
47721
49980
  };
47722
49981
 
47723
49982
  // src/files/BinaryFile.ts
@@ -48211,7 +50470,7 @@ var PodOS = (() => {
48211
50470
  sec: () => sec,
48212
50471
  sioc: () => sioc,
48213
50472
  skos: () => skos,
48214
- solid: () => solid,
50473
+ solid: () => solid2,
48215
50474
  space: () => space,
48216
50475
  tab: () => tab,
48217
50476
  tabont: () => tabont,
@@ -48289,7 +50548,7 @@ var PodOS = (() => {
48289
50548
  var bcc = "http://www.w3.org/ns/activitystreams#bcc";
48290
50549
  var bto = "http://www.w3.org/ns/activitystreams#bto";
48291
50550
  var cc = "http://www.w3.org/ns/activitystreams#cc";
48292
- var context = "http://www.w3.org/ns/activitystreams#context";
50551
+ var context2 = "http://www.w3.org/ns/activitystreams#context";
48293
50552
  var generator = "http://www.w3.org/ns/activitystreams#generator";
48294
50553
  var icon = "http://www.w3.org/ns/activitystreams#icon";
48295
50554
  var image = "http://www.w3.org/ns/activitystreams#image";
@@ -48407,7 +50666,7 @@ var PodOS = (() => {
48407
50666
  bcc,
48408
50667
  bto,
48409
50668
  cc,
48410
- context,
50669
+ context: context2,
48411
50670
  generator,
48412
50671
  icon,
48413
50672
  image,
@@ -48564,7 +50823,7 @@ var PodOS = (() => {
48564
50823
  var DomainOf_rrule = "http://www.w3.org/2002/12/cal/ical#DomainOf_rrule";
48565
50824
  var relatedTo = "http://www.w3.org/2002/12/cal/ical#relatedTo";
48566
50825
  var url2 = "http://www.w3.org/2002/12/cal/ical#url";
48567
- var uid = "http://www.w3.org/2002/12/cal/ical#uid";
50826
+ var uid2 = "http://www.w3.org/2002/12/cal/ical#uid";
48568
50827
  var exdate = "http://www.w3.org/2002/12/cal/ical#exdate";
48569
50828
  var exrule = "http://www.w3.org/2002/12/cal/ical#exrule";
48570
50829
  var Value_RECUR = "http://www.w3.org/2002/12/cal/ical#Value_RECUR";
@@ -48624,7 +50883,7 @@ var PodOS = (() => {
48624
50883
  DomainOf_rrule,
48625
50884
  relatedTo,
48626
50885
  url: url2,
48627
- uid,
50886
+ uid: uid2,
48628
50887
  exdate,
48629
50888
  exrule,
48630
50889
  Value_RECUR,
@@ -49051,7 +51310,7 @@ var PodOS = (() => {
49051
51310
  var SubstanceProtein = "http://hl7.org/fhir/SubstanceProtein";
49052
51311
  var _focalDevice = "http://hl7.org/fhir/_focalDevice";
49053
51312
  var _operationType = "http://hl7.org/fhir/_operationType";
49054
- var context2 = "http://hl7.org/fhir/context";
51313
+ var context3 = "http://hl7.org/fhir/context";
49055
51314
  var occurrenceDateTime = "http://hl7.org/fhir/occurrenceDateTime";
49056
51315
  var DetectedIssueEvidenceComponent = "http://hl7.org/fhir/DetectedIssueEvidenceComponent";
49057
51316
  var _ExplanationOfBenefit = "http://hl7.org/fhir/_ExplanationOfBenefit";
@@ -49396,7 +51655,7 @@ var PodOS = (() => {
49396
51655
  var _returnedAmount = "http://hl7.org/fhir/_returnedAmount";
49397
51656
  var MedicationKnowledgeDefinitionalIngredientComponent = "http://hl7.org/fhir/MedicationKnowledgeDefinitionalIngredientComponent";
49398
51657
  var candidate = "http://hl7.org/fhir/candidate";
49399
- var Subscription = "http://hl7.org/fhir/Subscription";
51658
+ var Subscription2 = "http://hl7.org/fhir/Subscription";
49400
51659
  var relatedAction = "http://hl7.org/fhir/relatedAction";
49401
51660
  var textPresentation = "http://hl7.org/fhir/textPresentation";
49402
51661
  var _supplements = "http://hl7.org/fhir/_supplements";
@@ -49997,7 +52256,7 @@ var PodOS = (() => {
49997
52256
  var Specimen = "http://hl7.org/fhir/Specimen";
49998
52257
  var _MedicinalProductDefinition = "http://hl7.org/fhir/_MedicinalProductDefinition";
49999
52258
  var OperationDefinition = "http://hl7.org/fhir/OperationDefinition";
50000
- var process2 = "http://hl7.org/fhir/process";
52259
+ var process3 = "http://hl7.org/fhir/process";
50001
52260
  var CitationCitedArtifactContributorshipEntryContributionInstanceComponent = "http://hl7.org/fhir/CitationCitedArtifactContributorshipEntryContributionInstanceComponent";
50002
52261
  var EncounterAdmissionComponent = "http://hl7.org/fhir/EncounterAdmissionComponent";
50003
52262
  var _MedicationDispense = "http://hl7.org/fhir/_MedicationDispense";
@@ -51052,7 +53311,7 @@ var PodOS = (() => {
51052
53311
  var _daysSupply = "http://hl7.org/fhir/_daysSupply";
51053
53312
  var reportingVendor = "http://hl7.org/fhir/reportingVendor";
51054
53313
  var current = "http://hl7.org/fhir/current";
51055
- var uid2 = "http://hl7.org/fhir/uid";
53314
+ var uid3 = "http://hl7.org/fhir/uid";
51056
53315
  var order = "http://hl7.org/fhir/order";
51057
53316
  var priorPrescription = "http://hl7.org/fhir/priorPrescription";
51058
53317
  var distanceFromLandmark = "http://hl7.org/fhir/distanceFromLandmark";
@@ -51408,7 +53667,7 @@ var PodOS = (() => {
51408
53667
  var _measurementType = "http://hl7.org/fhir/_measurementType";
51409
53668
  var RelatedArtifact = "http://hl7.org/fhir/RelatedArtifact";
51410
53669
  var RequestOrchestrationActionDynamicValueComponent = "http://hl7.org/fhir/RequestOrchestrationActionDynamicValueComponent";
51411
- var identity = "http://hl7.org/fhir/identity";
53670
+ var identity2 = "http://hl7.org/fhir/identity";
51412
53671
  var subType = "http://hl7.org/fhir/subType";
51413
53672
  var ValueSetExpansionContainsComponent = "http://hl7.org/fhir/ValueSetExpansionContainsComponent";
51414
53673
  var MedicationKnowledgePackagingComponent = "http://hl7.org/fhir/MedicationKnowledgePackagingComponent";
@@ -52596,7 +54855,7 @@ var PodOS = (() => {
52596
54855
  var ElementDefinitionMappingComponent = "http://hl7.org/fhir/ElementDefinitionMappingComponent";
52597
54856
  var copackagedIndicator = "http://hl7.org/fhir/copackagedIndicator";
52598
54857
  var precheckBehavior = "http://hl7.org/fhir/precheckBehavior";
52599
- var map = "http://hl7.org/fhir/map";
54858
+ var map2 = "http://hl7.org/fhir/map";
52600
54859
  var additionalInfo = "http://hl7.org/fhir/additionalInfo";
52601
54860
  var preConditions = "http://hl7.org/fhir/preConditions";
52602
54861
  var numberOfSubunits = "http://hl7.org/fhir/numberOfSubunits";
@@ -53284,7 +55543,7 @@ var PodOS = (() => {
53284
55543
  SubstanceProtein,
53285
55544
  _focalDevice,
53286
55545
  _operationType,
53287
- context: context2,
55546
+ context: context3,
53288
55547
  occurrenceDateTime,
53289
55548
  DetectedIssueEvidenceComponent,
53290
55549
  _ExplanationOfBenefit,
@@ -53629,7 +55888,7 @@ var PodOS = (() => {
53629
55888
  _returnedAmount,
53630
55889
  MedicationKnowledgeDefinitionalIngredientComponent,
53631
55890
  candidate,
53632
- Subscription,
55891
+ Subscription: Subscription2,
53633
55892
  relatedAction,
53634
55893
  textPresentation,
53635
55894
  _supplements,
@@ -54230,7 +56489,7 @@ var PodOS = (() => {
54230
56489
  Specimen,
54231
56490
  _MedicinalProductDefinition,
54232
56491
  OperationDefinition,
54233
- process: process2,
56492
+ process: process3,
54234
56493
  CitationCitedArtifactContributorshipEntryContributionInstanceComponent,
54235
56494
  EncounterAdmissionComponent,
54236
56495
  _MedicationDispense,
@@ -55285,7 +57544,7 @@ var PodOS = (() => {
55285
57544
  _daysSupply,
55286
57545
  reportingVendor,
55287
57546
  current,
55288
- uid: uid2,
57547
+ uid: uid3,
55289
57548
  order,
55290
57549
  priorPrescription,
55291
57550
  distanceFromLandmark,
@@ -55641,7 +57900,7 @@ var PodOS = (() => {
55641
57900
  _measurementType,
55642
57901
  RelatedArtifact,
55643
57902
  RequestOrchestrationActionDynamicValueComponent,
55644
- identity,
57903
+ identity: identity2,
55645
57904
  subType,
55646
57905
  ValueSetExpansionContainsComponent,
55647
57906
  MedicationKnowledgePackagingComponent,
@@ -56829,7 +59088,7 @@ var PodOS = (() => {
56829
59088
  ElementDefinitionMappingComponent,
56830
59089
  copackagedIndicator,
56831
59090
  precheckBehavior,
56832
- map,
59091
+ map: map2,
56833
59092
  additionalInfo,
56834
59093
  preConditions,
56835
59094
  numberOfSubunits,
@@ -57561,7 +59820,7 @@ var PodOS = (() => {
57561
59820
  var first = "http://www.w3.org/ns/hydra/core#first";
57562
59821
  var freetextQuery = "http://www.w3.org/ns/hydra/core#freetextQuery";
57563
59822
  var headerName = "http://www.w3.org/ns/hydra/core#headerName";
57564
- var last = "http://www.w3.org/ns/hydra/core#last";
59823
+ var last2 = "http://www.w3.org/ns/hydra/core#last";
57565
59824
  var limit2 = "http://www.w3.org/ns/hydra/core#limit";
57566
59825
  var mapping2 = "http://www.w3.org/ns/hydra/core#mapping";
57567
59826
  var member3 = "http://www.w3.org/ns/hydra/core#member";
@@ -57623,7 +59882,7 @@ var PodOS = (() => {
57623
59882
  first,
57624
59883
  freetextQuery,
57625
59884
  headerName,
57626
- last,
59885
+ last: last2,
57627
59886
  limit: limit2,
57628
59887
  mapping: mapping2,
57629
59888
  member: member3,
@@ -57711,7 +59970,7 @@ var PodOS = (() => {
57711
59970
  var ProtocolEvent = "http://www.w3.org/2007/ont/link#ProtocolEvent";
57712
59971
  var RDFDocument = "http://www.w3.org/2007/ont/link#RDFDocument";
57713
59972
  var Response2 = "http://www.w3.org/2007/ont/link#Response";
57714
- var Session2 = "http://www.w3.org/2007/ont/link#Session";
59973
+ var Session3 = "http://www.w3.org/2007/ont/link#Session";
57715
59974
  var isMentionedIn = "http://www.w3.org/2007/ont/link#isMentionedIn";
57716
59975
  var mentionsClass = "http://www.w3.org/2007/ont/link#mentionsClass";
57717
59976
  var protocol3 = "http://www.w3.org/2007/ont/link#protocol";
@@ -57731,7 +59990,7 @@ var PodOS = (() => {
57731
59990
  ProtocolEvent,
57732
59991
  RDFDocument,
57733
59992
  Response: Response2,
57734
- Session: Session2,
59993
+ Session: Session3,
57735
59994
  isMentionedIn,
57736
59995
  mentionsClass,
57737
59996
  protocol: protocol3,
@@ -59761,7 +62020,7 @@ var PodOS = (() => {
59761
62020
  var lyrics = "http://schema.org/lyrics";
59762
62021
  var maintainer = "http://schema.org/maintainer";
59763
62022
  var manufacturer2 = "http://schema.org/manufacturer";
59764
- var map2 = "http://schema.org/map";
62023
+ var map3 = "http://schema.org/map";
59765
62024
  var mapType = "http://schema.org/mapType";
59766
62025
  var maps = "http://schema.org/maps";
59767
62026
  var marginOfError = "http://schema.org/marginOfError";
@@ -62129,7 +64388,7 @@ var PodOS = (() => {
62129
64388
  lyrics,
62130
64389
  maintainer,
62131
64390
  manufacturer: manufacturer2,
62132
- map: map2,
64391
+ map: map3,
62133
64392
  mapType,
62134
64393
  maps,
62135
64394
  marginOfError,
@@ -64499,7 +66758,7 @@ var PodOS = (() => {
64499
66758
  var lyrics2 = "https://schema.org/lyrics";
64500
66759
  var maintainer2 = "https://schema.org/maintainer";
64501
66760
  var manufacturer3 = "https://schema.org/manufacturer";
64502
- var map3 = "https://schema.org/map";
66761
+ var map4 = "https://schema.org/map";
64503
66762
  var mapType2 = "https://schema.org/mapType";
64504
66763
  var maps2 = "https://schema.org/maps";
64505
66764
  var marginOfError2 = "https://schema.org/marginOfError";
@@ -66867,7 +69126,7 @@ var PodOS = (() => {
66867
69126
  lyrics: lyrics2,
66868
69127
  maintainer: maintainer2,
66869
69128
  manufacturer: manufacturer3,
66870
- map: map3,
69129
+ map: map4,
66871
69130
  mapType: mapType2,
66872
69131
  maps: maps2,
66873
69132
  marginOfError: marginOfError2,
@@ -67997,7 +70256,7 @@ var PodOS = (() => {
67997
70256
  var ProtocolEvent2 = "http://www.w3.org/2007/ont/link#ProtocolEvent";
67998
70257
  var RDFDocument2 = "http://www.w3.org/2007/ont/link#RDFDocument";
67999
70258
  var Response3 = "http://www.w3.org/2007/ont/link#Response";
68000
- var Session3 = "http://www.w3.org/2007/ont/link#Session";
70259
+ var Session4 = "http://www.w3.org/2007/ont/link#Session";
68001
70260
  var isMentionedIn2 = "http://www.w3.org/2007/ont/link#isMentionedIn";
68002
70261
  var mentionsClass2 = "http://www.w3.org/2007/ont/link#mentionsClass";
68003
70262
  var protocol4 = "http://www.w3.org/2007/ont/link#protocol";
@@ -68017,7 +70276,7 @@ var PodOS = (() => {
68017
70276
  ProtocolEvent: ProtocolEvent2,
68018
70277
  RDFDocument: RDFDocument2,
68019
70278
  Response: Response3,
68020
- Session: Session3,
70279
+ Session: Session4,
68021
70280
  isMentionedIn: isMentionedIn2,
68022
70281
  mentionsClass: mentionsClass2,
68023
70282
  protocol: protocol4,
@@ -68039,7 +70298,7 @@ var PodOS = (() => {
68039
70298
  var ProtocolEvent3 = "http://www.w3.org/2007/ont/link#ProtocolEvent";
68040
70299
  var RDFDocument3 = "http://www.w3.org/2007/ont/link#RDFDocument";
68041
70300
  var Response4 = "http://www.w3.org/2007/ont/link#Response";
68042
- var Session4 = "http://www.w3.org/2007/ont/link#Session";
70301
+ var Session5 = "http://www.w3.org/2007/ont/link#Session";
68043
70302
  var isMentionedIn3 = "http://www.w3.org/2007/ont/link#isMentionedIn";
68044
70303
  var mentionsClass3 = "http://www.w3.org/2007/ont/link#mentionsClass";
68045
70304
  var protocol5 = "http://www.w3.org/2007/ont/link#protocol";
@@ -68059,7 +70318,7 @@ var PodOS = (() => {
68059
70318
  ProtocolEvent: ProtocolEvent3,
68060
70319
  RDFDocument: RDFDocument3,
68061
70320
  Response: Response4,
68062
- Session: Session4,
70321
+ Session: Session5,
68063
70322
  isMentionedIn: isMentionedIn3,
68064
70323
  mentionsClass: mentionsClass3,
68065
70324
  protocol: protocol5,
@@ -68461,7 +70720,7 @@ var PodOS = (() => {
68461
70720
  var sec = secImport;
68462
70721
  var sioc = siocImport;
68463
70722
  var skos = skosImport;
68464
- var solid = solidImport;
70723
+ var solid2 = solidImport;
68465
70724
  var space = spaceImport;
68466
70725
  var tab = tabImport;
68467
70726
  var tabont = tabontImport;
@@ -68561,12 +70820,22 @@ var PodOS = (() => {
68561
70820
  proposeUriForNewThing(referenceUri, name7) {
68562
70821
  return this.uriService.proposeUriForNewThing(referenceUri, name7);
68563
70822
  }
70823
+ /**
70824
+ * @deprecated use observeSession instead
70825
+ * @param callback
70826
+ */
68564
70827
  trackSession(callback) {
68565
70828
  return this.session.trackSession((session4) => {
68566
70829
  this.store.updater.flagAuthorizationMetadata();
68567
70830
  callback(session4);
68568
70831
  });
68569
70832
  }
70833
+ /**
70834
+ * returns a behavior subject that can be used to observe changes in the session state
70835
+ */
70836
+ observeSession() {
70837
+ return this.session.observeSession();
70838
+ }
68570
70839
  /**
68571
70840
  * Fetch the WebId profile and preferences file for the given WebID
68572
70841
  * @param webId