@itwin/core-i18n 5.14.0-dev.2 → 5.14.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js +364 -205
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.js +233 -74
- package/lib/cjs/test/webpack/bundled-tests.js.map +1 -1
- package/lib/cjs/test/webpack/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.js.map +1 -1
- package/package.json +6 -6
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
/** @packageDocumentation
|
|
18
18
|
* @module Localization
|
|
19
19
|
*/
|
|
20
|
-
function
|
|
21
|
-
var path = "C:\\agent\\_work\\
|
|
22
|
-
var hash = "
|
|
20
|
+
function cov_1wctd2lw3r() {
|
|
21
|
+
var path = "C:\\agent\\_work\\2\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js";
|
|
22
|
+
var hash = "c62969131924018e5347a18fd98028451b653feb";
|
|
23
23
|
var global = new Function("return this")();
|
|
24
24
|
var gcv = "__coverage__";
|
|
25
25
|
var coverageData = {
|
|
26
|
-
path: "C:\\agent\\_work\\
|
|
26
|
+
path: "C:\\agent\\_work\\2\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js",
|
|
27
27
|
statementMap: {
|
|
28
28
|
"0": {
|
|
29
29
|
start: {
|
|
@@ -2120,13 +2120,13 @@ function cov_ogldeftyv() {
|
|
|
2120
2120
|
inputSourceMap: {
|
|
2121
2121
|
version: 3,
|
|
2122
2122
|
file: "ITwinLocalization.js",
|
|
2123
|
-
sources: ["C:\\agent\\_work\\
|
|
2123
|
+
sources: ["C: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AI,EAAE,cAAc,CAAC,CAAC;QAC3C,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,gBAAgB;IACT,mBAAmB,CAAC,IAAY;QACrC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AA7MD,8CA6MC;AAED,MAAM,iBAAiB;IACd,MAAM,CAAU,IAAI,GAAG,QAAQ,CAAC;IAChC,GAAG,CAAC,IAAc,IAAI,qBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,IAAI,CAAC,IAAc,IAAI,qBAAM,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,KAAK,CAAC,IAAc,IAAI,qBAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,gBAAgB,CAAC,IAAc;QACrC,IAAI,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;gBAC7B,OAAO,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC",
|
|
2126
2126
|
sourcesContent: ["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\nimport i18next, { i18n, InitOptions, Module, TOptionsBase } from \"i18next\";\r\nimport i18nextBrowserLanguageDetector, { DetectorOptions } from \"i18next-browser-languagedetector\";\r\nimport Backend, { HttpBackendOptions as BackendOptions } from \"i18next-http-backend\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type { Localization } from \"@itwin/core-common\";\r\n\r\nconst DEFAULT_MAX_RETRIES: number = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error\r\n\r\n/** Options for ITwinLocalization\r\n * @public\r\n */\r\nexport interface LocalizationOptions {\r\n urlTemplate?: string;\r\n backendPlugin?: Module;\r\n detectorPlugin?: Module;\r\n initOptions?: InitOptions;\r\n backendHttpOptions?: BackendOptions;\r\n detectorOptions?: DetectorOptions;\r\n}\r\n\r\n/** Supplies localizations for iTwin.js\r\n * @note this class uses the [i18next](https://www.i18next.com/) package.\r\n * @public\r\n */\r\nexport class ITwinLocalization implements Localization {\r\n public i18next: i18n;\r\n private readonly _initOptions: InitOptions;\r\n private readonly _backendOptions: BackendOptions;\r\n private readonly _detectionOptions: DetectorOptions;\r\n private readonly _namespaces = new Map<string, Promise<void>>();\r\n\r\n public constructor(options?: LocalizationOptions) {\r\n this.i18next = i18next.createInstance();\r\n\r\n this._backendOptions = {\r\n loadPath: options?.urlTemplate ?? \"locales/{{lng}}/{{ns}}.json\",\r\n crossDomain: true,\r\n ...options?.backendHttpOptions,\r\n };\r\n\r\n this._detectionOptions = {\r\n order: [\"querystring\", \"navigator\", \"htmlTag\"],\r\n lookupQuerystring: \"lng\",\r\n caches: [],\r\n ...options?.detectorOptions,\r\n };\r\n\r\n this._initOptions = {\r\n interpolation: { escapeValue: true },\r\n fallbackLng: \"en\",\r\n maxRetries: DEFAULT_MAX_RETRIES,\r\n backend: this._backendOptions,\r\n detection: this._detectionOptions,\r\n ...options?.initOptions,\r\n };\r\n\r\n this.i18next\r\n .use(options?.detectorPlugin ?? i18nextBrowserLanguageDetector)\r\n .use(options?.backendPlugin ?? Backend)\r\n .use(TranslationLogger);\r\n }\r\n\r\n public async initialize(namespaces: string[]): Promise<void> {\r\n\r\n // Also consider namespaces passed into constructor\r\n const initNamespaces: string[] = [this._initOptions.ns || []].flat();\r\n const combinedNamespaces: Set<string> = new Set([...namespaces, ...initNamespaces]); // without duplicates\r\n\r\n const defaultNamespace: string | false | readonly string[] = this._initOptions.defaultNS ?? namespaces[0];\r\n if (defaultNamespace)\r\n combinedNamespaces.add(defaultNamespace as string); // Make sure default namespace is in namespaces list\r\n\r\n const initOptions: InitOptions = {\r\n ...this._initOptions,\r\n defaultNS: defaultNamespace,\r\n ns: [...combinedNamespaces],\r\n };\r\n\r\n // if in a development environment, set debugging\r\n if (process.env.NODE_ENV === \"development\")\r\n initOptions.debug = true;\r\n\r\n const initPromise = this.i18next.init(initOptions) as unknown as Promise<void>;\r\n\r\n for (const ns of namespaces)\r\n this._namespaces.set(ns, initPromise);\r\n\r\n return initPromise;\r\n }\r\n\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * i18.translateKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n * @param line The input line, potentially containing %{keys}.\r\n * @returns The line with all %{keys} translated\r\n * @public\r\n */\r\n public getLocalizedKeys(line: string): string {\r\n return line.replace(/\\%\\{(.+?)\\}/g, (_match, tag) => this.getLocalizedString(tag));\r\n }\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @public\r\n */\r\n public getLocalizedString(key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n const value = this.i18next.t(key, options);\r\n\r\n if (typeof value !== \"string\") {\r\n throw new Error(\"Translation key(s) string not found\");\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /** Gets the English translation.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @internal\r\n */\r\n public getEnglishString(namespace: string, key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n options = {\r\n ...options,\r\n ns: namespace, // ensure namespace argument is used\r\n };\r\n\r\n const en = this.i18next.getFixedT(\"en\", namespace);\r\n const str = en(key, options);\r\n if (typeof str !== \"string\")\r\n throw new Error(\"Translation key(s) not found\");\r\n\r\n return str;\r\n }\r\n\r\n /** Get the promise for an already registered Namespace.\r\n * @param name - the name of the namespace\r\n * @public\r\n */\r\n public getNamespacePromise(name: string): Promise<void> | undefined {\r\n return this._namespaces.get(name);\r\n }\r\n\r\n /** @internal */\r\n public getLanguageList(): readonly string[] {\r\n return this.i18next.languages;\r\n }\r\n\r\n /** override the language detected in the browser */\r\n public async changeLanguage(language: string) {\r\n return this.i18next.changeLanguage(language) as unknown as Promise<void>;\r\n }\r\n\r\n /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.\r\n * @param name - the name of the namespace, which is the base name of the JSON file that contains the localization properties.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of the readPromise Promise property of the returned LocalizationNamespace.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n * @public\r\n */\r\n public async registerNamespace(name: string): Promise<void> {\r\n const existing = this._namespaces.get(name);\r\n if (existing !== undefined)\r\n return existing;\r\n\r\n const theReadPromise = new Promise<void>((resolve) => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.i18next.loadNamespaces(name, (err) => {\r\n if (!err)\r\n return resolve();\r\n\r\n // Here we got a non-null err object.\r\n // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.\r\n // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.\r\n // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.\r\n // There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.\r\n let locales = this.getLanguageList().map((thisLocale: any) => `/${thisLocale}/`);\r\n\r\n try {\r\n for (const thisError of err) {\r\n if (typeof thisError === \"string\")\r\n locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));\r\n }\r\n } catch {\r\n locales = [];\r\n }\r\n // if we removed every locale from the array, it wasn't loaded.\r\n if (locales.length === 0)\r\n Logger.logError(\"i18n\", `No resources for namespace ${name} could be loaded`);\r\n\r\n resolve();\r\n });\r\n });\r\n this._namespaces.set(name, theReadPromise);\r\n return theReadPromise;\r\n }\r\n\r\n /** @internal */\r\n public unregisterNamespace(name: string): void {\r\n this._namespaces.delete(name);\r\n }\r\n}\r\n\r\nclass TranslationLogger {\r\n public static readonly type = \"logger\";\r\n public log(args: string[]) { Logger.logInfo(\"i18n\", this.createLogMessage(args)); }\r\n public warn(args: string[]) { Logger.logWarning(\"i18n\", this.createLogMessage(args)); }\r\n public error(args: string[]) { Logger.logError(\"i18n\", this.createLogMessage(args)); }\r\n private createLogMessage(args: string[]) {\r\n let message = args[0];\r\n for (let i = 1; i < args.length; ++i) {\r\n if (typeof args[i] === \"string\")\r\n message += `\\n ${args[i]}`;\r\n }\r\n return message;\r\n }\r\n}\r\n"]
|
|
2127
2127
|
},
|
|
2128
2128
|
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
|
2129
|
-
hash: "
|
|
2129
|
+
hash: "c62969131924018e5347a18fd98028451b653feb"
|
|
2130
2130
|
};
|
|
2131
2131
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
2132
2132
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
@@ -2135,31 +2135,31 @@ function cov_ogldeftyv() {
|
|
|
2135
2135
|
var actualCoverage = coverage[path];
|
|
2136
2136
|
{
|
|
2137
2137
|
// @ts-ignore
|
|
2138
|
-
|
|
2138
|
+
cov_1wctd2lw3r = function () {
|
|
2139
2139
|
return actualCoverage;
|
|
2140
2140
|
};
|
|
2141
2141
|
}
|
|
2142
2142
|
return actualCoverage;
|
|
2143
2143
|
}
|
|
2144
|
-
|
|
2145
|
-
var __importDefault = (
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
return (
|
|
2144
|
+
cov_1wctd2lw3r();
|
|
2145
|
+
var __importDefault = (cov_1wctd2lw3r().s[0]++, (cov_1wctd2lw3r().b[0][0]++, this) && (cov_1wctd2lw3r().b[0][1]++, this.__importDefault) || (cov_1wctd2lw3r().b[0][2]++, function (mod) {
|
|
2146
|
+
cov_1wctd2lw3r().f[0]++;
|
|
2147
|
+
cov_1wctd2lw3r().s[1]++;
|
|
2148
|
+
return (cov_1wctd2lw3r().b[2][0]++, mod) && (cov_1wctd2lw3r().b[2][1]++, mod.__esModule) ? (cov_1wctd2lw3r().b[1][0]++, mod) : (cov_1wctd2lw3r().b[1][1]++, {
|
|
2149
2149
|
"default": mod
|
|
2150
2150
|
});
|
|
2151
2151
|
}));
|
|
2152
|
-
|
|
2152
|
+
cov_1wctd2lw3r().s[2]++;
|
|
2153
2153
|
Object.defineProperty(exports, "__esModule", ({
|
|
2154
2154
|
value: true
|
|
2155
2155
|
}));
|
|
2156
|
-
|
|
2156
|
+
cov_1wctd2lw3r().s[3]++;
|
|
2157
2157
|
exports.ITwinLocalization = void 0;
|
|
2158
|
-
const i18next_1 = (
|
|
2159
|
-
const i18next_browser_languagedetector_1 = (
|
|
2160
|
-
const i18next_http_backend_1 = (
|
|
2161
|
-
const core_bentley_1 = (
|
|
2162
|
-
const DEFAULT_MAX_RETRIES = (
|
|
2158
|
+
const i18next_1 = (cov_1wctd2lw3r().s[4]++, __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/cjs/i18next.js")));
|
|
2159
|
+
const i18next_browser_languagedetector_1 = (cov_1wctd2lw3r().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")));
|
|
2160
|
+
const i18next_http_backend_1 = (cov_1wctd2lw3r().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")));
|
|
2161
|
+
const core_bentley_1 = (cov_1wctd2lw3r().s[7]++, __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js"));
|
|
2162
|
+
const DEFAULT_MAX_RETRIES = (cov_1wctd2lw3r().s[8]++, 1); // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
|
|
2163
2163
|
/** Supplies localizations for iTwin.js
|
|
2164
2164
|
* @note this class uses the [i18next](https://www.i18next.com/) package.
|
|
2165
2165
|
* @public
|
|
@@ -2169,25 +2169,25 @@ class ITwinLocalization {
|
|
|
2169
2169
|
_initOptions;
|
|
2170
2170
|
_backendOptions;
|
|
2171
2171
|
_detectionOptions;
|
|
2172
|
-
_namespaces = (
|
|
2172
|
+
_namespaces = (cov_1wctd2lw3r().s[9]++, new Map());
|
|
2173
2173
|
constructor(options) {
|
|
2174
|
-
|
|
2175
|
-
|
|
2174
|
+
cov_1wctd2lw3r().f[1]++;
|
|
2175
|
+
cov_1wctd2lw3r().s[10]++;
|
|
2176
2176
|
this.i18next = i18next_1.default.createInstance();
|
|
2177
|
-
|
|
2177
|
+
cov_1wctd2lw3r().s[11]++;
|
|
2178
2178
|
this._backendOptions = {
|
|
2179
|
-
loadPath: (
|
|
2179
|
+
loadPath: (cov_1wctd2lw3r().b[3][0]++, options?.urlTemplate) ?? (cov_1wctd2lw3r().b[3][1]++, "locales/{{lng}}/{{ns}}.json"),
|
|
2180
2180
|
crossDomain: true,
|
|
2181
2181
|
...options?.backendHttpOptions
|
|
2182
2182
|
};
|
|
2183
|
-
|
|
2183
|
+
cov_1wctd2lw3r().s[12]++;
|
|
2184
2184
|
this._detectionOptions = {
|
|
2185
2185
|
order: ["querystring", "navigator", "htmlTag"],
|
|
2186
2186
|
lookupQuerystring: "lng",
|
|
2187
2187
|
caches: [],
|
|
2188
2188
|
...options?.detectorOptions
|
|
2189
2189
|
};
|
|
2190
|
-
|
|
2190
|
+
cov_1wctd2lw3r().s[13]++;
|
|
2191
2191
|
this._initOptions = {
|
|
2192
2192
|
interpolation: {
|
|
2193
2193
|
escapeValue: true
|
|
@@ -2198,41 +2198,41 @@ class ITwinLocalization {
|
|
|
2198
2198
|
detection: this._detectionOptions,
|
|
2199
2199
|
...options?.initOptions
|
|
2200
2200
|
};
|
|
2201
|
-
|
|
2202
|
-
this.i18next.use((
|
|
2201
|
+
cov_1wctd2lw3r().s[14]++;
|
|
2202
|
+
this.i18next.use((cov_1wctd2lw3r().b[4][0]++, options?.detectorPlugin) ?? (cov_1wctd2lw3r().b[4][1]++, i18next_browser_languagedetector_1.default)).use((cov_1wctd2lw3r().b[5][0]++, options?.backendPlugin) ?? (cov_1wctd2lw3r().b[5][1]++, i18next_http_backend_1.default)).use(TranslationLogger);
|
|
2203
2203
|
}
|
|
2204
2204
|
async initialize(namespaces) {
|
|
2205
|
-
|
|
2205
|
+
cov_1wctd2lw3r().f[2]++;
|
|
2206
2206
|
// Also consider namespaces passed into constructor
|
|
2207
|
-
const initNamespaces = (
|
|
2208
|
-
const combinedNamespaces = (
|
|
2209
|
-
const defaultNamespace = (
|
|
2210
|
-
|
|
2207
|
+
const initNamespaces = (cov_1wctd2lw3r().s[15]++, [(cov_1wctd2lw3r().b[6][0]++, this._initOptions.ns) || (cov_1wctd2lw3r().b[6][1]++, [])].flat());
|
|
2208
|
+
const combinedNamespaces = (cov_1wctd2lw3r().s[16]++, new Set([...namespaces, ...initNamespaces])); // without duplicates
|
|
2209
|
+
const defaultNamespace = (cov_1wctd2lw3r().s[17]++, (cov_1wctd2lw3r().b[7][0]++, this._initOptions.defaultNS) ?? (cov_1wctd2lw3r().b[7][1]++, namespaces[0]));
|
|
2210
|
+
cov_1wctd2lw3r().s[18]++;
|
|
2211
2211
|
if (defaultNamespace) {
|
|
2212
|
-
|
|
2213
|
-
|
|
2212
|
+
cov_1wctd2lw3r().b[8][0]++;
|
|
2213
|
+
cov_1wctd2lw3r().s[19]++;
|
|
2214
2214
|
combinedNamespaces.add(defaultNamespace);
|
|
2215
2215
|
} else {
|
|
2216
|
-
|
|
2216
|
+
cov_1wctd2lw3r().b[8][1]++;
|
|
2217
2217
|
} // Make sure default namespace is in namespaces list
|
|
2218
|
-
const initOptions = (
|
|
2218
|
+
const initOptions = (cov_1wctd2lw3r().s[20]++, {
|
|
2219
2219
|
...this._initOptions,
|
|
2220
2220
|
defaultNS: defaultNamespace,
|
|
2221
2221
|
ns: [...combinedNamespaces]
|
|
2222
2222
|
});
|
|
2223
2223
|
// if in a development environment, set debugging
|
|
2224
|
-
|
|
2224
|
+
cov_1wctd2lw3r().s[21]++;
|
|
2225
2225
|
if (false) // removed by dead control flow
|
|
2226
2226
|
{} else {
|
|
2227
|
-
|
|
2227
|
+
cov_1wctd2lw3r().b[9][1]++;
|
|
2228
2228
|
}
|
|
2229
|
-
const initPromise = (
|
|
2230
|
-
|
|
2229
|
+
const initPromise = (cov_1wctd2lw3r().s[23]++, this.i18next.init(initOptions));
|
|
2230
|
+
cov_1wctd2lw3r().s[24]++;
|
|
2231
2231
|
for (const ns of namespaces) {
|
|
2232
|
-
|
|
2232
|
+
cov_1wctd2lw3r().s[25]++;
|
|
2233
2233
|
this._namespaces.set(ns, initPromise);
|
|
2234
2234
|
}
|
|
2235
|
-
|
|
2235
|
+
cov_1wctd2lw3r().s[26]++;
|
|
2236
2236
|
return initPromise;
|
|
2237
2237
|
}
|
|
2238
2238
|
/** Replace all instances of `%{key}` within a string with the translations of those keys.
|
|
@@ -2252,11 +2252,11 @@ class ITwinLocalization {
|
|
|
2252
2252
|
* @public
|
|
2253
2253
|
*/
|
|
2254
2254
|
getLocalizedKeys(line) {
|
|
2255
|
-
|
|
2256
|
-
|
|
2255
|
+
cov_1wctd2lw3r().f[3]++;
|
|
2256
|
+
cov_1wctd2lw3r().s[27]++;
|
|
2257
2257
|
return line.replace(/\%\{(.+?)\}/g, (_match, tag) => {
|
|
2258
|
-
|
|
2259
|
-
|
|
2258
|
+
cov_1wctd2lw3r().f[4]++;
|
|
2259
|
+
cov_1wctd2lw3r().s[28]++;
|
|
2260
2260
|
return this.getLocalizedString(tag);
|
|
2261
2261
|
});
|
|
2262
2262
|
}
|
|
@@ -2274,25 +2274,25 @@ class ITwinLocalization {
|
|
|
2274
2274
|
* @public
|
|
2275
2275
|
*/
|
|
2276
2276
|
getLocalizedString(key, options) {
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
if ((
|
|
2280
|
-
|
|
2281
|
-
|
|
2277
|
+
cov_1wctd2lw3r().f[5]++;
|
|
2278
|
+
cov_1wctd2lw3r().s[29]++;
|
|
2279
|
+
if ((cov_1wctd2lw3r().b[11][0]++, options?.returnDetails) || (cov_1wctd2lw3r().b[11][1]++, options?.returnObjects)) {
|
|
2280
|
+
cov_1wctd2lw3r().b[10][0]++;
|
|
2281
|
+
cov_1wctd2lw3r().s[30]++;
|
|
2282
2282
|
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
2283
2283
|
} else {
|
|
2284
|
-
|
|
2284
|
+
cov_1wctd2lw3r().b[10][1]++;
|
|
2285
2285
|
}
|
|
2286
|
-
const value = (
|
|
2287
|
-
|
|
2286
|
+
const value = (cov_1wctd2lw3r().s[31]++, this.i18next.t(key, options));
|
|
2287
|
+
cov_1wctd2lw3r().s[32]++;
|
|
2288
2288
|
if (typeof value !== "string") {
|
|
2289
|
-
|
|
2290
|
-
|
|
2289
|
+
cov_1wctd2lw3r().b[12][0]++;
|
|
2290
|
+
cov_1wctd2lw3r().s[33]++;
|
|
2291
2291
|
throw new Error("Translation key(s) string not found");
|
|
2292
2292
|
} else {
|
|
2293
|
-
|
|
2293
|
+
cov_1wctd2lw3r().b[12][1]++;
|
|
2294
2294
|
}
|
|
2295
|
-
|
|
2295
|
+
cov_1wctd2lw3r().s[34]++;
|
|
2296
2296
|
return value;
|
|
2297
2297
|
}
|
|
2298
2298
|
/** Gets the English translation.
|
|
@@ -2303,31 +2303,31 @@ class ITwinLocalization {
|
|
|
2303
2303
|
* @internal
|
|
2304
2304
|
*/
|
|
2305
2305
|
getEnglishString(namespace, key, options) {
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
if ((
|
|
2309
|
-
|
|
2310
|
-
|
|
2306
|
+
cov_1wctd2lw3r().f[6]++;
|
|
2307
|
+
cov_1wctd2lw3r().s[35]++;
|
|
2308
|
+
if ((cov_1wctd2lw3r().b[14][0]++, options?.returnDetails) || (cov_1wctd2lw3r().b[14][1]++, options?.returnObjects)) {
|
|
2309
|
+
cov_1wctd2lw3r().b[13][0]++;
|
|
2310
|
+
cov_1wctd2lw3r().s[36]++;
|
|
2311
2311
|
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
2312
2312
|
} else {
|
|
2313
|
-
|
|
2313
|
+
cov_1wctd2lw3r().b[13][1]++;
|
|
2314
2314
|
}
|
|
2315
|
-
|
|
2315
|
+
cov_1wctd2lw3r().s[37]++;
|
|
2316
2316
|
options = {
|
|
2317
2317
|
...options,
|
|
2318
2318
|
ns: namespace // ensure namespace argument is used
|
|
2319
2319
|
};
|
|
2320
|
-
const en = (
|
|
2321
|
-
const str = (
|
|
2322
|
-
|
|
2320
|
+
const en = (cov_1wctd2lw3r().s[38]++, this.i18next.getFixedT("en", namespace));
|
|
2321
|
+
const str = (cov_1wctd2lw3r().s[39]++, en(key, options));
|
|
2322
|
+
cov_1wctd2lw3r().s[40]++;
|
|
2323
2323
|
if (typeof str !== "string") {
|
|
2324
|
-
|
|
2325
|
-
|
|
2324
|
+
cov_1wctd2lw3r().b[15][0]++;
|
|
2325
|
+
cov_1wctd2lw3r().s[41]++;
|
|
2326
2326
|
throw new Error("Translation key(s) not found");
|
|
2327
2327
|
} else {
|
|
2328
|
-
|
|
2328
|
+
cov_1wctd2lw3r().b[15][1]++;
|
|
2329
2329
|
}
|
|
2330
|
-
|
|
2330
|
+
cov_1wctd2lw3r().s[42]++;
|
|
2331
2331
|
return str;
|
|
2332
2332
|
}
|
|
2333
2333
|
/** Get the promise for an already registered Namespace.
|
|
@@ -2335,20 +2335,20 @@ class ITwinLocalization {
|
|
|
2335
2335
|
* @public
|
|
2336
2336
|
*/
|
|
2337
2337
|
getNamespacePromise(name) {
|
|
2338
|
-
|
|
2339
|
-
|
|
2338
|
+
cov_1wctd2lw3r().f[7]++;
|
|
2339
|
+
cov_1wctd2lw3r().s[43]++;
|
|
2340
2340
|
return this._namespaces.get(name);
|
|
2341
2341
|
}
|
|
2342
2342
|
/** @internal */
|
|
2343
2343
|
getLanguageList() {
|
|
2344
|
-
|
|
2345
|
-
|
|
2344
|
+
cov_1wctd2lw3r().f[8]++;
|
|
2345
|
+
cov_1wctd2lw3r().s[44]++;
|
|
2346
2346
|
return this.i18next.languages;
|
|
2347
2347
|
}
|
|
2348
2348
|
/** override the language detected in the browser */
|
|
2349
2349
|
async changeLanguage(language) {
|
|
2350
|
-
|
|
2351
|
-
|
|
2350
|
+
cov_1wctd2lw3r().f[9]++;
|
|
2351
|
+
cov_1wctd2lw3r().s[45]++;
|
|
2352
2352
|
return this.i18next.changeLanguage(language);
|
|
2353
2353
|
}
|
|
2354
2354
|
/** Register a new Namespace and return it. If the namespace is already registered, it will be returned.
|
|
@@ -2360,120 +2360,120 @@ class ITwinLocalization {
|
|
|
2360
2360
|
* @public
|
|
2361
2361
|
*/
|
|
2362
2362
|
async registerNamespace(name) {
|
|
2363
|
-
|
|
2364
|
-
const existing = (
|
|
2365
|
-
|
|
2363
|
+
cov_1wctd2lw3r().f[10]++;
|
|
2364
|
+
const existing = (cov_1wctd2lw3r().s[46]++, this._namespaces.get(name));
|
|
2365
|
+
cov_1wctd2lw3r().s[47]++;
|
|
2366
2366
|
if (existing !== undefined) {
|
|
2367
|
-
|
|
2368
|
-
|
|
2367
|
+
cov_1wctd2lw3r().b[16][0]++;
|
|
2368
|
+
cov_1wctd2lw3r().s[48]++;
|
|
2369
2369
|
return existing;
|
|
2370
2370
|
} else {
|
|
2371
|
-
|
|
2371
|
+
cov_1wctd2lw3r().b[16][1]++;
|
|
2372
2372
|
}
|
|
2373
|
-
const theReadPromise = (
|
|
2374
|
-
|
|
2375
|
-
|
|
2373
|
+
const theReadPromise = (cov_1wctd2lw3r().s[49]++, new Promise(resolve => {
|
|
2374
|
+
cov_1wctd2lw3r().f[11]++;
|
|
2375
|
+
cov_1wctd2lw3r().s[50]++;
|
|
2376
2376
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
2377
2377
|
this.i18next.loadNamespaces(name, err => {
|
|
2378
|
-
|
|
2379
|
-
|
|
2378
|
+
cov_1wctd2lw3r().f[12]++;
|
|
2379
|
+
cov_1wctd2lw3r().s[51]++;
|
|
2380
2380
|
if (!err) {
|
|
2381
|
-
|
|
2382
|
-
|
|
2381
|
+
cov_1wctd2lw3r().b[17][0]++;
|
|
2382
|
+
cov_1wctd2lw3r().s[52]++;
|
|
2383
2383
|
return resolve();
|
|
2384
2384
|
} else {
|
|
2385
|
-
|
|
2385
|
+
cov_1wctd2lw3r().b[17][1]++;
|
|
2386
2386
|
}
|
|
2387
2387
|
// Here we got a non-null err object.
|
|
2388
2388
|
// This method is called when the system has attempted to load the resources for the namespaces for each possible locale.
|
|
2389
2389
|
// For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.
|
|
2390
2390
|
// Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.
|
|
2391
2391
|
// There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.
|
|
2392
|
-
let locales = (
|
|
2393
|
-
|
|
2394
|
-
|
|
2392
|
+
let locales = (cov_1wctd2lw3r().s[53]++, this.getLanguageList().map(thisLocale => {
|
|
2393
|
+
cov_1wctd2lw3r().f[13]++;
|
|
2394
|
+
cov_1wctd2lw3r().s[54]++;
|
|
2395
2395
|
return `/${thisLocale}/`;
|
|
2396
2396
|
}));
|
|
2397
|
-
|
|
2397
|
+
cov_1wctd2lw3r().s[55]++;
|
|
2398
2398
|
try {
|
|
2399
|
-
|
|
2399
|
+
cov_1wctd2lw3r().s[56]++;
|
|
2400
2400
|
for (const thisError of err) {
|
|
2401
|
-
|
|
2401
|
+
cov_1wctd2lw3r().s[57]++;
|
|
2402
2402
|
if (typeof thisError === "string") {
|
|
2403
|
-
|
|
2404
|
-
|
|
2403
|
+
cov_1wctd2lw3r().b[18][0]++;
|
|
2404
|
+
cov_1wctd2lw3r().s[58]++;
|
|
2405
2405
|
locales = locales.filter(thisLocale => {
|
|
2406
|
-
|
|
2407
|
-
|
|
2406
|
+
cov_1wctd2lw3r().f[14]++;
|
|
2407
|
+
cov_1wctd2lw3r().s[59]++;
|
|
2408
2408
|
return !thisError.includes(thisLocale);
|
|
2409
2409
|
});
|
|
2410
2410
|
} else {
|
|
2411
|
-
|
|
2411
|
+
cov_1wctd2lw3r().b[18][1]++;
|
|
2412
2412
|
}
|
|
2413
2413
|
}
|
|
2414
2414
|
} catch {
|
|
2415
|
-
|
|
2415
|
+
cov_1wctd2lw3r().s[60]++;
|
|
2416
2416
|
locales = [];
|
|
2417
2417
|
}
|
|
2418
2418
|
// if we removed every locale from the array, it wasn't loaded.
|
|
2419
|
-
|
|
2419
|
+
cov_1wctd2lw3r().s[61]++;
|
|
2420
2420
|
if (locales.length === 0) {
|
|
2421
|
-
|
|
2422
|
-
|
|
2421
|
+
cov_1wctd2lw3r().b[19][0]++;
|
|
2422
|
+
cov_1wctd2lw3r().s[62]++;
|
|
2423
2423
|
core_bentley_1.Logger.logError("i18n", `No resources for namespace ${name} could be loaded`);
|
|
2424
2424
|
} else {
|
|
2425
|
-
|
|
2425
|
+
cov_1wctd2lw3r().b[19][1]++;
|
|
2426
2426
|
}
|
|
2427
|
-
|
|
2427
|
+
cov_1wctd2lw3r().s[63]++;
|
|
2428
2428
|
resolve();
|
|
2429
2429
|
});
|
|
2430
2430
|
}));
|
|
2431
|
-
|
|
2431
|
+
cov_1wctd2lw3r().s[64]++;
|
|
2432
2432
|
this._namespaces.set(name, theReadPromise);
|
|
2433
|
-
|
|
2433
|
+
cov_1wctd2lw3r().s[65]++;
|
|
2434
2434
|
return theReadPromise;
|
|
2435
2435
|
}
|
|
2436
2436
|
/** @internal */
|
|
2437
2437
|
unregisterNamespace(name) {
|
|
2438
|
-
|
|
2439
|
-
|
|
2438
|
+
cov_1wctd2lw3r().f[15]++;
|
|
2439
|
+
cov_1wctd2lw3r().s[66]++;
|
|
2440
2440
|
this._namespaces.delete(name);
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
|
-
|
|
2443
|
+
cov_1wctd2lw3r().s[67]++;
|
|
2444
2444
|
exports.ITwinLocalization = ITwinLocalization;
|
|
2445
2445
|
class TranslationLogger {
|
|
2446
|
-
static type = (
|
|
2446
|
+
static type = (cov_1wctd2lw3r().s[68]++, "logger");
|
|
2447
2447
|
log(args) {
|
|
2448
|
-
|
|
2449
|
-
|
|
2448
|
+
cov_1wctd2lw3r().f[16]++;
|
|
2449
|
+
cov_1wctd2lw3r().s[69]++;
|
|
2450
2450
|
core_bentley_1.Logger.logInfo("i18n", this.createLogMessage(args));
|
|
2451
2451
|
}
|
|
2452
2452
|
warn(args) {
|
|
2453
|
-
|
|
2454
|
-
|
|
2453
|
+
cov_1wctd2lw3r().f[17]++;
|
|
2454
|
+
cov_1wctd2lw3r().s[70]++;
|
|
2455
2455
|
core_bentley_1.Logger.logWarning("i18n", this.createLogMessage(args));
|
|
2456
2456
|
}
|
|
2457
2457
|
error(args) {
|
|
2458
|
-
|
|
2459
|
-
|
|
2458
|
+
cov_1wctd2lw3r().f[18]++;
|
|
2459
|
+
cov_1wctd2lw3r().s[71]++;
|
|
2460
2460
|
core_bentley_1.Logger.logError("i18n", this.createLogMessage(args));
|
|
2461
2461
|
}
|
|
2462
2462
|
createLogMessage(args) {
|
|
2463
|
-
|
|
2464
|
-
let message = (
|
|
2465
|
-
|
|
2466
|
-
for (let i = (
|
|
2467
|
-
|
|
2463
|
+
cov_1wctd2lw3r().f[19]++;
|
|
2464
|
+
let message = (cov_1wctd2lw3r().s[72]++, args[0]);
|
|
2465
|
+
cov_1wctd2lw3r().s[73]++;
|
|
2466
|
+
for (let i = (cov_1wctd2lw3r().s[74]++, 1); i < args.length; ++i) {
|
|
2467
|
+
cov_1wctd2lw3r().s[75]++;
|
|
2468
2468
|
if (typeof args[i] === "string") {
|
|
2469
|
-
|
|
2470
|
-
|
|
2469
|
+
cov_1wctd2lw3r().b[20][0]++;
|
|
2470
|
+
cov_1wctd2lw3r().s[76]++;
|
|
2471
2471
|
message += `\n ${args[i]}`;
|
|
2472
2472
|
} else {
|
|
2473
|
-
|
|
2473
|
+
cov_1wctd2lw3r().b[20][1]++;
|
|
2474
2474
|
}
|
|
2475
2475
|
}
|
|
2476
|
-
|
|
2476
|
+
cov_1wctd2lw3r().s[77]++;
|
|
2477
2477
|
return message;
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
@@ -17921,6 +17921,8 @@ var DbResult;
|
|
|
17921
17921
|
DbResult[DbResult["BE_SQLITE_ERROR_SchemaUpgradeRecommended"] = 369098762] = "BE_SQLITE_ERROR_SchemaUpgradeRecommended";
|
|
17922
17922
|
/** schema update require data transform */
|
|
17923
17923
|
DbResult[DbResult["BE_SQLITE_ERROR_DataTransformRequired"] = 385875978] = "BE_SQLITE_ERROR_DataTransformRequired";
|
|
17924
|
+
/** schema update would destroy existing instances or property values */
|
|
17925
|
+
DbResult[DbResult["BE_SQLITE_ERROR_DataDeletionRequired"] = 402653194] = "BE_SQLITE_ERROR_DataDeletionRequired";
|
|
17924
17926
|
/** Db not open */
|
|
17925
17927
|
DbResult[DbResult["BE_SQLITE_ERROR_NOTOPEN"] = 16777217] = "BE_SQLITE_ERROR_NOTOPEN";
|
|
17926
17928
|
/** Error propagating changes during commit */
|
|
@@ -18473,6 +18475,7 @@ class BentleyError extends Error {
|
|
|
18473
18475
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_IOERR_SEEK: return "BE_SQLITE_IOERR_SEEK";
|
|
18474
18476
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_IOERR_DELETE_NOENT: return "BE_SQLITE_IOERR_DELETE_NOENT";
|
|
18475
18477
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_DataTransformRequired: return "Schema update require to transform data";
|
|
18478
|
+
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_DataDeletionRequired: return "Schema update would destroy existing data";
|
|
18476
18479
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_FileExists: return "File Exists";
|
|
18477
18480
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_AlreadyOpen: return "Already Open";
|
|
18478
18481
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_NoPropertyTable: return "No Property Table";
|
|
@@ -21682,6 +21685,122 @@ class PerfLogger {
|
|
|
21682
21685
|
}
|
|
21683
21686
|
|
|
21684
21687
|
|
|
21688
|
+
/***/ },
|
|
21689
|
+
|
|
21690
|
+
/***/ "../bentley/lib/esm/ObservableMap.js"
|
|
21691
|
+
/*!*******************************************!*\
|
|
21692
|
+
!*** ../bentley/lib/esm/ObservableMap.js ***!
|
|
21693
|
+
\*******************************************/
|
|
21694
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21695
|
+
|
|
21696
|
+
"use strict";
|
|
21697
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21698
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21699
|
+
/* harmony export */ ObservableMap: () => (/* binding */ ObservableMap)
|
|
21700
|
+
/* harmony export */ });
|
|
21701
|
+
/* harmony import */ var _BeEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BeEvent */ "../bentley/lib/esm/BeEvent.js");
|
|
21702
|
+
/*---------------------------------------------------------------------------------------------
|
|
21703
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
21704
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
21705
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21706
|
+
/** @packageDocumentation
|
|
21707
|
+
* @module Collections
|
|
21708
|
+
*/
|
|
21709
|
+
|
|
21710
|
+
/** A standard [Map<K,V>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) that emits an event when its contents change.
|
|
21711
|
+
* @public
|
|
21712
|
+
*/
|
|
21713
|
+
class ObservableMap extends Map {
|
|
21714
|
+
/** @internal */
|
|
21715
|
+
get [Symbol.toStringTag]() { return "ObservableMap"; }
|
|
21716
|
+
/** Emitted after any change to the contents of this map. */
|
|
21717
|
+
onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
21718
|
+
/** Construct a new ObservableMap.
|
|
21719
|
+
* @param elements Optional elements with which to populate the new map.
|
|
21720
|
+
*/
|
|
21721
|
+
constructor(elements) {
|
|
21722
|
+
// IMPORTANT: do not pass `elements` to `super()`. It will invoke `set` which is overridden to invoke `onChanged.raiseEvent`, but
|
|
21723
|
+
// `onChanged` is not initialized until `super()` returns.
|
|
21724
|
+
super();
|
|
21725
|
+
if (elements)
|
|
21726
|
+
this.setAll(elements);
|
|
21727
|
+
}
|
|
21728
|
+
/** Invokes [Map.set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set), raising
|
|
21729
|
+
* the [[onChanged]] event unless `key` is already present with the same `value`.
|
|
21730
|
+
*/
|
|
21731
|
+
set(key, value) {
|
|
21732
|
+
const valueChanged = !this.has(key) || !Object.is(this.get(key), value);
|
|
21733
|
+
if (valueChanged)
|
|
21734
|
+
super.set(key, value);
|
|
21735
|
+
if (valueChanged) {
|
|
21736
|
+
this.onChanged.raiseEvent();
|
|
21737
|
+
}
|
|
21738
|
+
return this;
|
|
21739
|
+
}
|
|
21740
|
+
/** Invokes [Map.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete), raising
|
|
21741
|
+
* the [[onChanged]] event if the key was removed from the map.
|
|
21742
|
+
*/
|
|
21743
|
+
delete(key) {
|
|
21744
|
+
const ret = super.delete(key);
|
|
21745
|
+
if (ret) {
|
|
21746
|
+
this.onChanged.raiseEvent();
|
|
21747
|
+
}
|
|
21748
|
+
return ret;
|
|
21749
|
+
}
|
|
21750
|
+
/** If this map is not already empty, invokes [Map.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear)
|
|
21751
|
+
* and raises the [[onChanged]] event.
|
|
21752
|
+
*/
|
|
21753
|
+
clear() {
|
|
21754
|
+
if (0 !== this.size) {
|
|
21755
|
+
super.clear();
|
|
21756
|
+
this.onChanged.raiseEvent();
|
|
21757
|
+
}
|
|
21758
|
+
}
|
|
21759
|
+
/** Add or update multiple entries in the map, raising [[onChanged]] only once after all items are set, if the contents of
|
|
21760
|
+
* the map changed as a result.
|
|
21761
|
+
* This is more efficient than calling [[set]] in a loop when listeners need not be notified of each individual change.
|
|
21762
|
+
* @param items The entries to add or update.
|
|
21763
|
+
*/
|
|
21764
|
+
setAll(items) {
|
|
21765
|
+
let changed = false;
|
|
21766
|
+
try {
|
|
21767
|
+
for (const [key, value] of items) {
|
|
21768
|
+
if (!this.has(key) || !Object.is(this.get(key), value)) {
|
|
21769
|
+
super.set(key, value);
|
|
21770
|
+
changed = true;
|
|
21771
|
+
}
|
|
21772
|
+
}
|
|
21773
|
+
}
|
|
21774
|
+
finally {
|
|
21775
|
+
if (changed) {
|
|
21776
|
+
this.onChanged.raiseEvent();
|
|
21777
|
+
}
|
|
21778
|
+
}
|
|
21779
|
+
}
|
|
21780
|
+
/** Delete multiple keys from the map, raising [[onChanged]] only once after all keys are deleted.
|
|
21781
|
+
* This is more efficient than calling [[delete]] in a loop when listeners need not be notified of each individual deletion.
|
|
21782
|
+
* @param keys The keys to delete.
|
|
21783
|
+
* @returns The number of keys that were actually deleted (i.e., were present in the map).
|
|
21784
|
+
*/
|
|
21785
|
+
deleteAll(keys) {
|
|
21786
|
+
const prevSize = this.size;
|
|
21787
|
+
let deletedAny = false;
|
|
21788
|
+
try {
|
|
21789
|
+
for (const key of keys) {
|
|
21790
|
+
if (super.delete(key))
|
|
21791
|
+
deletedAny = true;
|
|
21792
|
+
}
|
|
21793
|
+
}
|
|
21794
|
+
finally {
|
|
21795
|
+
if (deletedAny) {
|
|
21796
|
+
this.onChanged.raiseEvent();
|
|
21797
|
+
}
|
|
21798
|
+
}
|
|
21799
|
+
return prevSize - this.size;
|
|
21800
|
+
}
|
|
21801
|
+
}
|
|
21802
|
+
|
|
21803
|
+
|
|
21685
21804
|
/***/ },
|
|
21686
21805
|
|
|
21687
21806
|
/***/ "../bentley/lib/esm/ObservableSet.js"
|
|
@@ -21708,6 +21827,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21708
21827
|
* @public
|
|
21709
21828
|
*/
|
|
21710
21829
|
class ObservableSet extends Set {
|
|
21830
|
+
/** @internal */
|
|
21831
|
+
get [Symbol.toStringTag]() { return "ObservableSet"; }
|
|
21711
21832
|
/** Emitted after `item` is added to this set. */
|
|
21712
21833
|
onAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
21713
21834
|
/** Emitted after `item` is deleted from this set. */
|
|
@@ -21718,27 +21839,39 @@ class ObservableSet extends Set {
|
|
|
21718
21839
|
onBatchAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
21719
21840
|
/** Emitted after multiple items are deleted from this set via [[deleteAll]]. */
|
|
21720
21841
|
onBatchDeleted = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
21842
|
+
/** Emitted after any change to the contents of this set. */
|
|
21843
|
+
onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
21721
21844
|
/** Construct a new ObservableSet.
|
|
21722
21845
|
* @param elements Optional elements with which to populate the new set.
|
|
21723
21846
|
*/
|
|
21724
21847
|
constructor(elements) {
|
|
21725
|
-
//
|
|
21726
|
-
super(
|
|
21727
|
-
|
|
21728
|
-
|
|
21729
|
-
|
|
21730
|
-
|
|
21731
|
-
|
|
21732
|
-
|
|
21733
|
-
|
|
21848
|
+
// IMPORTANT: do not pass `elements` to `super()`. It will invoke `add` which is overridden to invoke `onAdded.raiseEvent`, but
|
|
21849
|
+
// `onAdded` is not initialized until `super()` returns.
|
|
21850
|
+
super();
|
|
21851
|
+
if (elements)
|
|
21852
|
+
this.addAll(elements);
|
|
21853
|
+
}
|
|
21854
|
+
/** Invokes [Set.add](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/add), raising
|
|
21855
|
+
* the [[onAdded]] event if the item was not already present in the set.
|
|
21856
|
+
*/
|
|
21857
|
+
add(item) {
|
|
21858
|
+
const prevSize = this.size;
|
|
21859
|
+
const ret = super.add(item);
|
|
21860
|
+
if (this.size !== prevSize) {
|
|
21861
|
+
this.onAdded.raiseEvent(item);
|
|
21862
|
+
this.onChanged.raiseEvent();
|
|
21863
|
+
}
|
|
21864
|
+
return ret;
|
|
21734
21865
|
}
|
|
21735
21866
|
/** Invokes [Set.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/delete), raising
|
|
21736
21867
|
* the [[onDeleted]] event if the item was removed from the set.
|
|
21737
21868
|
*/
|
|
21738
21869
|
delete(item) {
|
|
21739
21870
|
const ret = super.delete(item);
|
|
21740
|
-
if (ret)
|
|
21871
|
+
if (ret) {
|
|
21741
21872
|
this.onDeleted.raiseEvent(item);
|
|
21873
|
+
this.onChanged.raiseEvent();
|
|
21874
|
+
}
|
|
21742
21875
|
return ret;
|
|
21743
21876
|
}
|
|
21744
21877
|
/** If this set is not already empty, invokes [Set.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/clear)
|
|
@@ -21748,6 +21881,7 @@ class ObservableSet extends Set {
|
|
|
21748
21881
|
if (0 !== this.size) {
|
|
21749
21882
|
super.clear();
|
|
21750
21883
|
this.onCleared.raiseEvent();
|
|
21884
|
+
this.onChanged.raiseEvent();
|
|
21751
21885
|
}
|
|
21752
21886
|
}
|
|
21753
21887
|
/** Add multiple items to the set, raising [[onBatchAdded]] only once after all items are added.
|
|
@@ -21757,10 +21891,21 @@ class ObservableSet extends Set {
|
|
|
21757
21891
|
*/
|
|
21758
21892
|
addAll(items) {
|
|
21759
21893
|
const prevSize = this.size;
|
|
21760
|
-
|
|
21761
|
-
|
|
21762
|
-
|
|
21763
|
-
|
|
21894
|
+
let addedAny = false;
|
|
21895
|
+
try {
|
|
21896
|
+
for (const item of items) {
|
|
21897
|
+
const prevSetSize = this.size;
|
|
21898
|
+
super.add(item);
|
|
21899
|
+
if (this.size !== prevSetSize)
|
|
21900
|
+
addedAny = true;
|
|
21901
|
+
}
|
|
21902
|
+
}
|
|
21903
|
+
finally {
|
|
21904
|
+
if (addedAny) {
|
|
21905
|
+
this.onBatchAdded.raiseEvent();
|
|
21906
|
+
this.onChanged.raiseEvent();
|
|
21907
|
+
}
|
|
21908
|
+
}
|
|
21764
21909
|
return this.size - prevSize;
|
|
21765
21910
|
}
|
|
21766
21911
|
/** Delete multiple items from the set, raising [[onBatchDeleted]] only once after all items are deleted.
|
|
@@ -21770,10 +21915,21 @@ class ObservableSet extends Set {
|
|
|
21770
21915
|
*/
|
|
21771
21916
|
deleteAll(items) {
|
|
21772
21917
|
const prevSize = this.size;
|
|
21773
|
-
|
|
21774
|
-
|
|
21775
|
-
|
|
21776
|
-
|
|
21918
|
+
let deletedAny = false;
|
|
21919
|
+
try {
|
|
21920
|
+
for (const item of items) {
|
|
21921
|
+
const prevSetSize = this.size;
|
|
21922
|
+
super.delete(item);
|
|
21923
|
+
if (this.size !== prevSetSize)
|
|
21924
|
+
deletedAny = true;
|
|
21925
|
+
}
|
|
21926
|
+
}
|
|
21927
|
+
finally {
|
|
21928
|
+
if (deletedAny) {
|
|
21929
|
+
this.onBatchDeleted.raiseEvent();
|
|
21930
|
+
this.onChanged.raiseEvent();
|
|
21931
|
+
}
|
|
21932
|
+
}
|
|
21777
21933
|
return prevSize - this.size;
|
|
21778
21934
|
}
|
|
21779
21935
|
}
|
|
@@ -24195,11 +24351,11 @@ class YieldManager {
|
|
|
24195
24351
|
"use strict";
|
|
24196
24352
|
__webpack_require__.r(__webpack_exports__);
|
|
24197
24353
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24198
|
-
/* harmony export */ AbandonedError: () => (/* reexport safe */
|
|
24199
|
-
/* harmony export */ BeDuration: () => (/* reexport safe */
|
|
24354
|
+
/* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
|
|
24355
|
+
/* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
|
|
24200
24356
|
/* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
|
|
24201
24357
|
/* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
|
|
24202
|
-
/* harmony export */ BeTimePoint: () => (/* reexport safe */
|
|
24358
|
+
/* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeTimePoint),
|
|
24203
24359
|
/* harmony export */ BeUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUiEvent),
|
|
24204
24360
|
/* harmony export */ BeUnorderedEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedEvent),
|
|
24205
24361
|
/* harmony export */ BeUnorderedUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedUiEvent),
|
|
@@ -24210,15 +24366,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24210
24366
|
/* harmony export */ ByteStream: () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
|
|
24211
24367
|
/* harmony export */ ChangeSetStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
|
|
24212
24368
|
/* harmony export */ CompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
|
|
24213
|
-
/* harmony export */ DbChangeStage: () => (/* reexport safe */
|
|
24214
|
-
/* harmony export */ DbConflictCause: () => (/* reexport safe */
|
|
24215
|
-
/* harmony export */ DbConflictResolution: () => (/* reexport safe */
|
|
24369
|
+
/* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbChangeStage),
|
|
24370
|
+
/* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictCause),
|
|
24371
|
+
/* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictResolution),
|
|
24216
24372
|
/* harmony export */ DbOpcode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
|
|
24217
24373
|
/* harmony export */ DbResult: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
|
|
24218
|
-
/* harmony export */ DbValueType: () => (/* reexport safe */
|
|
24374
|
+
/* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbValueType),
|
|
24219
24375
|
/* harmony export */ Dictionary: () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
|
|
24220
24376
|
/* harmony export */ DisposableList: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
|
|
24221
|
-
/* harmony export */ DuplicatePolicy: () => (/* reexport safe */
|
|
24377
|
+
/* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.DuplicatePolicy),
|
|
24222
24378
|
/* harmony export */ Entry: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.Entry),
|
|
24223
24379
|
/* harmony export */ ErrorCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.ErrorCategory),
|
|
24224
24380
|
/* harmony export */ GeoServiceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.GeoServiceStatus),
|
|
@@ -24237,39 +24393,40 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24237
24393
|
/* harmony export */ LogLevel: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.LogLevel),
|
|
24238
24394
|
/* harmony export */ Logger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.Logger),
|
|
24239
24395
|
/* harmony export */ MutableCompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.MutableCompressedId64Set),
|
|
24240
|
-
/* harmony export */
|
|
24241
|
-
/* harmony export */
|
|
24396
|
+
/* harmony export */ ObservableMap: () => (/* reexport safe */ _ObservableMap__WEBPACK_IMPORTED_MODULE_20__.ObservableMap),
|
|
24397
|
+
/* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_21__.ObservableSet),
|
|
24398
|
+
/* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.OneAtATimeAction),
|
|
24242
24399
|
/* harmony export */ OpenMode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.OpenMode),
|
|
24243
24400
|
/* harmony export */ OrderedId64Array: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.OrderedId64Array),
|
|
24244
|
-
/* harmony export */ OrderedId64Iterable: () => (/* reexport safe */
|
|
24245
|
-
/* harmony export */ OrderedSet: () => (/* reexport safe */
|
|
24401
|
+
/* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__.OrderedId64Iterable),
|
|
24402
|
+
/* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.OrderedSet),
|
|
24246
24403
|
/* harmony export */ PerfLogger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.PerfLogger),
|
|
24247
|
-
/* harmony export */ PriorityQueue: () => (/* reexport safe */
|
|
24248
|
-
/* harmony export */ ProcessDetector: () => (/* reexport safe */
|
|
24249
|
-
/* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */
|
|
24250
|
-
/* harmony export */ ReadonlySortedArray: () => (/* reexport safe */
|
|
24404
|
+
/* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__.PriorityQueue),
|
|
24405
|
+
/* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__.ProcessDetector),
|
|
24406
|
+
/* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.ReadonlyOrderedSet),
|
|
24407
|
+
/* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.ReadonlySortedArray),
|
|
24251
24408
|
/* harmony export */ RealityDataStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RealityDataStatus),
|
|
24252
|
-
/* harmony export */ RepositoryStatus: () => (/* reexport safe */
|
|
24409
|
+
/* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.RepositoryStatus),
|
|
24253
24410
|
/* harmony export */ RpcInterfaceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RpcInterfaceStatus),
|
|
24254
|
-
/* harmony export */ SortedArray: () => (/* reexport safe */
|
|
24255
|
-
/* harmony export */ SpanKind: () => (/* reexport safe */
|
|
24411
|
+
/* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.SortedArray),
|
|
24412
|
+
/* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.SpanKind),
|
|
24256
24413
|
/* harmony export */ StatusCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.StatusCategory),
|
|
24257
|
-
/* harmony export */ StopWatch: () => (/* reexport safe */
|
|
24414
|
+
/* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.StopWatch),
|
|
24258
24415
|
/* harmony export */ SuccessCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.SuccessCategory),
|
|
24259
|
-
/* harmony export */ Tracing: () => (/* reexport safe */
|
|
24416
|
+
/* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.Tracing),
|
|
24260
24417
|
/* harmony export */ TransientIdSequence: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.TransientIdSequence),
|
|
24261
|
-
/* harmony export */ TupleKeyedMap: () => (/* reexport safe */
|
|
24262
|
-
/* harmony export */ TypedArrayBuilder: () => (/* reexport safe */
|
|
24263
|
-
/* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */
|
|
24264
|
-
/* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */
|
|
24265
|
-
/* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */
|
|
24266
|
-
/* harmony export */ UintArrayBuilder: () => (/* reexport safe */
|
|
24267
|
-
/* harmony export */ UnexpectedErrors: () => (/* reexport safe */
|
|
24268
|
-
/* harmony export */ YieldManager: () => (/* reexport safe */
|
|
24418
|
+
/* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__.TupleKeyedMap),
|
|
24419
|
+
/* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.TypedArrayBuilder),
|
|
24420
|
+
/* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint16ArrayBuilder),
|
|
24421
|
+
/* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint32ArrayBuilder),
|
|
24422
|
+
/* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint8ArrayBuilder),
|
|
24423
|
+
/* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.UintArrayBuilder),
|
|
24424
|
+
/* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__.UnexpectedErrors),
|
|
24425
|
+
/* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_37__.YieldManager),
|
|
24269
24426
|
/* harmony export */ areEqualPossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.areEqualPossiblyUndefined),
|
|
24270
|
-
/* harmony export */ asInstanceOf: () => (/* reexport safe */
|
|
24427
|
+
/* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.asInstanceOf),
|
|
24271
24428
|
/* harmony export */ assert: () => (/* reexport safe */ _Assert__WEBPACK_IMPORTED_MODULE_1__.assert),
|
|
24272
|
-
/* harmony export */ base64StringToUint8Array: () => (/* reexport safe */
|
|
24429
|
+
/* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.base64StringToUint8Array),
|
|
24273
24430
|
/* harmony export */ compareArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareArrays),
|
|
24274
24431
|
/* harmony export */ compareBooleans: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleans),
|
|
24275
24432
|
/* harmony export */ compareBooleansOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleansOrUndefined),
|
|
@@ -24287,16 +24444,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24287
24444
|
/* harmony export */ expectNotNull: () => (/* reexport safe */ _Expect__WEBPACK_IMPORTED_MODULE_13__.expectNotNull),
|
|
24288
24445
|
/* harmony export */ isDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isDisposable),
|
|
24289
24446
|
/* harmony export */ isIDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isIDisposable),
|
|
24290
|
-
/* harmony export */ isInstanceOf: () => (/* reexport safe */
|
|
24447
|
+
/* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.isInstanceOf),
|
|
24291
24448
|
/* harmony export */ isProperSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isProperSubclassOf),
|
|
24292
24449
|
/* harmony export */ isSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isSubclassOf),
|
|
24293
|
-
/* harmony export */ lowerBound: () => (/* reexport safe */
|
|
24294
|
-
/* harmony export */ omit: () => (/* reexport safe */
|
|
24295
|
-
/* harmony export */ partitionArray: () => (/* reexport safe */
|
|
24296
|
-
/* harmony export */ shallowClone: () => (/* reexport safe */
|
|
24450
|
+
/* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.lowerBound),
|
|
24451
|
+
/* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.omit),
|
|
24452
|
+
/* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_25__.partitionArray),
|
|
24453
|
+
/* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.shallowClone),
|
|
24297
24454
|
/* harmony export */ using: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.using),
|
|
24298
|
-
/* harmony export */ utf8ToString: () => (/* reexport safe */
|
|
24299
|
-
/* harmony export */ wrapTimerCallback: () => (/* reexport safe */
|
|
24455
|
+
/* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.utf8ToString),
|
|
24456
|
+
/* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__.wrapTimerCallback)
|
|
24300
24457
|
/* harmony export */ });
|
|
24301
24458
|
/* harmony import */ var _AccessToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccessToken */ "../bentley/lib/esm/AccessToken.js");
|
|
24302
24459
|
/* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Assert */ "../bentley/lib/esm/Assert.js");
|
|
@@ -24318,24 +24475,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24318
24475
|
/* harmony import */ var _JsonUtils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./JsonUtils */ "../bentley/lib/esm/JsonUtils.js");
|
|
24319
24476
|
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Logger */ "../bentley/lib/esm/Logger.js");
|
|
24320
24477
|
/* harmony import */ var _LRUMap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LRUMap */ "../bentley/lib/esm/LRUMap.js");
|
|
24321
|
-
/* harmony import */ var
|
|
24322
|
-
/* harmony import */ var
|
|
24323
|
-
/* harmony import */ var
|
|
24324
|
-
/* harmony import */ var
|
|
24325
|
-
/* harmony import */ var
|
|
24326
|
-
/* harmony import */ var
|
|
24327
|
-
/* harmony import */ var
|
|
24328
|
-
/* harmony import */ var
|
|
24329
|
-
/* harmony import */ var
|
|
24330
|
-
/* harmony import */ var
|
|
24331
|
-
/* harmony import */ var
|
|
24332
|
-
/* harmony import */ var
|
|
24333
|
-
/* harmony import */ var
|
|
24334
|
-
/* harmony import */ var
|
|
24335
|
-
/* harmony import */ var
|
|
24336
|
-
/* harmony import */ var
|
|
24337
|
-
/* harmony import */ var
|
|
24338
|
-
/* harmony import */ var
|
|
24478
|
+
/* harmony import */ var _ObservableMap__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableMap */ "../bentley/lib/esm/ObservableMap.js");
|
|
24479
|
+
/* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ObservableSet */ "../bentley/lib/esm/ObservableSet.js");
|
|
24480
|
+
/* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OneAtATimeAction */ "../bentley/lib/esm/OneAtATimeAction.js");
|
|
24481
|
+
/* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../bentley/lib/esm/OrderedId64Iterable.js");
|
|
24482
|
+
/* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./OrderedSet */ "../bentley/lib/esm/OrderedSet.js");
|
|
24483
|
+
/* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./partitionArray */ "../bentley/lib/esm/partitionArray.js");
|
|
24484
|
+
/* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./PriorityQueue */ "../bentley/lib/esm/PriorityQueue.js");
|
|
24485
|
+
/* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ProcessDetector */ "../bentley/lib/esm/ProcessDetector.js");
|
|
24486
|
+
/* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./SortedArray */ "../bentley/lib/esm/SortedArray.js");
|
|
24487
|
+
/* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./StringUtils */ "../bentley/lib/esm/StringUtils.js");
|
|
24488
|
+
/* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Time */ "../bentley/lib/esm/Time.js");
|
|
24489
|
+
/* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Tracing */ "../bentley/lib/esm/Tracing.js");
|
|
24490
|
+
/* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TupleKeyedMap */ "../bentley/lib/esm/TupleKeyedMap.js");
|
|
24491
|
+
/* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../bentley/lib/esm/TypedArrayBuilder.js");
|
|
24492
|
+
/* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
|
|
24493
|
+
/* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityFunctions */ "../bentley/lib/esm/UtilityFunctions.js");
|
|
24494
|
+
/* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./UtilityTypes */ "../bentley/lib/esm/UtilityTypes.js");
|
|
24495
|
+
/* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./YieldManager */ "../bentley/lib/esm/YieldManager.js");
|
|
24496
|
+
/* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./internal/cross-package */ "../bentley/lib/esm/internal/cross-package.js");
|
|
24339
24497
|
/*---------------------------------------------------------------------------------------------
|
|
24340
24498
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
24341
24499
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -24375,6 +24533,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24375
24533
|
|
|
24376
24534
|
|
|
24377
24535
|
|
|
24536
|
+
|
|
24378
24537
|
|
|
24379
24538
|
|
|
24380
24539
|
// Temporarily (until 5.0) export top-level internal APIs to avoid breaking callers.
|