@itwin/ecschema-rpcinterface-tests 3.4.0-dev.43 → 3.4.0-dev.46
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/dist/bundled-tests.js +1198 -244
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +17 -17
|
@@ -19015,6 +19015,570 @@ Emitter.prototype.hasListeners = function(event){
|
|
|
19015
19015
|
};
|
|
19016
19016
|
|
|
19017
19017
|
|
|
19018
|
+
/***/ }),
|
|
19019
|
+
|
|
19020
|
+
/***/ "../../common/temp/node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js":
|
|
19021
|
+
/*!****************************************************************************************************************!*\
|
|
19022
|
+
!*** ../../common/temp/node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js ***!
|
|
19023
|
+
\****************************************************************************************************************/
|
|
19024
|
+
/***/ (function(module, exports) {
|
|
19025
|
+
|
|
19026
|
+
var global = typeof self !== 'undefined' ? self : this;
|
|
19027
|
+
var __self__ = (function () {
|
|
19028
|
+
function F() {
|
|
19029
|
+
this.fetch = false;
|
|
19030
|
+
this.DOMException = global.DOMException
|
|
19031
|
+
}
|
|
19032
|
+
F.prototype = global;
|
|
19033
|
+
return new F();
|
|
19034
|
+
})();
|
|
19035
|
+
(function(self) {
|
|
19036
|
+
|
|
19037
|
+
var irrelevant = (function (exports) {
|
|
19038
|
+
|
|
19039
|
+
var support = {
|
|
19040
|
+
searchParams: 'URLSearchParams' in self,
|
|
19041
|
+
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
|
19042
|
+
blob:
|
|
19043
|
+
'FileReader' in self &&
|
|
19044
|
+
'Blob' in self &&
|
|
19045
|
+
(function() {
|
|
19046
|
+
try {
|
|
19047
|
+
new Blob();
|
|
19048
|
+
return true
|
|
19049
|
+
} catch (e) {
|
|
19050
|
+
return false
|
|
19051
|
+
}
|
|
19052
|
+
})(),
|
|
19053
|
+
formData: 'FormData' in self,
|
|
19054
|
+
arrayBuffer: 'ArrayBuffer' in self
|
|
19055
|
+
};
|
|
19056
|
+
|
|
19057
|
+
function isDataView(obj) {
|
|
19058
|
+
return obj && DataView.prototype.isPrototypeOf(obj)
|
|
19059
|
+
}
|
|
19060
|
+
|
|
19061
|
+
if (support.arrayBuffer) {
|
|
19062
|
+
var viewClasses = [
|
|
19063
|
+
'[object Int8Array]',
|
|
19064
|
+
'[object Uint8Array]',
|
|
19065
|
+
'[object Uint8ClampedArray]',
|
|
19066
|
+
'[object Int16Array]',
|
|
19067
|
+
'[object Uint16Array]',
|
|
19068
|
+
'[object Int32Array]',
|
|
19069
|
+
'[object Uint32Array]',
|
|
19070
|
+
'[object Float32Array]',
|
|
19071
|
+
'[object Float64Array]'
|
|
19072
|
+
];
|
|
19073
|
+
|
|
19074
|
+
var isArrayBufferView =
|
|
19075
|
+
ArrayBuffer.isView ||
|
|
19076
|
+
function(obj) {
|
|
19077
|
+
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
|
|
19078
|
+
};
|
|
19079
|
+
}
|
|
19080
|
+
|
|
19081
|
+
function normalizeName(name) {
|
|
19082
|
+
if (typeof name !== 'string') {
|
|
19083
|
+
name = String(name);
|
|
19084
|
+
}
|
|
19085
|
+
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
|
|
19086
|
+
throw new TypeError('Invalid character in header field name')
|
|
19087
|
+
}
|
|
19088
|
+
return name.toLowerCase()
|
|
19089
|
+
}
|
|
19090
|
+
|
|
19091
|
+
function normalizeValue(value) {
|
|
19092
|
+
if (typeof value !== 'string') {
|
|
19093
|
+
value = String(value);
|
|
19094
|
+
}
|
|
19095
|
+
return value
|
|
19096
|
+
}
|
|
19097
|
+
|
|
19098
|
+
// Build a destructive iterator for the value list
|
|
19099
|
+
function iteratorFor(items) {
|
|
19100
|
+
var iterator = {
|
|
19101
|
+
next: function() {
|
|
19102
|
+
var value = items.shift();
|
|
19103
|
+
return {done: value === undefined, value: value}
|
|
19104
|
+
}
|
|
19105
|
+
};
|
|
19106
|
+
|
|
19107
|
+
if (support.iterable) {
|
|
19108
|
+
iterator[Symbol.iterator] = function() {
|
|
19109
|
+
return iterator
|
|
19110
|
+
};
|
|
19111
|
+
}
|
|
19112
|
+
|
|
19113
|
+
return iterator
|
|
19114
|
+
}
|
|
19115
|
+
|
|
19116
|
+
function Headers(headers) {
|
|
19117
|
+
this.map = {};
|
|
19118
|
+
|
|
19119
|
+
if (headers instanceof Headers) {
|
|
19120
|
+
headers.forEach(function(value, name) {
|
|
19121
|
+
this.append(name, value);
|
|
19122
|
+
}, this);
|
|
19123
|
+
} else if (Array.isArray(headers)) {
|
|
19124
|
+
headers.forEach(function(header) {
|
|
19125
|
+
this.append(header[0], header[1]);
|
|
19126
|
+
}, this);
|
|
19127
|
+
} else if (headers) {
|
|
19128
|
+
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
|
19129
|
+
this.append(name, headers[name]);
|
|
19130
|
+
}, this);
|
|
19131
|
+
}
|
|
19132
|
+
}
|
|
19133
|
+
|
|
19134
|
+
Headers.prototype.append = function(name, value) {
|
|
19135
|
+
name = normalizeName(name);
|
|
19136
|
+
value = normalizeValue(value);
|
|
19137
|
+
var oldValue = this.map[name];
|
|
19138
|
+
this.map[name] = oldValue ? oldValue + ', ' + value : value;
|
|
19139
|
+
};
|
|
19140
|
+
|
|
19141
|
+
Headers.prototype['delete'] = function(name) {
|
|
19142
|
+
delete this.map[normalizeName(name)];
|
|
19143
|
+
};
|
|
19144
|
+
|
|
19145
|
+
Headers.prototype.get = function(name) {
|
|
19146
|
+
name = normalizeName(name);
|
|
19147
|
+
return this.has(name) ? this.map[name] : null
|
|
19148
|
+
};
|
|
19149
|
+
|
|
19150
|
+
Headers.prototype.has = function(name) {
|
|
19151
|
+
return this.map.hasOwnProperty(normalizeName(name))
|
|
19152
|
+
};
|
|
19153
|
+
|
|
19154
|
+
Headers.prototype.set = function(name, value) {
|
|
19155
|
+
this.map[normalizeName(name)] = normalizeValue(value);
|
|
19156
|
+
};
|
|
19157
|
+
|
|
19158
|
+
Headers.prototype.forEach = function(callback, thisArg) {
|
|
19159
|
+
for (var name in this.map) {
|
|
19160
|
+
if (this.map.hasOwnProperty(name)) {
|
|
19161
|
+
callback.call(thisArg, this.map[name], name, this);
|
|
19162
|
+
}
|
|
19163
|
+
}
|
|
19164
|
+
};
|
|
19165
|
+
|
|
19166
|
+
Headers.prototype.keys = function() {
|
|
19167
|
+
var items = [];
|
|
19168
|
+
this.forEach(function(value, name) {
|
|
19169
|
+
items.push(name);
|
|
19170
|
+
});
|
|
19171
|
+
return iteratorFor(items)
|
|
19172
|
+
};
|
|
19173
|
+
|
|
19174
|
+
Headers.prototype.values = function() {
|
|
19175
|
+
var items = [];
|
|
19176
|
+
this.forEach(function(value) {
|
|
19177
|
+
items.push(value);
|
|
19178
|
+
});
|
|
19179
|
+
return iteratorFor(items)
|
|
19180
|
+
};
|
|
19181
|
+
|
|
19182
|
+
Headers.prototype.entries = function() {
|
|
19183
|
+
var items = [];
|
|
19184
|
+
this.forEach(function(value, name) {
|
|
19185
|
+
items.push([name, value]);
|
|
19186
|
+
});
|
|
19187
|
+
return iteratorFor(items)
|
|
19188
|
+
};
|
|
19189
|
+
|
|
19190
|
+
if (support.iterable) {
|
|
19191
|
+
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
|
19192
|
+
}
|
|
19193
|
+
|
|
19194
|
+
function consumed(body) {
|
|
19195
|
+
if (body.bodyUsed) {
|
|
19196
|
+
return Promise.reject(new TypeError('Already read'))
|
|
19197
|
+
}
|
|
19198
|
+
body.bodyUsed = true;
|
|
19199
|
+
}
|
|
19200
|
+
|
|
19201
|
+
function fileReaderReady(reader) {
|
|
19202
|
+
return new Promise(function(resolve, reject) {
|
|
19203
|
+
reader.onload = function() {
|
|
19204
|
+
resolve(reader.result);
|
|
19205
|
+
};
|
|
19206
|
+
reader.onerror = function() {
|
|
19207
|
+
reject(reader.error);
|
|
19208
|
+
};
|
|
19209
|
+
})
|
|
19210
|
+
}
|
|
19211
|
+
|
|
19212
|
+
function readBlobAsArrayBuffer(blob) {
|
|
19213
|
+
var reader = new FileReader();
|
|
19214
|
+
var promise = fileReaderReady(reader);
|
|
19215
|
+
reader.readAsArrayBuffer(blob);
|
|
19216
|
+
return promise
|
|
19217
|
+
}
|
|
19218
|
+
|
|
19219
|
+
function readBlobAsText(blob) {
|
|
19220
|
+
var reader = new FileReader();
|
|
19221
|
+
var promise = fileReaderReady(reader);
|
|
19222
|
+
reader.readAsText(blob);
|
|
19223
|
+
return promise
|
|
19224
|
+
}
|
|
19225
|
+
|
|
19226
|
+
function readArrayBufferAsText(buf) {
|
|
19227
|
+
var view = new Uint8Array(buf);
|
|
19228
|
+
var chars = new Array(view.length);
|
|
19229
|
+
|
|
19230
|
+
for (var i = 0; i < view.length; i++) {
|
|
19231
|
+
chars[i] = String.fromCharCode(view[i]);
|
|
19232
|
+
}
|
|
19233
|
+
return chars.join('')
|
|
19234
|
+
}
|
|
19235
|
+
|
|
19236
|
+
function bufferClone(buf) {
|
|
19237
|
+
if (buf.slice) {
|
|
19238
|
+
return buf.slice(0)
|
|
19239
|
+
} else {
|
|
19240
|
+
var view = new Uint8Array(buf.byteLength);
|
|
19241
|
+
view.set(new Uint8Array(buf));
|
|
19242
|
+
return view.buffer
|
|
19243
|
+
}
|
|
19244
|
+
}
|
|
19245
|
+
|
|
19246
|
+
function Body() {
|
|
19247
|
+
this.bodyUsed = false;
|
|
19248
|
+
|
|
19249
|
+
this._initBody = function(body) {
|
|
19250
|
+
this._bodyInit = body;
|
|
19251
|
+
if (!body) {
|
|
19252
|
+
this._bodyText = '';
|
|
19253
|
+
} else if (typeof body === 'string') {
|
|
19254
|
+
this._bodyText = body;
|
|
19255
|
+
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
|
19256
|
+
this._bodyBlob = body;
|
|
19257
|
+
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
|
19258
|
+
this._bodyFormData = body;
|
|
19259
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
19260
|
+
this._bodyText = body.toString();
|
|
19261
|
+
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
|
19262
|
+
this._bodyArrayBuffer = bufferClone(body.buffer);
|
|
19263
|
+
// IE 10-11 can't handle a DataView body.
|
|
19264
|
+
this._bodyInit = new Blob([this._bodyArrayBuffer]);
|
|
19265
|
+
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
|
19266
|
+
this._bodyArrayBuffer = bufferClone(body);
|
|
19267
|
+
} else {
|
|
19268
|
+
this._bodyText = body = Object.prototype.toString.call(body);
|
|
19269
|
+
}
|
|
19270
|
+
|
|
19271
|
+
if (!this.headers.get('content-type')) {
|
|
19272
|
+
if (typeof body === 'string') {
|
|
19273
|
+
this.headers.set('content-type', 'text/plain;charset=UTF-8');
|
|
19274
|
+
} else if (this._bodyBlob && this._bodyBlob.type) {
|
|
19275
|
+
this.headers.set('content-type', this._bodyBlob.type);
|
|
19276
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
19277
|
+
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
19278
|
+
}
|
|
19279
|
+
}
|
|
19280
|
+
};
|
|
19281
|
+
|
|
19282
|
+
if (support.blob) {
|
|
19283
|
+
this.blob = function() {
|
|
19284
|
+
var rejected = consumed(this);
|
|
19285
|
+
if (rejected) {
|
|
19286
|
+
return rejected
|
|
19287
|
+
}
|
|
19288
|
+
|
|
19289
|
+
if (this._bodyBlob) {
|
|
19290
|
+
return Promise.resolve(this._bodyBlob)
|
|
19291
|
+
} else if (this._bodyArrayBuffer) {
|
|
19292
|
+
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
|
|
19293
|
+
} else if (this._bodyFormData) {
|
|
19294
|
+
throw new Error('could not read FormData body as blob')
|
|
19295
|
+
} else {
|
|
19296
|
+
return Promise.resolve(new Blob([this._bodyText]))
|
|
19297
|
+
}
|
|
19298
|
+
};
|
|
19299
|
+
|
|
19300
|
+
this.arrayBuffer = function() {
|
|
19301
|
+
if (this._bodyArrayBuffer) {
|
|
19302
|
+
return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
|
|
19303
|
+
} else {
|
|
19304
|
+
return this.blob().then(readBlobAsArrayBuffer)
|
|
19305
|
+
}
|
|
19306
|
+
};
|
|
19307
|
+
}
|
|
19308
|
+
|
|
19309
|
+
this.text = function() {
|
|
19310
|
+
var rejected = consumed(this);
|
|
19311
|
+
if (rejected) {
|
|
19312
|
+
return rejected
|
|
19313
|
+
}
|
|
19314
|
+
|
|
19315
|
+
if (this._bodyBlob) {
|
|
19316
|
+
return readBlobAsText(this._bodyBlob)
|
|
19317
|
+
} else if (this._bodyArrayBuffer) {
|
|
19318
|
+
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
|
|
19319
|
+
} else if (this._bodyFormData) {
|
|
19320
|
+
throw new Error('could not read FormData body as text')
|
|
19321
|
+
} else {
|
|
19322
|
+
return Promise.resolve(this._bodyText)
|
|
19323
|
+
}
|
|
19324
|
+
};
|
|
19325
|
+
|
|
19326
|
+
if (support.formData) {
|
|
19327
|
+
this.formData = function() {
|
|
19328
|
+
return this.text().then(decode)
|
|
19329
|
+
};
|
|
19330
|
+
}
|
|
19331
|
+
|
|
19332
|
+
this.json = function() {
|
|
19333
|
+
return this.text().then(JSON.parse)
|
|
19334
|
+
};
|
|
19335
|
+
|
|
19336
|
+
return this
|
|
19337
|
+
}
|
|
19338
|
+
|
|
19339
|
+
// HTTP methods whose capitalization should be normalized
|
|
19340
|
+
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
|
|
19341
|
+
|
|
19342
|
+
function normalizeMethod(method) {
|
|
19343
|
+
var upcased = method.toUpperCase();
|
|
19344
|
+
return methods.indexOf(upcased) > -1 ? upcased : method
|
|
19345
|
+
}
|
|
19346
|
+
|
|
19347
|
+
function Request(input, options) {
|
|
19348
|
+
options = options || {};
|
|
19349
|
+
var body = options.body;
|
|
19350
|
+
|
|
19351
|
+
if (input instanceof Request) {
|
|
19352
|
+
if (input.bodyUsed) {
|
|
19353
|
+
throw new TypeError('Already read')
|
|
19354
|
+
}
|
|
19355
|
+
this.url = input.url;
|
|
19356
|
+
this.credentials = input.credentials;
|
|
19357
|
+
if (!options.headers) {
|
|
19358
|
+
this.headers = new Headers(input.headers);
|
|
19359
|
+
}
|
|
19360
|
+
this.method = input.method;
|
|
19361
|
+
this.mode = input.mode;
|
|
19362
|
+
this.signal = input.signal;
|
|
19363
|
+
if (!body && input._bodyInit != null) {
|
|
19364
|
+
body = input._bodyInit;
|
|
19365
|
+
input.bodyUsed = true;
|
|
19366
|
+
}
|
|
19367
|
+
} else {
|
|
19368
|
+
this.url = String(input);
|
|
19369
|
+
}
|
|
19370
|
+
|
|
19371
|
+
this.credentials = options.credentials || this.credentials || 'same-origin';
|
|
19372
|
+
if (options.headers || !this.headers) {
|
|
19373
|
+
this.headers = new Headers(options.headers);
|
|
19374
|
+
}
|
|
19375
|
+
this.method = normalizeMethod(options.method || this.method || 'GET');
|
|
19376
|
+
this.mode = options.mode || this.mode || null;
|
|
19377
|
+
this.signal = options.signal || this.signal;
|
|
19378
|
+
this.referrer = null;
|
|
19379
|
+
|
|
19380
|
+
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
19381
|
+
throw new TypeError('Body not allowed for GET or HEAD requests')
|
|
19382
|
+
}
|
|
19383
|
+
this._initBody(body);
|
|
19384
|
+
}
|
|
19385
|
+
|
|
19386
|
+
Request.prototype.clone = function() {
|
|
19387
|
+
return new Request(this, {body: this._bodyInit})
|
|
19388
|
+
};
|
|
19389
|
+
|
|
19390
|
+
function decode(body) {
|
|
19391
|
+
var form = new FormData();
|
|
19392
|
+
body
|
|
19393
|
+
.trim()
|
|
19394
|
+
.split('&')
|
|
19395
|
+
.forEach(function(bytes) {
|
|
19396
|
+
if (bytes) {
|
|
19397
|
+
var split = bytes.split('=');
|
|
19398
|
+
var name = split.shift().replace(/\+/g, ' ');
|
|
19399
|
+
var value = split.join('=').replace(/\+/g, ' ');
|
|
19400
|
+
form.append(decodeURIComponent(name), decodeURIComponent(value));
|
|
19401
|
+
}
|
|
19402
|
+
});
|
|
19403
|
+
return form
|
|
19404
|
+
}
|
|
19405
|
+
|
|
19406
|
+
function parseHeaders(rawHeaders) {
|
|
19407
|
+
var headers = new Headers();
|
|
19408
|
+
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
|
|
19409
|
+
// https://tools.ietf.org/html/rfc7230#section-3.2
|
|
19410
|
+
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
|
|
19411
|
+
preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
|
|
19412
|
+
var parts = line.split(':');
|
|
19413
|
+
var key = parts.shift().trim();
|
|
19414
|
+
if (key) {
|
|
19415
|
+
var value = parts.join(':').trim();
|
|
19416
|
+
headers.append(key, value);
|
|
19417
|
+
}
|
|
19418
|
+
});
|
|
19419
|
+
return headers
|
|
19420
|
+
}
|
|
19421
|
+
|
|
19422
|
+
Body.call(Request.prototype);
|
|
19423
|
+
|
|
19424
|
+
function Response(bodyInit, options) {
|
|
19425
|
+
if (!options) {
|
|
19426
|
+
options = {};
|
|
19427
|
+
}
|
|
19428
|
+
|
|
19429
|
+
this.type = 'default';
|
|
19430
|
+
this.status = options.status === undefined ? 200 : options.status;
|
|
19431
|
+
this.ok = this.status >= 200 && this.status < 300;
|
|
19432
|
+
this.statusText = 'statusText' in options ? options.statusText : 'OK';
|
|
19433
|
+
this.headers = new Headers(options.headers);
|
|
19434
|
+
this.url = options.url || '';
|
|
19435
|
+
this._initBody(bodyInit);
|
|
19436
|
+
}
|
|
19437
|
+
|
|
19438
|
+
Body.call(Response.prototype);
|
|
19439
|
+
|
|
19440
|
+
Response.prototype.clone = function() {
|
|
19441
|
+
return new Response(this._bodyInit, {
|
|
19442
|
+
status: this.status,
|
|
19443
|
+
statusText: this.statusText,
|
|
19444
|
+
headers: new Headers(this.headers),
|
|
19445
|
+
url: this.url
|
|
19446
|
+
})
|
|
19447
|
+
};
|
|
19448
|
+
|
|
19449
|
+
Response.error = function() {
|
|
19450
|
+
var response = new Response(null, {status: 0, statusText: ''});
|
|
19451
|
+
response.type = 'error';
|
|
19452
|
+
return response
|
|
19453
|
+
};
|
|
19454
|
+
|
|
19455
|
+
var redirectStatuses = [301, 302, 303, 307, 308];
|
|
19456
|
+
|
|
19457
|
+
Response.redirect = function(url, status) {
|
|
19458
|
+
if (redirectStatuses.indexOf(status) === -1) {
|
|
19459
|
+
throw new RangeError('Invalid status code')
|
|
19460
|
+
}
|
|
19461
|
+
|
|
19462
|
+
return new Response(null, {status: status, headers: {location: url}})
|
|
19463
|
+
};
|
|
19464
|
+
|
|
19465
|
+
exports.DOMException = self.DOMException;
|
|
19466
|
+
try {
|
|
19467
|
+
new exports.DOMException();
|
|
19468
|
+
} catch (err) {
|
|
19469
|
+
exports.DOMException = function(message, name) {
|
|
19470
|
+
this.message = message;
|
|
19471
|
+
this.name = name;
|
|
19472
|
+
var error = Error(message);
|
|
19473
|
+
this.stack = error.stack;
|
|
19474
|
+
};
|
|
19475
|
+
exports.DOMException.prototype = Object.create(Error.prototype);
|
|
19476
|
+
exports.DOMException.prototype.constructor = exports.DOMException;
|
|
19477
|
+
}
|
|
19478
|
+
|
|
19479
|
+
function fetch(input, init) {
|
|
19480
|
+
return new Promise(function(resolve, reject) {
|
|
19481
|
+
var request = new Request(input, init);
|
|
19482
|
+
|
|
19483
|
+
if (request.signal && request.signal.aborted) {
|
|
19484
|
+
return reject(new exports.DOMException('Aborted', 'AbortError'))
|
|
19485
|
+
}
|
|
19486
|
+
|
|
19487
|
+
var xhr = new XMLHttpRequest();
|
|
19488
|
+
|
|
19489
|
+
function abortXhr() {
|
|
19490
|
+
xhr.abort();
|
|
19491
|
+
}
|
|
19492
|
+
|
|
19493
|
+
xhr.onload = function() {
|
|
19494
|
+
var options = {
|
|
19495
|
+
status: xhr.status,
|
|
19496
|
+
statusText: xhr.statusText,
|
|
19497
|
+
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
|
19498
|
+
};
|
|
19499
|
+
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
|
19500
|
+
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
|
19501
|
+
resolve(new Response(body, options));
|
|
19502
|
+
};
|
|
19503
|
+
|
|
19504
|
+
xhr.onerror = function() {
|
|
19505
|
+
reject(new TypeError('Network request failed'));
|
|
19506
|
+
};
|
|
19507
|
+
|
|
19508
|
+
xhr.ontimeout = function() {
|
|
19509
|
+
reject(new TypeError('Network request failed'));
|
|
19510
|
+
};
|
|
19511
|
+
|
|
19512
|
+
xhr.onabort = function() {
|
|
19513
|
+
reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
19514
|
+
};
|
|
19515
|
+
|
|
19516
|
+
xhr.open(request.method, request.url, true);
|
|
19517
|
+
|
|
19518
|
+
if (request.credentials === 'include') {
|
|
19519
|
+
xhr.withCredentials = true;
|
|
19520
|
+
} else if (request.credentials === 'omit') {
|
|
19521
|
+
xhr.withCredentials = false;
|
|
19522
|
+
}
|
|
19523
|
+
|
|
19524
|
+
if ('responseType' in xhr && support.blob) {
|
|
19525
|
+
xhr.responseType = 'blob';
|
|
19526
|
+
}
|
|
19527
|
+
|
|
19528
|
+
request.headers.forEach(function(value, name) {
|
|
19529
|
+
xhr.setRequestHeader(name, value);
|
|
19530
|
+
});
|
|
19531
|
+
|
|
19532
|
+
if (request.signal) {
|
|
19533
|
+
request.signal.addEventListener('abort', abortXhr);
|
|
19534
|
+
|
|
19535
|
+
xhr.onreadystatechange = function() {
|
|
19536
|
+
// DONE (success or failure)
|
|
19537
|
+
if (xhr.readyState === 4) {
|
|
19538
|
+
request.signal.removeEventListener('abort', abortXhr);
|
|
19539
|
+
}
|
|
19540
|
+
};
|
|
19541
|
+
}
|
|
19542
|
+
|
|
19543
|
+
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
|
|
19544
|
+
})
|
|
19545
|
+
}
|
|
19546
|
+
|
|
19547
|
+
fetch.polyfill = true;
|
|
19548
|
+
|
|
19549
|
+
if (!self.fetch) {
|
|
19550
|
+
self.fetch = fetch;
|
|
19551
|
+
self.Headers = Headers;
|
|
19552
|
+
self.Request = Request;
|
|
19553
|
+
self.Response = Response;
|
|
19554
|
+
}
|
|
19555
|
+
|
|
19556
|
+
exports.Headers = Headers;
|
|
19557
|
+
exports.Request = Request;
|
|
19558
|
+
exports.Response = Response;
|
|
19559
|
+
exports.fetch = fetch;
|
|
19560
|
+
|
|
19561
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
19562
|
+
|
|
19563
|
+
return exports;
|
|
19564
|
+
|
|
19565
|
+
})({});
|
|
19566
|
+
})(__self__);
|
|
19567
|
+
__self__.fetch.ponyfill = true;
|
|
19568
|
+
// Remove "polyfill" property added by whatwg-fetch
|
|
19569
|
+
delete __self__.fetch.polyfill;
|
|
19570
|
+
// Choose between native implementation (global) or custom implementation (__self__)
|
|
19571
|
+
// var ctx = global.fetch ? global : __self__;
|
|
19572
|
+
var ctx = __self__; // this line disable service worker support temporarily
|
|
19573
|
+
exports = ctx.fetch // To enable: import fetch from 'cross-fetch'
|
|
19574
|
+
exports["default"] = ctx.fetch // For TypeScript consumers without esModuleInterop.
|
|
19575
|
+
exports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'
|
|
19576
|
+
exports.Headers = ctx.Headers
|
|
19577
|
+
exports.Request = ctx.Request
|
|
19578
|
+
exports.Response = ctx.Response
|
|
19579
|
+
module.exports = exports
|
|
19580
|
+
|
|
19581
|
+
|
|
19018
19582
|
/***/ }),
|
|
19019
19583
|
|
|
19020
19584
|
/***/ "../../common/temp/node_modules/.pnpm/deep-assign@2.0.0/node_modules/deep-assign/index.js":
|
|
@@ -21329,235 +21893,6 @@ Browser.type = 'languageDetector';
|
|
|
21329
21893
|
|
|
21330
21894
|
|
|
21331
21895
|
|
|
21332
|
-
/***/ }),
|
|
21333
|
-
|
|
21334
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-xhr-backend@3.2.2/node_modules/i18next-xhr-backend/dist/esm/i18nextXHRBackend.js":
|
|
21335
|
-
/*!*************************************************************************************************************************************!*\
|
|
21336
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-xhr-backend@3.2.2/node_modules/i18next-xhr-backend/dist/esm/i18nextXHRBackend.js ***!
|
|
21337
|
-
\*************************************************************************************************************************************/
|
|
21338
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
21339
|
-
|
|
21340
|
-
"use strict";
|
|
21341
|
-
__webpack_require__.r(__webpack_exports__);
|
|
21342
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21343
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
21344
|
-
/* harmony export */ });
|
|
21345
|
-
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.19.0/node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
|
|
21346
|
-
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.19.0/node_modules/@babel/runtime/helpers/esm/createClass.js");
|
|
21347
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.19.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
21348
|
-
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.19.0/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
21349
|
-
|
|
21350
|
-
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
var arr = [];
|
|
21355
|
-
var each = arr.forEach;
|
|
21356
|
-
var slice = arr.slice;
|
|
21357
|
-
function defaults(obj) {
|
|
21358
|
-
each.call(slice.call(arguments, 1), function (source) {
|
|
21359
|
-
if (source) {
|
|
21360
|
-
for (var prop in source) {
|
|
21361
|
-
if (obj[prop] === undefined) obj[prop] = source[prop];
|
|
21362
|
-
}
|
|
21363
|
-
}
|
|
21364
|
-
});
|
|
21365
|
-
return obj;
|
|
21366
|
-
}
|
|
21367
|
-
|
|
21368
|
-
function addQueryString(url, params) {
|
|
21369
|
-
if (params && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__["default"])(params) === 'object') {
|
|
21370
|
-
var queryString = '',
|
|
21371
|
-
e = encodeURIComponent; // Must encode data
|
|
21372
|
-
|
|
21373
|
-
for (var paramName in params) {
|
|
21374
|
-
queryString += '&' + e(paramName) + '=' + e(params[paramName]);
|
|
21375
|
-
}
|
|
21376
|
-
|
|
21377
|
-
if (!queryString) {
|
|
21378
|
-
return url;
|
|
21379
|
-
}
|
|
21380
|
-
|
|
21381
|
-
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
|
21382
|
-
}
|
|
21383
|
-
|
|
21384
|
-
return url;
|
|
21385
|
-
} // https://gist.github.com/Xeoncross/7663273
|
|
21386
|
-
|
|
21387
|
-
|
|
21388
|
-
function ajax(url, options, callback, data, cache) {
|
|
21389
|
-
if (data && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__["default"])(data) === 'object') {
|
|
21390
|
-
if (!cache) {
|
|
21391
|
-
data['_t'] = new Date();
|
|
21392
|
-
} // URL encoded form data must be in querystring format
|
|
21393
|
-
|
|
21394
|
-
|
|
21395
|
-
data = addQueryString('', data).slice(1);
|
|
21396
|
-
}
|
|
21397
|
-
|
|
21398
|
-
if (options.queryStringParams) {
|
|
21399
|
-
url = addQueryString(url, options.queryStringParams);
|
|
21400
|
-
}
|
|
21401
|
-
|
|
21402
|
-
try {
|
|
21403
|
-
var x;
|
|
21404
|
-
|
|
21405
|
-
if (XMLHttpRequest) {
|
|
21406
|
-
x = new XMLHttpRequest();
|
|
21407
|
-
} else {
|
|
21408
|
-
x = new ActiveXObject('MSXML2.XMLHTTP.3.0');
|
|
21409
|
-
}
|
|
21410
|
-
|
|
21411
|
-
x.open(data ? 'POST' : 'GET', url, 1);
|
|
21412
|
-
|
|
21413
|
-
if (!options.crossDomain) {
|
|
21414
|
-
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
21415
|
-
}
|
|
21416
|
-
|
|
21417
|
-
x.withCredentials = !!options.withCredentials;
|
|
21418
|
-
|
|
21419
|
-
if (data) {
|
|
21420
|
-
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
|
21421
|
-
}
|
|
21422
|
-
|
|
21423
|
-
if (x.overrideMimeType) {
|
|
21424
|
-
x.overrideMimeType("application/json");
|
|
21425
|
-
}
|
|
21426
|
-
|
|
21427
|
-
var h = options.customHeaders;
|
|
21428
|
-
h = typeof h === 'function' ? h() : h;
|
|
21429
|
-
|
|
21430
|
-
if (h) {
|
|
21431
|
-
for (var i in h) {
|
|
21432
|
-
x.setRequestHeader(i, h[i]);
|
|
21433
|
-
}
|
|
21434
|
-
}
|
|
21435
|
-
|
|
21436
|
-
x.onreadystatechange = function () {
|
|
21437
|
-
x.readyState > 3 && callback && callback(x.responseText, x);
|
|
21438
|
-
};
|
|
21439
|
-
|
|
21440
|
-
x.send(data);
|
|
21441
|
-
} catch (e) {
|
|
21442
|
-
console && console.log(e);
|
|
21443
|
-
}
|
|
21444
|
-
}
|
|
21445
|
-
|
|
21446
|
-
function getDefaults() {
|
|
21447
|
-
return {
|
|
21448
|
-
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
|
21449
|
-
addPath: '/locales/add/{{lng}}/{{ns}}',
|
|
21450
|
-
allowMultiLoading: false,
|
|
21451
|
-
parse: JSON.parse,
|
|
21452
|
-
parsePayload: function parsePayload(namespace, key, fallbackValue) {
|
|
21453
|
-
return (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, key, fallbackValue || '');
|
|
21454
|
-
},
|
|
21455
|
-
crossDomain: false,
|
|
21456
|
-
ajax: ajax
|
|
21457
|
-
};
|
|
21458
|
-
}
|
|
21459
|
-
|
|
21460
|
-
var Backend =
|
|
21461
|
-
/*#__PURE__*/
|
|
21462
|
-
function () {
|
|
21463
|
-
function Backend(services) {
|
|
21464
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
21465
|
-
|
|
21466
|
-
(0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Backend);
|
|
21467
|
-
|
|
21468
|
-
this.init(services, options);
|
|
21469
|
-
this.type = 'backend';
|
|
21470
|
-
}
|
|
21471
|
-
|
|
21472
|
-
(0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Backend, [{
|
|
21473
|
-
key: "init",
|
|
21474
|
-
value: function init(services) {
|
|
21475
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
21476
|
-
this.services = services;
|
|
21477
|
-
this.options = defaults(options, this.options || {}, getDefaults());
|
|
21478
|
-
}
|
|
21479
|
-
}, {
|
|
21480
|
-
key: "readMulti",
|
|
21481
|
-
value: function readMulti(languages, namespaces, callback) {
|
|
21482
|
-
var loadPath = this.options.loadPath;
|
|
21483
|
-
|
|
21484
|
-
if (typeof this.options.loadPath === 'function') {
|
|
21485
|
-
loadPath = this.options.loadPath(languages, namespaces);
|
|
21486
|
-
}
|
|
21487
|
-
|
|
21488
|
-
var url = this.services.interpolator.interpolate(loadPath, {
|
|
21489
|
-
lng: languages.join('+'),
|
|
21490
|
-
ns: namespaces.join('+')
|
|
21491
|
-
});
|
|
21492
|
-
this.loadUrl(url, callback);
|
|
21493
|
-
}
|
|
21494
|
-
}, {
|
|
21495
|
-
key: "read",
|
|
21496
|
-
value: function read(language, namespace, callback) {
|
|
21497
|
-
var loadPath = this.options.loadPath;
|
|
21498
|
-
|
|
21499
|
-
if (typeof this.options.loadPath === 'function') {
|
|
21500
|
-
loadPath = this.options.loadPath([language], [namespace]);
|
|
21501
|
-
}
|
|
21502
|
-
|
|
21503
|
-
var url = this.services.interpolator.interpolate(loadPath, {
|
|
21504
|
-
lng: language,
|
|
21505
|
-
ns: namespace
|
|
21506
|
-
});
|
|
21507
|
-
this.loadUrl(url, callback);
|
|
21508
|
-
}
|
|
21509
|
-
}, {
|
|
21510
|
-
key: "loadUrl",
|
|
21511
|
-
value: function loadUrl(url, callback) {
|
|
21512
|
-
var _this = this;
|
|
21513
|
-
|
|
21514
|
-
this.options.ajax(url, this.options, function (data, xhr) {
|
|
21515
|
-
if (xhr.status >= 500 && xhr.status < 600) return callback('failed loading ' + url, true
|
|
21516
|
-
/* retry */
|
|
21517
|
-
);
|
|
21518
|
-
if (xhr.status >= 400 && xhr.status < 500) return callback('failed loading ' + url, false
|
|
21519
|
-
/* no retry */
|
|
21520
|
-
);
|
|
21521
|
-
var ret, err;
|
|
21522
|
-
|
|
21523
|
-
try {
|
|
21524
|
-
ret = _this.options.parse(data, url);
|
|
21525
|
-
} catch (e) {
|
|
21526
|
-
err = 'failed parsing ' + url + ' to json';
|
|
21527
|
-
}
|
|
21528
|
-
|
|
21529
|
-
if (err) return callback(err, false);
|
|
21530
|
-
callback(null, ret);
|
|
21531
|
-
});
|
|
21532
|
-
}
|
|
21533
|
-
}, {
|
|
21534
|
-
key: "create",
|
|
21535
|
-
value: function create(languages, namespace, key, fallbackValue) {
|
|
21536
|
-
var _this2 = this;
|
|
21537
|
-
|
|
21538
|
-
if (typeof languages === 'string') languages = [languages];
|
|
21539
|
-
var payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
21540
|
-
languages.forEach(function (lng) {
|
|
21541
|
-
var url = _this2.services.interpolator.interpolate(_this2.options.addPath, {
|
|
21542
|
-
lng: lng,
|
|
21543
|
-
ns: namespace
|
|
21544
|
-
});
|
|
21545
|
-
|
|
21546
|
-
_this2.options.ajax(url, _this2.options, function (data, xhr) {//const statusCode = xhr.status.toString();
|
|
21547
|
-
// TODO: if statusCode === 4xx do log
|
|
21548
|
-
}, payload);
|
|
21549
|
-
});
|
|
21550
|
-
}
|
|
21551
|
-
}]);
|
|
21552
|
-
|
|
21553
|
-
return Backend;
|
|
21554
|
-
}();
|
|
21555
|
-
|
|
21556
|
-
Backend.type = 'backend';
|
|
21557
|
-
|
|
21558
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
|
|
21559
|
-
|
|
21560
|
-
|
|
21561
21896
|
/***/ }),
|
|
21562
21897
|
|
|
21563
21898
|
/***/ "../../common/temp/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js":
|
|
@@ -87209,7 +87544,7 @@ class RpcConfiguration {
|
|
|
87209
87544
|
/** The target interval (in milliseconds) between connection attempts for pending RPC operation requests. */
|
|
87210
87545
|
this.pendingOperationRetryInterval = 10000;
|
|
87211
87546
|
/** The maximum number of transient faults permitted before request failure. */
|
|
87212
|
-
this.transientFaultLimit =
|
|
87547
|
+
this.transientFaultLimit = 4;
|
|
87213
87548
|
/** @internal */
|
|
87214
87549
|
this.routing = _RpcRoutingToken__WEBPACK_IMPORTED_MODULE_5__.RpcRoutingToken["default"];
|
|
87215
87550
|
/** The control channel for the configuration.
|
|
@@ -87438,11 +87773,14 @@ var RpcRequestStatus;
|
|
|
87438
87773
|
RpcRequestStatus[RpcRequestStatus["BadGateway"] = 10] = "BadGateway";
|
|
87439
87774
|
RpcRequestStatus[RpcRequestStatus["ServiceUnavailable"] = 11] = "ServiceUnavailable";
|
|
87440
87775
|
RpcRequestStatus[RpcRequestStatus["GatewayTimeout"] = 12] = "GatewayTimeout";
|
|
87776
|
+
RpcRequestStatus[RpcRequestStatus["RequestTimeout"] = 13] = "RequestTimeout";
|
|
87777
|
+
RpcRequestStatus[RpcRequestStatus["TooManyRequests"] = 14] = "TooManyRequests";
|
|
87441
87778
|
})(RpcRequestStatus || (RpcRequestStatus = {}));
|
|
87442
87779
|
/** @public */
|
|
87443
87780
|
(function (RpcRequestStatus) {
|
|
87444
87781
|
function isTransientError(status) {
|
|
87445
|
-
return status === RpcRequestStatus.BadGateway || status === RpcRequestStatus.ServiceUnavailable || status === RpcRequestStatus.GatewayTimeout
|
|
87782
|
+
return status === RpcRequestStatus.BadGateway || status === RpcRequestStatus.ServiceUnavailable || status === RpcRequestStatus.GatewayTimeout
|
|
87783
|
+
|| status === RpcRequestStatus.RequestTimeout || status === RpcRequestStatus.TooManyRequests;
|
|
87446
87784
|
}
|
|
87447
87785
|
RpcRequestStatus.isTransientError = isTransientError;
|
|
87448
87786
|
})(RpcRequestStatus || (RpcRequestStatus = {}));
|
|
@@ -90115,6 +90453,8 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_3__.R
|
|
|
90115
90453
|
case 502: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.BadGateway;
|
|
90116
90454
|
case 503: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.ServiceUnavailable;
|
|
90117
90455
|
case 504: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.GatewayTimeout;
|
|
90456
|
+
case 408: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.RequestTimeout;
|
|
90457
|
+
case 429: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.TooManyRequests;
|
|
90118
90458
|
default: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Unknown;
|
|
90119
90459
|
}
|
|
90120
90460
|
}
|
|
@@ -90129,6 +90469,8 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_3__.R
|
|
|
90129
90469
|
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.BadGateway: return 502;
|
|
90130
90470
|
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.ServiceUnavailable: return 503;
|
|
90131
90471
|
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.GatewayTimeout: return 504;
|
|
90472
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.RequestTimeout: return 408;
|
|
90473
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.TooManyRequests: return 429;
|
|
90132
90474
|
default: return 501;
|
|
90133
90475
|
}
|
|
90134
90476
|
}
|
|
@@ -120665,6 +121007,12 @@ class ViewManager {
|
|
|
120665
121007
|
this.toolTipProviders.length = 0;
|
|
120666
121008
|
this._selectedView = undefined;
|
|
120667
121009
|
}
|
|
121010
|
+
/** Returns true if the specified viewport is currently being managed by this ViewManager.
|
|
121011
|
+
* @see [[addViewport]] to enable management of a viewport and [[dropViewport]] to disable it.
|
|
121012
|
+
*/
|
|
121013
|
+
hasViewport(viewport) {
|
|
121014
|
+
return this._viewports.includes(viewport);
|
|
121015
|
+
}
|
|
120668
121016
|
/** @internal */
|
|
120669
121017
|
endDynamicsMode() {
|
|
120670
121018
|
if (!this.inDynamicsMode)
|
|
@@ -120726,7 +121074,7 @@ class ViewManager {
|
|
|
120726
121074
|
* @note raises onViewOpen event with newVp.
|
|
120727
121075
|
*/
|
|
120728
121076
|
addViewport(newVp) {
|
|
120729
|
-
if (this.
|
|
121077
|
+
if (this.hasViewport(newVp)) // make sure its not already added
|
|
120730
121078
|
return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR;
|
|
120731
121079
|
newVp.setEventController(new _tools_EventController__WEBPACK_IMPORTED_MODULE_3__.EventController(newVp)); // this will direct events to the viewport
|
|
120732
121080
|
this._viewports.push(newVp);
|
|
@@ -123790,6 +124138,8 @@ class Viewport {
|
|
|
123790
124138
|
* @note Attempting to assign to [[flashedId]] from within the event callback will produce an exception.
|
|
123791
124139
|
*/
|
|
123792
124140
|
this.onFlashedIdChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
124141
|
+
/** @internal */
|
|
124142
|
+
this._hasMissingTiles = false;
|
|
123793
124143
|
/** A function executed by `setView()` when `this._view` changes. */
|
|
123794
124144
|
this._detachFromView = [];
|
|
123795
124145
|
this._detachFromDisplayStyle = [];
|
|
@@ -125529,6 +125879,7 @@ class Viewport {
|
|
|
125529
125879
|
const context = this.createSceneContext();
|
|
125530
125880
|
this.createScene(context);
|
|
125531
125881
|
context.requestMissingTiles();
|
|
125882
|
+
this._hasMissingTiles = context.hasMissingTiles || context.missingTiles.size > 0;
|
|
125532
125883
|
target.changeScene(context.scene);
|
|
125533
125884
|
isRedrawNeeded = true;
|
|
125534
125885
|
this._frameStatsCollector.endTime("createChangeSceneTime");
|
|
@@ -125644,6 +125995,45 @@ class Viewport {
|
|
|
125644
125995
|
readImageToCanvas() {
|
|
125645
125996
|
return this.target.readImageToCanvas();
|
|
125646
125997
|
}
|
|
125998
|
+
/** Returns a Promise that resolves after the contents of this viewport are fully loaded and rendered.
|
|
125999
|
+
* This can be useful, for example, when you want to capture an image of the viewport's contents, as in the following code:
|
|
126000
|
+
* ```ts
|
|
126001
|
+
* async function captureImage(vp: Viewport): Promise<ImageBuffer | undefined> {
|
|
126002
|
+
* await vp.waitForSceneCompletion();
|
|
126003
|
+
* return vp.readImageBuffer();
|
|
126004
|
+
* }
|
|
126005
|
+
* ```
|
|
126006
|
+
*/
|
|
126007
|
+
async waitForSceneCompletion() {
|
|
126008
|
+
const system = this.target.renderSystem;
|
|
126009
|
+
let haveNewTiles = true;
|
|
126010
|
+
let haveExternalTexRequests = true;
|
|
126011
|
+
while ((haveNewTiles || haveExternalTexRequests) && !this.isDisposed) {
|
|
126012
|
+
// Since this viewport is not being managed by the ViewManager, we must first manually invalidate the scene and re-render the frame each tick of the tile-wait loop.
|
|
126013
|
+
this.invalidateScene();
|
|
126014
|
+
this.renderFrame();
|
|
126015
|
+
haveExternalTexRequests = system.hasExternalTextureRequests;
|
|
126016
|
+
haveNewTiles = !this.areAllTileTreesLoaded || this._hasMissingTiles;
|
|
126017
|
+
if (!haveNewTiles) {
|
|
126018
|
+
// ViewAttachments and 3d section drawing attachments render to separate off-screen viewports - check those too.
|
|
126019
|
+
for (const vp of this.view.secondaryViewports) {
|
|
126020
|
+
if (vp.numRequestedTiles > 0) {
|
|
126021
|
+
haveNewTiles = true;
|
|
126022
|
+
break;
|
|
126023
|
+
}
|
|
126024
|
+
const tiles = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.tileAdmin.getTilesForUser(vp);
|
|
126025
|
+
if (tiles && tiles.external.requested > 0) {
|
|
126026
|
+
haveNewTiles = true;
|
|
126027
|
+
break;
|
|
126028
|
+
}
|
|
126029
|
+
}
|
|
126030
|
+
}
|
|
126031
|
+
// Since the viewport is not being managed by the ViewManager, we must manually pump the TileAdmin to initiate further tile requests each tick of the tile-wait loop.
|
|
126032
|
+
if (haveNewTiles)
|
|
126033
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.tileAdmin.process();
|
|
126034
|
+
await _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration.wait(100);
|
|
126035
|
+
}
|
|
126036
|
+
}
|
|
125647
126037
|
/** Get the point at the specified x and y location in the pixel buffer in npc coordinates.
|
|
125648
126038
|
* @see [[getPixelDataWorldPoint]] to obtain the point in [[CoordSystem.World]].
|
|
125649
126039
|
*/
|
|
@@ -126350,6 +126740,61 @@ class ScreenViewport extends Viewport {
|
|
|
126350
126740
|
}
|
|
126351
126741
|
this.invalidateRenderPlan();
|
|
126352
126742
|
}
|
|
126743
|
+
/** @internal override */
|
|
126744
|
+
async waitForSceneCompletion() {
|
|
126745
|
+
if (!_IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.viewManager.hasViewport(this))
|
|
126746
|
+
return super.waitForSceneCompletion();
|
|
126747
|
+
const system = this.target.renderSystem;
|
|
126748
|
+
// Let the ViewManager/TileAdmin initiate all further requests for tiles until no more requests are pending.
|
|
126749
|
+
// We will latch onto the onRender event in order to know when tile requests are finished and the promise is fulfilled.
|
|
126750
|
+
const promise = new Promise((resolve, _reject) => {
|
|
126751
|
+
const removeOnRender = this.onRender.addListener(() => {
|
|
126752
|
+
const removeOnViewClose = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.viewManager.onViewClose.addListener((vp) => {
|
|
126753
|
+
if (vp === this) {
|
|
126754
|
+
removeOnViewClose();
|
|
126755
|
+
removeOnRender();
|
|
126756
|
+
resolve();
|
|
126757
|
+
return;
|
|
126758
|
+
}
|
|
126759
|
+
});
|
|
126760
|
+
if (this.isDisposed) {
|
|
126761
|
+
removeOnViewClose();
|
|
126762
|
+
removeOnRender();
|
|
126763
|
+
resolve();
|
|
126764
|
+
return;
|
|
126765
|
+
}
|
|
126766
|
+
let haveNewTiles = !this.areAllTileTreesLoaded || this._hasMissingTiles;
|
|
126767
|
+
if (!haveNewTiles) {
|
|
126768
|
+
// ViewAttachments and 3d section drawing attachments render to separate off-screen viewports - check those too.
|
|
126769
|
+
for (const vp of this.view.secondaryViewports) {
|
|
126770
|
+
if (vp.numRequestedTiles > 0) {
|
|
126771
|
+
haveNewTiles = true;
|
|
126772
|
+
break;
|
|
126773
|
+
}
|
|
126774
|
+
const tiles = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.tileAdmin.getTilesForUser(vp);
|
|
126775
|
+
if (tiles && tiles.external.requested > 0) {
|
|
126776
|
+
haveNewTiles = true;
|
|
126777
|
+
break;
|
|
126778
|
+
}
|
|
126779
|
+
}
|
|
126780
|
+
}
|
|
126781
|
+
if (!haveNewTiles && !system.hasExternalTextureRequests) {
|
|
126782
|
+
removeOnViewClose();
|
|
126783
|
+
removeOnRender();
|
|
126784
|
+
resolve();
|
|
126785
|
+
return;
|
|
126786
|
+
}
|
|
126787
|
+
});
|
|
126788
|
+
});
|
|
126789
|
+
// Must first wait to ensure all tile trees are loaded -- tile requests will not happen before then; it may look like we have no requests pending, but in reality no requests even began.
|
|
126790
|
+
while (!this.areAllTileTreesLoaded) {
|
|
126791
|
+
await _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration.wait(100);
|
|
126792
|
+
}
|
|
126793
|
+
// After all tile trees have loaded, kick off an initial request for tiles.
|
|
126794
|
+
this.invalidateScene();
|
|
126795
|
+
this.renderFrame();
|
|
126796
|
+
return promise;
|
|
126797
|
+
}
|
|
126353
126798
|
}
|
|
126354
126799
|
/** Settings that may be adjusted to control the way animations are applied to a [[ScreenViewport]] by methods like
|
|
126355
126800
|
* [[changeView]] and [[synchWithView].
|
|
@@ -131962,6 +132407,8 @@ class RenderSystem {
|
|
|
131962
132407
|
}
|
|
131963
132408
|
/** Return a Promise which when resolved indicates that all pending external textures have finished loading from the backend. */
|
|
131964
132409
|
async waitForAllExternalTextures() { return Promise.resolve(); }
|
|
132410
|
+
/** @internal */
|
|
132411
|
+
get hasExternalTextureRequests() { return false; }
|
|
131965
132412
|
/** Create a graphic that assumes ownership of another graphic.
|
|
131966
132413
|
* @param ownedGraphic The RenderGraphic to be owned.
|
|
131967
132414
|
* @returns The owning graphic that exposes a `disposeGraphic` method for explicitly disposing of the owned graphic.
|
|
@@ -152620,6 +153067,10 @@ class System extends _RenderSystem__WEBPACK_IMPORTED_MODULE_7__.RenderSystem {
|
|
|
152620
153067
|
});
|
|
152621
153068
|
return promise;
|
|
152622
153069
|
}
|
|
153070
|
+
get hasExternalTextureRequests() {
|
|
153071
|
+
const loader = _Texture__WEBPACK_IMPORTED_MODULE_33__.ExternalTextureLoader.instance;
|
|
153072
|
+
return loader.numActiveRequests > 0 || loader.numPendingRequests > 0;
|
|
153073
|
+
}
|
|
152623
153074
|
/** Attempt to create a WebGLRenderingContext, returning undefined if unsuccessful. */
|
|
152624
153075
|
static createContext(canvas, useWebGL2, inputContextAttributes) {
|
|
152625
153076
|
let contextAttributes = { powerPreference: "high-performance" };
|
|
@@ -193177,7 +193628,7 @@ class ViewPan extends HandleWithInertia {
|
|
|
193177
193628
|
const thisWorld = vp.npcToWorld(thisPtNpc);
|
|
193178
193629
|
const dist = thisWorld.vectorTo(lastWorld);
|
|
193179
193630
|
if (view.is3d()) {
|
|
193180
|
-
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_17__.ViewStatus.Success !== (
|
|
193631
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_17__.ViewStatus.Success !== (vp.viewingGlobe ? view.moveCameraGlobal(lastWorld, thisWorld) : view.moveCameraWorld(dist)))
|
|
193181
193632
|
return false;
|
|
193182
193633
|
this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it
|
|
193183
193634
|
}
|
|
@@ -275621,7 +276072,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
275621
276072
|
/* harmony export */ });
|
|
275622
276073
|
/* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js");
|
|
275623
276074
|
/* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.5/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js");
|
|
275624
|
-
/* harmony import */ var
|
|
276075
|
+
/* harmony import */ var i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/index.js");
|
|
275625
276076
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
275626
276077
|
/*---------------------------------------------------------------------------------------------
|
|
275627
276078
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -275634,6 +276085,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
275634
276085
|
|
|
275635
276086
|
|
|
275636
276087
|
|
|
276088
|
+
const DEFAULT_MAX_RETRIES = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
|
|
275637
276089
|
/** Supplies localizations for iTwin.js
|
|
275638
276090
|
* @note this class uses the [i18next](https://www.i18next.com/) package.
|
|
275639
276091
|
* @public
|
|
@@ -275657,20 +276109,28 @@ class ITwinLocalization {
|
|
|
275657
276109
|
this._initOptions = {
|
|
275658
276110
|
interpolation: { escapeValue: true },
|
|
275659
276111
|
fallbackLng: "en",
|
|
276112
|
+
maxRetries: DEFAULT_MAX_RETRIES,
|
|
275660
276113
|
backend: this._backendOptions,
|
|
275661
276114
|
detection: this._detectionOptions,
|
|
275662
276115
|
...options === null || options === void 0 ? void 0 : options.initOptions,
|
|
275663
276116
|
};
|
|
275664
276117
|
this.i18next
|
|
275665
276118
|
.use((_b = options === null || options === void 0 ? void 0 : options.detectorPlugin) !== null && _b !== void 0 ? _b : i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__["default"])
|
|
275666
|
-
.use((_c = options === null || options === void 0 ? void 0 : options.backendPlugin) !== null && _c !== void 0 ? _c :
|
|
276119
|
+
.use((_c = options === null || options === void 0 ? void 0 : options.backendPlugin) !== null && _c !== void 0 ? _c : i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__["default"])
|
|
275667
276120
|
.use(TranslationLogger);
|
|
275668
276121
|
}
|
|
275669
276122
|
async initialize(namespaces) {
|
|
276123
|
+
var _a;
|
|
276124
|
+
// Also consider namespaces passed into constructor
|
|
276125
|
+
const initNamespaces = [this._initOptions.ns || []].flat();
|
|
276126
|
+
const combinedNamespaces = new Set([...namespaces, ...initNamespaces]); // without duplicates
|
|
276127
|
+
const defaultNamespace = (_a = this._initOptions.defaultNS) !== null && _a !== void 0 ? _a : namespaces[0];
|
|
276128
|
+
if (defaultNamespace)
|
|
276129
|
+
combinedNamespaces.add(defaultNamespace); // Make sure default namespace is in namespaces list
|
|
275670
276130
|
const initOptions = {
|
|
275671
276131
|
...this._initOptions,
|
|
275672
|
-
|
|
275673
|
-
|
|
276132
|
+
defaultNS: defaultNamespace,
|
|
276133
|
+
ns: [...combinedNamespaces],
|
|
275674
276134
|
};
|
|
275675
276135
|
// if in a development environment, set debugging
|
|
275676
276136
|
if (false)
|
|
@@ -275713,9 +276173,13 @@ class ITwinLocalization {
|
|
|
275713
276173
|
* @public
|
|
275714
276174
|
*/
|
|
275715
276175
|
getLocalizedString(key, options) {
|
|
276176
|
+
if ((options === null || options === void 0 ? void 0 : options.returnDetails) || (options === null || options === void 0 ? void 0 : options.returnObjects)) {
|
|
276177
|
+
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
276178
|
+
}
|
|
275716
276179
|
const value = this.i18next.t(key, options);
|
|
275717
|
-
if (typeof value !== "string")
|
|
275718
|
-
throw new Error("Translation key(s) not found");
|
|
276180
|
+
if (typeof value !== "string") {
|
|
276181
|
+
throw new Error("Translation key(s) string not found");
|
|
276182
|
+
}
|
|
275719
276183
|
return value;
|
|
275720
276184
|
}
|
|
275721
276185
|
/** Similar to `getLocalizedString` but the namespace is a separate param and the key does not include the namespace.
|
|
@@ -275745,6 +276209,9 @@ class ITwinLocalization {
|
|
|
275745
276209
|
* @internal
|
|
275746
276210
|
*/
|
|
275747
276211
|
getEnglishString(namespace, key, options) {
|
|
276212
|
+
if ((options === null || options === void 0 ? void 0 : options.returnDetails) || (options === null || options === void 0 ? void 0 : options.returnObjects)) {
|
|
276213
|
+
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
276214
|
+
}
|
|
275748
276215
|
const en = this.i18next.getFixedT("en", namespace);
|
|
275749
276216
|
const str = en(key, options);
|
|
275750
276217
|
if (typeof str !== "string")
|
|
@@ -275784,10 +276251,10 @@ class ITwinLocalization {
|
|
|
275784
276251
|
if (!err)
|
|
275785
276252
|
return resolve();
|
|
275786
276253
|
// Here we got a non-null err object.
|
|
275787
|
-
// This method is called when the system has attempted to load the resources for the
|
|
275788
|
-
//
|
|
275789
|
-
//
|
|
275790
|
-
// might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible
|
|
276254
|
+
// This method is called when the system has attempted to load the resources for the namespaces for each possible locale.
|
|
276255
|
+
// For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.
|
|
276256
|
+
// Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.
|
|
276257
|
+
// 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.
|
|
275791
276258
|
let locales = this.getLanguageList().map((thisLocale) => `/${thisLocale}/`);
|
|
275792
276259
|
try {
|
|
275793
276260
|
for (const thisError of err) {
|
|
@@ -301134,6 +301601,31 @@ var WidgetState;
|
|
|
301134
301601
|
|
|
301135
301602
|
/* (ignored) */
|
|
301136
301603
|
|
|
301604
|
+
/***/ }),
|
|
301605
|
+
|
|
301606
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/getFetch.cjs":
|
|
301607
|
+
/*!**************************************************************************************************************************!*\
|
|
301608
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/getFetch.cjs ***!
|
|
301609
|
+
\**************************************************************************************************************************/
|
|
301610
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
301611
|
+
|
|
301612
|
+
var fetchApi
|
|
301613
|
+
if (typeof fetch === 'function') {
|
|
301614
|
+
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
|
|
301615
|
+
fetchApi = __webpack_require__.g.fetch
|
|
301616
|
+
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
301617
|
+
fetchApi = window.fetch
|
|
301618
|
+
}
|
|
301619
|
+
}
|
|
301620
|
+
|
|
301621
|
+
if ( true && (typeof window === 'undefined' || typeof window.document === 'undefined')) {
|
|
301622
|
+
var f = fetchApi || __webpack_require__(/*! cross-fetch */ "../../common/temp/node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js")
|
|
301623
|
+
if (f.default) f = f.default
|
|
301624
|
+
exports["default"] = f
|
|
301625
|
+
module.exports = exports.default
|
|
301626
|
+
}
|
|
301627
|
+
|
|
301628
|
+
|
|
301137
301629
|
/***/ }),
|
|
301138
301630
|
|
|
301139
301631
|
/***/ "../../common/temp/node_modules/.pnpm/flatbuffers@1.12.0/node_modules/flatbuffers/js/flatbuffers.mjs":
|
|
@@ -303088,6 +303580,438 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
303088
303580
|
|
|
303089
303581
|
/***/ }),
|
|
303090
303582
|
|
|
303583
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/index.js":
|
|
303584
|
+
/*!**********************************************************************************************************************!*\
|
|
303585
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/index.js ***!
|
|
303586
|
+
\**********************************************************************************************************************/
|
|
303587
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
303588
|
+
|
|
303589
|
+
"use strict";
|
|
303590
|
+
__webpack_require__.r(__webpack_exports__);
|
|
303591
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
303592
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
303593
|
+
/* harmony export */ });
|
|
303594
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/utils.js");
|
|
303595
|
+
/* harmony import */ var _request_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./request.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/request.js");
|
|
303596
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
303597
|
+
|
|
303598
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
303599
|
+
|
|
303600
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
303601
|
+
|
|
303602
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
303603
|
+
|
|
303604
|
+
|
|
303605
|
+
|
|
303606
|
+
|
|
303607
|
+
var getDefaults = function getDefaults() {
|
|
303608
|
+
return {
|
|
303609
|
+
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
|
303610
|
+
addPath: '/locales/add/{{lng}}/{{ns}}',
|
|
303611
|
+
allowMultiLoading: false,
|
|
303612
|
+
parse: function parse(data) {
|
|
303613
|
+
return JSON.parse(data);
|
|
303614
|
+
},
|
|
303615
|
+
stringify: JSON.stringify,
|
|
303616
|
+
parsePayload: function parsePayload(namespace, key, fallbackValue) {
|
|
303617
|
+
return _defineProperty({}, key, fallbackValue || '');
|
|
303618
|
+
},
|
|
303619
|
+
request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
303620
|
+
reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
|
|
303621
|
+
customHeaders: {},
|
|
303622
|
+
queryStringParams: {},
|
|
303623
|
+
crossDomain: false,
|
|
303624
|
+
withCredentials: false,
|
|
303625
|
+
overrideMimeType: false,
|
|
303626
|
+
requestOptions: {
|
|
303627
|
+
mode: 'cors',
|
|
303628
|
+
credentials: 'same-origin',
|
|
303629
|
+
cache: 'default'
|
|
303630
|
+
}
|
|
303631
|
+
};
|
|
303632
|
+
};
|
|
303633
|
+
|
|
303634
|
+
var Backend = function () {
|
|
303635
|
+
function Backend(services) {
|
|
303636
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
303637
|
+
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
303638
|
+
|
|
303639
|
+
_classCallCheck(this, Backend);
|
|
303640
|
+
|
|
303641
|
+
this.services = services;
|
|
303642
|
+
this.options = options;
|
|
303643
|
+
this.allOptions = allOptions;
|
|
303644
|
+
this.type = 'backend';
|
|
303645
|
+
this.init(services, options, allOptions);
|
|
303646
|
+
}
|
|
303647
|
+
|
|
303648
|
+
_createClass(Backend, [{
|
|
303649
|
+
key: "init",
|
|
303650
|
+
value: function init(services) {
|
|
303651
|
+
var _this = this;
|
|
303652
|
+
|
|
303653
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
303654
|
+
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
303655
|
+
this.services = services;
|
|
303656
|
+
this.options = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.defaults)(options, this.options || {}, getDefaults());
|
|
303657
|
+
this.allOptions = allOptions;
|
|
303658
|
+
|
|
303659
|
+
if (this.services && this.options.reloadInterval) {
|
|
303660
|
+
setInterval(function () {
|
|
303661
|
+
return _this.reload();
|
|
303662
|
+
}, this.options.reloadInterval);
|
|
303663
|
+
}
|
|
303664
|
+
}
|
|
303665
|
+
}, {
|
|
303666
|
+
key: "readMulti",
|
|
303667
|
+
value: function readMulti(languages, namespaces, callback) {
|
|
303668
|
+
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
303669
|
+
}
|
|
303670
|
+
}, {
|
|
303671
|
+
key: "read",
|
|
303672
|
+
value: function read(language, namespace, callback) {
|
|
303673
|
+
this._readAny([language], language, [namespace], namespace, callback);
|
|
303674
|
+
}
|
|
303675
|
+
}, {
|
|
303676
|
+
key: "_readAny",
|
|
303677
|
+
value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
303678
|
+
var _this2 = this;
|
|
303679
|
+
|
|
303680
|
+
var loadPath = this.options.loadPath;
|
|
303681
|
+
|
|
303682
|
+
if (typeof this.options.loadPath === 'function') {
|
|
303683
|
+
loadPath = this.options.loadPath(languages, namespaces);
|
|
303684
|
+
}
|
|
303685
|
+
|
|
303686
|
+
loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
|
|
303687
|
+
loadPath.then(function (resolvedLoadPath) {
|
|
303688
|
+
if (!resolvedLoadPath) return callback(null, {});
|
|
303689
|
+
|
|
303690
|
+
var url = _this2.services.interpolator.interpolate(resolvedLoadPath, {
|
|
303691
|
+
lng: languages.join('+'),
|
|
303692
|
+
ns: namespaces.join('+')
|
|
303693
|
+
});
|
|
303694
|
+
|
|
303695
|
+
_this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
303696
|
+
});
|
|
303697
|
+
}
|
|
303698
|
+
}, {
|
|
303699
|
+
key: "loadUrl",
|
|
303700
|
+
value: function loadUrl(url, callback, languages, namespaces) {
|
|
303701
|
+
var _this3 = this;
|
|
303702
|
+
|
|
303703
|
+
this.options.request(this.options, url, undefined, function (err, res) {
|
|
303704
|
+
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + url + '; status code: ' + res.status, true);
|
|
303705
|
+
if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + url + '; status code: ' + res.status, false);
|
|
303706
|
+
if (!res && err && err.message && err.message.indexOf('Failed to fetch') > -1) return callback('failed loading ' + url + ': ' + err.message, true);
|
|
303707
|
+
if (err) return callback(err, false);
|
|
303708
|
+
var ret, parseErr;
|
|
303709
|
+
|
|
303710
|
+
try {
|
|
303711
|
+
if (typeof res.data === 'string') {
|
|
303712
|
+
ret = _this3.options.parse(res.data, languages, namespaces);
|
|
303713
|
+
} else {
|
|
303714
|
+
ret = res.data;
|
|
303715
|
+
}
|
|
303716
|
+
} catch (e) {
|
|
303717
|
+
parseErr = 'failed parsing ' + url + ' to json';
|
|
303718
|
+
}
|
|
303719
|
+
|
|
303720
|
+
if (parseErr) return callback(parseErr, false);
|
|
303721
|
+
callback(null, ret);
|
|
303722
|
+
});
|
|
303723
|
+
}
|
|
303724
|
+
}, {
|
|
303725
|
+
key: "create",
|
|
303726
|
+
value: function create(languages, namespace, key, fallbackValue, callback) {
|
|
303727
|
+
var _this4 = this;
|
|
303728
|
+
|
|
303729
|
+
if (!this.options.addPath) return;
|
|
303730
|
+
if (typeof languages === 'string') languages = [languages];
|
|
303731
|
+
var payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
303732
|
+
var finished = 0;
|
|
303733
|
+
var dataArray = [];
|
|
303734
|
+
var resArray = [];
|
|
303735
|
+
languages.forEach(function (lng) {
|
|
303736
|
+
var addPath = _this4.options.addPath;
|
|
303737
|
+
|
|
303738
|
+
if (typeof _this4.options.addPath === 'function') {
|
|
303739
|
+
addPath = _this4.options.addPath(lng, namespace);
|
|
303740
|
+
}
|
|
303741
|
+
|
|
303742
|
+
var url = _this4.services.interpolator.interpolate(addPath, {
|
|
303743
|
+
lng: lng,
|
|
303744
|
+
ns: namespace
|
|
303745
|
+
});
|
|
303746
|
+
|
|
303747
|
+
_this4.options.request(_this4.options, url, payload, function (data, res) {
|
|
303748
|
+
finished += 1;
|
|
303749
|
+
dataArray.push(data);
|
|
303750
|
+
resArray.push(res);
|
|
303751
|
+
|
|
303752
|
+
if (finished === languages.length) {
|
|
303753
|
+
if (callback) callback(dataArray, resArray);
|
|
303754
|
+
}
|
|
303755
|
+
});
|
|
303756
|
+
});
|
|
303757
|
+
}
|
|
303758
|
+
}, {
|
|
303759
|
+
key: "reload",
|
|
303760
|
+
value: function reload() {
|
|
303761
|
+
var _this5 = this;
|
|
303762
|
+
|
|
303763
|
+
var _this$services = this.services,
|
|
303764
|
+
backendConnector = _this$services.backendConnector,
|
|
303765
|
+
languageUtils = _this$services.languageUtils,
|
|
303766
|
+
logger = _this$services.logger;
|
|
303767
|
+
var currentLanguage = backendConnector.language;
|
|
303768
|
+
if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
|
|
303769
|
+
var toLoad = [];
|
|
303770
|
+
|
|
303771
|
+
var append = function append(lng) {
|
|
303772
|
+
var lngs = languageUtils.toResolveHierarchy(lng);
|
|
303773
|
+
lngs.forEach(function (l) {
|
|
303774
|
+
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
303775
|
+
});
|
|
303776
|
+
};
|
|
303777
|
+
|
|
303778
|
+
append(currentLanguage);
|
|
303779
|
+
if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
|
|
303780
|
+
return append(l);
|
|
303781
|
+
});
|
|
303782
|
+
toLoad.forEach(function (lng) {
|
|
303783
|
+
_this5.allOptions.ns.forEach(function (ns) {
|
|
303784
|
+
backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
|
|
303785
|
+
if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
|
|
303786
|
+
if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
|
|
303787
|
+
backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
|
|
303788
|
+
});
|
|
303789
|
+
});
|
|
303790
|
+
});
|
|
303791
|
+
}
|
|
303792
|
+
}]);
|
|
303793
|
+
|
|
303794
|
+
return Backend;
|
|
303795
|
+
}();
|
|
303796
|
+
|
|
303797
|
+
Backend.type = 'backend';
|
|
303798
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
|
|
303799
|
+
|
|
303800
|
+
/***/ }),
|
|
303801
|
+
|
|
303802
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/request.js":
|
|
303803
|
+
/*!************************************************************************************************************************!*\
|
|
303804
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/request.js ***!
|
|
303805
|
+
\************************************************************************************************************************/
|
|
303806
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
303807
|
+
|
|
303808
|
+
"use strict";
|
|
303809
|
+
var _getFetch_cjs__WEBPACK_IMPORTED_MODULE_1___namespace_cache;
|
|
303810
|
+
__webpack_require__.r(__webpack_exports__);
|
|
303811
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
303812
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
303813
|
+
/* harmony export */ });
|
|
303814
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/utils.js");
|
|
303815
|
+
/* harmony import */ var _getFetch_cjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getFetch.cjs */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/getFetch.cjs");
|
|
303816
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
303817
|
+
|
|
303818
|
+
|
|
303819
|
+
|
|
303820
|
+
var fetchApi;
|
|
303821
|
+
|
|
303822
|
+
if (typeof fetch === 'function') {
|
|
303823
|
+
if (typeof global !== 'undefined' && global.fetch) {
|
|
303824
|
+
fetchApi = global.fetch;
|
|
303825
|
+
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
303826
|
+
fetchApi = window.fetch;
|
|
303827
|
+
}
|
|
303828
|
+
}
|
|
303829
|
+
|
|
303830
|
+
var XmlHttpRequestApi;
|
|
303831
|
+
|
|
303832
|
+
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
|
|
303833
|
+
if (typeof global !== 'undefined' && global.XMLHttpRequest) {
|
|
303834
|
+
XmlHttpRequestApi = global.XMLHttpRequest;
|
|
303835
|
+
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
|
|
303836
|
+
XmlHttpRequestApi = window.XMLHttpRequest;
|
|
303837
|
+
}
|
|
303838
|
+
}
|
|
303839
|
+
|
|
303840
|
+
var ActiveXObjectApi;
|
|
303841
|
+
|
|
303842
|
+
if (typeof ActiveXObject === 'function') {
|
|
303843
|
+
if (typeof global !== 'undefined' && global.ActiveXObject) {
|
|
303844
|
+
ActiveXObjectApi = global.ActiveXObject;
|
|
303845
|
+
} else if (typeof window !== 'undefined' && window.ActiveXObject) {
|
|
303846
|
+
ActiveXObjectApi = window.ActiveXObject;
|
|
303847
|
+
}
|
|
303848
|
+
}
|
|
303849
|
+
|
|
303850
|
+
if (!fetchApi && /*#__PURE__*/ (_getFetch_cjs__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (_getFetch_cjs__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(_getFetch_cjs__WEBPACK_IMPORTED_MODULE_1__, 2))) && !XmlHttpRequestApi && !ActiveXObjectApi) fetchApi = _getFetch_cjs__WEBPACK_IMPORTED_MODULE_1__ || /*#__PURE__*/ (_getFetch_cjs__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (_getFetch_cjs__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(_getFetch_cjs__WEBPACK_IMPORTED_MODULE_1__, 2)));
|
|
303851
|
+
if (typeof fetchApi !== 'function') fetchApi = undefined;
|
|
303852
|
+
|
|
303853
|
+
var addQueryString = function addQueryString(url, params) {
|
|
303854
|
+
if (params && _typeof(params) === 'object') {
|
|
303855
|
+
var queryString = '';
|
|
303856
|
+
|
|
303857
|
+
for (var paramName in params) {
|
|
303858
|
+
queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
|
|
303859
|
+
}
|
|
303860
|
+
|
|
303861
|
+
if (!queryString) return url;
|
|
303862
|
+
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
|
303863
|
+
}
|
|
303864
|
+
|
|
303865
|
+
return url;
|
|
303866
|
+
};
|
|
303867
|
+
|
|
303868
|
+
var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
|
|
303869
|
+
if (options.queryStringParams) {
|
|
303870
|
+
url = addQueryString(url, options.queryStringParams);
|
|
303871
|
+
}
|
|
303872
|
+
|
|
303873
|
+
var headers = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.defaults)({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
|
|
303874
|
+
if (payload) headers['Content-Type'] = 'application/json';
|
|
303875
|
+
fetchApi(url, (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.defaults)({
|
|
303876
|
+
method: payload ? 'POST' : 'GET',
|
|
303877
|
+
body: payload ? options.stringify(payload) : undefined,
|
|
303878
|
+
headers: headers
|
|
303879
|
+
}, typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions)).then(function (response) {
|
|
303880
|
+
if (!response.ok) return callback(response.statusText || 'Error', {
|
|
303881
|
+
status: response.status
|
|
303882
|
+
});
|
|
303883
|
+
response.text().then(function (data) {
|
|
303884
|
+
callback(null, {
|
|
303885
|
+
status: response.status,
|
|
303886
|
+
data: data
|
|
303887
|
+
});
|
|
303888
|
+
}).catch(callback);
|
|
303889
|
+
}).catch(callback);
|
|
303890
|
+
};
|
|
303891
|
+
|
|
303892
|
+
var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
|
|
303893
|
+
if (payload && _typeof(payload) === 'object') {
|
|
303894
|
+
payload = addQueryString('', payload).slice(1);
|
|
303895
|
+
}
|
|
303896
|
+
|
|
303897
|
+
if (options.queryStringParams) {
|
|
303898
|
+
url = addQueryString(url, options.queryStringParams);
|
|
303899
|
+
}
|
|
303900
|
+
|
|
303901
|
+
try {
|
|
303902
|
+
var x;
|
|
303903
|
+
|
|
303904
|
+
if (XmlHttpRequestApi) {
|
|
303905
|
+
x = new XmlHttpRequestApi();
|
|
303906
|
+
} else {
|
|
303907
|
+
x = new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
|
|
303908
|
+
}
|
|
303909
|
+
|
|
303910
|
+
x.open(payload ? 'POST' : 'GET', url, 1);
|
|
303911
|
+
|
|
303912
|
+
if (!options.crossDomain) {
|
|
303913
|
+
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
303914
|
+
}
|
|
303915
|
+
|
|
303916
|
+
x.withCredentials = !!options.withCredentials;
|
|
303917
|
+
|
|
303918
|
+
if (payload) {
|
|
303919
|
+
x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
303920
|
+
}
|
|
303921
|
+
|
|
303922
|
+
if (x.overrideMimeType) {
|
|
303923
|
+
x.overrideMimeType('application/json');
|
|
303924
|
+
}
|
|
303925
|
+
|
|
303926
|
+
var h = options.customHeaders;
|
|
303927
|
+
h = typeof h === 'function' ? h() : h;
|
|
303928
|
+
|
|
303929
|
+
if (h) {
|
|
303930
|
+
for (var i in h) {
|
|
303931
|
+
x.setRequestHeader(i, h[i]);
|
|
303932
|
+
}
|
|
303933
|
+
}
|
|
303934
|
+
|
|
303935
|
+
x.onreadystatechange = function () {
|
|
303936
|
+
x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
|
|
303937
|
+
status: x.status,
|
|
303938
|
+
data: x.responseText
|
|
303939
|
+
});
|
|
303940
|
+
};
|
|
303941
|
+
|
|
303942
|
+
x.send(payload);
|
|
303943
|
+
} catch (e) {
|
|
303944
|
+
console && console.log(e);
|
|
303945
|
+
}
|
|
303946
|
+
};
|
|
303947
|
+
|
|
303948
|
+
var request = function request(options, url, payload, callback) {
|
|
303949
|
+
if (typeof payload === 'function') {
|
|
303950
|
+
callback = payload;
|
|
303951
|
+
payload = undefined;
|
|
303952
|
+
}
|
|
303953
|
+
|
|
303954
|
+
callback = callback || function () {};
|
|
303955
|
+
|
|
303956
|
+
if (fetchApi) {
|
|
303957
|
+
return requestWithFetch(options, url, payload, callback);
|
|
303958
|
+
}
|
|
303959
|
+
|
|
303960
|
+
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
|
|
303961
|
+
return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
303962
|
+
}
|
|
303963
|
+
};
|
|
303964
|
+
|
|
303965
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
|
|
303966
|
+
|
|
303967
|
+
/***/ }),
|
|
303968
|
+
|
|
303969
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/utils.js":
|
|
303970
|
+
/*!**********************************************************************************************************************!*\
|
|
303971
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/utils.js ***!
|
|
303972
|
+
\**********************************************************************************************************************/
|
|
303973
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
303974
|
+
|
|
303975
|
+
"use strict";
|
|
303976
|
+
__webpack_require__.r(__webpack_exports__);
|
|
303977
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
303978
|
+
/* harmony export */ "defaults": () => (/* binding */ defaults),
|
|
303979
|
+
/* harmony export */ "hasXMLHttpRequest": () => (/* binding */ hasXMLHttpRequest),
|
|
303980
|
+
/* harmony export */ "makePromise": () => (/* binding */ makePromise)
|
|
303981
|
+
/* harmony export */ });
|
|
303982
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
303983
|
+
|
|
303984
|
+
var arr = [];
|
|
303985
|
+
var each = arr.forEach;
|
|
303986
|
+
var slice = arr.slice;
|
|
303987
|
+
function defaults(obj) {
|
|
303988
|
+
each.call(slice.call(arguments, 1), function (source) {
|
|
303989
|
+
if (source) {
|
|
303990
|
+
for (var prop in source) {
|
|
303991
|
+
if (obj[prop] === undefined) obj[prop] = source[prop];
|
|
303992
|
+
}
|
|
303993
|
+
}
|
|
303994
|
+
});
|
|
303995
|
+
return obj;
|
|
303996
|
+
}
|
|
303997
|
+
function hasXMLHttpRequest() {
|
|
303998
|
+
return typeof XMLHttpRequest === 'function' || (typeof XMLHttpRequest === "undefined" ? "undefined" : _typeof(XMLHttpRequest)) === 'object';
|
|
303999
|
+
}
|
|
304000
|
+
|
|
304001
|
+
function isPromise(maybePromise) {
|
|
304002
|
+
return !!maybePromise && typeof maybePromise.then === 'function';
|
|
304003
|
+
}
|
|
304004
|
+
|
|
304005
|
+
function makePromise(maybePromise) {
|
|
304006
|
+
if (isPromise(maybePromise)) {
|
|
304007
|
+
return maybePromise;
|
|
304008
|
+
}
|
|
304009
|
+
|
|
304010
|
+
return Promise.resolve(maybePromise);
|
|
304011
|
+
}
|
|
304012
|
+
|
|
304013
|
+
/***/ }),
|
|
304014
|
+
|
|
303091
304015
|
/***/ "../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js":
|
|
303092
304016
|
/*!****************************************************************************************************!*\
|
|
303093
304017
|
!*** ../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js ***!
|
|
@@ -305948,7 +306872,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
305948
306872
|
/***/ ((module) => {
|
|
305949
306873
|
|
|
305950
306874
|
"use strict";
|
|
305951
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.
|
|
306875
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.46","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"tsc 1>&2 --outDir lib/cjs","build:esm":"tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.4.0-dev.46","@itwin/core-bentley":"workspace:^3.4.0-dev.46","@itwin/core-common":"workspace:^3.4.0-dev.46","@itwin/core-geometry":"workspace:^3.4.0-dev.46","@itwin/core-orbitgt":"workspace:^3.4.0-dev.46","@itwin/core-quantity":"workspace:^3.4.0-dev.46","@itwin/webgl-compatibility":"workspace:^3.4.0-dev.46"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"16.11.59","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
305952
306876
|
|
|
305953
306877
|
/***/ })
|
|
305954
306878
|
|
|
@@ -305997,6 +306921,36 @@ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev
|
|
|
305997
306921
|
/******/ };
|
|
305998
306922
|
/******/ })();
|
|
305999
306923
|
/******/
|
|
306924
|
+
/******/ /* webpack/runtime/create fake namespace object */
|
|
306925
|
+
/******/ (() => {
|
|
306926
|
+
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
306927
|
+
/******/ var leafPrototypes;
|
|
306928
|
+
/******/ // create a fake namespace object
|
|
306929
|
+
/******/ // mode & 1: value is a module id, require it
|
|
306930
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
306931
|
+
/******/ // mode & 4: return value when already ns object
|
|
306932
|
+
/******/ // mode & 16: return value when it's Promise-like
|
|
306933
|
+
/******/ // mode & 8|1: behave like require
|
|
306934
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
306935
|
+
/******/ if(mode & 1) value = this(value);
|
|
306936
|
+
/******/ if(mode & 8) return value;
|
|
306937
|
+
/******/ if(typeof value === 'object' && value) {
|
|
306938
|
+
/******/ if((mode & 4) && value.__esModule) return value;
|
|
306939
|
+
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
306940
|
+
/******/ }
|
|
306941
|
+
/******/ var ns = Object.create(null);
|
|
306942
|
+
/******/ __webpack_require__.r(ns);
|
|
306943
|
+
/******/ var def = {};
|
|
306944
|
+
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
306945
|
+
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
306946
|
+
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
306947
|
+
/******/ }
|
|
306948
|
+
/******/ def['default'] = () => (value);
|
|
306949
|
+
/******/ __webpack_require__.d(ns, def);
|
|
306950
|
+
/******/ return ns;
|
|
306951
|
+
/******/ };
|
|
306952
|
+
/******/ })();
|
|
306953
|
+
/******/
|
|
306000
306954
|
/******/ /* webpack/runtime/define property getters */
|
|
306001
306955
|
/******/ (() => {
|
|
306002
306956
|
/******/ // define getter functions for harmony exports
|