@itwin/core-i18n 5.15.0-dev.9 → 5.15.0

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.
@@ -2032,7 +2032,7 @@ cov_ogldeftyv().s[3]++;
2032
2032
  exports.ITwinLocalization = void 0;
2033
2033
  const i18next_1 = (cov_ogldeftyv().s[4]++, __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/cjs/i18next.js")));
2034
2034
  const i18next_browser_languagedetector_1 = (cov_ogldeftyv().s[5]++, __importDefault(__webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.8/node_modules/i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js")));
2035
- const i18next_http_backend_1 = (cov_ogldeftyv().s[6]++, __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js")));
2035
+ const i18next_http_backend_1 = (cov_ogldeftyv().s[6]++, __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js")));
2036
2036
  const core_bentley_1 = (cov_ogldeftyv().s[7]++, __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js"));
2037
2037
  const DEFAULT_MAX_RETRIES = (cov_ogldeftyv().s[8]++, 1); // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
2038
2038
  /** Supplies localizations for iTwin.js
@@ -17339,6 +17339,7 @@ function assert(condition, message) {
17339
17339
  "use strict";
17340
17340
  __webpack_require__.r(__webpack_exports__);
17341
17341
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17342
+ /* harmony export */ BeAsyncEvent: () => (/* binding */ BeAsyncEvent),
17342
17343
  /* harmony export */ BeEvent: () => (/* binding */ BeEvent),
17343
17344
  /* harmony export */ BeEventList: () => (/* binding */ BeEventList),
17344
17345
  /* harmony export */ BeUiEvent: () => (/* binding */ BeUiEvent),
@@ -17426,8 +17427,13 @@ class BeEvent {
17426
17427
  dropped = true;
17427
17428
  }
17428
17429
  else {
17430
+ const listener = context.listener;
17431
+ if (context.once) {
17432
+ context.listener = undefined;
17433
+ dropped = true;
17434
+ }
17429
17435
  try {
17430
- context.listener.apply(context.scope, args);
17436
+ listener.apply(context.scope, args);
17431
17437
  }
17432
17438
  catch (e) {
17433
17439
  _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
@@ -17436,10 +17442,6 @@ class BeEvent {
17436
17442
  // listener was removed during its own callback
17437
17443
  dropped = true;
17438
17444
  }
17439
- else if (context.once) {
17440
- context.listener = undefined;
17441
- dropped = true;
17442
- }
17443
17445
  }
17444
17446
  }
17445
17447
  this._emitDepth--;
@@ -17483,8 +17485,6 @@ class BeUiEvent extends BeEvent {
17483
17485
  */
17484
17486
  class BeUnorderedEvent {
17485
17487
  _listeners = new Set();
17486
- _emitDepth = 0;
17487
- _hasTombstones = false;
17488
17488
  /** The number of listeners currently subscribed to the event.
17489
17489
  * @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
17490
17490
  * but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
@@ -17514,43 +17514,26 @@ class BeUnorderedEvent {
17514
17514
  }
17515
17515
  /** Remove a specific context entry, deferring during emit. */
17516
17516
  _removeCtx(ctx) {
17517
- if (this._emitDepth > 0) {
17518
- ctx.listener = undefined; // tombstone for deferred cleanup
17519
- this._hasTombstones = true;
17520
- }
17521
- else {
17522
- this._listeners.delete(ctx);
17523
- }
17517
+ this._listeners.delete(ctx);
17524
17518
  }
17525
17519
  /**
17526
17520
  * Raises the event by calling each registered listener with the supplied arguments.
17527
17521
  * @param args This method takes any number of parameters and passes them through to the listeners.
17528
17522
  */
17529
17523
  raiseEvent(...args) {
17530
- this._emitDepth++;
17531
17524
  for (const ctx of this._listeners) {
17532
17525
  if (!ctx.listener) {
17533
17526
  continue;
17534
17527
  }
17528
+ if (ctx.once) {
17529
+ this._listeners.delete(ctx);
17530
+ }
17535
17531
  try {
17536
17532
  ctx.listener.apply(ctx.scope, args);
17537
17533
  }
17538
17534
  catch (e) {
17539
17535
  _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
17540
17536
  }
17541
- if (ctx.listener && ctx.once) {
17542
- ctx.listener = undefined;
17543
- this._hasTombstones = true;
17544
- }
17545
- }
17546
- this._emitDepth--;
17547
- // Only clean up tombstoned entries when we're back at the outermost emit
17548
- if (this._hasTombstones && this._emitDepth === 0) {
17549
- this._hasTombstones = false;
17550
- for (const ctx of this._listeners) {
17551
- if (ctx.listener === undefined)
17552
- this._listeners.delete(ctx);
17553
- }
17554
17537
  }
17555
17538
  }
17556
17539
  /** Clear all listeners from this BeUnorderedEvent.
@@ -17566,6 +17549,108 @@ class BeUnorderedUiEvent extends BeUnorderedEvent {
17566
17549
  /** Raises event with single strongly typed argument. */
17567
17550
  emit(args) { this.raiseEvent(args); }
17568
17551
  }
17552
+ /**
17553
+ * Manages a set of *listeners* for a particular event and notifies them when the event is raised.
17554
+ * Each listener is async (return a Promise<void>). The listeners may be invoked in series
17555
+ * or concurrently depending on the configuration of the instance.
17556
+ *
17557
+ * Like [[BeUnorderedEvent]], this class uses a `Set` internally to support more performant removal
17558
+ * of old listeners. When a listener is removed during emit, it is marked for deferred removal instead
17559
+ * of mutating the set immediately. Despite the "unordered" implication, items in a `Set` are enumerated
17560
+ * in insertion order, which means that this class invokes the listeners in insertion order.
17561
+ *
17562
+ * Listeners are managed exclusively through the disposal closure returned by [[addListener]] and
17563
+ * [[addOnce]]. There is no `removeListener` or `has` method — callers must capture the returned
17564
+ * closure to unsubscribe.
17565
+ * @beta
17566
+ */
17567
+ class BeAsyncEvent {
17568
+ _listeners = new Set();
17569
+ _concurrent = false;
17570
+ _promiseRejectionIsUnexpected = false;
17571
+ constructor(options) {
17572
+ if (options?.concurrent)
17573
+ this._concurrent = true;
17574
+ if (options?.promiseRejectionIsUnexpected)
17575
+ this._promiseRejectionIsUnexpected = true;
17576
+ }
17577
+ /** The number of listeners currently subscribed to the event.
17578
+ * @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
17579
+ * but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
17580
+ */
17581
+ get numberOfListeners() { return this._listeners.size; }
17582
+ /**
17583
+ * Registers a Listener to be executed whenever this event is raised.
17584
+ * @param listener The function to be executed when the event is raised.
17585
+ * @param scope An optional object scope to serve as the 'this' pointer when listener is invoked.
17586
+ * @returns A function that will remove this event listener in O(1).
17587
+ */
17588
+ addListener(listener, scope) {
17589
+ const ctx = { listener, scope, once: false };
17590
+ this._listeners.add(ctx);
17591
+ return () => this._removeCtx(ctx);
17592
+ }
17593
+ /**
17594
+ * Registers a callback function to be executed *only once* when the event is raised.
17595
+ * @param listener The function to be executed once when the event is raised.
17596
+ * @param scope An optional object scope to serve as the `this` pointer in which the listener function will execute.
17597
+ * @returns A function that will remove this event listener in O(1).
17598
+ */
17599
+ addOnce(listener, scope) {
17600
+ const ctx = { listener, scope, once: true };
17601
+ this._listeners.add(ctx);
17602
+ return () => this._removeCtx(ctx);
17603
+ }
17604
+ /** Remove a specific context entry, deferring during emit. */
17605
+ _removeCtx(ctx) {
17606
+ this._listeners.delete(ctx);
17607
+ }
17608
+ /**
17609
+ * Raises the event by calling each registered listener with the supplied arguments.
17610
+ *
17611
+ * See [[BeAsyncEventOptions]] for options that control the behavior of this method.
17612
+ *
17613
+ * @param args This method takes any number of parameters and passes them through to the listeners.
17614
+ * @returns A Promise that settles when the event invocation is complete.
17615
+ */
17616
+ async raiseEvent(...args) {
17617
+ const promises = [];
17618
+ // Wrapper to ensure that an exception thrown immediately by a listener is captured as a rejected promise rather than
17619
+ // allowed to propagate as an exception. A well-behaved Promise-returning function should never throw, but
17620
+ // this defends against the poorly-behaved ones. In Node 23+ we could use `Promise.try` instead.
17621
+ const invoke = async (ctx, args) => {
17622
+ if (!ctx.listener)
17623
+ return;
17624
+ await ctx.listener.apply(ctx.scope, args);
17625
+ };
17626
+ for (const ctx of this._listeners) {
17627
+ if (!ctx.listener)
17628
+ continue;
17629
+ if (ctx.once) {
17630
+ // Set guarantees this is safe during iteration.
17631
+ this._listeners.delete(ctx);
17632
+ }
17633
+ let promise = invoke(ctx, args);
17634
+ if (this._promiseRejectionIsUnexpected)
17635
+ promise = promise.catch(reason => _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(reason));
17636
+ if (this._concurrent)
17637
+ promises.push(promise);
17638
+ else
17639
+ await promise;
17640
+ }
17641
+ if (this._concurrent) {
17642
+ const result = await Promise.allSettled(promises);
17643
+ const firstRejection = result.find(r => r.status === "rejected");
17644
+ if (firstRejection)
17645
+ throw firstRejection.reason;
17646
+ }
17647
+ }
17648
+ /** Clear all listeners from this BeAsyncEvent.
17649
+ * @note If called during `raiseEvent`, remaining listeners in the current iteration are skipped
17650
+ * immediately rather than being tombstoned.
17651
+ */
17652
+ clear() { this._listeners.clear(); }
17653
+ }
17569
17654
  /**
17570
17655
  * A list of BeEvent objects, accessible by an event name.
17571
17656
  * This class may be used instead of explicitly declaring each BeEvent as a member of a containing class.
@@ -20122,16 +20207,18 @@ var Id64;
20122
20207
  Id64.getFirst = getFirst;
20123
20208
  /** Return the number of [[Id64String]]s represented by an [[Id64Arg]]. */
20124
20209
  function sizeOf(arg) {
20125
- return typeof arg === "string" ? 1 : (Array.isArray(arg) ? arg.length : arg.size);
20210
+ return typeof arg === "string" ? 1 : "size" in arg ? arg.size : arg.length;
20126
20211
  }
20127
20212
  Id64.sizeOf = sizeOf;
20128
20213
  /** Returns true if the [[Id64Arg]] contains the specified Id. */
20129
20214
  function has(arg, id) {
20130
- if (typeof arg === "string")
20215
+ if (typeof arg === "string") {
20131
20216
  return arg === id;
20132
- if (Array.isArray(arg))
20133
- return -1 !== arg.indexOf(id);
20134
- return arg.has(id);
20217
+ }
20218
+ if ("has" in arg) {
20219
+ return arg.has(id);
20220
+ }
20221
+ return -1 !== arg.indexOf(id);
20135
20222
  }
20136
20223
  Id64.has = has;
20137
20224
  /** The string representation of an invalid Id. */
@@ -24201,6 +24288,7 @@ class YieldManager {
24201
24288
  __webpack_require__.r(__webpack_exports__);
24202
24289
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24203
24290
  /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
24291
+ /* harmony export */ BeAsyncEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeAsyncEvent),
24204
24292
  /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
24205
24293
  /* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
24206
24294
  /* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
@@ -24924,534 +25012,377 @@ module.exports = _unsupportedIterableToArray, module.exports.__esModule = true,
24924
25012
 
24925
25013
  /***/ },
24926
25014
 
24927
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js"
25015
+ /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js"
24928
25016
  /*!**********************************************************************************************************************!*\
24929
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js ***!
25017
+ !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js ***!
24930
25018
  \**********************************************************************************************************************/
24931
25019
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
24932
25020
 
24933
25021
  "use strict";
24934
25022
  __webpack_require__.r(__webpack_exports__);
24935
25023
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24936
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
25024
+ /* harmony export */ "default": () => (/* binding */ Backend)
24937
25025
  /* harmony export */ });
24938
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js");
24939
- /* harmony import */ var _request_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./request.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js");
24940
- 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); }
24941
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24942
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24943
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
24944
- 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); } }
24945
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
24946
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
24947
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24948
- 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); }
24949
- ;
24950
-
24951
- var getDefaults = function getDefaults() {
24952
- return {
24953
- loadPath: '/locales/{{lng}}/{{ns}}.json',
24954
- addPath: '/locales/add/{{lng}}/{{ns}}',
24955
- parse: function parse(data) {
24956
- return JSON.parse(data);
24957
- },
24958
- stringify: JSON.stringify,
24959
- parsePayload: function parsePayload(namespace, key, fallbackValue) {
24960
- return _defineProperty({}, key, fallbackValue || '');
24961
- },
24962
- parseLoadPayload: function parseLoadPayload(languages, namespaces) {
24963
- return undefined;
24964
- },
24965
- request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
24966
- reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
24967
- customHeaders: {},
24968
- queryStringParams: {},
24969
- crossDomain: false,
24970
- withCredentials: false,
24971
- overrideMimeType: false,
24972
- requestOptions: {
24973
- mode: 'cors',
24974
- credentials: 'same-origin',
24975
- cache: 'default'
24976
- }
24977
- };
24978
- };
24979
- var Backend = function () {
24980
- function Backend(services) {
24981
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
24982
- var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
24983
- _classCallCheck(this, Backend);
24984
- this.services = services;
24985
- this.options = options;
24986
- this.allOptions = allOptions;
24987
- this.type = 'backend';
24988
- this.init(services, options, allOptions);
24989
- }
24990
- return _createClass(Backend, [{
24991
- key: "init",
24992
- value: function init(services) {
24993
- var _this = this;
24994
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
24995
- var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
24996
- this.services = services;
24997
- this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options || {}), options);
24998
- this.allOptions = allOptions;
24999
- if (this.services && this.options.reloadInterval) {
25000
- var timer = setInterval(function () {
25001
- return _this.reload();
25002
- }, this.options.reloadInterval);
25003
- if (_typeof(timer) === 'object' && typeof timer.unref === 'function') timer.unref();
25004
- }
25005
- }
25006
- }, {
25007
- key: "readMulti",
25008
- value: function readMulti(languages, namespaces, callback) {
25009
- this._readAny(languages, languages, namespaces, namespaces, callback);
25010
- }
25011
- }, {
25012
- key: "read",
25013
- value: function read(language, namespace, callback) {
25014
- this._readAny([language], language, [namespace], namespace, callback);
25015
- }
25016
- }, {
25017
- key: "_readAny",
25018
- value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
25019
- var _this2 = this;
25020
- var loadPath = this.options.loadPath;
25021
- if (typeof this.options.loadPath === 'function') {
25022
- loadPath = this.options.loadPath(languages, namespaces);
25023
- }
25024
- loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
25025
- loadPath.then(function (resolvedLoadPath) {
25026
- if (!resolvedLoadPath) return callback(null, {});
25027
- var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(resolvedLoadPath, {
25028
- lng: languages.join('+'),
25029
- ns: namespaces.join('+')
25030
- });
25031
- if (url == null) {
25032
- var safeLngs = languages.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
25033
- var safeNss = namespaces.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
25034
- return callback(new Error('i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[' + safeLngs + '] namespaces=[' + safeNss + ']'), false);
25035
- }
25036
- _this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
25037
- });
25038
- }
25039
- }, {
25040
- key: "loadUrl",
25041
- value: function loadUrl(url, callback, languages, namespaces) {
25042
- var _this3 = this;
25043
- var lng = typeof languages === 'string' ? [languages] : languages;
25044
- var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;
25045
- var payload = this.options.parseLoadPayload(lng, ns);
25046
- var safeUrl = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.redactUrlCredentials)(url));
25047
- this.options.request(this.options, url, payload, function (err, res) {
25048
- if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, true);
25049
- if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, false);
25050
- if (!res && err && err.message) {
25051
- var errorMessage = err.message.toLowerCase();
25052
- var isNetworkError = ['failed', 'fetch', 'network', 'load'].find(function (term) {
25053
- return errorMessage.indexOf(term) > -1;
25054
- });
25055
- if (isNetworkError) {
25056
- return callback('failed loading ' + safeUrl + ': ' + (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)(err.message), true);
25057
- }
25058
- }
25059
- if (err) return callback(err, false);
25060
- var ret, parseErr;
25061
- try {
25062
- if (typeof res.data === 'string') {
25063
- ret = _this3.options.parse(res.data, languages, namespaces);
25064
- } else {
25065
- ret = res.data;
25066
- }
25067
- } catch (e) {
25068
- parseErr = 'failed parsing ' + safeUrl + ' to json';
25069
- }
25070
- if (parseErr) return callback(parseErr, false);
25071
- callback(null, ret);
25072
- });
25073
- }
25074
- }, {
25075
- key: "create",
25076
- value: function create(languages, namespace, key, fallbackValue, callback) {
25077
- var _this4 = this;
25078
- if (!this.options.addPath) return;
25079
- if (typeof languages === 'string') languages = [languages];
25080
- var payload = this.options.parsePayload(namespace, key, fallbackValue);
25081
- var finished = 0;
25082
- var dataArray = [];
25083
- var resArray = [];
25084
- languages.forEach(function (lng) {
25085
- var addPath = _this4.options.addPath;
25086
- if (typeof _this4.options.addPath === 'function') {
25087
- addPath = _this4.options.addPath(lng, namespace);
25088
- }
25089
- var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(addPath, {
25090
- lng: lng,
25091
- ns: namespace
25092
- });
25093
- if (url == null) {
25094
- finished += 1;
25095
- if (callback && finished === languages.length) callback(dataArray, resArray);
25096
- return;
25097
- }
25098
- _this4.options.request(_this4.options, url, payload, function (data, res) {
25099
- finished += 1;
25100
- dataArray.push(data);
25101
- resArray.push(res);
25102
- if (finished === languages.length) {
25103
- if (typeof callback === 'function') callback(dataArray, resArray);
25104
- }
25105
- });
25106
- });
25107
- }
25108
- }, {
25109
- key: "reload",
25110
- value: function reload() {
25111
- var _this5 = this;
25112
- var _this$services = this.services,
25113
- backendConnector = _this$services.backendConnector,
25114
- languageUtils = _this$services.languageUtils,
25115
- logger = _this$services.logger;
25116
- var currentLanguage = backendConnector.language;
25117
- if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
25118
- var toLoad = [];
25119
- var append = function append(lng) {
25120
- var lngs = languageUtils.toResolveHierarchy(lng);
25121
- lngs.forEach(function (l) {
25122
- if (toLoad.indexOf(l) < 0) toLoad.push(l);
25123
- });
25124
- };
25125
- append(currentLanguage);
25126
- if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
25127
- return append(l);
25128
- });
25129
- toLoad.forEach(function (lng) {
25130
- _this5.allOptions.ns.forEach(function (ns) {
25131
- backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
25132
- if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
25133
- if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
25134
- backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
25135
- });
25136
- });
25137
- });
25138
- }
25139
- }]);
25140
- }();
25141
- Backend.type = 'backend';
25142
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
25143
-
25144
- /***/ },
25145
-
25146
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js"
25147
- /*!************************************************************************************************************************!*\
25148
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js ***!
25149
- \************************************************************************************************************************/
25150
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25151
-
25152
- "use strict";
25153
- __webpack_require__.r(__webpack_exports__);
25154
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25155
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
25156
- /* harmony export */ });
25157
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js");
25158
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25159
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25160
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25161
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
25162
- 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); }
25163
- 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); }
25164
- ;
25165
- var fetchApi = typeof fetch === 'function' ? fetch : undefined;
25166
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
25167
- fetchApi = __webpack_require__.g.fetch;
25168
- } else if (typeof window !== 'undefined' && window.fetch) {
25169
- fetchApi = window.fetch;
25170
- }
25171
- var XmlHttpRequestApi;
25172
- if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
25173
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.XMLHttpRequest) {
25174
- XmlHttpRequestApi = __webpack_require__.g.XMLHttpRequest;
25175
- } else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
25176
- XmlHttpRequestApi = window.XMLHttpRequest;
25177
- }
25178
- }
25179
- var ActiveXObjectApi;
25180
- if (typeof ActiveXObject === 'function') {
25181
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.ActiveXObject) {
25182
- ActiveXObjectApi = __webpack_require__.g.ActiveXObject;
25183
- } else if (typeof window !== 'undefined' && window.ActiveXObject) {
25184
- ActiveXObjectApi = window.ActiveXObject;
25185
- }
25186
- }
25187
- if (typeof fetchApi !== 'function') fetchApi = undefined;
25188
- if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
25189
- try {
25190
- __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f").then(() => (__webpack_require__.t(/*! cross-fetch */ "../../common/temp/node_modules/.pnpm/cross-fetch@4.1.0/node_modules/cross-fetch/dist/browser-ponyfill.js", 19))).then(function (mod) {
25191
- fetchApi = mod.default;
25192
- }).catch(function () {});
25193
- } catch (e) {}
25194
- }
25195
- var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
25196
- var addQueryString = function addQueryString(url, params) {
25197
- if (params && _typeof(params) === 'object') {
25198
- var queryString = '';
25199
- for (var _i = 0, _Object$keys = Object.keys(params); _i < _Object$keys.length; _i++) {
25200
- var paramName = _Object$keys[_i];
25201
- if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
25202
- queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
25203
- }
25204
- if (!queryString) return url;
25205
- url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
25206
- }
25207
- return url;
25208
- };
25209
- var fetchIt = function fetchIt(url, fetchOptions, callback, altFetch) {
25210
- var resolver = function resolver(response) {
25211
- if (!response.ok) return callback(response.statusText || 'Error', {
25212
- status: response.status
25213
- });
25214
- response.text().then(function (data) {
25215
- callback(null, {
25216
- status: response.status,
25217
- data: data
25218
- });
25219
- }).catch(callback);
25220
- };
25221
- if (altFetch) {
25222
- var altResponse = altFetch(url, fetchOptions);
25223
- if (altResponse instanceof Promise) {
25224
- altResponse.then(resolver).catch(callback);
25225
- return;
25226
- }
25227
- }
25228
- if (typeof fetch === 'function') {
25229
- fetch(url, fetchOptions).then(resolver).catch(callback);
25230
- } else {
25231
- fetchApi(url, fetchOptions).then(resolver).catch(callback);
25232
- }
25233
- };
25234
- var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
25235
- if (options.queryStringParams) {
25236
- url = addQueryString(url, options.queryStringParams);
25237
- }
25238
- var headers = _objectSpread({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
25239
- if (typeof window === 'undefined' && typeof __webpack_require__.g !== 'undefined' && typeof __webpack_require__.g.process !== 'undefined' && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) {
25240
- headers['User-Agent'] = "i18next-http-backend (node/".concat(__webpack_require__.g.process.version, "; ").concat(__webpack_require__.g.process.platform, " ").concat(__webpack_require__.g.process.arch, ")");
25241
- }
25242
- if (payload) headers['Content-Type'] = 'application/json';
25243
- var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
25244
- var fetchOptions = _objectSpread({
25245
- method: payload ? 'POST' : 'GET',
25246
- body: payload ? options.stringify(payload) : undefined,
25247
- headers: headers
25248
- }, options._omitFetchOptions ? {} : reqOptions);
25249
- var altFetch = typeof options.alternateFetch === 'function' && options.alternateFetch.length >= 1 ? options.alternateFetch : undefined;
25250
- try {
25251
- fetchIt(url, fetchOptions, callback, altFetch);
25252
- } catch (e) {
25253
- if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
25254
- return callback(e);
25255
- }
25256
- try {
25257
- Object.keys(reqOptions).forEach(function (opt) {
25258
- delete fetchOptions[opt];
25259
- });
25260
- fetchIt(url, fetchOptions, callback, altFetch);
25261
- options._omitFetchOptions = true;
25262
- } catch (err) {
25263
- callback(err);
25264
- }
25265
- }
25266
- };
25267
- var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
25268
- if (payload && _typeof(payload) === 'object') {
25269
- payload = addQueryString('', payload).slice(1);
25270
- }
25271
- if (options.queryStringParams) {
25272
- url = addQueryString(url, options.queryStringParams);
25273
- }
25274
- try {
25275
- var x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
25276
- x.open(payload ? 'POST' : 'GET', url, 1);
25277
- if (!options.crossDomain) {
25278
- x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
25279
- }
25280
- x.withCredentials = !!options.withCredentials;
25281
- if (payload) {
25282
- x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
25283
- }
25284
- if (x.overrideMimeType) {
25285
- x.overrideMimeType('application/json');
25286
- }
25287
- var h = options.customHeaders;
25288
- h = typeof h === 'function' ? h() : h;
25289
- if (h) {
25290
- for (var _i2 = 0, _Object$keys2 = Object.keys(h); _i2 < _Object$keys2.length; _i2++) {
25291
- var i = _Object$keys2[_i2];
25292
- if (UNSAFE_KEYS.indexOf(i) > -1) continue;
25293
- x.setRequestHeader(i, h[i]);
25294
- }
25295
- }
25296
- x.onreadystatechange = function () {
25297
- x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
25298
- status: x.status,
25299
- data: x.responseText
25300
- });
25301
- };
25302
- x.send(payload);
25303
- } catch (e) {
25304
- console && console.log(e);
25305
- }
25306
- };
25307
- var request = function request(options, url, payload, callback) {
25308
- if (typeof payload === 'function') {
25309
- callback = payload;
25310
- payload = undefined;
25311
- }
25312
- callback = callback || function () {};
25313
- if (fetchApi && url.indexOf('file:') !== 0) {
25314
- return requestWithFetch(options, url, payload, callback);
25315
- }
25316
- if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
25317
- return requestWithXmlHttpRequest(options, url, payload, callback);
25318
- }
25319
- callback(new Error('No fetch and no xhr implementation found!'));
25320
- };
25321
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
25322
-
25323
- /***/ },
25324
-
25325
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js"
25326
- /*!**********************************************************************************************************************!*\
25327
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js ***!
25328
- \**********************************************************************************************************************/
25329
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25330
-
25331
- "use strict";
25332
- __webpack_require__.r(__webpack_exports__);
25333
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25334
- /* harmony export */ defaults: () => (/* binding */ defaults),
25335
- /* harmony export */ hasXMLHttpRequest: () => (/* binding */ hasXMLHttpRequest),
25336
- /* harmony export */ interpolate: () => (/* binding */ interpolate),
25337
- /* harmony export */ interpolateUrl: () => (/* binding */ interpolateUrl),
25338
- /* harmony export */ isSafeLangUrlSegment: () => (/* binding */ isSafeLangUrlSegment),
25339
- /* harmony export */ isSafeNsUrlSegment: () => (/* binding */ isSafeNsUrlSegment),
25340
- /* harmony export */ isSafeUrlSegment: () => (/* binding */ isSafeUrlSegment),
25341
- /* harmony export */ makePromise: () => (/* binding */ makePromise),
25342
- /* harmony export */ redactUrlCredentials: () => (/* binding */ redactUrlCredentials),
25343
- /* harmony export */ sanitizeLogValue: () => (/* binding */ sanitizeLogValue)
25344
- /* harmony export */ });
25345
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
25346
- 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; } }
25347
- 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; }
25348
- 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); }
25349
- var arr = [];
25350
- var each = arr.forEach;
25351
- var slice = arr.slice;
25352
- var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
25353
- function defaults(obj) {
25354
- each.call(slice.call(arguments, 1), function (source) {
25355
- if (source) {
25356
- for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
25357
- var prop = _Object$keys[_i];
25358
- if (UNSAFE_KEYS.indexOf(prop) > -1) continue;
25359
- if (obj[prop] === undefined) obj[prop] = source[prop];
25360
- }
25361
- }
25362
- });
25363
- return obj;
25364
- }
25026
+ //#region lib/utils.js
25027
+ const arr = [];
25028
+ arr.forEach;
25029
+ arr.slice;
25030
+ const UNSAFE_KEYS$1 = [
25031
+ "__proto__",
25032
+ "constructor",
25033
+ "prototype"
25034
+ ];
25365
25035
  function isSafeUrlSegmentBase(v) {
25366
- if (typeof v !== 'string') return false;
25367
- if (v.length === 0 || v.length > 128) return false;
25368
- if (UNSAFE_KEYS.indexOf(v) > -1) return false;
25369
- if (v.indexOf('..') > -1) return false;
25370
- if (v.indexOf('\\') > -1) return false;
25371
- if (/[?#%\s@]/.test(v)) return false;
25372
- if (/[\x00-\x1F\x7F]/.test(v)) return false;
25373
- return true;
25036
+ if (typeof v !== "string") return false;
25037
+ if (v.length === 0 || v.length > 128) return false;
25038
+ if (UNSAFE_KEYS$1.indexOf(v) > -1) return false;
25039
+ if (v.indexOf("..") > -1) return false;
25040
+ if (v.indexOf("\\") > -1) return false;
25041
+ if (/[?#%:&=;\s]/.test(v)) return false;
25042
+ if (/[\x00-\x1F\x7F]/.test(v)) return false;
25043
+ return true;
25374
25044
  }
25375
25045
  function isSafeLangUrlSegment(v) {
25376
- if (!isSafeUrlSegmentBase(v)) return false;
25377
- if (v.indexOf('/') > -1) return false;
25378
- return true;
25046
+ if (!isSafeUrlSegmentBase(v)) return false;
25047
+ if (v.indexOf("/") > -1 || v.indexOf("@") > -1) return false;
25048
+ return true;
25379
25049
  }
25380
25050
  function isSafeNsUrlSegment(v) {
25381
- return isSafeUrlSegmentBase(v);
25051
+ if (!isSafeUrlSegmentBase(v)) return false;
25052
+ if (v.indexOf("//") > -1) return false;
25053
+ return true;
25382
25054
  }
25383
- var isSafeUrlSegment = isSafeLangUrlSegment;
25384
- var SAFETY_CHECK_BY_KEY = {
25385
- lng: isSafeLangUrlSegment,
25386
- ns: isSafeNsUrlSegment
25055
+ const SAFETY_CHECK_BY_KEY = {
25056
+ lng: isSafeLangUrlSegment,
25057
+ ns: isSafeNsUrlSegment
25387
25058
  };
25388
25059
  function sanitizeLogValue(v) {
25389
- if (typeof v !== 'string') return v;
25390
- return v.replace(/[\r\n\x00-\x1F\x7F]/g, ' ');
25060
+ if (typeof v !== "string") return v;
25061
+ return v.replace(/[\r\n\x00-\x1F\x7F]/g, " ");
25391
25062
  }
25392
25063
  function redactUrlCredentials(u) {
25393
- if (typeof u !== 'string' || u.length === 0) return u;
25394
- try {
25395
- var parsed = new URL(u);
25396
- if (parsed.username || parsed.password) {
25397
- parsed.username = '';
25398
- parsed.password = '';
25399
- return parsed.toString();
25400
- }
25401
- return u;
25402
- } catch (e) {
25403
- return u.replace(/(\/\/)[^/@\s]+@/g, '$1');
25404
- }
25064
+ if (typeof u !== "string" || u.length === 0) return u;
25065
+ try {
25066
+ const parsed = new URL(u);
25067
+ if (parsed.username || parsed.password) {
25068
+ parsed.username = "";
25069
+ parsed.password = "";
25070
+ return parsed.toString();
25071
+ }
25072
+ return u;
25073
+ } catch (e) {
25074
+ return u.replace(/(\/\/)[^/@\s]+@/g, "$1");
25075
+ }
25405
25076
  }
25406
25077
  function hasXMLHttpRequest() {
25407
- return typeof XMLHttpRequest === 'function' || (typeof XMLHttpRequest === "undefined" ? "undefined" : _typeof(XMLHttpRequest)) === 'object';
25078
+ return typeof XMLHttpRequest === "function" || typeof XMLHttpRequest === "object";
25408
25079
  }
25080
+ /**
25081
+ * Determine whether the given `maybePromise` is a Promise.
25082
+ *
25083
+ * @param {*} maybePromise
25084
+ *
25085
+ * @returns {Boolean}
25086
+ */
25409
25087
  function isPromise(maybePromise) {
25410
- return !!maybePromise && typeof maybePromise.then === 'function';
25088
+ return !!maybePromise && typeof maybePromise.then === "function";
25411
25089
  }
25090
+ /**
25091
+ * Convert any value to a Promise than will resolve to this value.
25092
+ *
25093
+ * @param {*} maybePromise
25094
+ *
25095
+ * @returns {Promise}
25096
+ */
25412
25097
  function makePromise(maybePromise) {
25413
- if (isPromise(maybePromise)) {
25414
- return maybePromise;
25415
- }
25416
- return Promise.resolve(maybePromise);
25417
- }
25418
- var interpolationRegexp = /\{\{(.+?)\}\}/g;
25419
- function interpolate(str, data) {
25420
- return str.replace(interpolationRegexp, function (match, key) {
25421
- var k = key.trim();
25422
- if (UNSAFE_KEYS.indexOf(k) > -1) return match;
25423
- var value = data[k];
25424
- return value != null ? value : match;
25425
- });
25098
+ if (isPromise(maybePromise)) return maybePromise;
25099
+ return Promise.resolve(maybePromise);
25426
25100
  }
25101
+ const interpolationRegexp = /\{\{(.+?)\}\}/g;
25102
+ const LEADING_DOUBLE_SLASH = /^[/\\]{2}/;
25427
25103
  function interpolateUrl(str, data) {
25428
- var unsafe = false;
25429
- var result = str.replace(interpolationRegexp, function (match, key) {
25430
- var k = key.trim();
25431
- if (UNSAFE_KEYS.indexOf(k) > -1) return match;
25432
- var value = data[k];
25433
- if (value == null) return match;
25434
- var check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
25435
- var segments = String(value).split('+');
25436
- var _iterator = _createForOfIteratorHelper(segments),
25437
- _step;
25438
- try {
25439
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
25440
- var seg = _step.value;
25441
- if (!check(seg)) {
25442
- unsafe = true;
25443
- return match;
25444
- }
25445
- }
25446
- } catch (err) {
25447
- _iterator.e(err);
25448
- } finally {
25449
- _iterator.f();
25450
- }
25451
- return segments.join('+');
25452
- });
25453
- return unsafe ? null : result;
25104
+ let unsafe = false;
25105
+ const result = str.replace(interpolationRegexp, (match, key) => {
25106
+ const k = key.trim();
25107
+ if (UNSAFE_KEYS$1.indexOf(k) > -1) return match;
25108
+ const value = data[k];
25109
+ if (value == null) return match;
25110
+ const check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
25111
+ const segments = String(value).split("+");
25112
+ for (const seg of segments) if (!check(seg)) {
25113
+ unsafe = true;
25114
+ return match;
25115
+ }
25116
+ return segments.join("+");
25117
+ });
25118
+ if (unsafe) return null;
25119
+ if (LEADING_DOUBLE_SLASH.test(result) && !LEADING_DOUBLE_SLASH.test(str)) return null;
25120
+ return result;
25454
25121
  }
25122
+ //#endregion
25123
+ //#region lib/request.js
25124
+ const g = typeof globalThis !== "undefined" ? globalThis : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : void 0;
25125
+ let fetchApi;
25126
+ if (typeof fetch === "function") fetchApi = fetch;
25127
+ else if (g && typeof g.fetch === "function") fetchApi = g.fetch;
25128
+ const XmlHttpRequestApi = hasXMLHttpRequest() && g ? g.XMLHttpRequest : void 0;
25129
+ const ActiveXObjectApi = typeof ActiveXObject === "function" && g ? g.ActiveXObject : void 0;
25130
+ const UNSAFE_KEYS = [
25131
+ "__proto__",
25132
+ "constructor",
25133
+ "prototype"
25134
+ ];
25135
+ const addQueryString = (url, params) => {
25136
+ if (params && typeof params === "object") {
25137
+ let queryString = "";
25138
+ for (const paramName of Object.keys(params)) {
25139
+ if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
25140
+ queryString += "&" + encodeURIComponent(paramName) + "=" + encodeURIComponent(params[paramName]);
25141
+ }
25142
+ if (!queryString) return url;
25143
+ url = url + (url.indexOf("?") !== -1 ? "&" : "?") + queryString.slice(1);
25144
+ }
25145
+ return url;
25146
+ };
25147
+ const fetchIt = (url, fetchOptions, callback, altFetch) => {
25148
+ const resolver = (response) => {
25149
+ if (!response.ok) return callback(response.statusText || "Error", { status: response.status });
25150
+ response.text().then((data) => {
25151
+ callback(null, {
25152
+ status: response.status,
25153
+ data
25154
+ });
25155
+ }).catch(callback);
25156
+ };
25157
+ if (altFetch) {
25158
+ const altResponse = altFetch(url, fetchOptions);
25159
+ if (altResponse instanceof Promise) {
25160
+ altResponse.then(resolver).catch(callback);
25161
+ return;
25162
+ }
25163
+ }
25164
+ if (typeof fetch === "function") fetch(url, fetchOptions).then(resolver).catch(callback);
25165
+ else fetchApi(url, fetchOptions).then(resolver).catch(callback);
25166
+ };
25167
+ const requestWithFetch = (options, url, payload, callback) => {
25168
+ if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
25169
+ const headers = { ...typeof options.customHeaders === "function" ? options.customHeaders() : options.customHeaders };
25170
+ if (typeof window === "undefined" && typeof __webpack_require__.g !== "undefined" && typeof __webpack_require__.g.process !== "undefined" && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) headers["User-Agent"] = `i18next-http-backend (node/${__webpack_require__.g.process.version}; ${__webpack_require__.g.process.platform} ${__webpack_require__.g.process.arch})`;
25171
+ if (payload) headers["Content-Type"] = "application/json";
25172
+ const reqOptions = typeof options.requestOptions === "function" ? options.requestOptions(payload) : options.requestOptions;
25173
+ const fetchOptions = {
25174
+ method: payload ? "POST" : "GET",
25175
+ body: payload ? options.stringify(payload) : void 0,
25176
+ headers,
25177
+ ...options._omitFetchOptions ? {} : reqOptions
25178
+ };
25179
+ const altFetch = typeof options.alternateFetch === "function" && options.alternateFetch.length >= 1 ? options.alternateFetch : void 0;
25180
+ try {
25181
+ fetchIt(url, fetchOptions, callback, altFetch);
25182
+ } catch (e) {
25183
+ if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf("not implemented") < 0) return callback(e);
25184
+ try {
25185
+ Object.keys(reqOptions).forEach((opt) => {
25186
+ delete fetchOptions[opt];
25187
+ });
25188
+ fetchIt(url, fetchOptions, callback, altFetch);
25189
+ options._omitFetchOptions = true;
25190
+ } catch (err) {
25191
+ callback(err);
25192
+ }
25193
+ }
25194
+ };
25195
+ const requestWithXmlHttpRequest = (options, url, payload, callback) => {
25196
+ if (payload && typeof payload === "object") payload = addQueryString("", payload).slice(1);
25197
+ if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
25198
+ try {
25199
+ const x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");
25200
+ x.open(payload ? "POST" : "GET", url, 1);
25201
+ if (!options.crossDomain) x.setRequestHeader("X-Requested-With", "XMLHttpRequest");
25202
+ x.withCredentials = !!options.withCredentials;
25203
+ if (payload) x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
25204
+ if (x.overrideMimeType) x.overrideMimeType("application/json");
25205
+ let h = options.customHeaders;
25206
+ h = typeof h === "function" ? h() : h;
25207
+ if (h) for (const i of Object.keys(h)) {
25208
+ if (UNSAFE_KEYS.indexOf(i) > -1) continue;
25209
+ x.setRequestHeader(i, h[i]);
25210
+ }
25211
+ x.onreadystatechange = () => {
25212
+ x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
25213
+ status: x.status,
25214
+ data: x.responseText
25215
+ });
25216
+ };
25217
+ x.send(payload);
25218
+ } catch (e) {
25219
+ console && console.log(e);
25220
+ }
25221
+ };
25222
+ const request = (options, url, payload, callback) => {
25223
+ if (typeof payload === "function") {
25224
+ callback = payload;
25225
+ payload = void 0;
25226
+ }
25227
+ callback = callback || (() => {});
25228
+ if (fetchApi && url.indexOf("file:") !== 0) return requestWithFetch(options, url, payload, callback);
25229
+ if (hasXMLHttpRequest() || typeof ActiveXObject === "function") return requestWithXmlHttpRequest(options, url, payload, callback);
25230
+ callback(/* @__PURE__ */ new Error("No fetch and no xhr implementation found!"));
25231
+ };
25232
+ //#endregion
25233
+ //#region lib/index.js
25234
+ const getDefaults = () => {
25235
+ return {
25236
+ loadPath: "/locales/{{lng}}/{{ns}}.json",
25237
+ addPath: "/locales/add/{{lng}}/{{ns}}",
25238
+ parse: (data) => JSON.parse(data),
25239
+ stringify: JSON.stringify,
25240
+ parsePayload: (namespace, key, fallbackValue) => ({ [key]: fallbackValue || "" }),
25241
+ parseLoadPayload: (languages, namespaces) => void 0,
25242
+ request,
25243
+ reloadInterval: typeof window !== "undefined" ? false : 3600 * 1e3,
25244
+ customHeaders: {},
25245
+ queryStringParams: {},
25246
+ crossDomain: false,
25247
+ withCredentials: false,
25248
+ overrideMimeType: false,
25249
+ requestOptions: {
25250
+ mode: "cors",
25251
+ credentials: "same-origin",
25252
+ cache: "default"
25253
+ }
25254
+ };
25255
+ };
25256
+ var Backend = class {
25257
+ constructor(services, options = {}, allOptions = {}) {
25258
+ this.services = services;
25259
+ this.options = options;
25260
+ this.allOptions = allOptions;
25261
+ this.type = "backend";
25262
+ this.init(services, options, allOptions);
25263
+ }
25264
+ init(services, options = {}, allOptions = {}) {
25265
+ this.services = services;
25266
+ this.options = {
25267
+ ...getDefaults(),
25268
+ ...this.options || {},
25269
+ ...options
25270
+ };
25271
+ this.allOptions = allOptions;
25272
+ if (this.services && this.options.reloadInterval) {
25273
+ const timer = setInterval(() => this.reload(), this.options.reloadInterval);
25274
+ if (typeof timer === "object" && typeof timer.unref === "function") timer.unref();
25275
+ }
25276
+ }
25277
+ readMulti(languages, namespaces, callback) {
25278
+ this._readAny(languages, languages, namespaces, namespaces, callback);
25279
+ }
25280
+ read(language, namespace, callback) {
25281
+ this._readAny([language], language, [namespace], namespace, callback);
25282
+ }
25283
+ _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
25284
+ let loadPath = this.options.loadPath;
25285
+ if (typeof this.options.loadPath === "function") loadPath = this.options.loadPath(languages, namespaces);
25286
+ loadPath = makePromise(loadPath);
25287
+ loadPath.then((resolvedLoadPath) => {
25288
+ if (!resolvedLoadPath) return callback(null, {});
25289
+ const url = interpolateUrl(resolvedLoadPath, {
25290
+ lng: languages.join("+"),
25291
+ ns: namespaces.join("+")
25292
+ });
25293
+ if (url == null) {
25294
+ const safeLngs = languages.map(sanitizeLogValue).join(", ");
25295
+ const safeNss = namespaces.map(sanitizeLogValue).join(", ");
25296
+ return callback(/* @__PURE__ */ new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + safeLngs + "] namespaces=[" + safeNss + "]"), false);
25297
+ }
25298
+ this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
25299
+ }, (err) => callback(err, false));
25300
+ }
25301
+ loadUrl(url, callback, languages, namespaces) {
25302
+ const lng = typeof languages === "string" ? [languages] : languages;
25303
+ const ns = typeof namespaces === "string" ? [namespaces] : namespaces;
25304
+ const payload = this.options.parseLoadPayload(lng, ns);
25305
+ const safeUrl = sanitizeLogValue(redactUrlCredentials(url));
25306
+ this.options.request(this.options, url, payload, (err, res) => {
25307
+ if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback("failed loading " + safeUrl + "; status code: " + res.status, true);
25308
+ if (res && res.status >= 400 && res.status < 500) return callback("failed loading " + safeUrl + "; status code: " + res.status, false);
25309
+ if (!res && err && err.message) {
25310
+ const errorMessage = err.message.toLowerCase();
25311
+ if ([
25312
+ "failed",
25313
+ "fetch",
25314
+ "network",
25315
+ "load"
25316
+ ].find((term) => errorMessage.indexOf(term) > -1)) return callback("failed loading " + safeUrl + ": " + sanitizeLogValue(err.message), true);
25317
+ }
25318
+ if (err) return callback(err, false);
25319
+ let ret, parseErr;
25320
+ try {
25321
+ if (typeof res.data === "string") ret = this.options.parse(res.data, languages, namespaces);
25322
+ else ret = res.data;
25323
+ } catch (e) {
25324
+ parseErr = "failed parsing " + safeUrl + " to json";
25325
+ }
25326
+ if (parseErr) return callback(parseErr, false);
25327
+ callback(null, ret);
25328
+ });
25329
+ }
25330
+ create(languages, namespace, key, fallbackValue, callback) {
25331
+ if (!this.options.addPath) return;
25332
+ if (typeof languages === "string") languages = [languages];
25333
+ const payload = this.options.parsePayload(namespace, key, fallbackValue);
25334
+ let finished = 0;
25335
+ const dataArray = [];
25336
+ const resArray = [];
25337
+ languages.forEach((lng) => {
25338
+ let addPath = this.options.addPath;
25339
+ if (typeof this.options.addPath === "function") addPath = this.options.addPath(lng, namespace);
25340
+ const url = interpolateUrl(addPath, {
25341
+ lng,
25342
+ ns: namespace
25343
+ });
25344
+ if (url == null) {
25345
+ finished += 1;
25346
+ if (callback && finished === languages.length) callback(dataArray, resArray);
25347
+ return;
25348
+ }
25349
+ this.options.request(this.options, url, payload, (data, res) => {
25350
+ finished += 1;
25351
+ dataArray.push(data);
25352
+ resArray.push(res);
25353
+ if (finished === languages.length) {
25354
+ if (typeof callback === "function") callback(dataArray, resArray);
25355
+ }
25356
+ });
25357
+ });
25358
+ }
25359
+ reload() {
25360
+ const { backendConnector, languageUtils, logger } = this.services;
25361
+ const currentLanguage = backendConnector.language;
25362
+ if (currentLanguage && currentLanguage.toLowerCase() === "cimode") return;
25363
+ const toLoad = [];
25364
+ const append = (lng) => {
25365
+ languageUtils.toResolveHierarchy(lng).forEach((l) => {
25366
+ if (toLoad.indexOf(l) < 0) toLoad.push(l);
25367
+ });
25368
+ };
25369
+ append(currentLanguage);
25370
+ if (this.allOptions.preload) this.allOptions.preload.forEach((l) => append(l));
25371
+ toLoad.forEach((lng) => {
25372
+ this.allOptions.ns.forEach((ns) => {
25373
+ backendConnector.read(lng, ns, "read", null, null, (err, data) => {
25374
+ if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err);
25375
+ if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data);
25376
+ backendConnector.loaded(`${lng}|${ns}`, err, data);
25377
+ });
25378
+ });
25379
+ });
25380
+ }
25381
+ };
25382
+ Backend.type = "backend";
25383
+ //#endregion
25384
+
25385
+
25455
25386
 
25456
25387
  /***/ }
25457
25388
 
@@ -25487,40 +25418,7 @@ function interpolateUrl(str, data) {
25487
25418
  /******/ return module.exports;
25488
25419
  /******/ }
25489
25420
  /******/
25490
- /******/ // expose the modules object (__webpack_modules__)
25491
- /******/ __webpack_require__.m = __webpack_modules__;
25492
- /******/
25493
25421
  /************************************************************************/
25494
- /******/ /* webpack/runtime/create fake namespace object */
25495
- /******/ (() => {
25496
- /******/ const getProto = Object.getPrototypeOf;
25497
- /******/ let leafPrototypes;
25498
- /******/ // create a fake namespace object
25499
- /******/ // mode & 1: value is a module id, require it
25500
- /******/ // mode & 2: merge all properties of value into the ns
25501
- /******/ // mode & 4: return value when already ns object
25502
- /******/ // mode & 16: return value when it's Promise-like
25503
- /******/ // mode & 8|1: behave like require
25504
- /******/ __webpack_require__.t = function(value, mode) {
25505
- /******/ if(mode & 1) value = this(value);
25506
- /******/ if(mode & 8) return value;
25507
- /******/ if(typeof value === 'object' && value) {
25508
- /******/ if((mode & 4) && value.__esModule) return value;
25509
- /******/ if((mode & 16) && typeof value.then === 'function') return value;
25510
- /******/ }
25511
- /******/ const ns = Object.create(null);
25512
- /******/ __webpack_require__.r(ns);
25513
- /******/ const def = {};
25514
- /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
25515
- /******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
25516
- /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
25517
- /******/ }
25518
- /******/ def['default'] = () => (value);
25519
- /******/ __webpack_require__.d(ns, def);
25520
- /******/ return ns;
25521
- /******/ };
25522
- /******/ })();
25523
- /******/
25524
25422
  /******/ /* webpack/runtime/define property getters */
25525
25423
  /******/ // define getter/value functions for harmony exports
25526
25424
  /******/ __webpack_require__.d = (exports, definition) => {
@@ -25531,20 +25429,6 @@ function interpolateUrl(str, data) {
25531
25429
  /******/ }
25532
25430
  /******/ };
25533
25431
  /******/
25534
- /******/ /* webpack/runtime/ensure chunk */
25535
- /******/ __webpack_require__.f = {};
25536
- /******/ // This file contains only the entry chunk.
25537
- /******/ // The chunk loading function for additional chunks
25538
- /******/ __webpack_require__.e = (chunkId) => {
25539
- /******/ const promises = [];
25540
- /******/ __webpack_require__.f.j(chunkId, promises);
25541
- /******/ return Promise.all(promises);
25542
- /******/ };
25543
- /******/
25544
- /******/ /* webpack/runtime/get javascript chunk filename */
25545
- /******/ // This function allow to reference async chunks
25546
- /******/ __webpack_require__.u = (chunkId) => (chunkId + ".bundled-tests.instrumented.js");
25547
- /******/
25548
25432
  /******/ /* webpack/runtime/global */
25549
25433
  /******/ __webpack_require__.g = (function() {
25550
25434
  /******/ if (typeof globalThis === 'object') return globalThis;
@@ -25558,51 +25442,6 @@ function interpolateUrl(str, data) {
25558
25442
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
25559
25443
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
25560
25444
  /******/
25561
- /******/ /* webpack/runtime/load script */
25562
- /******/ (() => {
25563
- /******/ const inProgress = {};
25564
- /******/ const dataWebpackPrefix = "@itwin/core-i18n:";
25565
- /******/ // loadScript function to load a script via script tag
25566
- /******/ __webpack_require__.l = (url, done, key, chunkId) => {
25567
- /******/ if(inProgress[url]) { inProgress[url].push(done); return; }
25568
- /******/ let script, needAttach;
25569
- /******/ if(key !== undefined) {
25570
- /******/ const scripts = document.getElementsByTagName("script");
25571
- /******/ for(var i = 0; i < scripts.length; i++) {
25572
- /******/ const s = scripts[i];
25573
- /******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
25574
- /******/ }
25575
- /******/ }
25576
- /******/ if(!script) {
25577
- /******/ needAttach = true;
25578
- /******/ script = document.createElement('script');
25579
- /******/
25580
- /******/ script.charset = 'utf-8';
25581
- /******/ if (__webpack_require__.nc) {
25582
- /******/ script.setAttribute("nonce", __webpack_require__.nc);
25583
- /******/ }
25584
- /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
25585
- /******/
25586
- /******/ script.src = url;
25587
- /******/ }
25588
- /******/ inProgress[url] = [done];
25589
- /******/ const onScriptComplete = (prev, event) => {
25590
- /******/ // avoid mem leaks in IE.
25591
- /******/ script.onerror = script.onload = null;
25592
- /******/ clearTimeout(timeout);
25593
- /******/ const doneFns = inProgress[url];
25594
- /******/ delete inProgress[url];
25595
- /******/ script.parentNode?.removeChild(script);
25596
- /******/ doneFns?.forEach((fn) => (fn(event)));
25597
- /******/ if(prev) return prev(event);
25598
- /******/ }
25599
- /******/ const timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
25600
- /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
25601
- /******/ script.onload = onScriptComplete.bind(null, script.onload);
25602
- /******/ needAttach && document.head.appendChild(script);
25603
- /******/ };
25604
- /******/ })();
25605
- /******/
25606
25445
  /******/ /* webpack/runtime/make namespace object */
25607
25446
  /******/ // define __esModule on exports
25608
25447
  /******/ __webpack_require__.r = (exports) => {
@@ -25610,118 +25449,6 @@ function interpolateUrl(str, data) {
25610
25449
  /******/ Object.defineProperty(exports, '__esModule', { value: true });
25611
25450
  /******/ };
25612
25451
  /******/
25613
- /******/ /* webpack/runtime/publicPath */
25614
- /******/ (() => {
25615
- /******/ let scriptUrl;
25616
- /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
25617
- /******/ const document = __webpack_require__.g.document;
25618
- /******/ if (!scriptUrl && document) {
25619
- /******/ if (document.currentScript?.tagName.toUpperCase() === 'SCRIPT')
25620
- /******/ scriptUrl = document.currentScript.src;
25621
- /******/ if (!scriptUrl) {
25622
- /******/ const scripts = document.getElementsByTagName("script");
25623
- /******/ if(scripts.length) {
25624
- /******/ let i = scripts.length - 1;
25625
- /******/ while (i > -1 && (!scriptUrl || !/^https?:/.test(scriptUrl))) scriptUrl = scripts[i--].src;
25626
- /******/ }
25627
- /******/ }
25628
- /******/ }
25629
- /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
25630
- /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
25631
- /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
25632
- /******/ scriptUrl = scriptUrl.replace(/^blob:|[?#].*$/g, "").replace(/\/[^/]+$/, "/");
25633
- /******/ __webpack_require__.p = scriptUrl;
25634
- /******/ })();
25635
- /******/
25636
- /******/ /* webpack/runtime/jsonp chunk loading */
25637
- /******/ (() => {
25638
- /******/ // no baseURI
25639
- /******/
25640
- /******/ // object to store loaded and loading chunks
25641
- /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
25642
- /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
25643
- /******/ const installedChunks = {
25644
- /******/ "main": 0
25645
- /******/ };
25646
- /******/
25647
- /******/ __webpack_require__.f.j = (chunkId, promises) => {
25648
- /******/ // JSONP chunk loading for javascript
25649
- /******/ let installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
25650
- /******/ if(installedChunkData !== 0) { // 0 means "already installed".
25651
- /******/
25652
- /******/ // a Promise means "currently loading".
25653
- /******/ if(installedChunkData) {
25654
- /******/ promises.push(installedChunkData[2]);
25655
- /******/ } else {
25656
- /******/ if(true) { // all chunks have JS
25657
- /******/ // setup Promise in chunk cache
25658
- /******/ const promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
25659
- /******/ promises.push(installedChunkData[2] = promise);
25660
- /******/
25661
- /******/ // create error before stack unwound to get useful stacktrace later
25662
- /******/ const error = new Error();
25663
- /******/ const loadingEnded = (event) => {
25664
- /******/ if(__webpack_require__.o(installedChunks, chunkId)) {
25665
- /******/ installedChunkData = installedChunks[chunkId];
25666
- /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
25667
- /******/ if(installedChunkData) {
25668
- /******/ const errorType = event && (event.type === 'load' ? 'missing' : event.type);
25669
- /******/ const realSrc = event && event.target && event.target.src;
25670
- /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
25671
- /******/ error.name = 'ChunkLoadError';
25672
- /******/ error.type = errorType;
25673
- /******/ error.request = realSrc;
25674
- /******/ error.event = event;
25675
- /******/ installedChunkData[1](error);
25676
- /******/ }
25677
- /******/ }
25678
- /******/ };
25679
- /******/ __webpack_require__.l(__webpack_require__.p + __webpack_require__.u(chunkId), loadingEnded, "chunk-" + chunkId, chunkId);
25680
- /******/ }
25681
- /******/ }
25682
- /******/ }
25683
- /******/ };
25684
- /******/
25685
- /******/ // no prefetching
25686
- /******/
25687
- /******/ // no preloaded
25688
- /******/
25689
- /******/ // no HMR
25690
- /******/
25691
- /******/ // no HMR manifest
25692
- /******/
25693
- /******/ // no on chunks loaded
25694
- /******/
25695
- /******/ // install a JSONP callback for chunk loading
25696
- /******/ const webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
25697
- /******/ let [chunkIds, moreModules, runtime] = data;
25698
- /******/ // add "moreModules" to the modules object,
25699
- /******/ // then flag all "chunkIds" as loaded and fire callback
25700
- /******/ var moduleId, chunkId, i = 0;
25701
- /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
25702
- /******/ for(moduleId in moreModules) {
25703
- /******/ if(__webpack_require__.o(moreModules, moduleId)) {
25704
- /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
25705
- /******/ }
25706
- /******/ }
25707
- /******/ if(runtime) var result = runtime(__webpack_require__);
25708
- /******/ }
25709
- /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
25710
- /******/ for(;i < chunkIds.length; i++) {
25711
- /******/ chunkId = chunkIds[i];
25712
- /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
25713
- /******/ installedChunks[chunkId][0]();
25714
- /******/ }
25715
- /******/ installedChunks[chunkId] = 0;
25716
- /******/ }
25717
- /******/
25718
- /******/ }
25719
- /******/
25720
- /******/ const chunkLoadingGlobal = self["webpackChunk_itwin_core_i18n"] = self["webpackChunk_itwin_core_i18n"] || [];
25721
- /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
25722
- /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
25723
- /******/ })();
25724
- /******/
25725
25452
  /************************************************************************/
25726
25453
  let __webpack_exports__ = {};
25727
25454
  // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.