@inweb/client 26.9.2 → 26.9.3

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.
@@ -177,10 +177,10 @@ class Model extends Endpoint {
177
177
  return this.file.getModelTransformMatrix(handle);
178
178
  }
179
179
  setModelTransformMatrix(handle, transform) {
180
- return this.file.setModelTransformMatrix(handle, transform).then((() => this));
180
+ return this.file.setModelTransformMatrix(handle, transform).then(() => this);
181
181
  }
182
182
  getViewpoints() {
183
- return this._file.getViewpoints().then((array => array.filter((({custom_fields: custom_fields = {}}) => custom_fields.modelId === this.id || custom_fields.modelName === this.name))));
183
+ return this._file.getViewpoints().then(array => array.filter(({custom_fields: custom_fields = {}}) => custom_fields.modelId === this.id || custom_fields.modelName === this.name));
184
184
  }
185
185
  saveViewpoint(viewpoint) {
186
186
  return this._file.saveViewpoint({
@@ -215,11 +215,11 @@ class Model extends Endpoint {
215
215
  if (!records) return;
216
216
  let ranges = [];
217
217
  if (records.length) {
218
- ranges = records.map((record => ({
218
+ ranges = records.map(record => ({
219
219
  begin: Number(record.begin),
220
220
  end: Number(record.end),
221
221
  requestId: record.reqId
222
- })));
222
+ }));
223
223
  } else {
224
224
  for (let i = 0; i < records.size(); i++) {
225
225
  const record = records.get(i);
@@ -239,29 +239,29 @@ class Model extends Endpoint {
239
239
  }
240
240
 
241
241
  function delay(ms, signal) {
242
- return new Promise((resolve => {
242
+ return new Promise(resolve => {
243
243
  let timeoutId = 0;
244
244
  const abortHandler = () => {
245
245
  clearTimeout(timeoutId);
246
246
  resolve(true);
247
247
  };
248
- timeoutId = window.setTimeout((() => {
248
+ timeoutId = window.setTimeout(() => {
249
249
  signal.removeEventListener("abort", abortHandler);
250
250
  resolve(false);
251
- }), ms);
251
+ }, ms);
252
252
  signal.addEventListener("abort", abortHandler, {
253
253
  once: true
254
254
  });
255
- }));
255
+ });
256
256
  }
257
257
 
258
258
  async function waitFor(func, params = {}) {
259
259
  var _a, _b, _c;
260
260
  const timeout = params.timeout || 6e5;
261
261
  const interval = params.interval || 3e3;
262
- const signal = (_a = params.signal) !== null && _a !== undefined ? _a : (new AbortController).signal;
263
- const abortError = (_b = params.abortError) !== null && _b !== undefined ? _b : new DOMException("Aborted", "AbortError");
264
- const timeoutError = (_c = params.timeoutError) !== null && _c !== undefined ? _c : new DOMException("Timeout", "TimeoutError");
262
+ const signal = (_a = params.signal) !== null && _a !== void 0 ? _a : (new AbortController).signal;
263
+ const abortError = (_b = params.abortError) !== null && _b !== void 0 ? _b : new DOMException("Aborted", "AbortError");
264
+ const timeoutError = (_c = params.timeoutError) !== null && _c !== void 0 ? _c : new DOMException("Timeout", "TimeoutError");
265
265
  const end = performance.now() + timeout;
266
266
  let count = timeout / interval;
267
267
  do {
@@ -275,7 +275,7 @@ function parseArgs(args) {
275
275
  if (typeof args === "string") {
276
276
  const firstArg = args.indexOf("--");
277
277
  if (firstArg !== -1) args = args.slice(firstArg);
278
- const argArray = args.split("--").map((x => x.split("=").map((y => y.split(" "))).flat())).filter((x => x[0])).map((x => x.concat([ "" ])));
278
+ const argArray = args.split("--").map(x => x.split("=").map(y => y.split(" ")).flat()).filter(x => x[0]).map(x => x.concat([ "" ]));
279
279
  return Object.fromEntries(argArray);
280
280
  }
281
281
  return args || {};
@@ -284,17 +284,17 @@ function parseArgs(args) {
284
284
  function userFullName(firstName, lastName = "", userName = "") {
285
285
  var _a;
286
286
  if (firstName && typeof firstName !== "string") {
287
- return userFullName((_a = firstName.firstName) !== null && _a !== undefined ? _a : firstName.name, firstName.lastName, firstName.userName);
287
+ return userFullName((_a = firstName.firstName) !== null && _a !== void 0 ? _a : firstName.name, firstName.lastName, firstName.userName);
288
288
  }
289
- return `${firstName !== null && firstName !== undefined ? firstName : ""} ${lastName !== null && lastName !== undefined ? lastName : ""}`.trim() || userName;
289
+ return `${firstName !== null && firstName !== void 0 ? firstName : ""} ${lastName !== null && lastName !== void 0 ? lastName : ""}`.trim() || userName;
290
290
  }
291
291
 
292
292
  function userInitials(fullName = "") {
293
- const names = fullName.split(" ").filter((x => x));
294
- return names.reduce(((initials, name, index) => {
293
+ const names = fullName.split(" ").filter(x => x);
294
+ return names.reduce((initials, name, index) => {
295
295
  if (index === 0 || index === names.length - 1) initials += name.charAt(0);
296
296
  return initials;
297
- }), "").toUpperCase();
297
+ }, "").toUpperCase();
298
298
  }
299
299
 
300
300
  class ClashTest extends Endpoint {
@@ -361,22 +361,22 @@ class ClashTest extends Endpoint {
361
361
  return this;
362
362
  }
363
363
  delete() {
364
- return super.delete("").then((response => response.json()));
364
+ return super.delete("").then(response => response.json());
365
365
  }
366
366
  save() {
367
367
  return this.update(this.data);
368
368
  }
369
369
  waitForDone(params) {
370
- const checkDone = () => this.checkout().then((test => {
370
+ const checkDone = () => this.checkout().then(test => {
371
371
  var _a;
372
372
  const ready = [ "done", "failed" ].includes(test.status);
373
- const cancel = (_a = params === null || params === undefined ? undefined : params.onCheckout) === null || _a === undefined ? undefined : _a.call(params, test, ready);
373
+ const cancel = (_a = params === null || params === void 0 ? void 0 : params.onCheckout) === null || _a === void 0 ? void 0 : _a.call(params, test, ready);
374
374
  return cancel || ready;
375
- }));
376
- return waitFor(checkDone, params).then((() => this));
375
+ });
376
+ return waitFor(checkDone, params).then(() => this);
377
377
  }
378
378
  getReport() {
379
- return this.get("/report").then((response => response.json()));
379
+ return this.get("/report").then(response => response.json());
380
380
  }
381
381
  }
382
382
 
@@ -404,8 +404,8 @@ class Assembly extends Endpoint {
404
404
  this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;
405
405
  this._data.owner.fullName = userFullName(this._data.owner);
406
406
  this._data.owner.initials = userInitials(this._data.owner.fullName);
407
- (_a = (_b = this._data).associatedFiles) !== null && _a !== undefined ? _a : _b.associatedFiles = [];
408
- this._data.associatedFiles.forEach((file => file.link = `${this.httpClient.serverUrl}/files/${file.fileId}`));
407
+ (_a = (_b = this._data).associatedFiles) !== null && _a !== void 0 ? _a : _b.associatedFiles = [];
408
+ this._data.associatedFiles.forEach(file => file.link = `${this.httpClient.serverUrl}/files/${file.fileId}`);
409
409
  }
410
410
  get files() {
411
411
  return this.data.files;
@@ -457,7 +457,7 @@ class Assembly extends Endpoint {
457
457
  return this;
458
458
  }
459
459
  delete() {
460
- return super.delete("").then((response => response.json()));
460
+ return super.delete("").then(response => response.json());
461
461
  }
462
462
  save() {
463
463
  return this.update(this.data);
@@ -471,7 +471,7 @@ class Assembly extends Endpoint {
471
471
  return Promise.resolve(this);
472
472
  }
473
473
  getModels() {
474
- return this.get("/geometry").then((response => response.json())).then((array => array.map((data => new Model(data, this)))));
474
+ return this.get("/geometry").then(response => response.json()).then(array => array.map(data => new Model(data, this)));
475
475
  }
476
476
  getModelTransformMatrix(handle) {
477
477
  return this.data.transform[handle];
@@ -495,40 +495,40 @@ class Assembly extends Endpoint {
495
495
  if (group) searchParams.set("group", "true");
496
496
  let queryString = searchParams.toString();
497
497
  if (queryString) queryString = "?" + queryString;
498
- return this.get(`/properties${queryString}`).then((response => response.json()));
498
+ return this.get(`/properties${queryString}`).then(response => response.json());
499
499
  }
500
500
  searchProperties(searchPattern) {
501
- return this.post("/properties/search", searchPattern).then((response => response.json()));
501
+ return this.post("/properties/search", searchPattern).then(response => response.json());
502
502
  }
503
503
  getCdaTree() {
504
- return this.get(`/properties/tree`).then((response => response.json()));
504
+ return this.get(`/properties/tree`).then(response => response.json());
505
505
  }
506
506
  getViewpoints() {
507
- return this.get("/viewpoints").then((response => response.json())).then((viewpoints => viewpoints.result));
507
+ return this.get("/viewpoints").then(response => response.json()).then(viewpoints => viewpoints.result);
508
508
  }
509
509
  saveViewpoint(viewpoint) {
510
- return this.post("/viewpoints", viewpoint).then((response => response.json()));
510
+ return this.post("/viewpoints", viewpoint).then(response => response.json());
511
511
  }
512
512
  deleteViewpoint(guid) {
513
- return super.delete(`/viewpoints/${guid}`).then((response => response.json()));
513
+ return super.delete(`/viewpoints/${guid}`).then(response => response.json());
514
514
  }
515
515
  getSnapshot(guid) {
516
- return this.get(`/viewpoints/${guid}/snapshot`).then((response => response.text()));
516
+ return this.get(`/viewpoints/${guid}/snapshot`).then(response => response.text());
517
517
  }
518
518
  getSnapshotData(guid, bitmapGuid) {
519
- return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then((response => response.text()));
519
+ return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then(response => response.text());
520
520
  }
521
521
  downloadResource(dataId, onProgress, signal) {
522
522
  return this.httpClient.downloadFile(this.getEndpointPath(`/downloads/${dataId}`), onProgress, {
523
523
  signal: signal,
524
524
  headers: this.headers
525
- }).then((response => response.arrayBuffer()));
525
+ }).then(response => response.arrayBuffer());
526
526
  }
527
527
  downloadResourceRange(dataId, requestId, ranges, onProgress, signal) {
528
528
  return this.httpClient.downloadFileRange(this.getEndpointPath(`/downloads/${dataId}${requestId ? "?requestId=" + requestId : ""}`), requestId, ranges, onProgress, {
529
529
  signal: signal,
530
530
  headers: this.headers
531
- }).then((response => response.arrayBuffer()));
531
+ }).then(response => response.arrayBuffer());
532
532
  }
533
533
  partialDownloadResource(dataId, onProgress, signal) {
534
534
  console.warn("Assembly.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use Assembly.downloadResource() instead.");
@@ -539,20 +539,20 @@ class Assembly extends Endpoint {
539
539
  }
540
540
  async getReferences(signal) {
541
541
  const files = new Endpoint("/files", this.httpClient, this.headers);
542
- const references = await Promise.all(this.associatedFiles.map((file => `/${file.fileId}/references`)).map((link => files.get(link, signal).then((response => response.json()))))).then((references => references.map((x => x.references)))).then((references => references.reduce(((x, v) => [ ...v, ...x ]), []))).then((references => [ ...new Set(references.map(JSON.stringify)) ].map((x => JSON.parse(x)))));
542
+ const references = await Promise.all(this.associatedFiles.map(file => `/${file.fileId}/references`).map(link => files.get(link, signal).then(response => response.json()))).then(references => references.map(x => x.references)).then(references => references.reduce((x, v) => [ ...v, ...x ], [])).then(references => [ ...new Set(references.map(JSON.stringify)) ].map(x => JSON.parse(x)));
543
543
  return {
544
544
  id: "",
545
545
  references: references
546
546
  };
547
547
  }
548
548
  waitForDone(params) {
549
- const checkDone = () => this.checkout().then((assembly => {
549
+ const checkDone = () => this.checkout().then(assembly => {
550
550
  var _a;
551
551
  const ready = [ "done", "failed" ].includes(assembly.status);
552
- const cancel = (_a = params === null || params === undefined ? undefined : params.onCheckout) === null || _a === undefined ? undefined : _a.call(params, assembly, ready);
552
+ const cancel = (_a = params === null || params === void 0 ? void 0 : params.onCheckout) === null || _a === void 0 ? void 0 : _a.call(params, assembly, ready);
553
553
  return cancel || ready;
554
- }));
555
- return waitFor(checkDone, params).then((() => this));
554
+ });
555
+ return waitFor(checkDone, params).then(() => this);
556
556
  }
557
557
  getClashTests(start, limit, name, ids, sortByDesc, sortField) {
558
558
  const searchParams = new URLSearchParams;
@@ -568,16 +568,16 @@ class Assembly extends Endpoint {
568
568
  if (sortField) searchParams.set("sortField", sortField);
569
569
  let queryString = searchParams.toString();
570
570
  if (queryString) queryString = "?" + queryString;
571
- return this.get(`/clashes${queryString}`).then((response => response.json())).then((tests => ({
571
+ return this.get(`/clashes${queryString}`).then(response => response.json()).then(tests => ({
572
572
  ...tests,
573
- result: tests.result.map((data => new ClashTest(data, this.path, this.httpClient)))
574
- })));
573
+ result: tests.result.map(data => new ClashTest(data, this.path, this.httpClient))
574
+ }));
575
575
  }
576
576
  getClashTest(testId) {
577
- return this.get(`/clashes/${testId}`).then((response => response.json())).then((data => new ClashTest(data, this.path, this.httpClient)));
577
+ return this.get(`/clashes/${testId}`).then(response => response.json()).then(data => new ClashTest(data, this.path, this.httpClient));
578
578
  }
579
579
  createClashTest(name, selectionTypeA, selectionTypeB, selectionSetA, selectionSetB, params) {
580
- const {tolerance: tolerance, clearance: clearance, waitForDone: waitForDone} = params !== null && params !== undefined ? params : {};
580
+ const {tolerance: tolerance, clearance: clearance, waitForDone: waitForDone} = params !== null && params !== void 0 ? params : {};
581
581
  if (!Array.isArray(selectionSetA)) selectionSetA = [ selectionSetA ];
582
582
  if (!Array.isArray(selectionSetB)) selectionSetB = [ selectionSetB ];
583
583
  return this.post("/clashes", {
@@ -588,10 +588,10 @@ class Assembly extends Endpoint {
588
588
  selectionSetB: selectionSetB,
589
589
  tolerance: tolerance,
590
590
  clearance: clearance
591
- }).then((response => response.json())).then((data => new ClashTest(data, this.path, this.httpClient))).then((result => waitForDone ? result.waitForDone(params) : result));
591
+ }).then(response => response.json()).then(data => new ClashTest(data, this.path, this.httpClient)).then(result => waitForDone ? result.waitForDone(params) : result);
592
592
  }
593
593
  deleteClashTest(testId) {
594
- return super.delete(`/clashes/${testId}`).then((response => response.json()));
594
+ return super.delete(`/clashes/${testId}`).then(response => response.json());
595
595
  }
596
596
  updateVersion(files, params = {
597
597
  waitForDone: false
@@ -628,18 +628,18 @@ function handleFetchError(response) {
628
628
  switch (response.status) {
629
629
  case 400:
630
630
  {
631
- return response.text().then((text => {
631
+ return response.text().then(text => {
632
632
  console.error(text);
633
633
  return Promise.reject(new FetchError(400, error400(text)));
634
- }));
634
+ });
635
635
  }
636
636
 
637
637
  case 500:
638
638
  {
639
- return response.text().then((text => {
639
+ return response.text().then(text => {
640
640
  console.error(error400(text, text));
641
641
  return Promise.reject(new FetchError(500));
642
- }));
642
+ });
643
643
  }
644
644
 
645
645
  default:
@@ -656,7 +656,7 @@ function $fetch(url, init = {
656
656
  ...init.headers
657
657
  };
658
658
  delete headers["Content-Type"];
659
- Object.keys(headers).filter((x => headers[x] === undefined)).forEach((x => delete headers[x]));
659
+ Object.keys(headers).filter(x => headers[x] === undefined).forEach(x => delete headers[x]);
660
660
  let body = undefined;
661
661
  if (init.method === "POST" || init.method === "PUT") {
662
662
  if (init.body instanceof FormData) {
@@ -712,7 +712,7 @@ function handleXMLHttpError(xhr) {
712
712
  function $xmlhttp(url, params = {
713
713
  method: "GET"
714
714
  }) {
715
- return new Promise(((resolve, reject) => {
715
+ return new Promise((resolve, reject) => {
716
716
  const xhr = new XMLHttpRequest;
717
717
  xhr.open(params.method, url, true);
718
718
  for (const key in params.headers) {
@@ -725,7 +725,7 @@ function $xmlhttp(url, params = {
725
725
  xhr.onprogress = event => params.downloadProgress && params.downloadProgress(calcProgress(event));
726
726
  xhr.onloadend = event => handleXMLHttpError(event.target).then(resolve, reject);
727
727
  xhr.send(params.body);
728
- }));
728
+ });
729
729
  }
730
730
 
731
731
  class HttpClient {
@@ -814,7 +814,7 @@ class HttpClient {
814
814
  async downloadFileRange(relativePath, reserved, ranges, onProgress, init = {}) {
815
815
  const headers = {
816
816
  ...init.headers,
817
- Range: "bytes=" + ranges.map((x => `${x.begin}-${x.end}`)).join(",")
817
+ Range: "bytes=" + ranges.map(x => `${x.begin}-${x.end}`).join(",")
818
818
  };
819
819
  const response = await this.get(relativePath, {
820
820
  ...init,
@@ -904,7 +904,7 @@ class Permission extends Endpoint {
904
904
  return this;
905
905
  }
906
906
  delete() {
907
- return super.delete("").then((response => response.json()));
907
+ return super.delete("").then(response => response.json());
908
908
  }
909
909
  save() {
910
910
  return this.update(this.data);
@@ -969,16 +969,16 @@ class Job extends Endpoint {
969
969
  return this;
970
970
  }
971
971
  delete() {
972
- return super.delete("").then((response => response.json()));
972
+ return super.delete("").then(response => response.json());
973
973
  }
974
974
  waitForDone(params) {
975
- const checkDone = () => this.checkout().then((job => {
975
+ const checkDone = () => this.checkout().then(job => {
976
976
  var _a;
977
977
  const ready = [ "done", "failed" ].includes(job.status);
978
- const cancel = (_a = params === null || params === undefined ? undefined : params.onCheckout) === null || _a === undefined ? undefined : _a.call(params, job, ready);
978
+ const cancel = (_a = params === null || params === void 0 ? void 0 : params.onCheckout) === null || _a === void 0 ? void 0 : _a.call(params, job, ready);
979
979
  return cancel || ready;
980
- }));
981
- return waitFor(checkDone, params).then((() => this));
980
+ });
981
+ return waitFor(checkDone, params).then(() => this);
982
982
  }
983
983
  }
984
984
 
@@ -1022,7 +1022,7 @@ class SharedLink extends Endpoint {
1022
1022
  return this;
1023
1023
  }
1024
1024
  delete() {
1025
- return super.delete("").then((response => response.json()));
1025
+ return super.delete("").then(response => response.json());
1026
1026
  }
1027
1027
  save() {
1028
1028
  return this.update(this.data);
@@ -1057,32 +1057,32 @@ class File extends Endpoint {
1057
1057
  if (typeof this._data.owner === "string") this._data.owner = {
1058
1058
  userId: this._data.owner
1059
1059
  };
1060
- (_a = (_p = this._data).owner) !== null && _a !== undefined ? _a : _p.owner = {};
1060
+ (_a = (_p = this._data).owner) !== null && _a !== void 0 ? _a : _p.owner = {};
1061
1061
  this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;
1062
1062
  this._data.owner.fullName = userFullName(this._data.owner);
1063
1063
  this._data.owner.initials = userInitials(this._data.owner.fullName);
1064
- (_b = (_q = this._data).status) !== null && _b !== undefined ? _b : _q.status = {};
1065
- (_c = (_r = this._data.status).geometry) !== null && _c !== undefined ? _c : _r.geometry = {
1066
- state: (_d = this._data.geometryStatus) !== null && _d !== undefined ? _d : "none"
1064
+ (_b = (_q = this._data).status) !== null && _b !== void 0 ? _b : _q.status = {};
1065
+ (_c = (_r = this._data.status).geometry) !== null && _c !== void 0 ? _c : _r.geometry = {
1066
+ state: (_d = this._data.geometryStatus) !== null && _d !== void 0 ? _d : "none"
1067
1067
  };
1068
- (_e = (_s = this._data.status).properties) !== null && _e !== undefined ? _e : _s.properties = {
1069
- state: (_f = this._data.propertiesStatus) !== null && _f !== undefined ? _f : "none"
1068
+ (_e = (_s = this._data.status).properties) !== null && _e !== void 0 ? _e : _s.properties = {
1069
+ state: (_f = this._data.propertiesStatus) !== null && _f !== void 0 ? _f : "none"
1070
1070
  };
1071
- (_g = (_t = this._data.status).validation) !== null && _g !== undefined ? _g : _t.validation = {
1072
- state: (_h = this._data.validationStatus) !== null && _h !== undefined ? _h : "none"
1071
+ (_g = (_t = this._data.status).validation) !== null && _g !== void 0 ? _g : _t.validation = {
1072
+ state: (_h = this._data.validationStatus) !== null && _h !== void 0 ? _h : "none"
1073
1073
  };
1074
- (_j = (_u = this._data).updatedBy) !== null && _j !== undefined ? _j : _u.updatedBy = {};
1074
+ (_j = (_u = this._data).updatedBy) !== null && _j !== void 0 ? _j : _u.updatedBy = {};
1075
1075
  this._data.updatedBy.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.updatedBy.userId}/avatar`;
1076
1076
  this._data.updatedBy.fullName = userFullName(this._data.updatedBy);
1077
1077
  this._data.updatedBy.initials = userInitials(this._data.updatedBy.fullName);
1078
- (_k = (_v = this._data).versions) !== null && _k !== undefined ? _k : _v.versions = [ {
1078
+ (_k = (_v = this._data).versions) !== null && _k !== void 0 ? _k : _v.versions = [ {
1079
1079
  ...value
1080
1080
  } ];
1081
- (_l = (_w = this._data.status).geometryGltf) !== null && _l !== undefined ? _l : _w.geometryGltf = {
1081
+ (_l = (_w = this._data.status).geometryGltf) !== null && _l !== void 0 ? _l : _w.geometryGltf = {
1082
1082
  state: "none"
1083
1083
  };
1084
- (_m = (_x = this._data).isFileDeleted) !== null && _m !== undefined ? _m : _x.isFileDeleted = false;
1085
- (_o = (_y = this._data).sharedLinkToken) !== null && _o !== undefined ? _o : _y.sharedLinkToken = null;
1084
+ (_m = (_x = this._data).isFileDeleted) !== null && _m !== void 0 ? _m : _x.isFileDeleted = false;
1085
+ (_o = (_y = this._data).sharedLinkToken) !== null && _o !== void 0 ? _o : _y.sharedLinkToken = null;
1086
1086
  }
1087
1087
  get exports() {
1088
1088
  return this.data.exports;
@@ -1149,7 +1149,7 @@ class File extends Endpoint {
1149
1149
  return this;
1150
1150
  }
1151
1151
  delete() {
1152
- return super.delete("").then((response => response.json()));
1152
+ return super.delete("").then(response => response.json());
1153
1153
  }
1154
1154
  save() {
1155
1155
  return this.update(this.data);
@@ -1169,7 +1169,7 @@ class File extends Endpoint {
1169
1169
  return this;
1170
1170
  }
1171
1171
  getModels() {
1172
- return this.get("/geometry").then((response => response.json())).then((array => array.map((data => new Model(data, this)))));
1172
+ return this.get("/geometry").then(response => response.json()).then(array => array.map(data => new Model(data, this)));
1173
1173
  }
1174
1174
  getModelTransformMatrix(handle) {
1175
1175
  return undefined;
@@ -1188,46 +1188,46 @@ class File extends Endpoint {
1188
1188
  if (group) searchParams.set("group", "true");
1189
1189
  let queryString = searchParams.toString();
1190
1190
  if (queryString) queryString = "?" + queryString;
1191
- return this.get(`/properties${queryString}`).then((response => response.json()));
1191
+ return this.get(`/properties${queryString}`).then(response => response.json());
1192
1192
  }
1193
1193
  searchProperties(searchPattern) {
1194
- return this.post("/properties/search", searchPattern).then((response => response.json()));
1194
+ return this.post("/properties/search", searchPattern).then(response => response.json());
1195
1195
  }
1196
1196
  getCdaTree() {
1197
- return this.get(`/properties/tree`).then((response => response.json()));
1197
+ return this.get(`/properties/tree`).then(response => response.json());
1198
1198
  }
1199
1199
  getViewpoints() {
1200
- return this.get("/viewpoints").then((response => response.json())).then((viewpoints => viewpoints.result));
1200
+ return this.get("/viewpoints").then(response => response.json()).then(viewpoints => viewpoints.result);
1201
1201
  }
1202
1202
  saveViewpoint(viewpoint) {
1203
- return this.post("/viewpoints", viewpoint).then((response => response.json()));
1203
+ return this.post("/viewpoints", viewpoint).then(response => response.json());
1204
1204
  }
1205
1205
  deleteViewpoint(guid) {
1206
- return super.delete(`/viewpoints/${guid}`).then((response => response.json()));
1206
+ return super.delete(`/viewpoints/${guid}`).then(response => response.json());
1207
1207
  }
1208
1208
  getSnapshot(guid) {
1209
- return this.get(`/viewpoints/${guid}/snapshot`).then((response => response.text()));
1209
+ return this.get(`/viewpoints/${guid}/snapshot`).then(response => response.text());
1210
1210
  }
1211
1211
  getSnapshotData(guid, bitmapGuid) {
1212
- return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then((response => response.text()));
1212
+ return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then(response => response.text());
1213
1213
  }
1214
1214
  download(onProgress, signal) {
1215
1215
  return this.httpClient.downloadFile(this.getEndpointPath("/downloads"), onProgress, {
1216
1216
  signal: signal,
1217
1217
  headers: this.headers
1218
- }).then((response => response.arrayBuffer()));
1218
+ }).then(response => response.arrayBuffer());
1219
1219
  }
1220
1220
  downloadResource(dataId, onProgress, signal) {
1221
1221
  return this.httpClient.downloadFile(this.getEndpointPath(`/downloads/${dataId}`), onProgress, {
1222
1222
  signal: signal,
1223
1223
  headers: this.headers
1224
- }).then((response => response.arrayBuffer()));
1224
+ }).then(response => response.arrayBuffer());
1225
1225
  }
1226
1226
  downloadResourceRange(dataId, requestId, ranges, onProgress, signal) {
1227
1227
  return this.httpClient.downloadFileRange(this.getEndpointPath(`/downloads/${dataId}${requestId ? "?requestId=" + requestId : ""}`), requestId, ranges, onProgress, {
1228
1228
  signal: signal,
1229
1229
  headers: this.headers
1230
- }).then((response => response.arrayBuffer()));
1230
+ }).then(response => response.arrayBuffer());
1231
1231
  }
1232
1232
  partialDownloadResource(dataId, onProgress, signal) {
1233
1233
  console.warn("File.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use File.downloadResource() instead.");
@@ -1237,10 +1237,10 @@ class File extends Endpoint {
1237
1237
  await this.downloadResourceRange(dataId, requestId, records, onProgress, signal);
1238
1238
  }
1239
1239
  getReferences(signal) {
1240
- return this.get("/references", signal).then((response => response.json()));
1240
+ return this.get("/references", signal).then(response => response.json());
1241
1241
  }
1242
1242
  setReferences(references) {
1243
- return this.put("/references", references).then((response => response.json()));
1243
+ return this.put("/references", references).then(response => response.json());
1244
1244
  }
1245
1245
  createJob(outputFormat, parameters) {
1246
1246
  const jobs = new Endpoint("/jobs", this.httpClient, this.headers);
@@ -1248,7 +1248,7 @@ class File extends Endpoint {
1248
1248
  fileId: this.id,
1249
1249
  outputFormat: outputFormat,
1250
1250
  parameters: parseArgs(parameters)
1251
- }).then((response => response.json())).then((data => new Job(data, this.httpClient)));
1251
+ }).then(response => response.json()).then(data => new Job(data, this.httpClient));
1252
1252
  }
1253
1253
  extractGeometry(type, parameters) {
1254
1254
  return this.createJob(type === "gltf" ? "geometryGltf" : "geometry", parameters);
@@ -1262,43 +1262,43 @@ class File extends Endpoint {
1262
1262
  waitForDone(jobs, waitAll, params) {
1263
1263
  const waitJobs = Array.isArray(jobs) ? jobs : [ jobs ];
1264
1264
  if (waitAll === undefined) waitAll = true;
1265
- const checkDone = () => this.checkout().then((file => {
1265
+ const checkDone = () => this.checkout().then(file => {
1266
1266
  var _a;
1267
- const readyJobs = waitJobs.filter((job => {
1267
+ const readyJobs = waitJobs.filter(job => {
1268
1268
  const jobStatus = file.status[job] || {};
1269
1269
  return [ "none", "done", "failed" ].includes(jobStatus.state || "none");
1270
- }));
1270
+ });
1271
1271
  const ready = waitAll ? readyJobs.length === waitJobs.length : readyJobs.length > 0;
1272
- const cancel = (_a = params === null || params === undefined ? undefined : params.onCheckout) === null || _a === undefined ? undefined : _a.call(params, file, ready);
1272
+ const cancel = (_a = params === null || params === void 0 ? void 0 : params.onCheckout) === null || _a === void 0 ? void 0 : _a.call(params, file, ready);
1273
1273
  return cancel || ready;
1274
- }));
1275
- return waitFor(checkDone, params).then((() => this));
1274
+ });
1275
+ return waitFor(checkDone, params).then(() => this);
1276
1276
  }
1277
1277
  getPermissions() {
1278
- return this.get("/permissions").then((response => response.json())).then((array => array.map((data => new Permission(data, this.id, this.httpClient)))));
1278
+ return this.get("/permissions").then(response => response.json()).then(array => array.map(data => new Permission(data, this.id, this.httpClient)));
1279
1279
  }
1280
1280
  getPermission(permissionId) {
1281
- return this.get(`/permissions/${permissionId}`).then((response => response.json())).then((data => new Permission(data, this.id, this.httpClient)));
1281
+ return this.get(`/permissions/${permissionId}`).then(response => response.json()).then(data => new Permission(data, this.id, this.httpClient));
1282
1282
  }
1283
1283
  createPermission(actions, grantedTo, _public) {
1284
1284
  return this.post("/permissions", {
1285
1285
  actions: Array.isArray(actions) ? actions : [ actions ],
1286
1286
  grantedTo: grantedTo,
1287
1287
  public: _public
1288
- }).then((response => response.json())).then((data => new Permission(data, this.id, this.httpClient)));
1288
+ }).then(response => response.json()).then(data => new Permission(data, this.id, this.httpClient));
1289
1289
  }
1290
1290
  deletePermission(permissionId) {
1291
- return super.delete(`/permissions/${permissionId}`).then((response => response.json()));
1291
+ return super.delete(`/permissions/${permissionId}`).then(response => response.json());
1292
1292
  }
1293
1293
  async uploadVersion(file, params = {
1294
1294
  waitForDone: false
1295
1295
  }) {
1296
- const result = await this.httpClient.uploadFile(this.getEndpointPath("/versions"), file, (progress => {
1296
+ const result = await this.httpClient.uploadFile(this.getEndpointPath("/versions"), file, progress => {
1297
1297
  var _a;
1298
- return (_a = params.onProgress) === null || _a === undefined ? undefined : _a.call(params, progress, file);
1299
- }), {
1298
+ return (_a = params.onProgress) === null || _a === void 0 ? void 0 : _a.call(params, progress, file);
1299
+ }, {
1300
1300
  headers: this.headers
1301
- }).then((xhr => JSON.parse(xhr.responseText))).then((data => new File(data, this.httpClient)));
1301
+ }).then(xhr => JSON.parse(xhr.responseText)).then(data => new File(data, this.httpClient));
1302
1302
  let geometryType = "";
1303
1303
  if (this.versions[0].status.geometryGltf.state !== "none") geometryType = "gltf";
1304
1304
  if (this.versions[0].status.geometry.state !== "none") geometryType = "vsfx";
@@ -1315,10 +1315,10 @@ class File extends Endpoint {
1315
1315
  return result;
1316
1316
  }
1317
1317
  getVersions() {
1318
- return this.get("/versions").then((response => response.json())).then((files => files.map((data => new File(data, this.httpClient))))).then((files => files.map((file => file.id == file.originalFileId ? file.useVersion(0) : file))));
1318
+ return this.get("/versions").then(response => response.json()).then(files => files.map(data => new File(data, this.httpClient))).then(files => files.map(file => file.id == file.originalFileId ? file.useVersion(0) : file));
1319
1319
  }
1320
1320
  getVersion(version) {
1321
- return this.get(`/versions/${version}`).then((response => response.json())).then((data => new File(data, this.httpClient))).then((file => file.id == file.originalFileId ? file.useVersion(0) : file));
1321
+ return this.get(`/versions/${version}`).then(response => response.json()).then(data => new File(data, this.httpClient)).then(file => file.id == file.originalFileId ? file.useVersion(0) : file);
1322
1322
  }
1323
1323
  async deleteVersion(version) {
1324
1324
  const response = await super.delete(`/versions/${version}`);
@@ -1407,7 +1407,7 @@ class Role extends Endpoint {
1407
1407
  return this;
1408
1408
  }
1409
1409
  delete() {
1410
- return super.delete("").then((response => response.json()));
1410
+ return super.delete("").then(response => response.json());
1411
1411
  }
1412
1412
  save() {
1413
1413
  return this.update(this.data);
@@ -1454,7 +1454,7 @@ class Member extends Endpoint {
1454
1454
  return this;
1455
1455
  }
1456
1456
  delete() {
1457
- return super.delete("").then((response => response.json()));
1457
+ return super.delete("").then(response => response.json());
1458
1458
  }
1459
1459
  save() {
1460
1460
  return this.update(this.data);
@@ -1550,7 +1550,7 @@ class Project extends Endpoint {
1550
1550
  return this;
1551
1551
  }
1552
1552
  delete() {
1553
- return super.delete("").then((response => response.text())).then((text => {
1553
+ return super.delete("").then(response => response.text()).then(text => {
1554
1554
  try {
1555
1555
  return JSON.parse(text);
1556
1556
  } catch {
@@ -1558,7 +1558,7 @@ class Project extends Endpoint {
1558
1558
  id: this.id
1559
1559
  };
1560
1560
  }
1561
- }));
1561
+ });
1562
1562
  }
1563
1563
  save() {
1564
1564
  return this.update(this.data);
@@ -1578,41 +1578,41 @@ class Project extends Endpoint {
1578
1578
  return this;
1579
1579
  }
1580
1580
  getRoles() {
1581
- return this.get("/roles").then((response => response.json())).then((array => array.map((data => new Role(data, this.id, this.httpClient)))));
1581
+ return this.get("/roles").then(response => response.json()).then(array => array.map(data => new Role(data, this.id, this.httpClient)));
1582
1582
  }
1583
1583
  getRole(name) {
1584
- return this.get(`/roles/${name}`).then((response => response.json())).then((data => new Role(data, this.id, this.httpClient)));
1584
+ return this.get(`/roles/${name}`).then(response => response.json()).then(data => new Role(data, this.id, this.httpClient));
1585
1585
  }
1586
1586
  createRole(name, description, permissions) {
1587
1587
  return this.post("/roles", {
1588
1588
  name: name,
1589
1589
  description: description,
1590
1590
  permissions: permissions || {}
1591
- }).then((response => response.json())).then((data => new Role(data, this.id, this.httpClient)));
1591
+ }).then(response => response.json()).then(data => new Role(data, this.id, this.httpClient));
1592
1592
  }
1593
1593
  deleteRole(name) {
1594
- return super.delete(`/roles/${name}`).then((response => response.json()));
1594
+ return super.delete(`/roles/${name}`).then(response => response.json());
1595
1595
  }
1596
1596
  getMembers() {
1597
- return this.get("/members").then((response => response.json())).then((array => array.map((data => new Member(data, this.id, this.httpClient)))));
1597
+ return this.get("/members").then(response => response.json()).then(array => array.map(data => new Member(data, this.id, this.httpClient)));
1598
1598
  }
1599
1599
  getMember(memberId) {
1600
- return this.get(`/members/${memberId}`).then((response => response.json())).then((data => new Member(data, this.id, this.httpClient)));
1600
+ return this.get(`/members/${memberId}`).then(response => response.json()).then(data => new Member(data, this.id, this.httpClient));
1601
1601
  }
1602
1602
  addMember(userId, role) {
1603
1603
  return this.post("/members", {
1604
1604
  userId: userId,
1605
1605
  role: role
1606
- }).then((response => response.json())).then((data => new Member(data, this.id, this.httpClient)));
1606
+ }).then(response => response.json()).then(data => new Member(data, this.id, this.httpClient));
1607
1607
  }
1608
1608
  removeMember(memberId) {
1609
- return super.delete(`/members/${memberId}`).then((response => response.json()));
1609
+ return super.delete(`/members/${memberId}`).then(response => response.json());
1610
1610
  }
1611
1611
  getFilesInformation() {
1612
1612
  const bcfProjects = new Endpoint("/bcf/3.0/projects", this.httpClient, this.headers);
1613
- return bcfProjects.get(`/${this.id}/files_information`).then((response => response.json())).then((items => {
1614
- items.forEach((item => {
1615
- const getFieldValue = displayName => (item.display_information.find((x => x.field_display_name === displayName)) || {}).field_value;
1613
+ return bcfProjects.get(`/${this.id}/files_information`).then(response => response.json()).then(items => {
1614
+ items.forEach(item => {
1615
+ const getFieldValue = displayName => (item.display_information.find(x => x.field_display_name === displayName) || {}).field_value;
1616
1616
  const previewUrl = `${this.httpClient.serverUrl}/files/${item.file.reference}/preview`;
1617
1617
  const ownerAvatarUrl = `${this.httpClient.serverUrl}/users/${getFieldValue("Owner")}/avatar`;
1618
1618
  const ownerFirstName = getFieldValue("Owner First Name");
@@ -1661,19 +1661,19 @@ class Project extends Endpoint {
1661
1661
  field_display_name: "Geometry Type",
1662
1662
  field_value: geometryType
1663
1663
  });
1664
- }));
1664
+ });
1665
1665
  return items;
1666
- }));
1666
+ });
1667
1667
  }
1668
1668
  getModels() {
1669
- return this.getFilesInformation().then((filesInformation => filesInformation.map((item => item.file.reference)))).then((ids => {
1669
+ return this.getFilesInformation().then(filesInformation => filesInformation.map(item => item.file.reference)).then(ids => {
1670
1670
  const files = new Endpoint("/files", this.httpClient, this.headers);
1671
1671
  return files.get(`?id=${ids.join("|")}`);
1672
- })).then((response => response.json())).then((files => files.result.map((data => new File(data, this.httpClient)))));
1672
+ }).then(response => response.json()).then(files => files.result.map(data => new File(data, this.httpClient)));
1673
1673
  }
1674
1674
  async addModel(fileId, actions, _public) {
1675
1675
  const files = new Endpoint("/files", this.httpClient, this.headers);
1676
- const file = await files.get(`/${fileId}`).then((response => response.json())).then((data => new File(data, this.httpClient)));
1676
+ const file = await files.get(`/${fileId}`).then(response => response.json()).then(data => new File(data, this.httpClient));
1677
1677
  const grantedTo = [ {
1678
1678
  project: {
1679
1679
  id: this.id,
@@ -1685,12 +1685,12 @@ class Project extends Endpoint {
1685
1685
  }
1686
1686
  async removeModel(fileId) {
1687
1687
  const files = new Endpoint("/files", this.httpClient, this.headers);
1688
- const file = await files.get(`/${fileId}`).then((response => response.json())).then((data => new File(data, this.httpClient)));
1688
+ const file = await files.get(`/${fileId}`).then(response => response.json()).then(data => new File(data, this.httpClient));
1689
1689
  const permissions = await file.getPermissions();
1690
- await Promise.allSettled(permissions.filter((permission => permission.grantedTo.some((x => {
1690
+ await Promise.allSettled(permissions.filter(permission => permission.grantedTo.some(x => {
1691
1691
  var _a;
1692
- return ((_a = x.project) === null || _a === undefined ? undefined : _a.id) === this.id;
1693
- })))).map((permission => permission.delete())));
1692
+ return ((_a = x.project) === null || _a === void 0 ? void 0 : _a.id) === this.id;
1693
+ })).map(permission => permission.delete()));
1694
1694
  return file;
1695
1695
  }
1696
1696
  }
@@ -1844,14 +1844,14 @@ class User extends Endpoint {
1844
1844
  }
1845
1845
  delete() {
1846
1846
  if (this.httpClient.signInUserIsAdmin) {
1847
- return super.delete(`/users/${this.id}`).then((response => response.json())).then((data => {
1847
+ return super.delete(`/users/${this.id}`).then(response => response.json()).then(data => {
1848
1848
  if (this.id === this.httpClient.signInUserId) {
1849
1849
  delete this.httpClient.headers["Authorization"];
1850
1850
  this.httpClient.signInUserId = "";
1851
1851
  this.httpClient.signInUserIsAdmin = false;
1852
1852
  }
1853
1853
  return data;
1854
- }));
1854
+ });
1855
1855
  } else {
1856
1856
  return Promise.reject(new FetchError(403));
1857
1857
  }
@@ -1986,7 +1986,7 @@ class OAuthClient extends Endpoint {
1986
1986
  return this;
1987
1987
  }
1988
1988
  delete() {
1989
- return super.delete("").then((response => response.json()));
1989
+ return super.delete("").then(response => response.json());
1990
1990
  }
1991
1991
  save() {
1992
1992
  return this.update(this.data);
@@ -2071,7 +2071,7 @@ class Plugin extends Endpoint {
2071
2071
  return this;
2072
2072
  }
2073
2073
  delete() {
2074
- return super.delete("").then((response => response.json()));
2074
+ return super.delete("").then(response => response.json());
2075
2075
  }
2076
2076
  async enable() {
2077
2077
  const response = await this.put("/enable");
@@ -2087,20 +2087,20 @@ class Plugin extends Endpoint {
2087
2087
  return this.httpClient.downloadFile(this.getEndpointPath("/download"), onProgress, {
2088
2088
  signal: signal,
2089
2089
  headers: this.headers
2090
- }).then((response => response.arrayBuffer()));
2090
+ }).then(response => response.arrayBuffer());
2091
2091
  }
2092
2092
  getManifest() {
2093
- return this.get("/manifest").then((response => response.json()));
2093
+ return this.get("/manifest").then(response => response.json());
2094
2094
  }
2095
2095
  getSettings() {
2096
- return this.get("/settings").then((response => response.json()));
2096
+ return this.get("/settings").then(response => response.json());
2097
2097
  }
2098
2098
  updateSettings(settings) {
2099
- return this.post("/settings", settings).then((response => response.json()));
2099
+ return this.post("/settings", settings).then(response => response.json());
2100
2100
  }
2101
2101
  executeCommand(command, parameters) {
2102
2102
  const commands = new Endpoint(`/plugins/${this.name}/commands`, this.httpClient, this.headers);
2103
- return commands.post(`/${command}?version=${this.version}`, parameters).then((response => response.json()));
2103
+ return commands.post(`/${command}?version=${this.version}`, parameters).then(response => response.json());
2104
2104
  }
2105
2105
  }
2106
2106
 
@@ -2175,27 +2175,27 @@ class Client extends EventEmitter2 {
2175
2175
  return this;
2176
2176
  }
2177
2177
  version() {
2178
- return this.httpClient.get("/version").then((response => response.json())).then((data => ({
2178
+ return this.httpClient.get("/version").then(response => response.json()).then(data => ({
2179
2179
  ...data,
2180
2180
  server: data.version,
2181
- client: "26.9.2"
2182
- })));
2181
+ client: "26.9.3"
2182
+ }));
2183
2183
  }
2184
2184
  registerUser(email, password, userName) {
2185
2185
  return this.httpClient.post("/register", {
2186
2186
  email: email,
2187
2187
  password: password,
2188
- userName: userName !== null && userName !== undefined ? userName : (email + "").split("@").at(0)
2189
- }).then((response => response.json()));
2188
+ userName: userName !== null && userName !== void 0 ? userName : (email + "").split("@").shift()
2189
+ }).then(response => response.json());
2190
2190
  }
2191
2191
  resendConfirmationEmail(email, password) {
2192
2192
  return this.httpClient.post("/register/email-confirmation", {
2193
2193
  email: email,
2194
2194
  password: password
2195
- }).then((response => response.json()));
2195
+ }).then(response => response.json());
2196
2196
  }
2197
2197
  confirmUserEmail(emailConfirmationId) {
2198
- return this.httpClient.get(`/register/email-confirmation/${emailConfirmationId}`).then((response => response.json()));
2198
+ return this.httpClient.get(`/register/email-confirmation/${emailConfirmationId}`).then(response => response.json());
2199
2199
  }
2200
2200
  async signInWithEmail(email, password) {
2201
2201
  const credentials = btoa(unescape(encodeURIComponent(email + ":" + password)));
@@ -2231,13 +2231,13 @@ class Client extends EventEmitter2 {
2231
2231
  return this._user;
2232
2232
  }
2233
2233
  getIdentityProviders() {
2234
- return this.httpClient.get("/identity").then((response => response.json()));
2234
+ return this.httpClient.get("/identity").then(response => response.json());
2235
2235
  }
2236
2236
  getServerSettings() {
2237
- return this.httpClient.get("/settings").then((response => response.json()));
2237
+ return this.httpClient.get("/settings").then(response => response.json());
2238
2238
  }
2239
2239
  updateServerSettings(settings) {
2240
- return this.httpClient.put("/settings", settings).then((response => response.json()));
2240
+ return this.httpClient.put("/settings", settings).then(response => response.json());
2241
2241
  }
2242
2242
  getOAuthClients(start, limit) {
2243
2243
  const searchParams = new URLSearchParams;
@@ -2245,41 +2245,41 @@ class Client extends EventEmitter2 {
2245
2245
  if (limit > 0) searchParams.set("limit", limit.toString());
2246
2246
  let queryString = searchParams.toString();
2247
2247
  if (queryString) queryString = "?" + queryString;
2248
- return this.httpClient.get(`/oauth/clients${queryString}`).then((response => response.json())).then((clients => ({
2248
+ return this.httpClient.get(`/oauth/clients${queryString}`).then(response => response.json()).then(clients => ({
2249
2249
  ...clients,
2250
- result: clients.result.map((data => new OAuthClient(data, this.httpClient)))
2251
- })));
2250
+ result: clients.result.map(data => new OAuthClient(data, this.httpClient))
2251
+ }));
2252
2252
  }
2253
2253
  getOAuthClient(clientId) {
2254
- return this.httpClient.get(`/oauth/clients/${clientId}`).then((response => response.json())).then((data => new OAuthClient(data, this.httpClient)));
2254
+ return this.httpClient.get(`/oauth/clients/${clientId}`).then(response => response.json()).then(data => new OAuthClient(data, this.httpClient));
2255
2255
  }
2256
2256
  createOAuthClient(name, redirectUrl, description) {
2257
2257
  return this.httpClient.post("/oauth/clients", {
2258
2258
  name: name,
2259
2259
  redirectUrl: redirectUrl,
2260
2260
  description: description
2261
- }).then((response => response.json())).then((data => new OAuthClient(data, this.httpClient)));
2261
+ }).then(response => response.json()).then(data => new OAuthClient(data, this.httpClient));
2262
2262
  }
2263
2263
  deleteOAuthClient(clientId) {
2264
- return this.httpClient.delete(`/oauth/clients/${clientId}`).then((response => response.json()));
2264
+ return this.httpClient.delete(`/oauth/clients/${clientId}`).then(response => response.json());
2265
2265
  }
2266
2266
  getUsers() {
2267
- return this.httpClient.get("/users").then((response => response.json())).then((array => array.map((data => ({
2267
+ return this.httpClient.get("/users").then(response => response.json()).then(array => array.map(data => ({
2268
2268
  id: data.id,
2269
2269
  ...data.userBrief
2270
- }))))).then((array => array.map((data => new User(data, this.httpClient)))));
2270
+ }))).then(array => array.map(data => new User(data, this.httpClient)));
2271
2271
  }
2272
2272
  getUser(userId) {
2273
2273
  if (this.httpClient.signInUserIsAdmin) {
2274
- return this.httpClient.get(`/users/${userId}`).then((response => response.json())).then((data => ({
2274
+ return this.httpClient.get(`/users/${userId}`).then(response => response.json()).then(data => ({
2275
2275
  id: data.id,
2276
2276
  ...data.userBrief
2277
- }))).then((data => new User(data, this.httpClient)));
2277
+ })).then(data => new User(data, this.httpClient));
2278
2278
  } else if (userId === this.httpClient.signInUserId) {
2279
- return this.httpClient.get("/user").then((response => response.json())).then((data => ({
2279
+ return this.httpClient.get("/user").then(response => response.json()).then(data => ({
2280
2280
  id: userId,
2281
2281
  ...data
2282
- }))).then((data => new User(data, this.httpClient)));
2282
+ })).then(data => new User(data, this.httpClient));
2283
2283
  } else {
2284
2284
  return Promise.reject(new FetchError(403));
2285
2285
  }
@@ -2291,22 +2291,22 @@ class Client extends EventEmitter2 {
2291
2291
  userBrief: {
2292
2292
  ...rest,
2293
2293
  email: email,
2294
- userName: userName !== null && userName !== undefined ? userName : (email + "").split("@").at(0)
2294
+ userName: userName !== null && userName !== void 0 ? userName : (email + "").split("@").shift()
2295
2295
  },
2296
2296
  password: password
2297
- }).then((response => response.json())).then((data => ({
2297
+ }).then(response => response.json()).then(data => ({
2298
2298
  id: data.id,
2299
2299
  ...data.userBrief
2300
- }))).then((data => new User(data, this.httpClient)));
2300
+ })).then(data => new User(data, this.httpClient));
2301
2301
  }
2302
2302
  deleteUser(userId) {
2303
2303
  if (this.httpClient.signInUserIsAdmin) {
2304
- return this.httpClient.delete(`/users/${userId}`).then((response => response.json())).then((data => {
2304
+ return this.httpClient.delete(`/users/${userId}`).then(response => response.json()).then(data => {
2305
2305
  if (userId === this.httpClient.signInUserId) {
2306
2306
  this.clearCurrentUser();
2307
2307
  }
2308
2308
  return data;
2309
- }));
2309
+ });
2310
2310
  } else {
2311
2311
  return Promise.reject(new FetchError(403));
2312
2312
  }
@@ -2330,28 +2330,28 @@ class Client extends EventEmitter2 {
2330
2330
  if (shared) searchParams.set("shared", "true");
2331
2331
  let queryString = searchParams.toString();
2332
2332
  if (queryString) queryString = "?" + queryString;
2333
- return this.httpClient.get(`/files${queryString}`).then((response => response.json())).then((files => ({
2333
+ return this.httpClient.get(`/files${queryString}`).then(response => response.json()).then(files => ({
2334
2334
  ...files,
2335
- result: files.result.map((data => new File(data, this.httpClient)))
2336
- })));
2335
+ result: files.result.map(data => new File(data, this.httpClient))
2336
+ }));
2337
2337
  }
2338
2338
  getFile(fileId) {
2339
- return this.httpClient.get(`/files/${fileId}`).then((response => response.json())).then((data => new File(data, this.httpClient)));
2339
+ return this.httpClient.get(`/files/${fileId}`).then(response => response.json()).then(data => new File(data, this.httpClient));
2340
2340
  }
2341
2341
  async uploadFile(file, params = {
2342
2342
  geometry: true,
2343
2343
  properties: false,
2344
2344
  waitForDone: false
2345
2345
  }) {
2346
- const result = await this.httpClient.uploadFile("/files", file, (progress => {
2346
+ const result = await this.httpClient.uploadFile("/files", file, progress => {
2347
2347
  var _a;
2348
2348
  this.emitEvent({
2349
2349
  type: "uploadprogress",
2350
2350
  data: progress,
2351
2351
  file: file
2352
2352
  });
2353
- (_a = params.onProgress) === null || _a === undefined ? undefined : _a.call(params, progress, file);
2354
- })).then((xhr => JSON.parse(xhr.responseText))).then((data => new File(data, this.httpClient)));
2353
+ (_a = params.onProgress) === null || _a === void 0 ? void 0 : _a.call(params, progress, file);
2354
+ }).then(xhr => JSON.parse(xhr.responseText)).then(data => new File(data, this.httpClient));
2355
2355
  const geometryType = typeof params.geometry === "string" ? params.geometry : "vsfx";
2356
2356
  const jobParameters = params.jobParameters || {};
2357
2357
  const jobs = [];
@@ -2361,12 +2361,12 @@ class Client extends EventEmitter2 {
2361
2361
  return result;
2362
2362
  }
2363
2363
  deleteFile(fileId) {
2364
- return this.httpClient.delete(`/files/${fileId}`).then((response => response.json()));
2364
+ return this.httpClient.delete(`/files/${fileId}`).then(response => response.json());
2365
2365
  }
2366
2366
  downloadFile(fileId, onProgress, signal) {
2367
2367
  return this.httpClient.downloadFile(`/files/${fileId}/downloads`, onProgress, {
2368
2368
  signal: signal
2369
- }).then((response => response.arrayBuffer()));
2369
+ }).then(response => response.arrayBuffer());
2370
2370
  }
2371
2371
  getJobs(status, limit, start, sortByDesc, sortField) {
2372
2372
  const searchParams = new URLSearchParams;
@@ -2381,23 +2381,23 @@ class Client extends EventEmitter2 {
2381
2381
  if (sortField) searchParams.set("sortField", sortField);
2382
2382
  let queryString = searchParams.toString();
2383
2383
  if (queryString) queryString = "?" + queryString;
2384
- return this.httpClient.get(`/jobs${queryString}`).then((response => response.json())).then((jobs => ({
2384
+ return this.httpClient.get(`/jobs${queryString}`).then(response => response.json()).then(jobs => ({
2385
2385
  ...jobs,
2386
- result: jobs.result.map((data => new Job(data, this.httpClient)))
2387
- })));
2386
+ result: jobs.result.map(data => new Job(data, this.httpClient))
2387
+ }));
2388
2388
  }
2389
2389
  getJob(jobId) {
2390
- return this.httpClient.get(`/jobs/${jobId}`).then((response => response.json())).then((data => new Job(data, this.httpClient)));
2390
+ return this.httpClient.get(`/jobs/${jobId}`).then(response => response.json()).then(data => new Job(data, this.httpClient));
2391
2391
  }
2392
2392
  createJob(fileId, outputFormat, parameters) {
2393
2393
  return this.httpClient.post("/jobs", {
2394
2394
  fileId: fileId,
2395
2395
  outputFormat: outputFormat,
2396
2396
  parameters: parseArgs(parameters)
2397
- }).then((response => response.json())).then((data => new Job(data, this.httpClient)));
2397
+ }).then(response => response.json()).then(data => new Job(data, this.httpClient));
2398
2398
  }
2399
2399
  deleteJob(jobId) {
2400
- return this.httpClient.delete(`/jobs/${jobId}`).then((response => response.json()));
2400
+ return this.httpClient.delete(`/jobs/${jobId}`).then(response => response.json());
2401
2401
  }
2402
2402
  getAssemblies(start, limit, name, ids, sortByDesc, sortField) {
2403
2403
  const searchParams = new URLSearchParams;
@@ -2413,13 +2413,13 @@ class Client extends EventEmitter2 {
2413
2413
  if (sortField) searchParams.set("sortField", sortField);
2414
2414
  let queryString = searchParams.toString();
2415
2415
  if (queryString) queryString = "?" + queryString;
2416
- return this.httpClient.get(`/assemblies${queryString}`).then((response => response.json())).then((assemblies => ({
2416
+ return this.httpClient.get(`/assemblies${queryString}`).then(response => response.json()).then(assemblies => ({
2417
2417
  ...assemblies,
2418
- result: assemblies.result.map((data => new Assembly(data, this.httpClient)))
2419
- })));
2418
+ result: assemblies.result.map(data => new Assembly(data, this.httpClient))
2419
+ }));
2420
2420
  }
2421
2421
  getAssembly(assemblyId) {
2422
- return this.httpClient.get(`/assemblies/${assemblyId}`).then((response => response.json())).then((data => new Assembly(data, this.httpClient)));
2422
+ return this.httpClient.get(`/assemblies/${assemblyId}`).then(response => response.json()).then(data => new Assembly(data, this.httpClient));
2423
2423
  }
2424
2424
  createAssembly(files, name, params = {}) {
2425
2425
  const jobParameters = params.jobParameters || {};
@@ -2430,10 +2430,10 @@ class Client extends EventEmitter2 {
2430
2430
  geometry: parseArgs(jobParameters.geometry),
2431
2431
  properties: parseArgs(jobParameters.properties)
2432
2432
  }
2433
- }).then((response => response.json())).then((data => new Assembly(data, this.httpClient))).then((result => params.waitForDone ? result.waitForDone(params) : result));
2433
+ }).then(response => response.json()).then(data => new Assembly(data, this.httpClient)).then(result => params.waitForDone ? result.waitForDone(params) : result);
2434
2434
  }
2435
2435
  deleteAssembly(assemblyId) {
2436
- return this.httpClient.delete(`/assemblies/${assemblyId}`).then((response => response.json()));
2436
+ return this.httpClient.delete(`/assemblies/${assemblyId}`).then(response => response.json());
2437
2437
  }
2438
2438
  getProjects(start, limit, name, ids, sortByDesc) {
2439
2439
  const searchParams = new URLSearchParams;
@@ -2448,11 +2448,11 @@ class Client extends EventEmitter2 {
2448
2448
  if (sortByDesc !== undefined) searchParams.set("sortBy", sortByDesc ? "desc" : "asc");
2449
2449
  let queryString = searchParams.toString();
2450
2450
  if (queryString) queryString = "?" + queryString;
2451
- return this.httpClient.get(`/projects${queryString}`).then((response => response.json())).then((projects => {
2451
+ return this.httpClient.get(`/projects${queryString}`).then(response => response.json()).then(projects => {
2452
2452
  if (Array.isArray(projects)) {
2453
2453
  let result = projects;
2454
- if (ids) result = result.filter((x => ids.includes(x.id)));
2455
- if (name) result = result.filter((x => x.name.includes(name)));
2454
+ if (ids) result = result.filter(x => ids.includes(x.id));
2455
+ if (name) result = result.filter(x => x.name.includes(name));
2456
2456
  if (limit > 0) {
2457
2457
  const begin = start > 0 ? start : 0;
2458
2458
  result = result.slice(begin, begin + limit);
@@ -2466,13 +2466,13 @@ class Client extends EventEmitter2 {
2466
2466
  };
2467
2467
  }
2468
2468
  return projects;
2469
- })).then((projects => ({
2469
+ }).then(projects => ({
2470
2470
  ...projects,
2471
- result: projects.result.map((data => new Project(data, this.httpClient)))
2472
- })));
2471
+ result: projects.result.map(data => new Project(data, this.httpClient))
2472
+ }));
2473
2473
  }
2474
2474
  getProject(projectId) {
2475
- return this.httpClient.get(`/projects/${projectId}`).then((response => response.json())).then((data => new Project(data, this.httpClient)));
2475
+ return this.httpClient.get(`/projects/${projectId}`).then(response => response.json()).then(data => new Project(data, this.httpClient));
2476
2476
  }
2477
2477
  createProject(name, description, startDate, endDate) {
2478
2478
  return this.httpClient.post("/projects", {
@@ -2480,10 +2480,10 @@ class Client extends EventEmitter2 {
2480
2480
  description: description,
2481
2481
  startDate: startDate instanceof Date ? startDate.toISOString() : startDate,
2482
2482
  endDate: endDate instanceof Date ? endDate.toISOString() : endDate
2483
- }).then((response => response.json())).then((data => new Project(data, this.httpClient)));
2483
+ }).then(response => response.json()).then(data => new Project(data, this.httpClient));
2484
2484
  }
2485
2485
  deleteProject(projectId) {
2486
- return this.httpClient.delete(`/projects/${projectId}`).then((response => response.text())).then((text => {
2486
+ return this.httpClient.delete(`/projects/${projectId}`).then(response => response.text()).then(text => {
2487
2487
  try {
2488
2488
  return JSON.parse(text);
2489
2489
  } catch {
@@ -2491,61 +2491,61 @@ class Client extends EventEmitter2 {
2491
2491
  id: projectId
2492
2492
  };
2493
2493
  }
2494
- }));
2494
+ });
2495
2495
  }
2496
2496
  getSharedLink(token) {
2497
- return this.httpClient.get(`/shares/${token}`).then((response => response.json())).then((data => new SharedLink(data, this.httpClient)));
2497
+ return this.httpClient.get(`/shares/${token}`).then(response => response.json()).then(data => new SharedLink(data, this.httpClient));
2498
2498
  }
2499
2499
  createSharedLink(fileId, permissions) {
2500
2500
  return this.httpClient.post("/shares", {
2501
2501
  fileId: fileId,
2502
2502
  permissions: permissions
2503
- }).then((response => response.json())).then((data => new SharedLink(data, this.httpClient)));
2503
+ }).then(response => response.json()).then(data => new SharedLink(data, this.httpClient));
2504
2504
  }
2505
2505
  deleteSharedLink(token) {
2506
- return this.httpClient.delete(`/shares/${token}`).then((response => response.json()));
2506
+ return this.httpClient.delete(`/shares/${token}`).then(response => response.json());
2507
2507
  }
2508
2508
  getSharedFile(token, password) {
2509
2509
  return this.httpClient.get(`/shares/${token}/info`, {
2510
2510
  headers: {
2511
2511
  "InWeb-Password": password
2512
2512
  }
2513
- }).then((response => response.json())).then((data => new SharedFile(data, password, this.httpClient)));
2513
+ }).then(response => response.json()).then(data => new SharedFile(data, password, this.httpClient));
2514
2514
  }
2515
2515
  getPlugins() {
2516
- return this.httpClient.get("/plugins").then((response => response.json())).then((array => array.map((data => new Plugin(data, this.httpClient)))));
2516
+ return this.httpClient.get("/plugins").then(response => response.json()).then(array => array.map(data => new Plugin(data, this.httpClient)));
2517
2517
  }
2518
2518
  getPlugin(name, version) {
2519
- return this.httpClient.get(`/plugins/${name}/${version}`).then((response => response.json())).then((data => new Plugin(data, this.httpClient)));
2519
+ return this.httpClient.get(`/plugins/${name}/${version}`).then(response => response.json()).then(data => new Plugin(data, this.httpClient));
2520
2520
  }
2521
2521
  async uploadPlugin(file, onProgress) {
2522
- return await this.httpClient.uploadFile("/plugins", file, (progress => {
2522
+ return await this.httpClient.uploadFile("/plugins", file, progress => {
2523
2523
  this.emitEvent({
2524
2524
  type: "uploadprogress",
2525
2525
  data: progress,
2526
2526
  file: file
2527
2527
  });
2528
2528
  if (onProgress) onProgress(progress, file);
2529
- })).then((xhr => JSON.parse(xhr.responseText))).then((data => new Plugin(data, this.httpClient)));
2529
+ }).then(xhr => JSON.parse(xhr.responseText)).then(data => new Plugin(data, this.httpClient));
2530
2530
  }
2531
2531
  deletePlugin(name, version) {
2532
- return this.httpClient.delete(`/plugins/${name}/${version}`).then((response => response.json()));
2532
+ return this.httpClient.delete(`/plugins/${name}/${version}`).then(response => response.json());
2533
2533
  }
2534
2534
  downloadPlugin(name, version, onProgress, signal) {
2535
2535
  return this.httpClient.downloadFile(`/plugins/${name}/${version}/download`, onProgress, {
2536
2536
  signal: signal
2537
- }).then((response => response.arrayBuffer()));
2537
+ }).then(response => response.arrayBuffer());
2538
2538
  }
2539
2539
  executePluginCommand(name, version, command, parameters) {
2540
2540
  const searchParams = new URLSearchParams;
2541
2541
  if (version) searchParams.set("version", version);
2542
2542
  let queryString = searchParams.toString();
2543
2543
  if (queryString) queryString = "?" + queryString;
2544
- return this.httpClient.post(`/plugins/${name}/commands/${command}${queryString}`, parameters).then((response => response.json()));
2544
+ return this.httpClient.post(`/plugins/${name}/commands/${command}${queryString}`, parameters).then(response => response.json());
2545
2545
  }
2546
2546
  }
2547
2547
 
2548
- const version = "26.9.2";
2548
+ const version = "26.9.3";
2549
2549
 
2550
2550
  export { Assembly, ClashTest, Client, Endpoint, FetchError, File, Job, Member, Model, OAuthClient, Permission, Plugin, Project, Role, SharedFile, SharedLink, User, parseArgs, statusText, userFullName, userInitials, version, waitFor };
2551
2551
  //# sourceMappingURL=client.module.js.map