mftsccs-browser 1.1.22-beta → 1.1.23-beta

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.
@@ -1003,7 +1003,7 @@ function GetAllConnectionsOfCompositionBulk() {
1003
1003
  return __awaiter(this, arguments, void 0, function* (composition_ids = []) {
1004
1004
  if (_app__WEBPACK_IMPORTED_MODULE_7__.serviceWorker) {
1005
1005
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_7__.sendMessage)('GetAllConnectionsOfCompositionBulk', { composition_ids });
1006
- console.log('data received from sw', res);
1006
+ // console.log('data received from sw', res)
1007
1007
  return res.data;
1008
1008
  }
1009
1009
  var connectionList = [];
@@ -1214,7 +1214,7 @@ function GetCompositionConnectionsBetweenTwoConcepts(ofConceptId, toConcept, mai
1214
1214
  return __awaiter(this, void 0, void 0, function* () {
1215
1215
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
1216
1216
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetCompositionConnectionsBetweenTwoConcepts', { ofConceptId, toConcept, mainKey });
1217
- console.log('data received from sw', res);
1217
+ // console.log('data received from sw', res)
1218
1218
  return res.data;
1219
1219
  }
1220
1220
  var connectionList = [];
@@ -1295,7 +1295,7 @@ function GetConcept(id) {
1295
1295
  try {
1296
1296
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
1297
1297
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConcept', { id });
1298
- console.log('data received from sw', res);
1298
+ // console.log('data received from sw', res)
1299
1299
  return res.data;
1300
1300
  }
1301
1301
  let result = (0,_app__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();
@@ -1359,6 +1359,7 @@ __webpack_require__.r(__webpack_exports__);
1359
1359
  /* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ "./src/DataStructures/BaseUrl.ts");
1360
1360
  /* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ "./src/Services/Security/GetRequestHeader.ts");
1361
1361
  /* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ "./src/Services/Common/ErrorPosting.ts");
1362
+ /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ "./src/app.ts");
1362
1363
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
1363
1364
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1364
1365
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1372,6 +1373,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
1372
1373
 
1373
1374
 
1374
1375
 
1376
+
1375
1377
  /**
1376
1378
  * This function takes in a list of ids and returns a list of concepts . This uses local memory to find concepts
1377
1379
  * namely in the concept binary tree. If it could not find the concepts in local memory then it fetches those from
@@ -1381,6 +1383,11 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
1381
1383
  */
1382
1384
  function GetConceptBulk(passedConcepts) {
1383
1385
  return __awaiter(this, void 0, void 0, function* () {
1386
+ if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
1387
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptBulk', { passedConcepts });
1388
+ // console.log('data received from sw', res)
1389
+ return res.data;
1390
+ }
1384
1391
  let result = [];
1385
1392
  let setTime = new Date().getTime();
1386
1393
  // let conceptIds = passedConcepts.filter((value, index, self) => {
@@ -1527,7 +1534,7 @@ function GetConceptByCharacterAndType(characterValue, typeId) {
1527
1534
  try {
1528
1535
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
1529
1536
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptByCharacterAndType', { characterValue, typeId });
1530
- console.log('data received from sw', res);
1537
+ // console.log('data received from sw', res)
1531
1538
  return res.data;
1532
1539
  }
1533
1540
  let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, typeId);
@@ -1744,7 +1751,7 @@ function GetConnectionBulk() {
1744
1751
  return __awaiter(this, arguments, void 0, function* (connectionIds = []) {
1745
1752
  if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
1746
1753
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetConnectionBulk', { connectionIds });
1747
- console.log('data received from sw', res);
1754
+ // console.log('data received from sw', res)
1748
1755
  return res.data;
1749
1756
  }
1750
1757
  let connectionList = [];
@@ -1842,7 +1849,7 @@ function GetConnectionOfTheConcept(typeId_1, ofTheConceptId_1, userId_1) {
1842
1849
  return __awaiter(this, arguments, void 0, function* (typeId, ofTheConceptId, userId, inpage = 10, page = 1) {
1843
1850
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
1844
1851
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConnectionOfTheConcept', { typeId, ofTheConceptId, userId, inpage, page });
1845
- console.log('data received from sw', res);
1852
+ // console.log('data received from sw', res)
1846
1853
  return res.data;
1847
1854
  }
1848
1855
  let connectionList = [];
@@ -2311,7 +2318,7 @@ function RecursiveSearchApi() {
2311
2318
  listLinkers,
2312
2319
  textSearch,
2313
2320
  });
2314
- console.log("data received from sw", res);
2321
+ // console.log("data received from sw", res);
2315
2322
  return res.data;
2316
2323
  }
2317
2324
  let concepts = [];
@@ -2360,7 +2367,7 @@ function RecursiveSearchApiRaw() {
2360
2367
  listLinkers,
2361
2368
  textSearch,
2362
2369
  });
2363
- console.log("data received from sw", res);
2370
+ // console.log("data received from sw", res);
2364
2371
  return res.data;
2365
2372
  }
2366
2373
  let concepts = [];
@@ -2409,7 +2416,7 @@ function RecursiveSearchApiRawFullLinker() {
2409
2416
  fullLinkers,
2410
2417
  textSearch,
2411
2418
  });
2412
- console.log("data received from sw", res);
2419
+ // console.log("data received from sw", res);
2413
2420
  return res.data;
2414
2421
  }
2415
2422
  let concepts = [];
@@ -2458,7 +2465,7 @@ function RecursiveSearchApiNewRawFullLinker() {
2458
2465
  fullLinkers,
2459
2466
  textSearch,
2460
2467
  });
2461
- console.log("data received from sw", res);
2468
+ // console.log("data received from sw", res);
2462
2469
  return res.data;
2463
2470
  }
2464
2471
  let concepts = [];
@@ -4467,6 +4474,7 @@ __webpack_require__.r(__webpack_exports__);
4467
4474
  /* harmony import */ var _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BinaryCharacterTree */ "./src/DataStructures/BinaryCharacterTree.ts");
4468
4475
  /* harmony import */ var _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BinaryTypeTree */ "./src/DataStructures/BinaryTypeTree.ts");
4469
4476
  /* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/CreateDefaultConcept */ "./src/Services/CreateDefaultConcept.ts");
4477
+ /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ "./src/app.ts");
4470
4478
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4471
4479
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4472
4480
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -4481,6 +4489,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
4481
4489
 
4482
4490
 
4483
4491
 
4492
+
4484
4493
  class ConceptsData {
4485
4494
  constructor() {
4486
4495
  this.name = "conceptsArray";
@@ -4519,6 +4528,11 @@ class ConceptsData {
4519
4528
  });
4520
4529
  }
4521
4530
  static AddConcept(concept) {
4531
+ if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
4532
+ const res = (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('AddConcept', { concept }); // is async function
4533
+ // console.log('data received from sw', res)
4534
+ // return res.data // remove comment when this function is async
4535
+ }
4522
4536
  if (concept.id > 0) {
4523
4537
  // console.log("added the concept to the tree", concept);
4524
4538
  //var contains = this.CheckContains(concept);
@@ -4563,6 +4577,11 @@ class ConceptsData {
4563
4577
  }
4564
4578
  static GetConcept(id) {
4565
4579
  return __awaiter(this, void 0, void 0, function* () {
4580
+ if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
4581
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__GetConcept', { id });
4582
+ // console.log('data received from sw', res)
4583
+ return res.data;
4584
+ }
4566
4585
  var myConcept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();
4567
4586
  var node = yield _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.getNodeFromTree(id);
4568
4587
  if (node === null || node === void 0 ? void 0 : node.value) {
@@ -4633,6 +4652,11 @@ class ConceptsData {
4633
4652
  }
4634
4653
  static GetConceptsByTypeIdAndUser(typeId, userId) {
4635
4654
  return __awaiter(this, void 0, void 0, function* () {
4655
+ if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
4656
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetConceptsByTypeIdAndUser', { typeId, userId });
4657
+ // console.log('data received from sw', res)
4658
+ return res.data;
4659
+ }
4636
4660
  let ConceptList = [];
4637
4661
  ConceptList = yield _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.getTypeVariantsFromTreeWithUserIdNew(typeId, userId);
4638
4662
  return ConceptList;
@@ -5798,7 +5822,7 @@ class ConnectionData {
5798
5822
  return __awaiter(this, void 0, void 0, function* () {
5799
5823
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5800
5824
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("ConnectionData__GetConnectionByOfTheConceptAndType", { ofTheConceptId, typeId });
5801
- console.log("data received from sw", res);
5825
+ // console.log("data received from sw", res);
5802
5826
  return res.data;
5803
5827
  }
5804
5828
  let connections = _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionOfTheTree.GetConnectionByOfTheConceptAndTypeId(ofTheConceptId, typeId);
@@ -5830,7 +5854,7 @@ class ConnectionData {
5830
5854
  return __awaiter(this, void 0, void 0, function* () {
5831
5855
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5832
5856
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('ConnectionData__GetConnection', { id });
5833
- console.log('data received from sw', res);
5857
+ // console.log('data received from sw', res)
5834
5858
  return res.data;
5835
5859
  }
5836
5860
  // var myConcept: Connection|null;
@@ -5867,7 +5891,7 @@ class ConnectionData {
5867
5891
  return __awaiter(this, void 0, void 0, function* () {
5868
5892
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5869
5893
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("ConnectionData__GetConnectionsOfCompositionLocal", { id });
5870
- console.log("data received from sw", res);
5894
+ // console.log("data received from sw", res);
5871
5895
  return res.data;
5872
5896
  }
5873
5897
  let connections = [];
@@ -5896,6 +5920,11 @@ class ConnectionData {
5896
5920
  }
5897
5921
  static GetConnectionsOfConcept(id) {
5898
5922
  return __awaiter(this, void 0, void 0, function* () {
5923
+ if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5924
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("ConnectionData__GetConnectionsOfConcept", { id });
5925
+ // console.log("data received from sw", res);
5926
+ return res.data;
5927
+ }
5899
5928
  let connectionIds = [];
5900
5929
  let connections = [];
5901
5930
  connectionIds = yield ConnectionData.GetConnectionByOfTheConceptAndType(id, id);
@@ -8708,6 +8737,7 @@ class FreeschemaQuery {
8708
8737
  this.typeConnection = "";
8709
8738
  this.outputFormat = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_0__.NORMAL;
8710
8739
  this.name = "";
8740
+ this.reverse = false;
8711
8741
  }
8712
8742
  }
8713
8743
 
@@ -11179,7 +11209,7 @@ function CreateConnectionBetweenTwoConcepts(ofTheConcept_1, toTheConcept_1, link
11179
11209
  var _a, _b;
11180
11210
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
11181
11211
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('CreateConnectionBetweenTwoConcepts', { ofTheConcept, toTheConcept, linker, both, count });
11182
- console.log('data received from sw', res);
11212
+ // console.log('data received from sw', res)
11183
11213
  return res.data;
11184
11214
  }
11185
11215
  let userId = ofTheConcept.userId;
@@ -11331,7 +11361,7 @@ function CreateTheComposition(json_1) {
11331
11361
  return __awaiter(this, arguments, void 0, function* (json, ofTheConceptId = null, ofTheConceptUserId = null, mainKey = null, userId = null, accessId = null, sessionInformationId = null) {
11332
11362
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
11333
11363
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheComposition', { json, ofTheConceptId, ofTheConceptUserId, mainKey, userId, accessId, sessionInformationId });
11334
- console.log('data received from sw', res);
11364
+ // console.log('data received from sw', res)
11335
11365
  return res.data;
11336
11366
  }
11337
11367
  let localUserId = userId !== null && userId !== void 0 ? userId : 999;
@@ -11592,7 +11622,7 @@ function DeleteConceptById(id) {
11592
11622
  return __awaiter(this, void 0, void 0, function* () {
11593
11623
  if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
11594
11624
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('DeleteConceptById', { id });
11595
- console.log('data received from sw', res);
11625
+ // console.log('data received from sw', res)
11596
11626
  return res.data;
11597
11627
  }
11598
11628
  if (id > 0) {
@@ -11648,7 +11678,7 @@ function DeleteConnectionById(id) {
11648
11678
  return __awaiter(this, void 0, void 0, function* () {
11649
11679
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
11650
11680
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('DeleteConnectionById', { id });
11651
- console.log('data received from sw', res);
11681
+ // console.log('data received from sw', res)
11652
11682
  return res.data;
11653
11683
  }
11654
11684
  if (id > 0) {
@@ -11694,7 +11724,7 @@ function DeleteConnectionByType(id, linker) {
11694
11724
  return __awaiter(this, void 0, void 0, function* () {
11695
11725
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
11696
11726
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('DeleteConnectionByType', { id, linker });
11697
- console.log('data received from sw', res);
11727
+ // console.log('data received from sw', res)
11698
11728
  return res.data;
11699
11729
  }
11700
11730
  let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);
@@ -11773,7 +11803,8 @@ __webpack_require__.r(__webpack_exports__);
11773
11803
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11774
11804
  /* harmony export */ FindConnectionsOfCompositionsBulkInMemory: () => (/* binding */ FindConnectionsOfCompositionsBulkInMemory)
11775
11805
  /* harmony export */ });
11776
- /* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ "./src/DataStructures/ConnectionData.ts");
11806
+ /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ "./src/app.ts");
11807
+ /* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ "./src/DataStructures/ConnectionData.ts");
11777
11808
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
11778
11809
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11779
11810
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -11784,12 +11815,18 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
11784
11815
  });
11785
11816
  };
11786
11817
 
11818
+
11787
11819
  function FindConnectionsOfCompositionsBulkInMemory() {
11788
11820
  return __awaiter(this, arguments, void 0, function* (composition_ids = []) {
11821
+ if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
11822
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('FindConnectionsOfCompositionsBulkInMemory', { composition_ids });
11823
+ // console.log('data received from sw', res)
11824
+ return res.data;
11825
+ }
11789
11826
  let FinalConnectionList = [];
11790
11827
  for (let i = 0; i < composition_ids.length; i++) {
11791
11828
  // let connectionList = await ConnectionData.GetConnectionsOfCompositionLocal(composition_ids[i]);
11792
- let connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.GetConnectionsOfConcept(composition_ids[i]);
11829
+ let connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.GetConnectionsOfConcept(composition_ids[i]);
11793
11830
  FinalConnectionList.push(...connectionList);
11794
11831
  }
11795
11832
  return FinalConnectionList;
@@ -11849,7 +11886,7 @@ function GetCompositionById(id) {
11849
11886
  return __awaiter(this, void 0, void 0, function* () {
11850
11887
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
11851
11888
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionById', { id });
11852
- console.log('data received from sw', res);
11889
+ // console.log('data received from sw', res)
11853
11890
  return res.data;
11854
11891
  }
11855
11892
  let connectionList = [];
@@ -11952,7 +11989,7 @@ function GetComposition(id) {
11952
11989
  var _a, _b;
11953
11990
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
11954
11991
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetComposition', { id });
11955
- console.log('data received from sw', res);
11992
+ // console.log('data received from sw', res)
11956
11993
  return res.data;
11957
11994
  }
11958
11995
  let connectionList = [];
@@ -12016,7 +12053,7 @@ function GetCompositionFromMemory(id) {
12016
12053
  var _a, _b;
12017
12054
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12018
12055
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemory', { id });
12019
- console.log('data received from sw', res);
12056
+ // console.log('data received from sw', res)
12020
12057
  return res.data;
12021
12058
  }
12022
12059
  let connectionList = [];
@@ -12052,6 +12089,11 @@ function GetCompositionFromMemory(id) {
12052
12089
  function GetCompositionFromMemoryNormal(id) {
12053
12090
  return __awaiter(this, void 0, void 0, function* () {
12054
12091
  var _a, _b;
12092
+ if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12093
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemoryNormal', { id });
12094
+ // console.log('data received from sw', res)
12095
+ return res.data;
12096
+ }
12055
12097
  let connectionList = [];
12056
12098
  let returnOutput = {};
12057
12099
  //connectionList = await ConnectionData.GetConnectionsOfConcept(id);
@@ -12085,7 +12127,7 @@ function GetCompositionWithIdFromMemory(id) {
12085
12127
  var _a, _b;
12086
12128
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12087
12129
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemory', { id });
12088
- console.log('data received from sw', res);
12130
+ // console.log('data received from sw', res)
12089
12131
  return res.data;
12090
12132
  }
12091
12133
  let connectionList = [];
@@ -12124,6 +12166,11 @@ function GetCompositionWithIdFromMemory(id) {
12124
12166
  function GetCompositionWithIdFromMemoryNew(id) {
12125
12167
  return __awaiter(this, void 0, void 0, function* () {
12126
12168
  var _a, _b;
12169
+ if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12170
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemoryNew', { id });
12171
+ // console.log('data received from sw', res)
12172
+ return res.data;
12173
+ }
12127
12174
  let connectionList = [];
12128
12175
  let returnOutput = {};
12129
12176
  //connectionList = await ConnectionData.GetConnectionsOfConcept(id);
@@ -12165,7 +12212,7 @@ function GetCompositionWithIdAndDateFromMemory(id) {
12165
12212
  var _a, _b;
12166
12213
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12167
12214
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdAndDateFromMemory', { id });
12168
- console.log('data received from sw', res);
12215
+ // console.log('data received from sw', res)
12169
12216
  return res.data;
12170
12217
  }
12171
12218
  let connectionList = [];
@@ -12229,7 +12276,7 @@ function GetCompositionWithId(id) {
12229
12276
  var _a, _b;
12230
12277
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12231
12278
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithId', { id });
12232
- console.log('data received from sw', res);
12279
+ // console.log('data received from sw', res)
12233
12280
  return res.data;
12234
12281
  }
12235
12282
  let connectionList = [];
@@ -12728,7 +12775,7 @@ function GetCompositionFromConnectionsWithDataId() {
12728
12775
  return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {
12729
12776
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
12730
12777
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataId', { conceptIds, connectionIds });
12731
- console.log('data received from sw', res);
12778
+ // console.log('data received from sw', res)
12732
12779
  return res.data;
12733
12780
  }
12734
12781
  let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);
@@ -12753,7 +12800,7 @@ function GetCompositionFromConnectionsWithDataIdIndex() {
12753
12800
  return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {
12754
12801
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
12755
12802
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataIdIndex', { conceptIds, connectionIds });
12756
- console.log('data received from sw', res);
12803
+ // console.log('data received from sw', res)
12757
12804
  return res.data;
12758
12805
  }
12759
12806
  let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);
@@ -12796,6 +12843,11 @@ function GetCompositionFromConnectionsWithIndex() {
12796
12843
  */
12797
12844
  function GetConnectionDataPrefetch(connectionIds) {
12798
12845
  return __awaiter(this, void 0, void 0, function* () {
12846
+ if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
12847
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetConnectionDataPrefetch', { connectionIds });
12848
+ // console.log('data received from sw', res)
12849
+ return res.data;
12850
+ }
12799
12851
  let remainingConnections = [];
12800
12852
  let connectionsAll = [];
12801
12853
  let remainingIds = {};
@@ -12962,7 +13014,7 @@ function GetCompositionList(compositionName_1, userId_1) {
12962
13014
  return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {
12963
13015
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12964
13016
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionList', { compositionName, userId, inpage, page });
12965
- console.log('data received from sw', res);
13017
+ // console.log('data received from sw', res)
12966
13018
  return res.data;
12967
13019
  }
12968
13020
  let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__["default"])(compositionName);
@@ -13032,6 +13084,11 @@ function GetCompositionListAll(compositionName_1, userId_1) {
13032
13084
  // }
13033
13085
  function GetCompositionListAllWithId(compositionName_1, userId_1) {
13034
13086
  return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {
13087
+ if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
13088
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListAllWithId', { compositionName, userId, inpage, page });
13089
+ // console.log('data received from sw', res)
13090
+ return res.data;
13091
+ }
13035
13092
  let conceptLocal = yield (0,_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_7__["default"])(compositionName);
13036
13093
  let conceptOnline = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__["default"])(compositionName);
13037
13094
  let CompositionList = [];
@@ -13068,7 +13125,7 @@ function GetCompositionListWithId(compositionName_1, userId_1) {
13068
13125
  return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {
13069
13126
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
13070
13127
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListWithId', { compositionName, userId, inpage, page });
13071
- console.log('data received from sw', res);
13128
+ // console.log('data received from sw', res)
13072
13129
  return res.data;
13073
13130
  }
13074
13131
  let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__["default"])(compositionName);
@@ -13160,7 +13217,8 @@ __webpack_require__.r(__webpack_exports__);
13160
13217
  /* harmony export */ "default": () => (/* binding */ GetConceptByCharacter)
13161
13218
  /* harmony export */ });
13162
13219
  /* harmony import */ var _Api_GetConceptByCharacterValue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetConceptByCharacterValue */ "./src/Api/GetConceptByCharacterValue.ts");
13163
- /* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/ConceptData */ "./src/DataStructures/ConceptData.ts");
13220
+ /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ "./src/app.ts");
13221
+ /* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/ConceptData */ "./src/DataStructures/ConceptData.ts");
13164
13222
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13165
13223
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13166
13224
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -13172,15 +13230,21 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
13172
13230
  };
13173
13231
 
13174
13232
 
13233
+
13175
13234
  function GetConceptByCharacter(characterValue) {
13176
13235
  return __awaiter(this, void 0, void 0, function* () {
13177
- let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13236
+ if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13237
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConceptByCharacter', { characterValue });
13238
+ // console.log('data received from sw', res)
13239
+ return res.data;
13240
+ }
13241
+ let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13178
13242
  let literalCharacter = `${characterValue}`;
13179
13243
  if ((concept == null || (concept === null || concept === void 0 ? void 0 : concept.id) == 0) && literalCharacter) {
13180
13244
  yield (0,_Api_GetConceptByCharacterValue__WEBPACK_IMPORTED_MODULE_0__.GetConceptByCharacterValue)(characterValue);
13181
- concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, 51);
13245
+ concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, 51);
13182
13246
  if (concept.id == 0) {
13183
- concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13247
+ concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13184
13248
  }
13185
13249
  }
13186
13250
  return concept;
@@ -13188,11 +13252,16 @@ function GetConceptByCharacter(characterValue) {
13188
13252
  }
13189
13253
  function GetConceptByCharacterUpdated(characterValue) {
13190
13254
  return __awaiter(this, void 0, void 0, function* () {
13191
- let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13255
+ if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13256
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConceptByCharacterUpdated', { characterValue });
13257
+ // console.log('data received from sw', res)
13258
+ return res.data;
13259
+ }
13260
+ let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13192
13261
  let literalCharacter = `${characterValue}`;
13193
13262
  if ((concept == null || (concept === null || concept === void 0 ? void 0 : concept.id) == 0) && literalCharacter) {
13194
13263
  yield (0,_Api_GetConceptByCharacterValue__WEBPACK_IMPORTED_MODULE_0__.GetConceptByCharacterValue)(characterValue);
13195
- concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13264
+ concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13196
13265
  }
13197
13266
  return concept;
13198
13267
  });
@@ -13240,7 +13309,7 @@ function GetConnectionBetweenTwoConceptsLinker(ofTheConcept_1, toTheConcept_1, l
13240
13309
  var _a, _b;
13241
13310
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13242
13311
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConnectionBetweenTwoConceptsLinker', { ofTheConcept, toTheConcept, linker, fullLinker, forward });
13243
- console.log('data received from sw', res);
13312
+ // console.log('data received from sw', res)
13244
13313
  return res.data;
13245
13314
  }
13246
13315
  let typeConcept = (0,_app__WEBPACK_IMPORTED_MODULE_1__.CreateDefaultConcept)();
@@ -13300,7 +13369,7 @@ function GetConnectionById(id) {
13300
13369
  return __awaiter(this, void 0, void 0, function* () {
13301
13370
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13302
13371
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConnectionById', { id });
13303
- console.log('data received from sw', res);
13372
+ // console.log('data received from sw', res)
13304
13373
  return res.data;
13305
13374
  }
13306
13375
  let connection = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnection(id);
@@ -13426,7 +13495,7 @@ function GetLink(id_1, linker_1) {
13426
13495
  var _a;
13427
13496
  if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
13428
13497
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetLink', { id, linker, inpage, page });
13429
- console.log('data received from sw', res);
13498
+ // console.log('data received from sw', res)
13430
13499
  return res.data;
13431
13500
  }
13432
13501
  let output = [];
@@ -13550,6 +13619,7 @@ __webpack_require__.r(__webpack_exports__);
13550
13619
  /* harmony import */ var _GetTheConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GetTheConcept */ "./src/Services/GetTheConcept.ts");
13551
13620
  /* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ "./src/Api/GetAllConnectionsOfCompositionBulk.ts");
13552
13621
  /* harmony import */ var _ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConceptFinding/GetConceptByCharacterAndCategory */ "./src/Services/ConceptFinding/GetConceptByCharacterAndCategory.ts");
13622
+ /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ "./src/app.ts");
13553
13623
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13554
13624
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13555
13625
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -13564,8 +13634,14 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
13564
13634
 
13565
13635
 
13566
13636
 
13637
+
13567
13638
  function GetRelation(id_1, relation_1) {
13568
13639
  return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {
13640
+ if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
13641
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelation', { id, relation, inpage, page });
13642
+ // console.log('data received from sw', res)
13643
+ return res.data;
13644
+ }
13569
13645
  let output = [];
13570
13646
  let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__["default"])(id);
13571
13647
  let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);
@@ -13590,6 +13666,11 @@ function GetRelation(id_1, relation_1) {
13590
13666
  }
13591
13667
  function GetRelationRaw(id_1, relation_1) {
13592
13668
  return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {
13669
+ if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
13670
+ const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelationRaw', { id, relation, inpage, page });
13671
+ // console.log('data received from sw', res)
13672
+ return res.data;
13673
+ }
13593
13674
  let output = [];
13594
13675
  let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__["default"])(id);
13595
13676
  let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);
@@ -13652,7 +13733,7 @@ function GetTheConcept(id_1) {
13652
13733
  try {
13653
13734
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13654
13735
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetTheConcept', { id, userId });
13655
- console.log('data received from sw', res);
13736
+ // console.log('data received from sw', res)
13656
13737
  return res.data;
13657
13738
  }
13658
13739
  let concept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();
@@ -13808,7 +13889,7 @@ function CreateConnectionBetweenTwoConceptsLocal(ofTheConcept_1, toTheConcept_1,
13808
13889
  try {
13809
13890
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
13810
13891
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateConnectionBetweenTwoConceptsLocal', { ofTheConcept, toTheConcept, linker, both, actions });
13811
- console.log('data received from sw', res);
13892
+ // console.log('data received from sw', res)
13812
13893
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
13813
13894
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
13814
13895
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14086,7 +14167,7 @@ function CreateTheCompositionLocal(json_1) {
14086
14167
  var _a, _b, _c, _d;
14087
14168
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14088
14169
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheCompositionLocal', { json, ofTheConceptId, ofTheConceptUserId, mainKey, userId, accessId, sessionInformationId, actions });
14089
- console.log('data received from sw', res);
14170
+ // console.log('data received from sw', res)
14090
14171
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14091
14172
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14092
14173
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14188,7 +14269,7 @@ function CreateTheConceptLocal(referent_1, typecharacter_1, userId_1, categoryId
14188
14269
  try {
14189
14270
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14190
14271
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheConceptLocal', { referent, typecharacter, userId, categoryId, typeId, accessId, isComposition, referentId });
14191
- console.log('data received from sw', res);
14272
+ // console.log('data received from sw', res)
14192
14273
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14193
14274
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14194
14275
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14267,7 +14348,7 @@ function CreateTheConnectionLocal(ofTheConceptId_1, toTheConceptId_1, typeId_1)
14267
14348
  var _a, _b, _c, _d;
14268
14349
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
14269
14350
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('CreateTheConnectionLocal', { ofTheConceptId, toTheConceptId, typeId, orderId, typeString, userId, actions });
14270
- console.log('data received from sw', res);
14351
+ // console.log('data received from sw', res)
14271
14352
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14272
14353
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14273
14354
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14334,7 +14415,7 @@ function DeleteConceptLocal(id) {
14334
14415
  return __awaiter(this, void 0, void 0, function* () {
14335
14416
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14336
14417
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('DeleteConceptLocal', { id });
14337
- console.log('data received from sw', res);
14418
+ // console.log('data received from sw', res)
14338
14419
  return res.data;
14339
14420
  }
14340
14421
  let concept = yield (0,_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_2__.GetTheConceptLocal)(id);
@@ -14383,7 +14464,7 @@ function GetCompositionListLocal(compositionName, userId) {
14383
14464
  return __awaiter(this, void 0, void 0, function* () {
14384
14465
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14385
14466
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('GetCompositionListLocal', { compositionName, userId });
14386
- console.log('data received from sw', res);
14467
+ // console.log('data received from sw', res)
14387
14468
  return res.data;
14388
14469
  }
14389
14470
  try {
@@ -14413,7 +14494,7 @@ function GetCompositionListLocalWithId(compositionName, userId) {
14413
14494
  return __awaiter(this, void 0, void 0, function* () {
14414
14495
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14415
14496
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('GetCompositionListLocalWithId', { compositionName, userId });
14416
- console.log('data received from sw', res);
14497
+ // console.log('data received from sw', res)
14417
14498
  return res.data;
14418
14499
  }
14419
14500
  try {
@@ -14473,7 +14554,7 @@ function GetCompositionLocal(id) {
14473
14554
  try {
14474
14555
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
14475
14556
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionLocal', { id });
14476
- console.log('data received from sw', res);
14557
+ // console.log('data received from sw', res)
14477
14558
  return res.data;
14478
14559
  }
14479
14560
  let connectionList = [];
@@ -14509,7 +14590,7 @@ function GetCompositionLocalWithId(id) {
14509
14590
  try {
14510
14591
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
14511
14592
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionLocalWithId', { id });
14512
- console.log('data received from sw', res);
14593
+ // console.log('data received from sw', res)
14513
14594
  return res.data;
14514
14595
  }
14515
14596
  let connectionList = [];
@@ -14639,7 +14720,7 @@ function GetConceptByCharacterAndCategoryLocal(character) {
14639
14720
  return __awaiter(this, void 0, void 0, function* () {
14640
14721
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
14641
14722
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetConceptByCharacterAndCategoryLocal', { character });
14642
- console.log('data received from sw', res);
14723
+ // console.log('data received from sw', res)
14643
14724
  return res.data;
14644
14725
  }
14645
14726
  let lconcept = (0,_app__WEBPACK_IMPORTED_MODULE_2__.CreateDefaultLConcept)();
@@ -14757,7 +14838,7 @@ function GetRelationLocal(id, relation, userId) {
14757
14838
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("GetRelationLocal", {
14758
14839
  id, relation, userId
14759
14840
  });
14760
- console.log("data received from sw", res);
14841
+ // console.log("data received from sw", res);
14761
14842
  return res.data;
14762
14843
  }
14763
14844
  let typeConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetConceptByCharacterAndCategoryLocal)(relation);
@@ -14821,7 +14902,7 @@ function GetTheConceptLocal(id) {
14821
14902
  try {
14822
14903
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
14823
14904
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetTheConceptLocal', { id });
14824
- console.log('data received from sw', res);
14905
+ // console.log('data received from sw', res)
14825
14906
  return res.data;
14826
14907
  }
14827
14908
  let lconcept = (0,_app__WEBPACK_IMPORTED_MODULE_2__.CreateDefaultLConcept)();
@@ -14884,7 +14965,7 @@ function MakeTheConceptLocal(referent_1, typeCharacter_1, userId_1, categoryId_1
14884
14965
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("MakeTheConceptLocal", {
14885
14966
  referent, typeCharacter, userId, categoryId, typeId, actions
14886
14967
  });
14887
- console.log("data received from sw", res);
14968
+ // console.log("data received from sw", res);
14888
14969
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14889
14970
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14890
14971
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14956,7 +15037,7 @@ function MakeTheInstanceConceptLocal(type_1, referent_1) {
14956
15037
  var _a, _b, _c, _d;
14957
15038
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
14958
15039
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('MakeTheInstanceConceptLocal', { type, referent, composition, userId, accessId, sessionInformationId, referentId, actions });
14959
- console.log('data received from sw', res);
15040
+ // console.log('data received from sw', res)
14960
15041
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14961
15042
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14962
15043
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -15066,7 +15147,7 @@ function MakeTheTypeConceptLocal(typeString_1, sessionId_1, sessionUserId_1, use
15066
15147
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)("MakeTheTypeConceptLocal", {
15067
15148
  typeString, sessionId, sessionUserId, userId, actions
15068
15149
  });
15069
- console.log("data received from sw", res);
15150
+ // console.log("data received from sw", res);
15070
15151
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
15071
15152
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
15072
15153
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -15148,7 +15229,7 @@ function UpdateCompositionLocal(patcherStructure_1) {
15148
15229
  patcherStructure,
15149
15230
  actions
15150
15231
  });
15151
- console.log("data received from sw", res);
15232
+ // console.log("data received from sw", res);
15152
15233
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
15153
15234
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
15154
15235
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -15440,7 +15521,7 @@ function MakeTheInstanceConcept(type_1, referent_1) {
15440
15521
  passedSessionId,
15441
15522
  referentId,
15442
15523
  });
15443
- console.log("data received from sw", res);
15524
+ // console.log("data received from sw", res);
15444
15525
  return res.data;
15445
15526
  }
15446
15527
  let sessionInformationId = passedSessionId;
@@ -15540,7 +15621,7 @@ function MakeTheTimestamp(type_1, referent_1, userId_1) {
15540
15621
  return __awaiter(this, arguments, void 0, function* (type, referent, userId, accessId = 4, sessionInformationId = 999) {
15541
15622
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
15542
15623
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('MakeTheTimestamp', { type, referent, userId, accessId, sessionInformationId });
15543
- console.log('data received from sw', res);
15624
+ // console.log('data received from sw', res)
15544
15625
  return res.data;
15545
15626
  }
15546
15627
  let categoryId = 4;
@@ -15600,7 +15681,7 @@ function MakeTheTypeConcept(typeString, sessionId, sessionUserId, userId) {
15600
15681
  return __awaiter(this, void 0, void 0, function* () {
15601
15682
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
15602
15683
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('MakeTheTypeConcept', { typeString, sessionId, sessionUserId, userId });
15603
- console.log('data received from sw', res);
15684
+ // console.log('data received from sw', res)
15604
15685
  return res.data;
15605
15686
  }
15606
15687
  let referentId = 999;
@@ -16862,7 +16943,7 @@ function UpdateComposition(patcherStructure) {
16862
16943
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_13__.sendMessage)("UpdateComposition", {
16863
16944
  patcherStructure,
16864
16945
  });
16865
- console.log("data received from sw", res);
16946
+ // console.log("data received from sw", res);
16866
16947
  return res.data;
16867
16948
  }
16868
16949
  // get all the default userId, sessionId, accessId passed by the patcherStructure
@@ -19248,10 +19329,9 @@ function sendMessage(type, payload) {
19248
19329
  }
19249
19330
  // Timeout for waiting for the response (e.g., 5 seconds)
19250
19331
  setTimeout(() => {
19251
- console.log('timeout', type);
19252
19332
  reject("No response from service worker after timeout");
19253
19333
  navigator.serviceWorker.removeEventListener("message", responseHandler);
19254
- }, 10000);
19334
+ }, 30000); // 30 sec
19255
19335
  // })
19256
19336
  // .catch(err => reject(err))
19257
19337
  // .finally(() => console.log('finally'))