chat-pane 2.4.22 → 2.4.23-d7dc428f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -5012,7 +5012,10 @@ function removeOidcQueryParam(redirectUrl) {
5012
5012
  cleanedUrl.searchParams.delete("code");
5013
5013
  cleanedUrl.searchParams.delete("state");
5014
5014
  cleanedUrl.hash = "";
5015
- return cleanedUrl.toString();
5015
+ if (redirectUrl.includes(`${cleanedUrl.origin}/`)) {
5016
+ return cleanedUrl.href;
5017
+ }
5018
+ return `${cleanedUrl.origin}${cleanedUrl.href.substring(cleanedUrl.origin.length + 1)}`;
5016
5019
  }
5017
5020
  async function clearOidcPersistentStorage() {
5018
5021
  const client = new _inrupt_oidc_client__WEBPACK_IMPORTED_MODULE_0__.OidcClient({
@@ -5680,7 +5683,7 @@ class IssuerConfigFetcher {
5680
5683
  }
5681
5684
  async fetchConfig(issuer) {
5682
5685
  let issuerConfig;
5683
- const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer).href;
5686
+ const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer.endsWith("/") ? issuer : `${issuer}/`).href;
5684
5687
  const issuerConfigRequestBody = await window.fetch(openIdConfigUrl);
5685
5688
  try {
5686
5689
  issuerConfig = processConfig(await issuerConfigRequestBody.json());
@@ -5857,12 +5860,6 @@ class AuthCodeRedirectHandler {
5857
5860
  webId: tokens.webId,
5858
5861
  isLoggedIn: "true",
5859
5862
  }, { secure: true });
5860
- url.searchParams.delete("code");
5861
- await this.storageUtility.setForUser(storedSessionId, {
5862
- redirectUrl: url.toString(),
5863
- }, {
5864
- secure: false,
5865
- });
5866
5863
  const sessionInfo = await this.sessionInfoManager.get(storedSessionId);
5867
5864
  if (!sessionInfo) {
5868
5865
  throw new Error(`Could not retrieve session: [${storedSessionId}].`);
@@ -19847,6 +19844,8 @@ var INTRINSICS = {
19847
19844
  '%AsyncIteratorPrototype%': needsEval,
19848
19845
  '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
19849
19846
  '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
19847
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
19848
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
19850
19849
  '%Boolean%': Boolean,
19851
19850
  '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
19852
19851
  '%Date%': Date,
@@ -19902,6 +19901,14 @@ var INTRINSICS = {
19902
19901
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
19903
19902
  };
19904
19903
 
19904
+ try {
19905
+ null.error; // eslint-disable-line no-unused-expressions
19906
+ } catch (e) {
19907
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
19908
+ var errorProto = getProto(getProto(e));
19909
+ INTRINSICS['%Error.prototype%'] = errorProto;
19910
+ }
19911
+
19905
19912
  var doEval = function doEval(name) {
19906
19913
  var value;
19907
19914
  if (name === '%AsyncFunction%') {
@@ -38805,7 +38812,6 @@ __webpack_require__.r(__webpack_exports__);
38805
38812
  /* harmony import */ var _class_order__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./class-order */ "./node_modules/rdflib/esm/class-order.js");
38806
38813
  /* harmony import */ var _node_internal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node-internal */ "./node_modules/rdflib/esm/node-internal.js");
38807
38814
  /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./types */ "./node_modules/rdflib/esm/types.js");
38808
- /* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ "./node_modules/console-browserify/index.js");
38809
38815
 
38810
38816
 
38811
38817
 
@@ -38901,7 +38907,6 @@ var BlankNode = /*#__PURE__*/function (_Node) {
38901
38907
  function getId(id) {
38902
38908
  if (id) {
38903
38909
  if (typeof id !== 'string') {
38904
- console.log('Bad blank id:', id);
38905
38910
  throw new Error('Bad id argument to new blank node: ' + id);
38906
38911
  }
38907
38912
  if (id.includes('#')) {
@@ -40529,7 +40534,7 @@ var Fetcher = /*#__PURE__*/function () {
40529
40534
  size: 0,
40530
40535
  timeout: 0
40531
40536
  };
40532
- console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error);
40537
+ // console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
40533
40538
  return _this5.handleError(dummyResponse, docuri, options); // possible credentials retry
40534
40539
  // return this.failFetch(options, 'fetch failed: ' + error, 999, dummyResponse) // Fake status code: fetch exception
40535
40540
 
@@ -40590,25 +40595,21 @@ var Fetcher = /*#__PURE__*/function () {
40590
40595
  if (fetchResponse.ok) {
40591
40596
  userCallback(true, 'OK', fetchResponse);
40592
40597
  } else {
40593
- // console.log('@@@ fetcher.js Should not take this path !!!!!!!!!!!!')
40594
40598
  var oops = 'HTTP error: Status ' + fetchResponse.status + ' (' + fetchResponse.statusText + ')';
40595
40599
  if (fetchResponse.responseText) {
40596
40600
  oops += ' ' + fetchResponse.responseText; // not in 404, dns error, nock failure
40597
40601
  }
40598
40602
 
40599
- console.log(oops + ' fetching ' + uri);
40600
40603
  userCallback(false, oops, fetchResponse);
40601
40604
  }
40602
40605
  } else {
40603
40606
  var _oops = '@@ nowOrWhenFetched: no response object!';
40604
- console.log(_oops);
40605
40607
  userCallback(false, _oops);
40606
40608
  }
40607
40609
  }
40608
40610
  }, function (err) {
40609
40611
  var message = err.message || err.statusText;
40610
40612
  message = 'Failed to load <' + uri + '> ' + message;
40611
- console.log(message);
40612
40613
  if (err.response && err.response.status) {
40613
40614
  message += ' status: ' + err.response.status;
40614
40615
  }
@@ -40847,45 +40848,42 @@ var Fetcher = /*#__PURE__*/function () {
40847
40848
  return fetcher.load(doc);
40848
40849
  case 6:
40849
40850
  response = _context2.sent;
40850
- _context2.next = 29;
40851
+ _context2.next = 26;
40851
40852
  break;
40852
40853
  case 9:
40853
40854
  _context2.prev = 9;
40854
40855
  _context2.t0 = _context2["catch"](3);
40855
40856
  if (!(_context2.t0.response.status === 404)) {
40856
- _context2.next = 27;
40857
+ _context2.next = 25;
40857
40858
  break;
40858
40859
  }
40859
- console.log('createIfNotExists: doc does NOT exist, will create... ' + doc);
40860
- _context2.prev = 13;
40861
- _context2.next = 16;
40860
+ _context2.prev = 12;
40861
+ _context2.next = 15;
40862
40862
  return fetcher.webOperation('PUT', doc.value, {
40863
40863
  data: data,
40864
40864
  contentType: contentType
40865
40865
  });
40866
- case 16:
40866
+ case 15:
40867
40867
  response = _context2.sent;
40868
- _context2.next = 23;
40868
+ _context2.next = 21;
40869
40869
  break;
40870
- case 19:
40871
- _context2.prev = 19;
40872
- _context2.t1 = _context2["catch"](13);
40873
- console.log('createIfNotExists doc FAILED: ' + doc + ': ' + _context2.t1);
40870
+ case 18:
40871
+ _context2.prev = 18;
40872
+ _context2.t1 = _context2["catch"](12);
40874
40873
  throw _context2.t1;
40875
- case 23:
40874
+ case 21:
40876
40875
  delete fetcher.requested[doc.value]; // delete cached 404 error
40877
40876
  // console.log('createIfNotExists doc created ok ' + doc)
40878
40877
  return _context2.abrupt("return", response);
40879
- case 27:
40880
- console.log('createIfNotExists doc load error NOT 404: ' + doc + ': ' + _context2.t0);
40878
+ case 25:
40881
40879
  throw _context2.t0;
40882
- case 29:
40880
+ case 26:
40883
40881
  return _context2.abrupt("return", response);
40884
- case 30:
40882
+ case 27:
40885
40883
  case "end":
40886
40884
  return _context2.stop();
40887
40885
  }
40888
- }, _callee2, this, [[3, 9], [13, 19]]);
40886
+ }, _callee2, this, [[3, 9], [12, 18]]);
40889
40887
  }));
40890
40888
  function createIfNotExists(_x4) {
40891
40889
  return _createIfNotExists.apply(this, arguments);
@@ -41194,7 +41192,8 @@ var Fetcher = /*#__PURE__*/function () {
41194
41192
  }, {
41195
41193
  key: "retryNoCredentials",
41196
41194
  value: function retryNoCredentials(docuri, options) {
41197
- console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource);
41195
+ // console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
41196
+
41198
41197
  options.retriedWithNoCredentials = true; // protect against being called twice
41199
41198
 
41200
41199
  delete this.requested[docuri]; // forget the original request happened
@@ -41239,7 +41238,7 @@ var Fetcher = /*#__PURE__*/function () {
41239
41238
  // Now attempt retry via proxy
41240
41239
  var proxyUri = Fetcher.crossSiteProxy(docuri);
41241
41240
  if (proxyUri && !options.proxyUsed) {
41242
- console.log('web: Direct failed so trying proxy ' + proxyUri);
41241
+ // console.log('web: Direct failed so trying proxy ' + proxyUri)
41243
41242
  return this.redirectToProxy(proxyUri, options);
41244
41243
  }
41245
41244
  }
@@ -41312,7 +41311,7 @@ var Fetcher = /*#__PURE__*/function () {
41312
41311
 
41313
41312
  // Check for masked errors (CORS, etc)
41314
41313
  if (response.status === 0) {
41315
- console.log('Masked error - status 0 for ' + docuri);
41314
+ // console.log('Masked error - status 0 for ' + docuri)
41316
41315
  return this.handleError(response, docuri, options);
41317
41316
  }
41318
41317
  if (response.status >= 400) {
@@ -41645,7 +41644,6 @@ __webpack_require__.r(__webpack_exports__);
41645
41644
  /* harmony import */ var _variable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./variable */ "./node_modules/rdflib/esm/variable.js");
41646
41645
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils */ "./node_modules/rdflib/esm/utils.js");
41647
41646
  /* harmony import */ var _named_node__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./named-node */ "./node_modules/rdflib/esm/named-node.js");
41648
- /* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ "./node_modules/console-browserify/index.js");
41649
41647
 
41650
41648
 
41651
41649
 
@@ -42200,7 +42198,6 @@ var Formula = /*#__PURE__*/function (_Node) {
42200
42198
  while (todo.length) {
42201
42199
  follow(todo.shift());
42202
42200
  }
42203
- // console.log('' + result.length + ' statements about ' + subject)
42204
42201
  return result;
42205
42202
  }
42206
42203
 
@@ -42357,10 +42354,10 @@ var Formula = /*#__PURE__*/function (_Node) {
42357
42354
  var statementsCopy = this.statements.map(function (ea) {
42358
42355
  return ea.substitute(bindings);
42359
42356
  });
42360
- console.log('Formula subs statmnts:' + statementsCopy);
42357
+ // console.log('Formula subs statmnts:' + statementsCopy)
42361
42358
  var y = new Formula();
42362
42359
  y.addAll(statementsCopy);
42363
- console.log('indexed-form subs formula:' + y);
42360
+ // console.log('indexed-form subs formula:' + y)
42364
42361
  return y;
42365
42362
  }
42366
42363
  }, {
@@ -45135,7 +45132,6 @@ __webpack_require__.r(__webpack_exports__);
45135
45132
  /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
45136
45133
  /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
45137
45134
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
45138
- /* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ "./node_modules/console-browserify/index.js");
45139
45135
 
45140
45136
 
45141
45137
 
@@ -45173,7 +45169,6 @@ var Node = /*#__PURE__*/function () {
45173
45169
  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Node, [{
45174
45170
  key: "substitute",
45175
45171
  value: function substitute(bindings) {
45176
- console.log('@@@ node substitute' + this);
45177
45172
  return this;
45178
45173
  }
45179
45174
 
@@ -49509,7 +49504,6 @@ __webpack_require__.r(__webpack_exports__);
49509
49504
  /* harmony import */ var _node_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node-internal */ "./node_modules/rdflib/esm/node-internal.js");
49510
49505
  /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./types */ "./node_modules/rdflib/esm/types.js");
49511
49506
  /* harmony import */ var _default_graph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./default-graph */ "./node_modules/rdflib/esm/default-graph.js");
49512
- /* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ "./node_modules/console-browserify/index.js");
49513
49507
 
49514
49508
 
49515
49509
 
@@ -49588,7 +49582,7 @@ var Statement = /*#__PURE__*/function () {
49588
49582
  key: "substitute",
49589
49583
  value: function substitute(bindings) {
49590
49584
  var y = new Statement(this.subject.substitute(bindings), this.predicate.substitute(bindings), this.object.substitute(bindings), (0,_default_graph__WEBPACK_IMPORTED_MODULE_3__.isDefaultGraph)(this.graph) ? this.graph : this.graph.substitute(bindings)); // 2016
49591
- console.log('@@@ statement substitute:' + y);
49585
+ // console.log('@@@ statement substitute:' + y)
49592
49586
  return y;
49593
49587
  }
49594
49588
 
@@ -53716,7 +53710,7 @@ var SolidAuthnLogic = /** @class */ (function () {
53716
53710
  */
53717
53711
  SolidAuthnLogic.prototype.checkUser = function (setUserCallback) {
53718
53712
  return __awaiter(this, void 0, void 0, function () {
53719
- var preLoginRedirectHash, postLoginRedirectHash, curUrl, me, webId;
53713
+ var preLoginRedirectHash, redirectUrl, postLoginRedirectHash, curUrl, me, webId;
53720
53714
  return __generator(this, function (_a) {
53721
53715
  switch (_a.label) {
53722
53716
  case 0:
@@ -53728,20 +53722,16 @@ var SolidAuthnLogic = /** @class */ (function () {
53728
53722
  if (document.location.toString() !== url)
53729
53723
  history.replaceState(null, '', url);
53730
53724
  });
53731
- /**
53732
- * Handle a successful authentication redirect
53733
- */
53725
+ redirectUrl = new URL(window.location.href);
53726
+ redirectUrl.hash = '';
53734
53727
  return [4 /*yield*/, this.session
53735
53728
  .handleIncomingRedirect({
53736
53729
  restorePreviousSession: true,
53737
- url: window.location.href
53730
+ url: redirectUrl.href
53738
53731
  })
53739
53732
  // Check to see if a hash was stored in local storage
53740
53733
  ];
53741
53734
  case 1:
53742
- /**
53743
- * Handle a successful authentication redirect
53744
- */
53745
53735
  _a.sent();
53746
53736
  postLoginRedirectHash = window.localStorage.getItem('preLoginRedirectHash');
53747
53737
  if (postLoginRedirectHash) {
@@ -63185,7 +63175,7 @@ function renderSignInPopup(dom) {
63185
63175
  issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
63186
63176
  var loginToIssuer = /*#__PURE__*/function () {
63187
63177
  var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
63188
- var preLoginRedirectHash;
63178
+ var preLoginRedirectHash, locationUrl;
63189
63179
  return _regenerator["default"].wrap(function _callee$(_context) {
63190
63180
  while (1) switch (_context.prev = _context.next) {
63191
63181
  case 0:
@@ -63197,23 +63187,25 @@ function renderSignInPopup(dom) {
63197
63187
  }
63198
63188
  window.localStorage.setItem('loginIssuer', issuerUri);
63199
63189
  // Login
63200
- _context.next = 6;
63190
+ locationUrl = new URL(window.location.href);
63191
+ locationUrl.hash = ''; // remove hash part
63192
+ _context.next = 8;
63201
63193
  return _solidLogic.authSession.login({
63202
- redirectUrl: window.location.href,
63194
+ redirectUrl: locationUrl.href,
63203
63195
  oidcIssuer: issuerUri
63204
63196
  });
63205
- case 6:
63206
- _context.next = 11;
63207
- break;
63208
63197
  case 8:
63209
- _context.prev = 8;
63198
+ _context.next = 13;
63199
+ break;
63200
+ case 10:
63201
+ _context.prev = 10;
63210
63202
  _context.t0 = _context["catch"](0);
63211
63203
  (0, _log.alert)(_context.t0.message);
63212
- case 11:
63204
+ case 13:
63213
63205
  case "end":
63214
63206
  return _context.stop();
63215
63207
  }
63216
- }, _callee, null, [[0, 8]]);
63208
+ }, _callee, null, [[0, 10]]);
63217
63209
  }));
63218
63210
  return function loginToIssuer(_x11) {
63219
63211
  return _ref.apply(this, arguments);
@@ -69150,10 +69142,10 @@ Object.defineProperty(exports, "__esModule", ({
69150
69142
  }));
69151
69143
  exports.versionInfo = void 0;
69152
69144
  var versionInfo = {
69153
- buildTime: '2023-02-28T16:35:42Z',
69154
- commit: 'ce13e4428c9204d2f64dbd0bd6237ae08f23ae2b',
69145
+ buildTime: '2023-03-17T10:43:05Z',
69146
+ commit: '5b3471ff0bc08942d334b9bc9a6992adcb5cdb6b',
69155
69147
  npmInfo: {
69156
- 'solid-ui': '2.4.26',
69148
+ 'solid-ui': '2.4.27',
69157
69149
  npm: '8.19.4',
69158
69150
  node: '16.19.1',
69159
69151
  v8: '9.4.146.26-node.24',
@@ -83586,33 +83578,21 @@ class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_3__.LocalJWKSet {
83586
83578
  }
83587
83579
  async reload() {
83588
83580
  if (this._pendingFetch && (0,_runtime_env_js__WEBPACK_IMPORTED_MODULE_1__.isCloudflareWorkers)()) {
83589
- return new Promise((resolve) => {
83590
- const isDone = () => {
83591
- if (this._pendingFetch === undefined) {
83592
- resolve();
83593
- }
83594
- else {
83595
- setTimeout(isDone, 5);
83596
- }
83597
- };
83598
- isDone();
83599
- });
83600
- }
83601
- if (!this._pendingFetch) {
83602
- this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
83603
- .then((json) => {
83604
- if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
83605
- throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
83606
- }
83607
- this._jwks = { keys: json.keys };
83608
- this._jwksTimestamp = Date.now();
83609
- this._pendingFetch = undefined;
83610
- })
83611
- .catch((err) => {
83612
- this._pendingFetch = undefined;
83613
- throw err;
83614
- });
83581
+ this._pendingFetch = undefined;
83615
83582
  }
83583
+ this._pendingFetch || (this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
83584
+ .then((json) => {
83585
+ if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
83586
+ throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
83587
+ }
83588
+ this._jwks = { keys: json.keys };
83589
+ this._jwksTimestamp = Date.now();
83590
+ this._pendingFetch = undefined;
83591
+ })
83592
+ .catch((err) => {
83593
+ this._pendingFetch = undefined;
83594
+ throw err;
83595
+ }));
83616
83596
  await this._pendingFetch;
83617
83597
  }
83618
83598
  }