chat-pane 2.4.22 → 2.4.23-140ba245
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/LICENSE.md +0 -0
- package/README.md +3 -0
- package/dist/index.html +0 -0
- package/dist/longChatPane.js +59 -85
- package/dist/longChatPane.js.map +1 -1
- package/dist/main.js +449 -345
- package/dist/main.js.map +1 -1
- package/dist/shortChatPane.js +59 -85
- package/dist/shortChatPane.js.map +1 -1
- package/lib/createChat.js +44 -0
- package/lib/createChat.js.map +1 -0
- package/lib/findChat.js +60 -0
- package/lib/findChat.js.map +1 -0
- package/lib/getChat.js +74 -0
- package/lib/getChat.js.map +1 -0
- package/lib/helpers.js +79 -0
- package/lib/helpers.js.map +1 -0
- package/lib/helpers.test.js +64 -0
- package/lib/helpers.test.js.map +1 -0
- package/lib/longChatPane.js +0 -0
- package/lib/longChatPane.js.map +0 -0
- package/lib/longChatPane.test.js +11 -0
- package/lib/longChatPane.test.js.map +1 -0
- package/lib/main.js +2 -2
- package/lib/main.js.map +1 -1
- package/lib/{create.js → manageChat.js} +22 -262
- package/lib/manageChat.js.map +1 -0
- package/lib/manageNotifications.js +56 -0
- package/lib/manageNotifications.js.map +1 -0
- package/lib/shortChatPane.js +0 -0
- package/lib/shortChatPane.js.map +0 -0
- package/package.json +20 -12
- package/src/createChat.ts +16 -0
- package/src/findChat.ts +18 -0
- package/src/getChat.ts +23 -0
- package/src/helpers.test.ts +35 -0
- package/src/helpers.ts +27 -0
- package/src/longChatPane.js +0 -0
- package/src/longChatPane.test.ts +7 -0
- package/src/main.js +2 -1
- package/src/manageChat.ts +63 -0
- package/src/manageNotifications.ts +24 -0
- package/src/shortChatPane.js +0 -0
- package/lib/create.js.map +0 -1
- package/src/create.ts +0 -148
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
|
-
|
|
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}].`);
|
|
@@ -14421,353 +14418,306 @@ var fetcher = solid_logic__WEBPACK_IMPORTED_MODULE_0__.store.fetcher;
|
|
|
14421
14418
|
|
|
14422
14419
|
/***/ }),
|
|
14423
14420
|
|
|
14424
|
-
/***/ "./src/
|
|
14425
|
-
|
|
14426
|
-
!*** ./src/
|
|
14427
|
-
|
|
14421
|
+
/***/ "./src/createChat.ts":
|
|
14422
|
+
/*!***************************!*\
|
|
14423
|
+
!*** ./src/createChat.ts ***!
|
|
14424
|
+
\***************************/
|
|
14428
14425
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14429
14426
|
|
|
14430
14427
|
"use strict";
|
|
14431
14428
|
__webpack_require__.r(__webpack_exports__);
|
|
14432
14429
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14433
|
-
/* harmony export */ "
|
|
14434
|
-
/* harmony export */ "getChat": () => (/* binding */ getChat)
|
|
14430
|
+
/* harmony export */ "createChatThing": () => (/* binding */ createChatThing)
|
|
14435
14431
|
/* harmony export */ });
|
|
14436
|
-
/* harmony import */ var
|
|
14437
|
-
/* harmony import */ var
|
|
14438
|
-
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
|
|
14439
|
-
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
|
|
14440
|
-
/* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
|
|
14432
|
+
/* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
|
|
14433
|
+
/* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
|
|
14441
14434
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14442
14435
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
14443
14436
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14444
14437
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14445
14438
|
|
|
14446
14439
|
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
function getMe() {
|
|
14450
|
-
return _getMe.apply(this, arguments);
|
|
14451
|
-
}
|
|
14452
|
-
function _getMe() {
|
|
14453
|
-
_getMe = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
14454
|
-
var me;
|
|
14455
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14456
|
-
while (1) {
|
|
14457
|
-
switch (_context.prev = _context.next) {
|
|
14458
|
-
case 0:
|
|
14459
|
-
me = solid_logic__WEBPACK_IMPORTED_MODULE_1__.authn.currentUser();
|
|
14460
|
-
if (!(me === null)) {
|
|
14461
|
-
_context.next = 3;
|
|
14462
|
-
break;
|
|
14463
|
-
}
|
|
14464
|
-
throw new Error('Current user not found! Not logged in?');
|
|
14465
|
-
case 3:
|
|
14466
|
-
_context.next = 5;
|
|
14467
|
-
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(me.doc());
|
|
14468
|
-
case 5:
|
|
14469
|
-
return _context.abrupt("return", me);
|
|
14470
|
-
case 6:
|
|
14471
|
-
case "end":
|
|
14472
|
-
return _context.stop();
|
|
14473
|
-
}
|
|
14474
|
-
}
|
|
14475
|
-
}, _callee);
|
|
14476
|
-
}));
|
|
14477
|
-
return _getMe.apply(this, arguments);
|
|
14478
|
-
}
|
|
14479
|
-
function getPodRoot(_x) {
|
|
14480
|
-
return _getPodRoot.apply(this, arguments);
|
|
14481
|
-
}
|
|
14482
|
-
function _getPodRoot() {
|
|
14483
|
-
_getPodRoot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(me) {
|
|
14484
|
-
var podRoot;
|
|
14485
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
14486
|
-
while (1) {
|
|
14487
|
-
switch (_context2.prev = _context2.next) {
|
|
14488
|
-
case 0:
|
|
14489
|
-
podRoot = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.space('storage'), undefined, me.doc());
|
|
14490
|
-
if (podRoot) {
|
|
14491
|
-
_context2.next = 3;
|
|
14492
|
-
break;
|
|
14493
|
-
}
|
|
14494
|
-
throw new Error('Current user pod root not found!');
|
|
14495
|
-
case 3:
|
|
14496
|
-
return _context2.abrupt("return", podRoot);
|
|
14497
|
-
case 4:
|
|
14498
|
-
case "end":
|
|
14499
|
-
return _context2.stop();
|
|
14500
|
-
}
|
|
14501
|
-
}
|
|
14502
|
-
}, _callee2);
|
|
14503
|
-
}));
|
|
14504
|
-
return _getPodRoot.apply(this, arguments);
|
|
14505
|
-
}
|
|
14506
|
-
function sendInvite(_x2, _x3) {
|
|
14507
|
-
return _sendInvite.apply(this, arguments);
|
|
14508
|
-
}
|
|
14509
|
-
function _sendInvite() {
|
|
14510
|
-
_sendInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(invitee, chatThing) {
|
|
14511
|
-
var inviteeInbox, inviteBody, inviteResponse, locationStr;
|
|
14512
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
14513
|
-
while (1) {
|
|
14514
|
-
switch (_context3.prev = _context3.next) {
|
|
14515
|
-
case 0:
|
|
14516
|
-
_context3.next = 2;
|
|
14517
|
-
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(invitee.doc());
|
|
14518
|
-
case 2:
|
|
14519
|
-
inviteeInbox = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(invitee, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.ldp('inbox'), undefined, invitee.doc());
|
|
14520
|
-
if (inviteeInbox) {
|
|
14521
|
-
_context3.next = 5;
|
|
14522
|
-
break;
|
|
14523
|
-
}
|
|
14524
|
-
throw new Error("Invitee inbox not found! ".concat(invitee.value));
|
|
14525
|
-
case 5:
|
|
14526
|
-
inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('seeAlso'), " <").concat(chatThing.value, "> . \n ");
|
|
14527
|
-
_context3.next = 8;
|
|
14528
|
-
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.webOperation('POST', inviteeInbox.value, {
|
|
14529
|
-
data: inviteBody,
|
|
14530
|
-
contentType: 'text/turtle'
|
|
14531
|
-
});
|
|
14532
|
-
case 8:
|
|
14533
|
-
inviteResponse = _context3.sent;
|
|
14534
|
-
locationStr = inviteResponse.headers.get('location');
|
|
14535
|
-
if (locationStr) {
|
|
14536
|
-
_context3.next = 12;
|
|
14537
|
-
break;
|
|
14538
|
-
}
|
|
14539
|
-
throw new Error("Invite sending returned a ".concat(inviteResponse.status));
|
|
14540
|
-
case 12:
|
|
14541
|
-
case "end":
|
|
14542
|
-
return _context3.stop();
|
|
14543
|
-
}
|
|
14544
|
-
}
|
|
14545
|
-
}, _callee3);
|
|
14546
|
-
}));
|
|
14547
|
-
return _sendInvite.apply(this, arguments);
|
|
14548
|
-
}
|
|
14549
|
-
function determineChatContainer(invitee, podRoot) {
|
|
14550
|
-
// Create chat
|
|
14551
|
-
// See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
|
|
14552
|
-
var chatContainerStr = new URL("IndividualChats/".concat(new URL(invitee.value).host, "/"), podRoot.value).toString();
|
|
14553
|
-
return new rdflib__WEBPACK_IMPORTED_MODULE_3__["default"](chatContainerStr);
|
|
14554
|
-
}
|
|
14555
|
-
function createChatThing(_x4, _x5) {
|
|
14440
|
+
function createChatThing(_x, _x2) {
|
|
14556
14441
|
return _createChatThing.apply(this, arguments);
|
|
14557
14442
|
}
|
|
14558
14443
|
function _createChatThing() {
|
|
14559
|
-
_createChatThing = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
14444
|
+
_createChatThing = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(chatContainer, me) {
|
|
14560
14445
|
var created;
|
|
14561
|
-
return _regeneratorRuntime().wrap(function
|
|
14446
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14562
14447
|
while (1) {
|
|
14563
|
-
switch (
|
|
14448
|
+
switch (_context.prev = _context.next) {
|
|
14564
14449
|
case 0:
|
|
14565
|
-
|
|
14566
|
-
return
|
|
14450
|
+
_context.next = 2;
|
|
14451
|
+
return _longChatPane__WEBPACK_IMPORTED_MODULE_1__.longChatPane.mintNew({
|
|
14567
14452
|
session: {
|
|
14568
|
-
store:
|
|
14453
|
+
store: solid_logic__WEBPACK_IMPORTED_MODULE_0__.store
|
|
14569
14454
|
}
|
|
14570
14455
|
}, {
|
|
14571
14456
|
me: me,
|
|
14572
14457
|
newBase: chatContainer.value
|
|
14573
14458
|
});
|
|
14574
14459
|
case 2:
|
|
14575
|
-
created =
|
|
14576
|
-
return
|
|
14460
|
+
created = _context.sent;
|
|
14461
|
+
return _context.abrupt("return", created.newInstance);
|
|
14577
14462
|
case 4:
|
|
14578
14463
|
case "end":
|
|
14579
|
-
return
|
|
14464
|
+
return _context.stop();
|
|
14580
14465
|
}
|
|
14581
14466
|
}
|
|
14582
|
-
},
|
|
14467
|
+
}, _callee);
|
|
14583
14468
|
}));
|
|
14584
14469
|
return _createChatThing.apply(this, arguments);
|
|
14585
14470
|
}
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
|
|
14595
|
-
|
|
14596
|
-
|
|
14597
|
-
|
|
14598
|
-
|
|
14599
|
-
|
|
14600
|
-
|
|
14601
|
-
|
|
14602
|
-
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
throw new Error('Chat ACL doc not found!');
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
case 8:
|
|
14614
|
-
aclResponse = _context5.sent;
|
|
14615
|
-
case 9:
|
|
14616
|
-
case "end":
|
|
14617
|
-
return _context5.stop();
|
|
14618
|
-
}
|
|
14619
|
-
}
|
|
14620
|
-
}, _callee5);
|
|
14621
|
-
}));
|
|
14622
|
-
return _setAcl.apply(this, arguments);
|
|
14623
|
-
}
|
|
14624
|
-
function addToPrivateTypeIndex(_x9, _x10) {
|
|
14625
|
-
return _addToPrivateTypeIndex.apply(this, arguments);
|
|
14626
|
-
}
|
|
14627
|
-
function _addToPrivateTypeIndex() {
|
|
14628
|
-
_addToPrivateTypeIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(chatThing, me) {
|
|
14629
|
-
var privateTypeIndex, reg, ins;
|
|
14630
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
14631
|
-
while (1) {
|
|
14632
|
-
switch (_context6.prev = _context6.next) {
|
|
14633
|
-
case 0:
|
|
14634
|
-
// Add to private type index
|
|
14635
|
-
privateTypeIndex = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('privateTypeIndex'));
|
|
14636
|
-
if (privateTypeIndex) {
|
|
14637
|
-
_context6.next = 3;
|
|
14638
|
-
break;
|
|
14639
|
-
}
|
|
14640
|
-
throw new Error('Private type index not found!');
|
|
14641
|
-
case 3:
|
|
14642
|
-
_context6.next = 5;
|
|
14643
|
-
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(privateTypeIndex);
|
|
14644
|
-
case 5:
|
|
14645
|
-
reg = solid_ui__WEBPACK_IMPORTED_MODULE_0__.widgets.newThing(privateTypeIndex);
|
|
14646
|
-
ins = [(0,rdflib__WEBPACK_IMPORTED_MODULE_4__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('type'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('TypeRegistration'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_4__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('forClass'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.meeting('LongChat'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_4__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('instance'), chatThing, privateTypeIndex.doc())];
|
|
14647
|
-
_context6.next = 9;
|
|
14648
|
-
return new Promise(function (resolve, reject) {
|
|
14649
|
-
solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.updater.update([], ins, function (_uri, ok, errm) {
|
|
14650
|
-
if (!ok) {
|
|
14651
|
-
reject(new Error(errm));
|
|
14652
|
-
} else {
|
|
14653
|
-
resolve();
|
|
14654
|
-
}
|
|
14655
|
-
});
|
|
14656
|
-
});
|
|
14657
|
-
case 9:
|
|
14658
|
-
case "end":
|
|
14659
|
-
return _context6.stop();
|
|
14660
|
-
}
|
|
14661
|
-
}
|
|
14662
|
-
}, _callee6);
|
|
14663
|
-
}));
|
|
14664
|
-
return _addToPrivateTypeIndex.apply(this, arguments);
|
|
14665
|
-
}
|
|
14666
|
-
function findChat(_x11) {
|
|
14471
|
+
|
|
14472
|
+
/***/ }),
|
|
14473
|
+
|
|
14474
|
+
/***/ "./src/findChat.ts":
|
|
14475
|
+
/*!*************************!*\
|
|
14476
|
+
!*** ./src/findChat.ts ***!
|
|
14477
|
+
\*************************/
|
|
14478
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14479
|
+
|
|
14480
|
+
"use strict";
|
|
14481
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14482
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14483
|
+
/* harmony export */ "findChat": () => (/* binding */ findChat)
|
|
14484
|
+
/* harmony export */ });
|
|
14485
|
+
/* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
|
|
14486
|
+
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
|
|
14487
|
+
/* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
|
|
14488
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
|
14489
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14490
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
14491
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14492
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14493
|
+
|
|
14494
|
+
|
|
14495
|
+
|
|
14496
|
+
|
|
14497
|
+
function findChat(_x) {
|
|
14667
14498
|
return _findChat.apply(this, arguments);
|
|
14668
14499
|
}
|
|
14669
14500
|
function _findChat() {
|
|
14670
|
-
_findChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
14501
|
+
_findChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(invitee) {
|
|
14671
14502
|
var me, podRoot, chatContainer, exists;
|
|
14672
|
-
return _regeneratorRuntime().wrap(function
|
|
14503
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14673
14504
|
while (1) {
|
|
14674
|
-
switch (
|
|
14505
|
+
switch (_context.prev = _context.next) {
|
|
14675
14506
|
case 0:
|
|
14676
|
-
|
|
14677
|
-
return getMe();
|
|
14507
|
+
_context.next = 2;
|
|
14508
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.getMe)();
|
|
14678
14509
|
case 2:
|
|
14679
|
-
me =
|
|
14680
|
-
|
|
14681
|
-
return getPodRoot(me);
|
|
14510
|
+
me = _context.sent;
|
|
14511
|
+
_context.next = 5;
|
|
14512
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.getPodRoot)(me);
|
|
14682
14513
|
case 5:
|
|
14683
|
-
podRoot =
|
|
14684
|
-
chatContainer = determineChatContainer(invitee, podRoot);
|
|
14514
|
+
podRoot = _context.sent;
|
|
14515
|
+
chatContainer = (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.determineChatContainer)(invitee, podRoot);
|
|
14685
14516
|
exists = true;
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
return
|
|
14517
|
+
_context.prev = 8;
|
|
14518
|
+
_context.next = 11;
|
|
14519
|
+
return solid_logic__WEBPACK_IMPORTED_MODULE_0__.store.fetcher.load(new rdflib__WEBPACK_IMPORTED_MODULE_3__["default"](chatContainer.value + _longChatPane__WEBPACK_IMPORTED_MODULE_1__.longChatPane.CHAT_LOCATION_IN_CONTAINER));
|
|
14689
14520
|
case 11:
|
|
14690
|
-
|
|
14521
|
+
_context.next = 16;
|
|
14691
14522
|
break;
|
|
14692
14523
|
case 13:
|
|
14693
|
-
|
|
14694
|
-
|
|
14524
|
+
_context.prev = 13;
|
|
14525
|
+
_context.t0 = _context["catch"](8);
|
|
14695
14526
|
exists = false;
|
|
14696
14527
|
case 16:
|
|
14697
|
-
return
|
|
14528
|
+
return _context.abrupt("return", {
|
|
14698
14529
|
me: me,
|
|
14699
14530
|
chatContainer: chatContainer,
|
|
14700
14531
|
exists: exists
|
|
14701
14532
|
});
|
|
14702
14533
|
case 17:
|
|
14703
14534
|
case "end":
|
|
14704
|
-
return
|
|
14535
|
+
return _context.stop();
|
|
14705
14536
|
}
|
|
14706
14537
|
}
|
|
14707
|
-
},
|
|
14538
|
+
}, _callee, null, [[8, 13]]);
|
|
14708
14539
|
}));
|
|
14709
14540
|
return _findChat.apply(this, arguments);
|
|
14710
14541
|
}
|
|
14711
|
-
|
|
14542
|
+
|
|
14543
|
+
/***/ }),
|
|
14544
|
+
|
|
14545
|
+
/***/ "./src/getChat.ts":
|
|
14546
|
+
/*!************************!*\
|
|
14547
|
+
!*** ./src/getChat.ts ***!
|
|
14548
|
+
\************************/
|
|
14549
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14550
|
+
|
|
14551
|
+
"use strict";
|
|
14552
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14553
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14554
|
+
/* harmony export */ "getChat": () => (/* binding */ getChat)
|
|
14555
|
+
/* harmony export */ });
|
|
14556
|
+
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
|
|
14557
|
+
/* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
|
|
14558
|
+
/* harmony import */ var _manageNotifications__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./manageNotifications */ "./src/manageNotifications.ts");
|
|
14559
|
+
/* harmony import */ var _manageChat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./manageChat */ "./src/manageChat.ts");
|
|
14560
|
+
/* harmony import */ var _findChat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./findChat */ "./src/findChat.ts");
|
|
14561
|
+
/* harmony import */ var _createChat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createChat */ "./src/createChat.ts");
|
|
14562
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14563
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
14564
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14565
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14566
|
+
|
|
14567
|
+
|
|
14568
|
+
|
|
14569
|
+
|
|
14570
|
+
|
|
14571
|
+
|
|
14572
|
+
function getChat(_x) {
|
|
14712
14573
|
return _getChat.apply(this, arguments);
|
|
14713
14574
|
}
|
|
14714
14575
|
function _getChat() {
|
|
14715
|
-
_getChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
14576
|
+
_getChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(invitee) {
|
|
14716
14577
|
var createIfMissing,
|
|
14717
14578
|
_yield$findChat,
|
|
14718
14579
|
me,
|
|
14719
14580
|
chatContainer,
|
|
14720
14581
|
exists,
|
|
14721
14582
|
chatThing,
|
|
14722
|
-
|
|
14723
|
-
return _regeneratorRuntime().wrap(function
|
|
14583
|
+
_args = arguments;
|
|
14584
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14724
14585
|
while (1) {
|
|
14725
|
-
switch (
|
|
14586
|
+
switch (_context.prev = _context.next) {
|
|
14726
14587
|
case 0:
|
|
14727
|
-
createIfMissing =
|
|
14728
|
-
|
|
14729
|
-
return findChat(invitee);
|
|
14588
|
+
createIfMissing = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
|
|
14589
|
+
_context.next = 3;
|
|
14590
|
+
return (0,_findChat__WEBPACK_IMPORTED_MODULE_3__.findChat)(invitee);
|
|
14730
14591
|
case 3:
|
|
14731
|
-
_yield$findChat =
|
|
14592
|
+
_yield$findChat = _context.sent;
|
|
14732
14593
|
me = _yield$findChat.me;
|
|
14733
14594
|
chatContainer = _yield$findChat.chatContainer;
|
|
14734
14595
|
exists = _yield$findChat.exists;
|
|
14735
14596
|
if (!exists) {
|
|
14736
|
-
|
|
14597
|
+
_context.next = 9;
|
|
14737
14598
|
break;
|
|
14738
14599
|
}
|
|
14739
|
-
return
|
|
14600
|
+
return _context.abrupt("return", new rdflib__WEBPACK_IMPORTED_MODULE_5__["default"](chatContainer.value + _longChatPane__WEBPACK_IMPORTED_MODULE_0__.longChatPane.CHAT_LOCATION_IN_CONTAINER));
|
|
14740
14601
|
case 9:
|
|
14741
14602
|
if (!createIfMissing) {
|
|
14742
|
-
|
|
14603
|
+
_context.next = 20;
|
|
14743
14604
|
break;
|
|
14744
14605
|
}
|
|
14745
|
-
|
|
14746
|
-
return createChatThing(chatContainer, me);
|
|
14606
|
+
_context.next = 12;
|
|
14607
|
+
return (0,_createChat__WEBPACK_IMPORTED_MODULE_4__.createChatThing)(chatContainer, me);
|
|
14747
14608
|
case 12:
|
|
14748
|
-
chatThing =
|
|
14749
|
-
|
|
14750
|
-
return sendInvite(invitee, chatThing);
|
|
14609
|
+
chatThing = _context.sent;
|
|
14610
|
+
_context.next = 15;
|
|
14611
|
+
return (0,_manageNotifications__WEBPACK_IMPORTED_MODULE_1__.sendInvite)(invitee, chatThing);
|
|
14751
14612
|
case 15:
|
|
14752
|
-
|
|
14753
|
-
return setAcl(chatContainer, me, invitee);
|
|
14613
|
+
_context.next = 17;
|
|
14614
|
+
return (0,_manageChat__WEBPACK_IMPORTED_MODULE_2__.setAcl)(chatContainer, me, invitee);
|
|
14754
14615
|
case 17:
|
|
14755
|
-
|
|
14756
|
-
return addToPrivateTypeIndex(chatThing, me);
|
|
14616
|
+
_context.next = 19;
|
|
14617
|
+
return (0,_manageChat__WEBPACK_IMPORTED_MODULE_2__.addToPrivateTypeIndex)(chatThing, me);
|
|
14757
14618
|
case 19:
|
|
14758
|
-
return
|
|
14619
|
+
return _context.abrupt("return", chatThing);
|
|
14759
14620
|
case 20:
|
|
14760
14621
|
case "end":
|
|
14761
|
-
return
|
|
14622
|
+
return _context.stop();
|
|
14762
14623
|
}
|
|
14763
14624
|
}
|
|
14764
|
-
},
|
|
14625
|
+
}, _callee);
|
|
14765
14626
|
}));
|
|
14766
14627
|
return _getChat.apply(this, arguments);
|
|
14767
14628
|
}
|
|
14768
14629
|
|
|
14769
14630
|
/***/ }),
|
|
14770
14631
|
|
|
14632
|
+
/***/ "./src/helpers.ts":
|
|
14633
|
+
/*!************************!*\
|
|
14634
|
+
!*** ./src/helpers.ts ***!
|
|
14635
|
+
\************************/
|
|
14636
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14637
|
+
|
|
14638
|
+
"use strict";
|
|
14639
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14640
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14641
|
+
/* harmony export */ "determineChatContainer": () => (/* binding */ determineChatContainer),
|
|
14642
|
+
/* harmony export */ "getMe": () => (/* binding */ getMe),
|
|
14643
|
+
/* harmony export */ "getPodRoot": () => (/* binding */ getPodRoot)
|
|
14644
|
+
/* harmony export */ });
|
|
14645
|
+
/* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
|
|
14646
|
+
/* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
|
|
14647
|
+
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
|
|
14648
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14649
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
14650
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14651
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14652
|
+
|
|
14653
|
+
|
|
14654
|
+
|
|
14655
|
+
function getMe() {
|
|
14656
|
+
return _getMe.apply(this, arguments);
|
|
14657
|
+
}
|
|
14658
|
+
function _getMe() {
|
|
14659
|
+
_getMe = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
14660
|
+
var me;
|
|
14661
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14662
|
+
while (1) {
|
|
14663
|
+
switch (_context.prev = _context.next) {
|
|
14664
|
+
case 0:
|
|
14665
|
+
me = solid_logic__WEBPACK_IMPORTED_MODULE_1__.authn.currentUser();
|
|
14666
|
+
if (!(me === null)) {
|
|
14667
|
+
_context.next = 3;
|
|
14668
|
+
break;
|
|
14669
|
+
}
|
|
14670
|
+
throw new Error('Current user not found! Not logged in?');
|
|
14671
|
+
case 3:
|
|
14672
|
+
_context.next = 5;
|
|
14673
|
+
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(me.doc());
|
|
14674
|
+
case 5:
|
|
14675
|
+
return _context.abrupt("return", me);
|
|
14676
|
+
case 6:
|
|
14677
|
+
case "end":
|
|
14678
|
+
return _context.stop();
|
|
14679
|
+
}
|
|
14680
|
+
}
|
|
14681
|
+
}, _callee);
|
|
14682
|
+
}));
|
|
14683
|
+
return _getMe.apply(this, arguments);
|
|
14684
|
+
}
|
|
14685
|
+
function getPodRoot(_x) {
|
|
14686
|
+
return _getPodRoot.apply(this, arguments);
|
|
14687
|
+
}
|
|
14688
|
+
function _getPodRoot() {
|
|
14689
|
+
_getPodRoot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(me) {
|
|
14690
|
+
var podRoot;
|
|
14691
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
14692
|
+
while (1) {
|
|
14693
|
+
switch (_context2.prev = _context2.next) {
|
|
14694
|
+
case 0:
|
|
14695
|
+
podRoot = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.space('storage'), undefined, me.doc());
|
|
14696
|
+
if (podRoot) {
|
|
14697
|
+
_context2.next = 3;
|
|
14698
|
+
break;
|
|
14699
|
+
}
|
|
14700
|
+
throw new Error('Current user pod root not found!');
|
|
14701
|
+
case 3:
|
|
14702
|
+
return _context2.abrupt("return", podRoot);
|
|
14703
|
+
case 4:
|
|
14704
|
+
case "end":
|
|
14705
|
+
return _context2.stop();
|
|
14706
|
+
}
|
|
14707
|
+
}
|
|
14708
|
+
}, _callee2);
|
|
14709
|
+
}));
|
|
14710
|
+
return _getPodRoot.apply(this, arguments);
|
|
14711
|
+
}
|
|
14712
|
+
function determineChatContainer(invitee, podRoot) {
|
|
14713
|
+
// Create chat
|
|
14714
|
+
// See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
|
|
14715
|
+
var chatContainerStr = new URL("IndividualChats/".concat(new URL(invitee.value).host, "/"), podRoot.value).toString();
|
|
14716
|
+
return new rdflib__WEBPACK_IMPORTED_MODULE_2__["default"](chatContainerStr);
|
|
14717
|
+
}
|
|
14718
|
+
|
|
14719
|
+
/***/ }),
|
|
14720
|
+
|
|
14771
14721
|
/***/ "./src/longChatPane.js":
|
|
14772
14722
|
/*!*****************************!*\
|
|
14773
14723
|
!*** ./src/longChatPane.js ***!
|
|
@@ -15257,6 +15207,177 @@ var longChatPane = {
|
|
|
15257
15207
|
|
|
15258
15208
|
/***/ }),
|
|
15259
15209
|
|
|
15210
|
+
/***/ "./src/manageChat.ts":
|
|
15211
|
+
/*!***************************!*\
|
|
15212
|
+
!*** ./src/manageChat.ts ***!
|
|
15213
|
+
\***************************/
|
|
15214
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
15215
|
+
|
|
15216
|
+
"use strict";
|
|
15217
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15218
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15219
|
+
/* harmony export */ "addToPrivateTypeIndex": () => (/* binding */ addToPrivateTypeIndex),
|
|
15220
|
+
/* harmony export */ "setAcl": () => (/* binding */ setAcl)
|
|
15221
|
+
/* harmony export */ });
|
|
15222
|
+
/* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
|
|
15223
|
+
/* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
|
|
15224
|
+
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
|
|
15225
|
+
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
|
|
15226
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
15227
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
15228
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15229
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15230
|
+
|
|
15231
|
+
|
|
15232
|
+
|
|
15233
|
+
function setAcl(_x, _x2, _x3) {
|
|
15234
|
+
return _setAcl.apply(this, arguments);
|
|
15235
|
+
}
|
|
15236
|
+
function _setAcl() {
|
|
15237
|
+
_setAcl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(chatContainer, me, invitee) {
|
|
15238
|
+
var chatAclDoc, aclBody, aclResponse;
|
|
15239
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15240
|
+
while (1) {
|
|
15241
|
+
switch (_context.prev = _context.next) {
|
|
15242
|
+
case 0:
|
|
15243
|
+
_context.next = 2;
|
|
15244
|
+
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(chatContainer);
|
|
15245
|
+
case 2:
|
|
15246
|
+
// FIXME: check the Why value on this quad:
|
|
15247
|
+
chatAclDoc = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(chatContainer, new rdflib__WEBPACK_IMPORTED_MODULE_2__["default"]('http://www.iana.org/assignments/link-relations/acl'));
|
|
15248
|
+
if (chatAclDoc) {
|
|
15249
|
+
_context.next = 5;
|
|
15250
|
+
break;
|
|
15251
|
+
}
|
|
15252
|
+
throw new Error('Chat ACL doc not found!');
|
|
15253
|
+
case 5:
|
|
15254
|
+
aclBody = "\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <".concat(me.value, ">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n<#invitee>\n a acl:Authorization;\n acl:agent <").concat(invitee.value, ">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n");
|
|
15255
|
+
_context.next = 8;
|
|
15256
|
+
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.webOperation('PUT', chatAclDoc.value, {
|
|
15257
|
+
data: aclBody,
|
|
15258
|
+
contentType: 'text/turtle'
|
|
15259
|
+
});
|
|
15260
|
+
case 8:
|
|
15261
|
+
aclResponse = _context.sent;
|
|
15262
|
+
case 9:
|
|
15263
|
+
case "end":
|
|
15264
|
+
return _context.stop();
|
|
15265
|
+
}
|
|
15266
|
+
}
|
|
15267
|
+
}, _callee);
|
|
15268
|
+
}));
|
|
15269
|
+
return _setAcl.apply(this, arguments);
|
|
15270
|
+
}
|
|
15271
|
+
function addToPrivateTypeIndex(_x4, _x5) {
|
|
15272
|
+
return _addToPrivateTypeIndex.apply(this, arguments);
|
|
15273
|
+
}
|
|
15274
|
+
function _addToPrivateTypeIndex() {
|
|
15275
|
+
_addToPrivateTypeIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(chatThing, me) {
|
|
15276
|
+
var privateTypeIndex, reg, ins;
|
|
15277
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
15278
|
+
while (1) {
|
|
15279
|
+
switch (_context2.prev = _context2.next) {
|
|
15280
|
+
case 0:
|
|
15281
|
+
// Add to private type index
|
|
15282
|
+
privateTypeIndex = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('privateTypeIndex'));
|
|
15283
|
+
if (privateTypeIndex) {
|
|
15284
|
+
_context2.next = 3;
|
|
15285
|
+
break;
|
|
15286
|
+
}
|
|
15287
|
+
throw new Error('Private type index not found!');
|
|
15288
|
+
case 3:
|
|
15289
|
+
_context2.next = 5;
|
|
15290
|
+
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(privateTypeIndex);
|
|
15291
|
+
case 5:
|
|
15292
|
+
reg = solid_ui__WEBPACK_IMPORTED_MODULE_0__.widgets.newThing(privateTypeIndex);
|
|
15293
|
+
ins = [(0,rdflib__WEBPACK_IMPORTED_MODULE_3__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('type'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('TypeRegistration'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_3__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('forClass'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.meeting('LongChat'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_3__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('instance'), chatThing, privateTypeIndex.doc())];
|
|
15294
|
+
_context2.next = 9;
|
|
15295
|
+
return new Promise(function (resolve, reject) {
|
|
15296
|
+
solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.updater.update([], ins, function (_uri, ok, errm) {
|
|
15297
|
+
if (!ok) {
|
|
15298
|
+
reject(new Error(errm));
|
|
15299
|
+
} else {
|
|
15300
|
+
resolve();
|
|
15301
|
+
}
|
|
15302
|
+
});
|
|
15303
|
+
});
|
|
15304
|
+
case 9:
|
|
15305
|
+
case "end":
|
|
15306
|
+
return _context2.stop();
|
|
15307
|
+
}
|
|
15308
|
+
}
|
|
15309
|
+
}, _callee2);
|
|
15310
|
+
}));
|
|
15311
|
+
return _addToPrivateTypeIndex.apply(this, arguments);
|
|
15312
|
+
}
|
|
15313
|
+
|
|
15314
|
+
/***/ }),
|
|
15315
|
+
|
|
15316
|
+
/***/ "./src/manageNotifications.ts":
|
|
15317
|
+
/*!************************************!*\
|
|
15318
|
+
!*** ./src/manageNotifications.ts ***!
|
|
15319
|
+
\************************************/
|
|
15320
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
15321
|
+
|
|
15322
|
+
"use strict";
|
|
15323
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15324
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15325
|
+
/* harmony export */ "sendInvite": () => (/* binding */ sendInvite)
|
|
15326
|
+
/* harmony export */ });
|
|
15327
|
+
/* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
|
|
15328
|
+
/* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
|
|
15329
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
15330
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
15331
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15332
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15333
|
+
|
|
15334
|
+
|
|
15335
|
+
function sendInvite(_x, _x2) {
|
|
15336
|
+
return _sendInvite.apply(this, arguments);
|
|
15337
|
+
}
|
|
15338
|
+
function _sendInvite() {
|
|
15339
|
+
_sendInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(invitee, chatThing) {
|
|
15340
|
+
var inviteeInbox, inviteBody, inviteResponse, locationStr;
|
|
15341
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15342
|
+
while (1) {
|
|
15343
|
+
switch (_context.prev = _context.next) {
|
|
15344
|
+
case 0:
|
|
15345
|
+
_context.next = 2;
|
|
15346
|
+
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(invitee.doc());
|
|
15347
|
+
case 2:
|
|
15348
|
+
inviteeInbox = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(invitee, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.ldp('inbox'), undefined, invitee.doc());
|
|
15349
|
+
if (inviteeInbox) {
|
|
15350
|
+
_context.next = 5;
|
|
15351
|
+
break;
|
|
15352
|
+
}
|
|
15353
|
+
throw new Error("Invitee inbox not found! ".concat(invitee.value));
|
|
15354
|
+
case 5:
|
|
15355
|
+
inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('seeAlso'), " <").concat(chatThing.value, "> . \n ");
|
|
15356
|
+
_context.next = 8;
|
|
15357
|
+
return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.webOperation('POST', inviteeInbox.value, {
|
|
15358
|
+
data: inviteBody,
|
|
15359
|
+
contentType: 'text/turtle'
|
|
15360
|
+
});
|
|
15361
|
+
case 8:
|
|
15362
|
+
inviteResponse = _context.sent;
|
|
15363
|
+
locationStr = inviteResponse.headers.get('location');
|
|
15364
|
+
if (locationStr) {
|
|
15365
|
+
_context.next = 12;
|
|
15366
|
+
break;
|
|
15367
|
+
}
|
|
15368
|
+
throw new Error("Invite sending returned a ".concat(inviteResponse.status));
|
|
15369
|
+
case 12:
|
|
15370
|
+
case "end":
|
|
15371
|
+
return _context.stop();
|
|
15372
|
+
}
|
|
15373
|
+
}
|
|
15374
|
+
}, _callee);
|
|
15375
|
+
}));
|
|
15376
|
+
return _sendInvite.apply(this, arguments);
|
|
15377
|
+
}
|
|
15378
|
+
|
|
15379
|
+
/***/ }),
|
|
15380
|
+
|
|
15260
15381
|
/***/ "./node_modules/base64-js/index.js":
|
|
15261
15382
|
/*!*****************************************!*\
|
|
15262
15383
|
!*** ./node_modules/base64-js/index.js ***!
|
|
@@ -19847,6 +19968,8 @@ var INTRINSICS = {
|
|
|
19847
19968
|
'%AsyncIteratorPrototype%': needsEval,
|
|
19848
19969
|
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
|
19849
19970
|
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
|
19971
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
|
|
19972
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
|
|
19850
19973
|
'%Boolean%': Boolean,
|
|
19851
19974
|
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
|
19852
19975
|
'%Date%': Date,
|
|
@@ -19902,6 +20025,14 @@ var INTRINSICS = {
|
|
|
19902
20025
|
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
|
19903
20026
|
};
|
|
19904
20027
|
|
|
20028
|
+
try {
|
|
20029
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
20030
|
+
} catch (e) {
|
|
20031
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
20032
|
+
var errorProto = getProto(getProto(e));
|
|
20033
|
+
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
20034
|
+
}
|
|
20035
|
+
|
|
19905
20036
|
var doEval = function doEval(name) {
|
|
19906
20037
|
var value;
|
|
19907
20038
|
if (name === '%AsyncFunction%') {
|
|
@@ -38805,7 +38936,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38805
38936
|
/* harmony import */ var _class_order__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./class-order */ "./node_modules/rdflib/esm/class-order.js");
|
|
38806
38937
|
/* harmony import */ var _node_internal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node-internal */ "./node_modules/rdflib/esm/node-internal.js");
|
|
38807
38938
|
/* 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
38939
|
|
|
38810
38940
|
|
|
38811
38941
|
|
|
@@ -38901,7 +39031,6 @@ var BlankNode = /*#__PURE__*/function (_Node) {
|
|
|
38901
39031
|
function getId(id) {
|
|
38902
39032
|
if (id) {
|
|
38903
39033
|
if (typeof id !== 'string') {
|
|
38904
|
-
console.log('Bad blank id:', id);
|
|
38905
39034
|
throw new Error('Bad id argument to new blank node: ' + id);
|
|
38906
39035
|
}
|
|
38907
39036
|
if (id.includes('#')) {
|
|
@@ -40529,7 +40658,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
40529
40658
|
size: 0,
|
|
40530
40659
|
timeout: 0
|
|
40531
40660
|
};
|
|
40532
|
-
console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
40661
|
+
// console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
40533
40662
|
return _this5.handleError(dummyResponse, docuri, options); // possible credentials retry
|
|
40534
40663
|
// return this.failFetch(options, 'fetch failed: ' + error, 999, dummyResponse) // Fake status code: fetch exception
|
|
40535
40664
|
|
|
@@ -40590,25 +40719,21 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
40590
40719
|
if (fetchResponse.ok) {
|
|
40591
40720
|
userCallback(true, 'OK', fetchResponse);
|
|
40592
40721
|
} else {
|
|
40593
|
-
// console.log('@@@ fetcher.js Should not take this path !!!!!!!!!!!!')
|
|
40594
40722
|
var oops = 'HTTP error: Status ' + fetchResponse.status + ' (' + fetchResponse.statusText + ')';
|
|
40595
40723
|
if (fetchResponse.responseText) {
|
|
40596
40724
|
oops += ' ' + fetchResponse.responseText; // not in 404, dns error, nock failure
|
|
40597
40725
|
}
|
|
40598
40726
|
|
|
40599
|
-
console.log(oops + ' fetching ' + uri);
|
|
40600
40727
|
userCallback(false, oops, fetchResponse);
|
|
40601
40728
|
}
|
|
40602
40729
|
} else {
|
|
40603
40730
|
var _oops = '@@ nowOrWhenFetched: no response object!';
|
|
40604
|
-
console.log(_oops);
|
|
40605
40731
|
userCallback(false, _oops);
|
|
40606
40732
|
}
|
|
40607
40733
|
}
|
|
40608
40734
|
}, function (err) {
|
|
40609
40735
|
var message = err.message || err.statusText;
|
|
40610
40736
|
message = 'Failed to load <' + uri + '> ' + message;
|
|
40611
|
-
console.log(message);
|
|
40612
40737
|
if (err.response && err.response.status) {
|
|
40613
40738
|
message += ' status: ' + err.response.status;
|
|
40614
40739
|
}
|
|
@@ -40847,45 +40972,42 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
40847
40972
|
return fetcher.load(doc);
|
|
40848
40973
|
case 6:
|
|
40849
40974
|
response = _context2.sent;
|
|
40850
|
-
_context2.next =
|
|
40975
|
+
_context2.next = 26;
|
|
40851
40976
|
break;
|
|
40852
40977
|
case 9:
|
|
40853
40978
|
_context2.prev = 9;
|
|
40854
40979
|
_context2.t0 = _context2["catch"](3);
|
|
40855
40980
|
if (!(_context2.t0.response.status === 404)) {
|
|
40856
|
-
_context2.next =
|
|
40981
|
+
_context2.next = 25;
|
|
40857
40982
|
break;
|
|
40858
40983
|
}
|
|
40859
|
-
|
|
40860
|
-
_context2.
|
|
40861
|
-
_context2.next = 16;
|
|
40984
|
+
_context2.prev = 12;
|
|
40985
|
+
_context2.next = 15;
|
|
40862
40986
|
return fetcher.webOperation('PUT', doc.value, {
|
|
40863
40987
|
data: data,
|
|
40864
40988
|
contentType: contentType
|
|
40865
40989
|
});
|
|
40866
|
-
case
|
|
40990
|
+
case 15:
|
|
40867
40991
|
response = _context2.sent;
|
|
40868
|
-
_context2.next =
|
|
40992
|
+
_context2.next = 21;
|
|
40869
40993
|
break;
|
|
40870
|
-
case
|
|
40871
|
-
_context2.prev =
|
|
40872
|
-
_context2.t1 = _context2["catch"](
|
|
40873
|
-
console.log('createIfNotExists doc FAILED: ' + doc + ': ' + _context2.t1);
|
|
40994
|
+
case 18:
|
|
40995
|
+
_context2.prev = 18;
|
|
40996
|
+
_context2.t1 = _context2["catch"](12);
|
|
40874
40997
|
throw _context2.t1;
|
|
40875
|
-
case
|
|
40998
|
+
case 21:
|
|
40876
40999
|
delete fetcher.requested[doc.value]; // delete cached 404 error
|
|
40877
41000
|
// console.log('createIfNotExists doc created ok ' + doc)
|
|
40878
41001
|
return _context2.abrupt("return", response);
|
|
40879
|
-
case
|
|
40880
|
-
console.log('createIfNotExists doc load error NOT 404: ' + doc + ': ' + _context2.t0);
|
|
41002
|
+
case 25:
|
|
40881
41003
|
throw _context2.t0;
|
|
40882
|
-
case
|
|
41004
|
+
case 26:
|
|
40883
41005
|
return _context2.abrupt("return", response);
|
|
40884
|
-
case
|
|
41006
|
+
case 27:
|
|
40885
41007
|
case "end":
|
|
40886
41008
|
return _context2.stop();
|
|
40887
41009
|
}
|
|
40888
|
-
}, _callee2, this, [[3, 9], [
|
|
41010
|
+
}, _callee2, this, [[3, 9], [12, 18]]);
|
|
40889
41011
|
}));
|
|
40890
41012
|
function createIfNotExists(_x4) {
|
|
40891
41013
|
return _createIfNotExists.apply(this, arguments);
|
|
@@ -41194,7 +41316,8 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
41194
41316
|
}, {
|
|
41195
41317
|
key: "retryNoCredentials",
|
|
41196
41318
|
value: function retryNoCredentials(docuri, options) {
|
|
41197
|
-
console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
41319
|
+
// console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
41320
|
+
|
|
41198
41321
|
options.retriedWithNoCredentials = true; // protect against being called twice
|
|
41199
41322
|
|
|
41200
41323
|
delete this.requested[docuri]; // forget the original request happened
|
|
@@ -41239,7 +41362,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
41239
41362
|
// Now attempt retry via proxy
|
|
41240
41363
|
var proxyUri = Fetcher.crossSiteProxy(docuri);
|
|
41241
41364
|
if (proxyUri && !options.proxyUsed) {
|
|
41242
|
-
console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
41365
|
+
// console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
41243
41366
|
return this.redirectToProxy(proxyUri, options);
|
|
41244
41367
|
}
|
|
41245
41368
|
}
|
|
@@ -41312,7 +41435,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
41312
41435
|
|
|
41313
41436
|
// Check for masked errors (CORS, etc)
|
|
41314
41437
|
if (response.status === 0) {
|
|
41315
|
-
console.log('Masked error - status 0 for ' + docuri)
|
|
41438
|
+
// console.log('Masked error - status 0 for ' + docuri)
|
|
41316
41439
|
return this.handleError(response, docuri, options);
|
|
41317
41440
|
}
|
|
41318
41441
|
if (response.status >= 400) {
|
|
@@ -41645,7 +41768,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41645
41768
|
/* harmony import */ var _variable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./variable */ "./node_modules/rdflib/esm/variable.js");
|
|
41646
41769
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils */ "./node_modules/rdflib/esm/utils.js");
|
|
41647
41770
|
/* 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
41771
|
|
|
41650
41772
|
|
|
41651
41773
|
|
|
@@ -42200,7 +42322,6 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
42200
42322
|
while (todo.length) {
|
|
42201
42323
|
follow(todo.shift());
|
|
42202
42324
|
}
|
|
42203
|
-
// console.log('' + result.length + ' statements about ' + subject)
|
|
42204
42325
|
return result;
|
|
42205
42326
|
}
|
|
42206
42327
|
|
|
@@ -42357,10 +42478,10 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
42357
42478
|
var statementsCopy = this.statements.map(function (ea) {
|
|
42358
42479
|
return ea.substitute(bindings);
|
|
42359
42480
|
});
|
|
42360
|
-
console.log('Formula subs statmnts:' + statementsCopy)
|
|
42481
|
+
// console.log('Formula subs statmnts:' + statementsCopy)
|
|
42361
42482
|
var y = new Formula();
|
|
42362
42483
|
y.addAll(statementsCopy);
|
|
42363
|
-
console.log('indexed-form subs formula:' + y)
|
|
42484
|
+
// console.log('indexed-form subs formula:' + y)
|
|
42364
42485
|
return y;
|
|
42365
42486
|
}
|
|
42366
42487
|
}, {
|
|
@@ -45135,7 +45256,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45135
45256
|
/* 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
45257
|
/* 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
45258
|
/* 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
45259
|
|
|
45140
45260
|
|
|
45141
45261
|
|
|
@@ -45173,7 +45293,6 @@ var Node = /*#__PURE__*/function () {
|
|
|
45173
45293
|
(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Node, [{
|
|
45174
45294
|
key: "substitute",
|
|
45175
45295
|
value: function substitute(bindings) {
|
|
45176
|
-
console.log('@@@ node substitute' + this);
|
|
45177
45296
|
return this;
|
|
45178
45297
|
}
|
|
45179
45298
|
|
|
@@ -49509,7 +49628,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
49509
49628
|
/* harmony import */ var _node_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node-internal */ "./node_modules/rdflib/esm/node-internal.js");
|
|
49510
49629
|
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./types */ "./node_modules/rdflib/esm/types.js");
|
|
49511
49630
|
/* 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
49631
|
|
|
49514
49632
|
|
|
49515
49633
|
|
|
@@ -49588,7 +49706,7 @@ var Statement = /*#__PURE__*/function () {
|
|
|
49588
49706
|
key: "substitute",
|
|
49589
49707
|
value: function substitute(bindings) {
|
|
49590
49708
|
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)
|
|
49709
|
+
// console.log('@@@ statement substitute:' + y)
|
|
49592
49710
|
return y;
|
|
49593
49711
|
}
|
|
49594
49712
|
|
|
@@ -53716,7 +53834,7 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
53716
53834
|
*/
|
|
53717
53835
|
SolidAuthnLogic.prototype.checkUser = function (setUserCallback) {
|
|
53718
53836
|
return __awaiter(this, void 0, void 0, function () {
|
|
53719
|
-
var preLoginRedirectHash, postLoginRedirectHash, curUrl, me, webId;
|
|
53837
|
+
var preLoginRedirectHash, redirectUrl, postLoginRedirectHash, curUrl, me, webId;
|
|
53720
53838
|
return __generator(this, function (_a) {
|
|
53721
53839
|
switch (_a.label) {
|
|
53722
53840
|
case 0:
|
|
@@ -53728,20 +53846,16 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
53728
53846
|
if (document.location.toString() !== url)
|
|
53729
53847
|
history.replaceState(null, '', url);
|
|
53730
53848
|
});
|
|
53731
|
-
|
|
53732
|
-
|
|
53733
|
-
*/
|
|
53849
|
+
redirectUrl = new URL(window.location.href);
|
|
53850
|
+
redirectUrl.hash = '';
|
|
53734
53851
|
return [4 /*yield*/, this.session
|
|
53735
53852
|
.handleIncomingRedirect({
|
|
53736
53853
|
restorePreviousSession: true,
|
|
53737
|
-
url:
|
|
53854
|
+
url: redirectUrl.href
|
|
53738
53855
|
})
|
|
53739
53856
|
// Check to see if a hash was stored in local storage
|
|
53740
53857
|
];
|
|
53741
53858
|
case 1:
|
|
53742
|
-
/**
|
|
53743
|
-
* Handle a successful authentication redirect
|
|
53744
|
-
*/
|
|
53745
53859
|
_a.sent();
|
|
53746
53860
|
postLoginRedirectHash = window.localStorage.getItem('preLoginRedirectHash');
|
|
53747
53861
|
if (postLoginRedirectHash) {
|
|
@@ -63185,7 +63299,7 @@ function renderSignInPopup(dom) {
|
|
|
63185
63299
|
issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
|
|
63186
63300
|
var loginToIssuer = /*#__PURE__*/function () {
|
|
63187
63301
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
|
|
63188
|
-
var preLoginRedirectHash;
|
|
63302
|
+
var preLoginRedirectHash, locationUrl;
|
|
63189
63303
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
63190
63304
|
while (1) switch (_context.prev = _context.next) {
|
|
63191
63305
|
case 0:
|
|
@@ -63197,23 +63311,25 @@ function renderSignInPopup(dom) {
|
|
|
63197
63311
|
}
|
|
63198
63312
|
window.localStorage.setItem('loginIssuer', issuerUri);
|
|
63199
63313
|
// Login
|
|
63200
|
-
|
|
63314
|
+
locationUrl = new URL(window.location.href);
|
|
63315
|
+
locationUrl.hash = ''; // remove hash part
|
|
63316
|
+
_context.next = 8;
|
|
63201
63317
|
return _solidLogic.authSession.login({
|
|
63202
|
-
redirectUrl:
|
|
63318
|
+
redirectUrl: locationUrl.href,
|
|
63203
63319
|
oidcIssuer: issuerUri
|
|
63204
63320
|
});
|
|
63205
|
-
case 6:
|
|
63206
|
-
_context.next = 11;
|
|
63207
|
-
break;
|
|
63208
63321
|
case 8:
|
|
63209
|
-
_context.
|
|
63322
|
+
_context.next = 13;
|
|
63323
|
+
break;
|
|
63324
|
+
case 10:
|
|
63325
|
+
_context.prev = 10;
|
|
63210
63326
|
_context.t0 = _context["catch"](0);
|
|
63211
63327
|
(0, _log.alert)(_context.t0.message);
|
|
63212
|
-
case
|
|
63328
|
+
case 13:
|
|
63213
63329
|
case "end":
|
|
63214
63330
|
return _context.stop();
|
|
63215
63331
|
}
|
|
63216
|
-
}, _callee, null, [[0,
|
|
63332
|
+
}, _callee, null, [[0, 10]]);
|
|
63217
63333
|
}));
|
|
63218
63334
|
return function loginToIssuer(_x11) {
|
|
63219
63335
|
return _ref.apply(this, arguments);
|
|
@@ -69150,10 +69266,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
69150
69266
|
}));
|
|
69151
69267
|
exports.versionInfo = void 0;
|
|
69152
69268
|
var versionInfo = {
|
|
69153
|
-
buildTime: '2023-
|
|
69154
|
-
commit: '
|
|
69269
|
+
buildTime: '2023-03-17T10:43:05Z',
|
|
69270
|
+
commit: '5b3471ff0bc08942d334b9bc9a6992adcb5cdb6b',
|
|
69155
69271
|
npmInfo: {
|
|
69156
|
-
'solid-ui': '2.4.
|
|
69272
|
+
'solid-ui': '2.4.27',
|
|
69157
69273
|
npm: '8.19.4',
|
|
69158
69274
|
node: '16.19.1',
|
|
69159
69275
|
v8: '9.4.146.26-node.24',
|
|
@@ -83586,33 +83702,21 @@ class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_3__.LocalJWKSet {
|
|
|
83586
83702
|
}
|
|
83587
83703
|
async reload() {
|
|
83588
83704
|
if (this._pendingFetch && (0,_runtime_env_js__WEBPACK_IMPORTED_MODULE_1__.isCloudflareWorkers)()) {
|
|
83589
|
-
|
|
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
|
-
});
|
|
83705
|
+
this._pendingFetch = undefined;
|
|
83615
83706
|
}
|
|
83707
|
+
this._pendingFetch || (this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
|
|
83708
|
+
.then((json) => {
|
|
83709
|
+
if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
|
|
83710
|
+
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
|
|
83711
|
+
}
|
|
83712
|
+
this._jwks = { keys: json.keys };
|
|
83713
|
+
this._jwksTimestamp = Date.now();
|
|
83714
|
+
this._pendingFetch = undefined;
|
|
83715
|
+
})
|
|
83716
|
+
.catch((err) => {
|
|
83717
|
+
this._pendingFetch = undefined;
|
|
83718
|
+
throw err;
|
|
83719
|
+
}));
|
|
83616
83720
|
await this._pendingFetch;
|
|
83617
83721
|
}
|
|
83618
83722
|
}
|
|
@@ -87645,7 +87749,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
87645
87749
|
/* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
|
|
87646
87750
|
/* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
|
|
87647
87751
|
/* harmony import */ var _src_longChatPane_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../src/longChatPane.js */ "./src/longChatPane.js");
|
|
87648
|
-
/* harmony import */ var
|
|
87752
|
+
/* harmony import */ var _src_getChat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../src/getChat */ "./src/getChat.ts");
|
|
87649
87753
|
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./dev/context.ts");
|
|
87650
87754
|
/* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ "./node_modules/console-browserify/index.js");
|
|
87651
87755
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
@@ -87794,7 +87898,7 @@ window.inviteSomeone = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
|
|
|
87794
87898
|
case 0:
|
|
87795
87899
|
invitee = solid_logic__WEBPACK_IMPORTED_MODULE_0__.store.namedNode(document.getElementById('invitee').value);
|
|
87796
87900
|
_context2.next = 3;
|
|
87797
|
-
return (0,
|
|
87901
|
+
return (0,_src_getChat__WEBPACK_IMPORTED_MODULE_3__.getChat)(invitee);
|
|
87798
87902
|
case 3:
|
|
87799
87903
|
created = _context2.sent;
|
|
87800
87904
|
console.log(created);
|