@octostar/platform-api 0.5.24 → 0.5.28

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.
@@ -2034,7 +2034,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
2034
2034
  var undefined;
2035
2035
 
2036
2036
  /** Used as the semantic version number. */
2037
- var VERSION = '4.17.21';
2037
+ var VERSION = '4.17.23';
2038
2038
 
2039
2039
  /** Used as the size to enable large array optimizations. */
2040
2040
  var LARGE_ARRAY_SIZE = 200;
@@ -5788,7 +5788,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
5788
5788
  if (isArray(iteratee)) {
5789
5789
  return function(value) {
5790
5790
  return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
5791
- }
5791
+ };
5792
5792
  }
5793
5793
  return iteratee;
5794
5794
  });
@@ -6392,8 +6392,47 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
6392
6392
  */
6393
6393
  function baseUnset(object, path) {
6394
6394
  path = castPath(path, object);
6395
- object = parent(object, path);
6396
- return object == null || delete object[toKey(last(path))];
6395
+
6396
+ // Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
6397
+ var index = -1,
6398
+ length = path.length;
6399
+
6400
+ if (!length) {
6401
+ return true;
6402
+ }
6403
+
6404
+ var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
6405
+
6406
+ while (++index < length) {
6407
+ var key = path[index];
6408
+
6409
+ // skip non-string keys (e.g., Symbols, numbers)
6410
+ if (typeof key !== 'string') {
6411
+ continue;
6412
+ }
6413
+
6414
+ // Always block "__proto__" anywhere in the path if it's not expected
6415
+ if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
6416
+ return false;
6417
+ }
6418
+
6419
+ // Block "constructor.prototype" chains
6420
+ if (key === 'constructor' &&
6421
+ (index + 1) < length &&
6422
+ typeof path[index + 1] === 'string' &&
6423
+ path[index + 1] === 'prototype') {
6424
+
6425
+ // Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
6426
+ if (isRootPrimitive && index === 0) {
6427
+ continue;
6428
+ }
6429
+
6430
+ return false;
6431
+ }
6432
+ }
6433
+
6434
+ var obj = parent(object, path);
6435
+ return obj == null || delete obj[toKey(last(path))];
6397
6436
  }
6398
6437
 
6399
6438
  /**
@@ -22555,7 +22594,7 @@ var getContextApi = exports.getContextApi = /*#__PURE__*/function () {
22555
22594
  };
22556
22595
  }();
22557
22596
 
22558
- },{"./constants":34,"./factory":35,"./lib/AsyncServiceLocator":38}],24:[function(require,module,exports){
22597
+ },{"./constants":34,"./factory":35,"./lib/AsyncServiceLocator":39}],24:[function(require,module,exports){
22559
22598
  "use strict";
22560
22599
 
22561
22600
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -23647,7 +23686,7 @@ Object.keys(_OsSpinner).forEach(function (key) {
23647
23686
  Object.defineProperty(exports, "__esModule", {
23648
23687
  value: true
23649
23688
  });
23650
- exports.getPostMessageNames = exports.createPrefixesConstants = exports.apiNames = void 0;
23689
+ exports.getPostMessageNames = exports.createPrefixesConstants = exports.apiNames = exports.OCTOSTAR_ENTITIES_MIME_TYPE = void 0;
23651
23690
  /**
23652
23691
  * @beta
23653
23692
  * Create a set of message names with a namespace.
@@ -23671,6 +23710,12 @@ var getPostMessageNames = exports.getPostMessageNames = function getPostMessageN
23671
23710
  * API names.
23672
23711
  */
23673
23712
  var apiNames = exports.apiNames = createPrefixesConstants('octostar:api-names', ['desktop', 'ontology', 'context', 'extras', 'remoteApp', 'savedSearch'], undefined);
23713
+ /**
23714
+ * @beta
23715
+ * MIME type for drag payload containing Octostar entities.
23716
+ * Used when dragging entities across the application.
23717
+ */
23718
+ var OCTOSTAR_ENTITIES_MIME_TYPE = exports.OCTOSTAR_ENTITIES_MIME_TYPE = 'application/x-octostar-entities';
23674
23719
  // test
23675
23720
  // const v = messages.get_api;
23676
23721
 
@@ -23888,7 +23933,7 @@ var forwardCallsToFutureObject = exports.forwardCallsToFutureObject = function f
23888
23933
  });
23889
23934
  };
23890
23935
 
23891
- },{"./constants":34,"./utils":48,"post-robot":6}],36:[function(require,module,exports){
23936
+ },{"./constants":34,"./utils":52,"post-robot":6}],36:[function(require,module,exports){
23892
23937
  "use strict";
23893
23938
 
23894
23939
  Object.defineProperty(exports, "__esModule", {
@@ -24048,8 +24093,52 @@ Object.keys(_FusionTypes).forEach(function (key) {
24048
24093
  }
24049
24094
  });
24050
24095
  });
24096
+ var _ContextApiRegistry = require("./lib/ContextApiRegistry");
24097
+ Object.keys(_ContextApiRegistry).forEach(function (key) {
24098
+ if (key === "default" || key === "__esModule") return;
24099
+ if (key in exports && exports[key] === _ContextApiRegistry[key]) return;
24100
+ Object.defineProperty(exports, key, {
24101
+ enumerable: true,
24102
+ get: function get() {
24103
+ return _ContextApiRegistry[key];
24104
+ }
24105
+ });
24106
+ });
24107
+ var _SearchQueryBuilder = require("./lib/SearchQueryBuilder");
24108
+ Object.keys(_SearchQueryBuilder).forEach(function (key) {
24109
+ if (key === "default" || key === "__esModule") return;
24110
+ if (key in exports && exports[key] === _SearchQueryBuilder[key]) return;
24111
+ Object.defineProperty(exports, key, {
24112
+ enumerable: true,
24113
+ get: function get() {
24114
+ return _SearchQueryBuilder[key];
24115
+ }
24116
+ });
24117
+ });
24118
+ var _browserChannel = require("./lib/browserChannel");
24119
+ Object.keys(_browserChannel).forEach(function (key) {
24120
+ if (key === "default" || key === "__esModule") return;
24121
+ if (key in exports && exports[key] === _browserChannel[key]) return;
24122
+ Object.defineProperty(exports, key, {
24123
+ enumerable: true,
24124
+ get: function get() {
24125
+ return _browserChannel[key];
24126
+ }
24127
+ });
24128
+ });
24129
+ var _ApiConfig = require("./lib/ApiConfig");
24130
+ Object.keys(_ApiConfig).forEach(function (key) {
24131
+ if (key === "default" || key === "__esModule") return;
24132
+ if (key in exports && exports[key] === _ApiConfig[key]) return;
24133
+ Object.defineProperty(exports, key, {
24134
+ enumerable: true,
24135
+ get: function get() {
24136
+ return _ApiConfig[key];
24137
+ }
24138
+ });
24139
+ });
24051
24140
 
24052
- },{"./apis":23,"./components":33,"./constants":34,"./lib/AIClientImpl":37,"./lib/FilesAPIImpl":39,"./lib/FusionApi":40,"./lib/JWTProvider":41,"./lib/LiveContextAPI":42,"./lib/Proxy":43,"./lib/userWorkspace":44,"./permissions":45,"./type/FusionTypes":46,"./types":47,"./utils":48}],37:[function(require,module,exports){
24141
+ },{"./apis":23,"./components":33,"./constants":34,"./lib/AIClientImpl":37,"./lib/ApiConfig":38,"./lib/ContextApiRegistry":40,"./lib/FilesAPIImpl":41,"./lib/FusionApi":42,"./lib/JWTProvider":43,"./lib/LiveContextAPI":44,"./lib/Proxy":45,"./lib/SearchQueryBuilder":46,"./lib/browserChannel":47,"./lib/userWorkspace":48,"./permissions":49,"./type/FusionTypes":50,"./types":51,"./utils":52}],37:[function(require,module,exports){
24053
24142
  "use strict";
24054
24143
 
24055
24144
  Object.defineProperty(exports, "__esModule", {
@@ -24216,6 +24305,80 @@ var AIClientImpl = exports.AIClientImpl = /*#__PURE__*/function () {
24216
24305
  },{}],38:[function(require,module,exports){
24217
24306
  "use strict";
24218
24307
 
24308
+ Object.defineProperty(exports, "__esModule", {
24309
+ value: true
24310
+ });
24311
+ exports.ApiConfig = void 0;
24312
+ // FIXME: TEAM-4235 To be removed when superset is gone.
24313
+ function getDefaultBaseUrl() {
24314
+ if (typeof window === 'undefined') return '';
24315
+ return window.location.origin;
24316
+ }
24317
+ /**
24318
+ * ApiConfig
24319
+ * A generic, synchronous store for developer settings and URL construction.
24320
+ */
24321
+ var ApiConfig = exports.ApiConfig = {
24322
+ // Initialized empty; hydrated by DesktopContextProvider
24323
+ settings: {},
24324
+ /**
24325
+ * Returns the base URL, preferring developer overrides.
24326
+ */
24327
+ getApiBaseUrl: function getApiBaseUrl() {
24328
+ var override = this.settings.octostarAPIServer;
24329
+ if (override) {
24330
+ try {
24331
+ var url = new URL(override);
24332
+ // url.host automatically includes the port
24333
+ return "".concat(url.protocol, "//").concat(url.host);
24334
+ } catch (_unused) {
24335
+ // Fall back if override is an invalid URL
24336
+ }
24337
+ }
24338
+ return getDefaultBaseUrl();
24339
+ },
24340
+ /**
24341
+ * Returns true if using the default API (same origin).
24342
+ * When true, authentication relies on cookies - no Bearer token needed.
24343
+ * When false (developer override), Bearer token should be used.
24344
+ *
24345
+ * FIXME: TEAM-4235 To be removed when superset is gone.
24346
+ */
24347
+ isUsingDefaultApi: function isUsingDefaultApi() {
24348
+ var override = this.settings.octostarAPIServer;
24349
+ if (!override) {
24350
+ return true;
24351
+ }
24352
+ try {
24353
+ var overrideUrl = new URL(override);
24354
+ var defaultUrl = getDefaultBaseUrl();
24355
+ return "".concat(overrideUrl.protocol, "//").concat(overrideUrl.host) === defaultUrl;
24356
+ } catch (_unused2) {
24357
+ return true;
24358
+ }
24359
+ },
24360
+ /**
24361
+ * Specifically handles the migrated attachment path.
24362
+ * Usage: ApiConfig.getAttachmentUrl(attachmentId)
24363
+ */
24364
+ getAttachmentUrl: function getAttachmentUrl(path, options) {
24365
+ var base = this.getApiBaseUrl().replace(/\/$/, '');
24366
+ var suffix = path.startsWith('/') ? path : "/".concat(path);
24367
+ var query = new URLSearchParams();
24368
+ var url = "".concat(base, "/api/v1/files/attachments").concat(suffix);
24369
+ if (options) {
24370
+ Object.keys(options).forEach(function (key) {
24371
+ query.set(key, String(options[key]));
24372
+ });
24373
+ return "".concat(url, "?").concat(query.toString());
24374
+ }
24375
+ return url;
24376
+ }
24377
+ };
24378
+
24379
+ },{}],39:[function(require,module,exports){
24380
+ "use strict";
24381
+
24219
24382
  Object.defineProperty(exports, "__esModule", {
24220
24383
  value: true
24221
24384
  });
@@ -24330,13 +24493,78 @@ AsyncServiceLocator.instances = {};
24330
24493
  // testService.test();
24331
24494
  // test2Service.getName();
24332
24495
 
24333
- },{}],39:[function(require,module,exports){
24496
+ },{}],40:[function(require,module,exports){
24497
+ "use strict";
24498
+
24499
+ Object.defineProperty(exports, "__esModule", {
24500
+ value: true
24501
+ });
24502
+ exports.ContextRegistry = void 0;
24503
+ exports.registerContext = registerContext;
24504
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
24505
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
24506
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
24507
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
24508
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
24509
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
24510
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
24511
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
24512
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24513
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24514
+ // appContextRegistry.ts
24515
+ var contextMap = new Map();
24516
+ function registerContext(channelId, contextApi) {
24517
+ if (channelId) {
24518
+ contextMap.set(channelId, contextApi);
24519
+ }
24520
+ return function () {
24521
+ if (channelId && contextMap.get(channelId) === contextApi) {
24522
+ contextMap["delete"](channelId);
24523
+ }
24524
+ };
24525
+ }
24526
+ var ContextRegistry = exports.ContextRegistry = /*#__PURE__*/function () {
24527
+ function ContextRegistry() {
24528
+ _classCallCheck(this, ContextRegistry);
24529
+ }
24530
+ return _createClass(ContextRegistry, null, [{
24531
+ key: "getAppContext",
24532
+ value: function () {
24533
+ var _getAppContext = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(channelId) {
24534
+ var api;
24535
+ return _regenerator().w(function (_context) {
24536
+ while (1) switch (_context.n) {
24537
+ case 0:
24538
+ api = contextMap.get(channelId);
24539
+ if (api) {
24540
+ _context.n = 1;
24541
+ break;
24542
+ }
24543
+ throw new Error("No context found for channelId: ".concat(channelId));
24544
+ case 1:
24545
+ _context.n = 2;
24546
+ return api.getContext();
24547
+ case 2:
24548
+ return _context.a(2, _context.v);
24549
+ }
24550
+ }, _callee);
24551
+ }));
24552
+ function getAppContext(_x) {
24553
+ return _getAppContext.apply(this, arguments);
24554
+ }
24555
+ return getAppContext;
24556
+ }()
24557
+ }]);
24558
+ }();
24559
+
24560
+ },{}],41:[function(require,module,exports){
24334
24561
  "use strict";
24335
24562
 
24336
24563
  Object.defineProperty(exports, "__esModule", {
24337
24564
  value: true
24338
24565
  });
24339
24566
  exports.FilesAPIImpl = void 0;
24567
+ var _browserChannel = require("./browserChannel");
24340
24568
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
24341
24569
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
24342
24570
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
@@ -24383,7 +24611,7 @@ var FilesAPIImpl = exports.FilesAPIImpl = /*#__PURE__*/function () {
24383
24611
  var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
24384
24612
  key = _Object$entries$_i[0],
24385
24613
  value = _Object$entries$_i[1];
24386
- if (value !== undefined) {
24614
+ if (value !== undefined && value !== null) {
24387
24615
  params.append(key, String(value));
24388
24616
  }
24389
24617
  }
@@ -24499,13 +24727,12 @@ var FilesAPIImpl = exports.FilesAPIImpl = /*#__PURE__*/function () {
24499
24727
  key: "moveOrRename",
24500
24728
  value: function () {
24501
24729
  var _moveOrRename = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(os_workspace, path, _ref) {
24502
- var to_path, entity_id, new_name, new_os_parent_folder, _ref$force, force, query, url;
24730
+ var entity_id, new_name, new_os_parent_folder, _ref$force, force, query, url;
24503
24731
  return _regenerator().w(function (_context5) {
24504
24732
  while (1) switch (_context5.n) {
24505
24733
  case 0:
24506
- to_path = _ref.to_path, entity_id = _ref.entity_id, new_name = _ref.new_name, new_os_parent_folder = _ref.new_os_parent_folder, _ref$force = _ref.force, force = _ref$force === void 0 ? false : _ref$force;
24734
+ entity_id = _ref.entity_id, new_name = _ref.new_name, new_os_parent_folder = _ref.new_os_parent_folder, _ref$force = _ref.force, force = _ref$force === void 0 ? false : _ref$force;
24507
24735
  query = this.buildQueryParams({
24508
- to_path: to_path,
24509
24736
  entity_id: entity_id,
24510
24737
  new_name: new_name,
24511
24738
  new_os_parent_folder: new_os_parent_folder,
@@ -24693,7 +24920,8 @@ var FilesAPIImpl = exports.FilesAPIImpl = /*#__PURE__*/function () {
24693
24920
  endpoint: "/api/v1/files/unzip/".concat(os_workspace, "/").concat(entity_id).concat(query ? "?".concat(query) : ''),
24694
24921
  method: 'POST',
24695
24922
  headers: {
24696
- 'Content-Type': 'application/json'
24923
+ 'Content-Type': 'application/json',
24924
+ 'X-Browser-Channel': (0, _browserChannel.getBrowserChannel)()
24697
24925
  }
24698
24926
  }));
24699
24927
  }
@@ -24737,7 +24965,7 @@ var FilesAPIImpl = exports.FilesAPIImpl = /*#__PURE__*/function () {
24737
24965
  }]);
24738
24966
  }();
24739
24967
 
24740
- },{}],40:[function(require,module,exports){
24968
+ },{"./browserChannel":47}],42:[function(require,module,exports){
24741
24969
  "use strict";
24742
24970
 
24743
24971
  Object.defineProperty(exports, "__esModule", {
@@ -25625,7 +25853,7 @@ FusionAPI.RELATIONSHIP_SAME_AS = 'same_as';
25625
25853
  FusionAPI.RELATIONSHIP_SAME_AS_REVERSE = '~same_as';
25626
25854
  FusionAPI.RELATIONSHIP_FEATURED_IN = 'featured_in';
25627
25855
 
25628
- },{"lodash":4}],41:[function(require,module,exports){
25856
+ },{"lodash":4}],43:[function(require,module,exports){
25629
25857
  "use strict";
25630
25858
 
25631
25859
  Object.defineProperty(exports, "__esModule", {
@@ -25708,7 +25936,7 @@ var JWTProvider = exports.JWTProvider = /*#__PURE__*/function () {
25708
25936
  }]);
25709
25937
  }();
25710
25938
 
25711
- },{}],42:[function(require,module,exports){
25939
+ },{}],44:[function(require,module,exports){
25712
25940
  "use strict";
25713
25941
 
25714
25942
  Object.defineProperty(exports, "__esModule", {
@@ -25739,7 +25967,7 @@ var LiveContextAPI = exports.LiveContextAPI = /*#__PURE__*/function () {
25739
25967
  this.messageType = 'LiveContextAPI-Message';
25740
25968
  this.contextData = contextData;
25741
25969
  var iframeChannelId = new URLSearchParams(window.location.search).get(IFRAME_CHANNEL_ID_PARAM);
25742
- this.channelId = iframeChannelId !== null && iframeChannelId !== void 0 ? iframeChannelId : (0, _uuid.v4)();
25970
+ this.channelId = iframeChannelId;
25743
25971
  this.type = window.top !== window ? 'iframe' : 'parent';
25744
25972
  // Bind the message handler to maintain context
25745
25973
  this.messageHandler = this.handleMessage.bind(this);
@@ -25910,7 +26138,10 @@ var LiveContextAPI = exports.LiveContextAPI = /*#__PURE__*/function () {
25910
26138
  }
25911
26139
  }, {
25912
26140
  key: "connect",
25913
- value: function connect() {
26141
+ value: function connect(defaultChannelId) {
26142
+ if (!this.channelId) {
26143
+ this.channelId = defaultChannelId !== null && defaultChannelId !== void 0 ? defaultChannelId : (0, _uuid.v4)();
26144
+ }
25914
26145
  return this.channelId;
25915
26146
  }
25916
26147
  }, {
@@ -25924,7 +26155,7 @@ var LiveContextAPI = exports.LiveContextAPI = /*#__PURE__*/function () {
25924
26155
  }]);
25925
26156
  }();
25926
26157
 
25927
- },{"lodash":4,"uuid":7}],43:[function(require,module,exports){
26158
+ },{"lodash":4,"uuid":7}],45:[function(require,module,exports){
25928
26159
  "use strict";
25929
26160
 
25930
26161
  Object.defineProperty(exports, "__esModule", {
@@ -25958,7 +26189,187 @@ var makeProxy = exports.makeProxy = function makeProxy(obj) {
25958
26189
  return proxyObj;
25959
26190
  };
25960
26191
 
25961
- },{}],44:[function(require,module,exports){
26192
+ },{}],46:[function(require,module,exports){
26193
+ "use strict";
26194
+
26195
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
26196
+ Object.defineProperty(exports, "__esModule", {
26197
+ value: true
26198
+ });
26199
+ exports.buildTextSearchClauses = buildTextSearchClauses;
26200
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
26201
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
26202
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
26203
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
26204
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
26205
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
26206
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { if ("" === t) return e; var p = o[r]; return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
26207
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
26208
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
26209
+ /**
26210
+ * Builds an array of OpenSearch "should" clauses for full text search.
26211
+ *
26212
+ * @param query - The search query string
26213
+ * @param options - Search options
26214
+ */
26215
+ function buildTextSearchClauses(query, options) {
26216
+ var _options$defaultQuery;
26217
+ var trimmedQuery = query.trim();
26218
+ var operator = (_options$defaultQuery = options === null || options === void 0 ? void 0 : options.defaultQueryOperator) !== null && _options$defaultQuery !== void 0 ? _options$defaultQuery : 'or';
26219
+ if (!trimmedQuery) {
26220
+ return [];
26221
+ }
26222
+ // FIXME: lowercasing as the mappings lowercase keywords...
26223
+ var lowercaseQuery = trimmedQuery.toLowerCase().replace(/\s+/g, ' ');
26224
+ // Create matches for quoted parts
26225
+ var quotedPhrases = [];
26226
+ var quoteRegex = /*#__PURE__*/_wrapRegExp(/"([^"]+)"/g, {
26227
+ phrase: 1
26228
+ });
26229
+ var match;
26230
+ while ((match = quoteRegex.exec(trimmedQuery)) !== null) {
26231
+ var _match$groups;
26232
+ var phrase = (_match$groups = match.groups) === null || _match$groups === void 0 || (_match$groups = _match$groups.phrase) === null || _match$groups === void 0 ? void 0 : _match$groups.trim();
26233
+ if (phrase) {
26234
+ quotedPhrases.push(phrase.toLowerCase().replace(/\s+/g, ' '));
26235
+ }
26236
+ }
26237
+ var clauses = [];
26238
+ // Build term queries for quoted phrases
26239
+ var quotedTermQueries = quotedPhrases.map(function (phrase) {
26240
+ return {
26241
+ term: {
26242
+ 'document_fields.entity_label.keyword': {
26243
+ value: phrase,
26244
+ boost: 100
26245
+ }
26246
+ }
26247
+ };
26248
+ });
26249
+ // Add quoted term queries as or clauses. This is by design.
26250
+ if (quotedTermQueries.length > 0) {
26251
+ clauses.push.apply(clauses, _toConsumableArray(quotedTermQueries));
26252
+ }
26253
+ // If nothing quoted, try exact match on label
26254
+ if (!quotedPhrases.length) {
26255
+ clauses.push({
26256
+ term: {
26257
+ 'document_fields.entity_label.keyword': {
26258
+ value: lowercaseQuery,
26259
+ boost: 100
26260
+ }
26261
+ }
26262
+ });
26263
+ }
26264
+ // Match phrase on label
26265
+ clauses.push({
26266
+ match_phrase: {
26267
+ 'document_fields.entity_label': {
26268
+ query: trimmedQuery,
26269
+ analyzer: 'standard',
26270
+ boost: 50
26271
+ }
26272
+ }
26273
+ });
26274
+ // Standard match with all terms on label
26275
+ clauses.push({
26276
+ match: {
26277
+ 'document_fields.entity_label': {
26278
+ query: trimmedQuery,
26279
+ analyzer: 'standard',
26280
+ operator: 'and',
26281
+ boost: 20
26282
+ }
26283
+ }
26284
+ });
26285
+ // Broad search over all fields
26286
+ clauses.push({
26287
+ simple_query_string: {
26288
+ query: trimmedQuery,
26289
+ fields: ['*'],
26290
+ flags: 'PHRASE',
26291
+ analyzer: 'standard',
26292
+ default_operator: operator,
26293
+ boost: 1,
26294
+ lenient: true
26295
+ }
26296
+ });
26297
+ return clauses;
26298
+ }
26299
+
26300
+ },{}],47:[function(require,module,exports){
26301
+ "use strict";
26302
+
26303
+ Object.defineProperty(exports, "__esModule", {
26304
+ value: true
26305
+ });
26306
+ exports.getBrowserChannel = getBrowserChannel;
26307
+ exports.readBrowserChannel = readBrowserChannel;
26308
+ /**
26309
+ * A per-browser-tab channel used to uniquely identify a single client instance.
26310
+ *
26311
+ * Resolution order:
26312
+ * 1. browser_channel URL param (iframe-safe propagation)
26313
+ * 2. sessionStorage (tab-scoped persistence)
26314
+ * 3. generated UUID (fallback)
26315
+ */
26316
+ var STORAGE_KEY = 'browser_channel_id';
26317
+ var URL_PARAM = 'browser_channel';
26318
+ var cachedChannel = null;
26319
+ function generate() {
26320
+ return crypto.randomUUID();
26321
+ }
26322
+ function getFromUrl() {
26323
+ try {
26324
+ var params = new URLSearchParams(window.location.search);
26325
+ return params.get(URL_PARAM);
26326
+ } catch (_unused) {
26327
+ return null;
26328
+ }
26329
+ }
26330
+ function getBrowserChannel() {
26331
+ if (cachedChannel) {
26332
+ return cachedChannel;
26333
+ }
26334
+ // 1️⃣ URL param wins (iframe propagation)
26335
+ var fromUrl = getFromUrl();
26336
+ if (fromUrl) {
26337
+ cachedChannel = fromUrl;
26338
+ try {
26339
+ sessionStorage.setItem(STORAGE_KEY, fromUrl);
26340
+ } catch (_unused2) {
26341
+ /* ignore */
26342
+ }
26343
+ return fromUrl;
26344
+ }
26345
+ // 2️⃣ sessionStorage (tab-scoped)
26346
+ try {
26347
+ var existing = sessionStorage.getItem(STORAGE_KEY);
26348
+ if (existing) {
26349
+ cachedChannel = existing;
26350
+ return existing;
26351
+ }
26352
+ } catch (_unused3) {
26353
+ /* ignore */
26354
+ }
26355
+ // 3️⃣ generate fallback
26356
+ var channel = generate();
26357
+ try {
26358
+ sessionStorage.setItem(STORAGE_KEY, channel);
26359
+ } catch (_unused4) {
26360
+ /* ignore */
26361
+ }
26362
+ cachedChannel = channel;
26363
+ return channel;
26364
+ }
26365
+ /**
26366
+ * Explicit getter for other consumers (iframes, embeds, etc)
26367
+ */
26368
+ function readBrowserChannel() {
26369
+ return getBrowserChannel();
26370
+ }
26371
+
26372
+ },{}],48:[function(require,module,exports){
25962
26373
  "use strict";
25963
26374
 
25964
26375
  Object.defineProperty(exports, "__esModule", {
@@ -26037,7 +26448,7 @@ var getOrCreateUsersPrivateWorkspaceRecord = exports.getOrCreateUsersPrivateWork
26037
26448
  };
26038
26449
  }();
26039
26450
 
26040
- },{"uuid":7}],45:[function(require,module,exports){
26451
+ },{"uuid":7}],49:[function(require,module,exports){
26041
26452
  "use strict";
26042
26453
 
26043
26454
  Object.defineProperty(exports, "__esModule", {
@@ -26062,21 +26473,21 @@ var ONTOLOGY_PERMISSION_GROUP = exports.ONTOLOGY_PERMISSION_GROUP = 'octostar:on
26062
26473
  var ALL_PERMISSIONS = exports.ALL_PERMISSIONS = 'all';
26063
26474
  var ALL_PERMISSIONS_ARRAY = exports.ALL_PERMISSIONS_ARRAY = [ALL_PERMISSIONS];
26064
26475
 
26065
- },{}],46:[function(require,module,exports){
26476
+ },{}],50:[function(require,module,exports){
26066
26477
  "use strict";
26067
26478
 
26068
26479
  Object.defineProperty(exports, "__esModule", {
26069
26480
  value: true
26070
26481
  });
26071
26482
 
26072
- },{}],47:[function(require,module,exports){
26483
+ },{}],51:[function(require,module,exports){
26073
26484
  "use strict";
26074
26485
 
26075
26486
  Object.defineProperty(exports, "__esModule", {
26076
26487
  value: true
26077
26488
  });
26078
26489
 
26079
- },{}],48:[function(require,module,exports){
26490
+ },{}],52:[function(require,module,exports){
26080
26491
  "use strict";
26081
26492
 
26082
26493
  Object.defineProperty(exports, "__esModule", {