@itwin/rpcinterface-full-stack-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 +1199 -245
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -19352,6 +19352,570 @@ Emitter.prototype.hasListeners = function(event){
|
|
|
19352
19352
|
};
|
|
19353
19353
|
|
|
19354
19354
|
|
|
19355
|
+
/***/ }),
|
|
19356
|
+
|
|
19357
|
+
/***/ "../../common/temp/node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js":
|
|
19358
|
+
/*!****************************************************************************************************************!*\
|
|
19359
|
+
!*** ../../common/temp/node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js ***!
|
|
19360
|
+
\****************************************************************************************************************/
|
|
19361
|
+
/***/ (function(module, exports) {
|
|
19362
|
+
|
|
19363
|
+
var global = typeof self !== 'undefined' ? self : this;
|
|
19364
|
+
var __self__ = (function () {
|
|
19365
|
+
function F() {
|
|
19366
|
+
this.fetch = false;
|
|
19367
|
+
this.DOMException = global.DOMException
|
|
19368
|
+
}
|
|
19369
|
+
F.prototype = global;
|
|
19370
|
+
return new F();
|
|
19371
|
+
})();
|
|
19372
|
+
(function(self) {
|
|
19373
|
+
|
|
19374
|
+
var irrelevant = (function (exports) {
|
|
19375
|
+
|
|
19376
|
+
var support = {
|
|
19377
|
+
searchParams: 'URLSearchParams' in self,
|
|
19378
|
+
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
|
19379
|
+
blob:
|
|
19380
|
+
'FileReader' in self &&
|
|
19381
|
+
'Blob' in self &&
|
|
19382
|
+
(function() {
|
|
19383
|
+
try {
|
|
19384
|
+
new Blob();
|
|
19385
|
+
return true
|
|
19386
|
+
} catch (e) {
|
|
19387
|
+
return false
|
|
19388
|
+
}
|
|
19389
|
+
})(),
|
|
19390
|
+
formData: 'FormData' in self,
|
|
19391
|
+
arrayBuffer: 'ArrayBuffer' in self
|
|
19392
|
+
};
|
|
19393
|
+
|
|
19394
|
+
function isDataView(obj) {
|
|
19395
|
+
return obj && DataView.prototype.isPrototypeOf(obj)
|
|
19396
|
+
}
|
|
19397
|
+
|
|
19398
|
+
if (support.arrayBuffer) {
|
|
19399
|
+
var viewClasses = [
|
|
19400
|
+
'[object Int8Array]',
|
|
19401
|
+
'[object Uint8Array]',
|
|
19402
|
+
'[object Uint8ClampedArray]',
|
|
19403
|
+
'[object Int16Array]',
|
|
19404
|
+
'[object Uint16Array]',
|
|
19405
|
+
'[object Int32Array]',
|
|
19406
|
+
'[object Uint32Array]',
|
|
19407
|
+
'[object Float32Array]',
|
|
19408
|
+
'[object Float64Array]'
|
|
19409
|
+
];
|
|
19410
|
+
|
|
19411
|
+
var isArrayBufferView =
|
|
19412
|
+
ArrayBuffer.isView ||
|
|
19413
|
+
function(obj) {
|
|
19414
|
+
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
|
|
19415
|
+
};
|
|
19416
|
+
}
|
|
19417
|
+
|
|
19418
|
+
function normalizeName(name) {
|
|
19419
|
+
if (typeof name !== 'string') {
|
|
19420
|
+
name = String(name);
|
|
19421
|
+
}
|
|
19422
|
+
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
|
|
19423
|
+
throw new TypeError('Invalid character in header field name')
|
|
19424
|
+
}
|
|
19425
|
+
return name.toLowerCase()
|
|
19426
|
+
}
|
|
19427
|
+
|
|
19428
|
+
function normalizeValue(value) {
|
|
19429
|
+
if (typeof value !== 'string') {
|
|
19430
|
+
value = String(value);
|
|
19431
|
+
}
|
|
19432
|
+
return value
|
|
19433
|
+
}
|
|
19434
|
+
|
|
19435
|
+
// Build a destructive iterator for the value list
|
|
19436
|
+
function iteratorFor(items) {
|
|
19437
|
+
var iterator = {
|
|
19438
|
+
next: function() {
|
|
19439
|
+
var value = items.shift();
|
|
19440
|
+
return {done: value === undefined, value: value}
|
|
19441
|
+
}
|
|
19442
|
+
};
|
|
19443
|
+
|
|
19444
|
+
if (support.iterable) {
|
|
19445
|
+
iterator[Symbol.iterator] = function() {
|
|
19446
|
+
return iterator
|
|
19447
|
+
};
|
|
19448
|
+
}
|
|
19449
|
+
|
|
19450
|
+
return iterator
|
|
19451
|
+
}
|
|
19452
|
+
|
|
19453
|
+
function Headers(headers) {
|
|
19454
|
+
this.map = {};
|
|
19455
|
+
|
|
19456
|
+
if (headers instanceof Headers) {
|
|
19457
|
+
headers.forEach(function(value, name) {
|
|
19458
|
+
this.append(name, value);
|
|
19459
|
+
}, this);
|
|
19460
|
+
} else if (Array.isArray(headers)) {
|
|
19461
|
+
headers.forEach(function(header) {
|
|
19462
|
+
this.append(header[0], header[1]);
|
|
19463
|
+
}, this);
|
|
19464
|
+
} else if (headers) {
|
|
19465
|
+
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
|
19466
|
+
this.append(name, headers[name]);
|
|
19467
|
+
}, this);
|
|
19468
|
+
}
|
|
19469
|
+
}
|
|
19470
|
+
|
|
19471
|
+
Headers.prototype.append = function(name, value) {
|
|
19472
|
+
name = normalizeName(name);
|
|
19473
|
+
value = normalizeValue(value);
|
|
19474
|
+
var oldValue = this.map[name];
|
|
19475
|
+
this.map[name] = oldValue ? oldValue + ', ' + value : value;
|
|
19476
|
+
};
|
|
19477
|
+
|
|
19478
|
+
Headers.prototype['delete'] = function(name) {
|
|
19479
|
+
delete this.map[normalizeName(name)];
|
|
19480
|
+
};
|
|
19481
|
+
|
|
19482
|
+
Headers.prototype.get = function(name) {
|
|
19483
|
+
name = normalizeName(name);
|
|
19484
|
+
return this.has(name) ? this.map[name] : null
|
|
19485
|
+
};
|
|
19486
|
+
|
|
19487
|
+
Headers.prototype.has = function(name) {
|
|
19488
|
+
return this.map.hasOwnProperty(normalizeName(name))
|
|
19489
|
+
};
|
|
19490
|
+
|
|
19491
|
+
Headers.prototype.set = function(name, value) {
|
|
19492
|
+
this.map[normalizeName(name)] = normalizeValue(value);
|
|
19493
|
+
};
|
|
19494
|
+
|
|
19495
|
+
Headers.prototype.forEach = function(callback, thisArg) {
|
|
19496
|
+
for (var name in this.map) {
|
|
19497
|
+
if (this.map.hasOwnProperty(name)) {
|
|
19498
|
+
callback.call(thisArg, this.map[name], name, this);
|
|
19499
|
+
}
|
|
19500
|
+
}
|
|
19501
|
+
};
|
|
19502
|
+
|
|
19503
|
+
Headers.prototype.keys = function() {
|
|
19504
|
+
var items = [];
|
|
19505
|
+
this.forEach(function(value, name) {
|
|
19506
|
+
items.push(name);
|
|
19507
|
+
});
|
|
19508
|
+
return iteratorFor(items)
|
|
19509
|
+
};
|
|
19510
|
+
|
|
19511
|
+
Headers.prototype.values = function() {
|
|
19512
|
+
var items = [];
|
|
19513
|
+
this.forEach(function(value) {
|
|
19514
|
+
items.push(value);
|
|
19515
|
+
});
|
|
19516
|
+
return iteratorFor(items)
|
|
19517
|
+
};
|
|
19518
|
+
|
|
19519
|
+
Headers.prototype.entries = function() {
|
|
19520
|
+
var items = [];
|
|
19521
|
+
this.forEach(function(value, name) {
|
|
19522
|
+
items.push([name, value]);
|
|
19523
|
+
});
|
|
19524
|
+
return iteratorFor(items)
|
|
19525
|
+
};
|
|
19526
|
+
|
|
19527
|
+
if (support.iterable) {
|
|
19528
|
+
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
|
19529
|
+
}
|
|
19530
|
+
|
|
19531
|
+
function consumed(body) {
|
|
19532
|
+
if (body.bodyUsed) {
|
|
19533
|
+
return Promise.reject(new TypeError('Already read'))
|
|
19534
|
+
}
|
|
19535
|
+
body.bodyUsed = true;
|
|
19536
|
+
}
|
|
19537
|
+
|
|
19538
|
+
function fileReaderReady(reader) {
|
|
19539
|
+
return new Promise(function(resolve, reject) {
|
|
19540
|
+
reader.onload = function() {
|
|
19541
|
+
resolve(reader.result);
|
|
19542
|
+
};
|
|
19543
|
+
reader.onerror = function() {
|
|
19544
|
+
reject(reader.error);
|
|
19545
|
+
};
|
|
19546
|
+
})
|
|
19547
|
+
}
|
|
19548
|
+
|
|
19549
|
+
function readBlobAsArrayBuffer(blob) {
|
|
19550
|
+
var reader = new FileReader();
|
|
19551
|
+
var promise = fileReaderReady(reader);
|
|
19552
|
+
reader.readAsArrayBuffer(blob);
|
|
19553
|
+
return promise
|
|
19554
|
+
}
|
|
19555
|
+
|
|
19556
|
+
function readBlobAsText(blob) {
|
|
19557
|
+
var reader = new FileReader();
|
|
19558
|
+
var promise = fileReaderReady(reader);
|
|
19559
|
+
reader.readAsText(blob);
|
|
19560
|
+
return promise
|
|
19561
|
+
}
|
|
19562
|
+
|
|
19563
|
+
function readArrayBufferAsText(buf) {
|
|
19564
|
+
var view = new Uint8Array(buf);
|
|
19565
|
+
var chars = new Array(view.length);
|
|
19566
|
+
|
|
19567
|
+
for (var i = 0; i < view.length; i++) {
|
|
19568
|
+
chars[i] = String.fromCharCode(view[i]);
|
|
19569
|
+
}
|
|
19570
|
+
return chars.join('')
|
|
19571
|
+
}
|
|
19572
|
+
|
|
19573
|
+
function bufferClone(buf) {
|
|
19574
|
+
if (buf.slice) {
|
|
19575
|
+
return buf.slice(0)
|
|
19576
|
+
} else {
|
|
19577
|
+
var view = new Uint8Array(buf.byteLength);
|
|
19578
|
+
view.set(new Uint8Array(buf));
|
|
19579
|
+
return view.buffer
|
|
19580
|
+
}
|
|
19581
|
+
}
|
|
19582
|
+
|
|
19583
|
+
function Body() {
|
|
19584
|
+
this.bodyUsed = false;
|
|
19585
|
+
|
|
19586
|
+
this._initBody = function(body) {
|
|
19587
|
+
this._bodyInit = body;
|
|
19588
|
+
if (!body) {
|
|
19589
|
+
this._bodyText = '';
|
|
19590
|
+
} else if (typeof body === 'string') {
|
|
19591
|
+
this._bodyText = body;
|
|
19592
|
+
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
|
19593
|
+
this._bodyBlob = body;
|
|
19594
|
+
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
|
19595
|
+
this._bodyFormData = body;
|
|
19596
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
19597
|
+
this._bodyText = body.toString();
|
|
19598
|
+
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
|
19599
|
+
this._bodyArrayBuffer = bufferClone(body.buffer);
|
|
19600
|
+
// IE 10-11 can't handle a DataView body.
|
|
19601
|
+
this._bodyInit = new Blob([this._bodyArrayBuffer]);
|
|
19602
|
+
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
|
19603
|
+
this._bodyArrayBuffer = bufferClone(body);
|
|
19604
|
+
} else {
|
|
19605
|
+
this._bodyText = body = Object.prototype.toString.call(body);
|
|
19606
|
+
}
|
|
19607
|
+
|
|
19608
|
+
if (!this.headers.get('content-type')) {
|
|
19609
|
+
if (typeof body === 'string') {
|
|
19610
|
+
this.headers.set('content-type', 'text/plain;charset=UTF-8');
|
|
19611
|
+
} else if (this._bodyBlob && this._bodyBlob.type) {
|
|
19612
|
+
this.headers.set('content-type', this._bodyBlob.type);
|
|
19613
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
19614
|
+
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
19615
|
+
}
|
|
19616
|
+
}
|
|
19617
|
+
};
|
|
19618
|
+
|
|
19619
|
+
if (support.blob) {
|
|
19620
|
+
this.blob = function() {
|
|
19621
|
+
var rejected = consumed(this);
|
|
19622
|
+
if (rejected) {
|
|
19623
|
+
return rejected
|
|
19624
|
+
}
|
|
19625
|
+
|
|
19626
|
+
if (this._bodyBlob) {
|
|
19627
|
+
return Promise.resolve(this._bodyBlob)
|
|
19628
|
+
} else if (this._bodyArrayBuffer) {
|
|
19629
|
+
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
|
|
19630
|
+
} else if (this._bodyFormData) {
|
|
19631
|
+
throw new Error('could not read FormData body as blob')
|
|
19632
|
+
} else {
|
|
19633
|
+
return Promise.resolve(new Blob([this._bodyText]))
|
|
19634
|
+
}
|
|
19635
|
+
};
|
|
19636
|
+
|
|
19637
|
+
this.arrayBuffer = function() {
|
|
19638
|
+
if (this._bodyArrayBuffer) {
|
|
19639
|
+
return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
|
|
19640
|
+
} else {
|
|
19641
|
+
return this.blob().then(readBlobAsArrayBuffer)
|
|
19642
|
+
}
|
|
19643
|
+
};
|
|
19644
|
+
}
|
|
19645
|
+
|
|
19646
|
+
this.text = function() {
|
|
19647
|
+
var rejected = consumed(this);
|
|
19648
|
+
if (rejected) {
|
|
19649
|
+
return rejected
|
|
19650
|
+
}
|
|
19651
|
+
|
|
19652
|
+
if (this._bodyBlob) {
|
|
19653
|
+
return readBlobAsText(this._bodyBlob)
|
|
19654
|
+
} else if (this._bodyArrayBuffer) {
|
|
19655
|
+
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
|
|
19656
|
+
} else if (this._bodyFormData) {
|
|
19657
|
+
throw new Error('could not read FormData body as text')
|
|
19658
|
+
} else {
|
|
19659
|
+
return Promise.resolve(this._bodyText)
|
|
19660
|
+
}
|
|
19661
|
+
};
|
|
19662
|
+
|
|
19663
|
+
if (support.formData) {
|
|
19664
|
+
this.formData = function() {
|
|
19665
|
+
return this.text().then(decode)
|
|
19666
|
+
};
|
|
19667
|
+
}
|
|
19668
|
+
|
|
19669
|
+
this.json = function() {
|
|
19670
|
+
return this.text().then(JSON.parse)
|
|
19671
|
+
};
|
|
19672
|
+
|
|
19673
|
+
return this
|
|
19674
|
+
}
|
|
19675
|
+
|
|
19676
|
+
// HTTP methods whose capitalization should be normalized
|
|
19677
|
+
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
|
|
19678
|
+
|
|
19679
|
+
function normalizeMethod(method) {
|
|
19680
|
+
var upcased = method.toUpperCase();
|
|
19681
|
+
return methods.indexOf(upcased) > -1 ? upcased : method
|
|
19682
|
+
}
|
|
19683
|
+
|
|
19684
|
+
function Request(input, options) {
|
|
19685
|
+
options = options || {};
|
|
19686
|
+
var body = options.body;
|
|
19687
|
+
|
|
19688
|
+
if (input instanceof Request) {
|
|
19689
|
+
if (input.bodyUsed) {
|
|
19690
|
+
throw new TypeError('Already read')
|
|
19691
|
+
}
|
|
19692
|
+
this.url = input.url;
|
|
19693
|
+
this.credentials = input.credentials;
|
|
19694
|
+
if (!options.headers) {
|
|
19695
|
+
this.headers = new Headers(input.headers);
|
|
19696
|
+
}
|
|
19697
|
+
this.method = input.method;
|
|
19698
|
+
this.mode = input.mode;
|
|
19699
|
+
this.signal = input.signal;
|
|
19700
|
+
if (!body && input._bodyInit != null) {
|
|
19701
|
+
body = input._bodyInit;
|
|
19702
|
+
input.bodyUsed = true;
|
|
19703
|
+
}
|
|
19704
|
+
} else {
|
|
19705
|
+
this.url = String(input);
|
|
19706
|
+
}
|
|
19707
|
+
|
|
19708
|
+
this.credentials = options.credentials || this.credentials || 'same-origin';
|
|
19709
|
+
if (options.headers || !this.headers) {
|
|
19710
|
+
this.headers = new Headers(options.headers);
|
|
19711
|
+
}
|
|
19712
|
+
this.method = normalizeMethod(options.method || this.method || 'GET');
|
|
19713
|
+
this.mode = options.mode || this.mode || null;
|
|
19714
|
+
this.signal = options.signal || this.signal;
|
|
19715
|
+
this.referrer = null;
|
|
19716
|
+
|
|
19717
|
+
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
19718
|
+
throw new TypeError('Body not allowed for GET or HEAD requests')
|
|
19719
|
+
}
|
|
19720
|
+
this._initBody(body);
|
|
19721
|
+
}
|
|
19722
|
+
|
|
19723
|
+
Request.prototype.clone = function() {
|
|
19724
|
+
return new Request(this, {body: this._bodyInit})
|
|
19725
|
+
};
|
|
19726
|
+
|
|
19727
|
+
function decode(body) {
|
|
19728
|
+
var form = new FormData();
|
|
19729
|
+
body
|
|
19730
|
+
.trim()
|
|
19731
|
+
.split('&')
|
|
19732
|
+
.forEach(function(bytes) {
|
|
19733
|
+
if (bytes) {
|
|
19734
|
+
var split = bytes.split('=');
|
|
19735
|
+
var name = split.shift().replace(/\+/g, ' ');
|
|
19736
|
+
var value = split.join('=').replace(/\+/g, ' ');
|
|
19737
|
+
form.append(decodeURIComponent(name), decodeURIComponent(value));
|
|
19738
|
+
}
|
|
19739
|
+
});
|
|
19740
|
+
return form
|
|
19741
|
+
}
|
|
19742
|
+
|
|
19743
|
+
function parseHeaders(rawHeaders) {
|
|
19744
|
+
var headers = new Headers();
|
|
19745
|
+
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
|
|
19746
|
+
// https://tools.ietf.org/html/rfc7230#section-3.2
|
|
19747
|
+
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
|
|
19748
|
+
preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
|
|
19749
|
+
var parts = line.split(':');
|
|
19750
|
+
var key = parts.shift().trim();
|
|
19751
|
+
if (key) {
|
|
19752
|
+
var value = parts.join(':').trim();
|
|
19753
|
+
headers.append(key, value);
|
|
19754
|
+
}
|
|
19755
|
+
});
|
|
19756
|
+
return headers
|
|
19757
|
+
}
|
|
19758
|
+
|
|
19759
|
+
Body.call(Request.prototype);
|
|
19760
|
+
|
|
19761
|
+
function Response(bodyInit, options) {
|
|
19762
|
+
if (!options) {
|
|
19763
|
+
options = {};
|
|
19764
|
+
}
|
|
19765
|
+
|
|
19766
|
+
this.type = 'default';
|
|
19767
|
+
this.status = options.status === undefined ? 200 : options.status;
|
|
19768
|
+
this.ok = this.status >= 200 && this.status < 300;
|
|
19769
|
+
this.statusText = 'statusText' in options ? options.statusText : 'OK';
|
|
19770
|
+
this.headers = new Headers(options.headers);
|
|
19771
|
+
this.url = options.url || '';
|
|
19772
|
+
this._initBody(bodyInit);
|
|
19773
|
+
}
|
|
19774
|
+
|
|
19775
|
+
Body.call(Response.prototype);
|
|
19776
|
+
|
|
19777
|
+
Response.prototype.clone = function() {
|
|
19778
|
+
return new Response(this._bodyInit, {
|
|
19779
|
+
status: this.status,
|
|
19780
|
+
statusText: this.statusText,
|
|
19781
|
+
headers: new Headers(this.headers),
|
|
19782
|
+
url: this.url
|
|
19783
|
+
})
|
|
19784
|
+
};
|
|
19785
|
+
|
|
19786
|
+
Response.error = function() {
|
|
19787
|
+
var response = new Response(null, {status: 0, statusText: ''});
|
|
19788
|
+
response.type = 'error';
|
|
19789
|
+
return response
|
|
19790
|
+
};
|
|
19791
|
+
|
|
19792
|
+
var redirectStatuses = [301, 302, 303, 307, 308];
|
|
19793
|
+
|
|
19794
|
+
Response.redirect = function(url, status) {
|
|
19795
|
+
if (redirectStatuses.indexOf(status) === -1) {
|
|
19796
|
+
throw new RangeError('Invalid status code')
|
|
19797
|
+
}
|
|
19798
|
+
|
|
19799
|
+
return new Response(null, {status: status, headers: {location: url}})
|
|
19800
|
+
};
|
|
19801
|
+
|
|
19802
|
+
exports.DOMException = self.DOMException;
|
|
19803
|
+
try {
|
|
19804
|
+
new exports.DOMException();
|
|
19805
|
+
} catch (err) {
|
|
19806
|
+
exports.DOMException = function(message, name) {
|
|
19807
|
+
this.message = message;
|
|
19808
|
+
this.name = name;
|
|
19809
|
+
var error = Error(message);
|
|
19810
|
+
this.stack = error.stack;
|
|
19811
|
+
};
|
|
19812
|
+
exports.DOMException.prototype = Object.create(Error.prototype);
|
|
19813
|
+
exports.DOMException.prototype.constructor = exports.DOMException;
|
|
19814
|
+
}
|
|
19815
|
+
|
|
19816
|
+
function fetch(input, init) {
|
|
19817
|
+
return new Promise(function(resolve, reject) {
|
|
19818
|
+
var request = new Request(input, init);
|
|
19819
|
+
|
|
19820
|
+
if (request.signal && request.signal.aborted) {
|
|
19821
|
+
return reject(new exports.DOMException('Aborted', 'AbortError'))
|
|
19822
|
+
}
|
|
19823
|
+
|
|
19824
|
+
var xhr = new XMLHttpRequest();
|
|
19825
|
+
|
|
19826
|
+
function abortXhr() {
|
|
19827
|
+
xhr.abort();
|
|
19828
|
+
}
|
|
19829
|
+
|
|
19830
|
+
xhr.onload = function() {
|
|
19831
|
+
var options = {
|
|
19832
|
+
status: xhr.status,
|
|
19833
|
+
statusText: xhr.statusText,
|
|
19834
|
+
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
|
19835
|
+
};
|
|
19836
|
+
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
|
19837
|
+
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
|
19838
|
+
resolve(new Response(body, options));
|
|
19839
|
+
};
|
|
19840
|
+
|
|
19841
|
+
xhr.onerror = function() {
|
|
19842
|
+
reject(new TypeError('Network request failed'));
|
|
19843
|
+
};
|
|
19844
|
+
|
|
19845
|
+
xhr.ontimeout = function() {
|
|
19846
|
+
reject(new TypeError('Network request failed'));
|
|
19847
|
+
};
|
|
19848
|
+
|
|
19849
|
+
xhr.onabort = function() {
|
|
19850
|
+
reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
19851
|
+
};
|
|
19852
|
+
|
|
19853
|
+
xhr.open(request.method, request.url, true);
|
|
19854
|
+
|
|
19855
|
+
if (request.credentials === 'include') {
|
|
19856
|
+
xhr.withCredentials = true;
|
|
19857
|
+
} else if (request.credentials === 'omit') {
|
|
19858
|
+
xhr.withCredentials = false;
|
|
19859
|
+
}
|
|
19860
|
+
|
|
19861
|
+
if ('responseType' in xhr && support.blob) {
|
|
19862
|
+
xhr.responseType = 'blob';
|
|
19863
|
+
}
|
|
19864
|
+
|
|
19865
|
+
request.headers.forEach(function(value, name) {
|
|
19866
|
+
xhr.setRequestHeader(name, value);
|
|
19867
|
+
});
|
|
19868
|
+
|
|
19869
|
+
if (request.signal) {
|
|
19870
|
+
request.signal.addEventListener('abort', abortXhr);
|
|
19871
|
+
|
|
19872
|
+
xhr.onreadystatechange = function() {
|
|
19873
|
+
// DONE (success or failure)
|
|
19874
|
+
if (xhr.readyState === 4) {
|
|
19875
|
+
request.signal.removeEventListener('abort', abortXhr);
|
|
19876
|
+
}
|
|
19877
|
+
};
|
|
19878
|
+
}
|
|
19879
|
+
|
|
19880
|
+
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
|
|
19881
|
+
})
|
|
19882
|
+
}
|
|
19883
|
+
|
|
19884
|
+
fetch.polyfill = true;
|
|
19885
|
+
|
|
19886
|
+
if (!self.fetch) {
|
|
19887
|
+
self.fetch = fetch;
|
|
19888
|
+
self.Headers = Headers;
|
|
19889
|
+
self.Request = Request;
|
|
19890
|
+
self.Response = Response;
|
|
19891
|
+
}
|
|
19892
|
+
|
|
19893
|
+
exports.Headers = Headers;
|
|
19894
|
+
exports.Request = Request;
|
|
19895
|
+
exports.Response = Response;
|
|
19896
|
+
exports.fetch = fetch;
|
|
19897
|
+
|
|
19898
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
19899
|
+
|
|
19900
|
+
return exports;
|
|
19901
|
+
|
|
19902
|
+
})({});
|
|
19903
|
+
})(__self__);
|
|
19904
|
+
__self__.fetch.ponyfill = true;
|
|
19905
|
+
// Remove "polyfill" property added by whatwg-fetch
|
|
19906
|
+
delete __self__.fetch.polyfill;
|
|
19907
|
+
// Choose between native implementation (global) or custom implementation (__self__)
|
|
19908
|
+
// var ctx = global.fetch ? global : __self__;
|
|
19909
|
+
var ctx = __self__; // this line disable service worker support temporarily
|
|
19910
|
+
exports = ctx.fetch // To enable: import fetch from 'cross-fetch'
|
|
19911
|
+
exports["default"] = ctx.fetch // For TypeScript consumers without esModuleInterop.
|
|
19912
|
+
exports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'
|
|
19913
|
+
exports.Headers = ctx.Headers
|
|
19914
|
+
exports.Request = ctx.Request
|
|
19915
|
+
exports.Response = ctx.Response
|
|
19916
|
+
module.exports = exports
|
|
19917
|
+
|
|
19918
|
+
|
|
19355
19919
|
/***/ }),
|
|
19356
19920
|
|
|
19357
19921
|
/***/ "../../common/temp/node_modules/.pnpm/deep-assign@2.0.0/node_modules/deep-assign/index.js":
|
|
@@ -21666,235 +22230,6 @@ Browser.type = 'languageDetector';
|
|
|
21666
22230
|
|
|
21667
22231
|
|
|
21668
22232
|
|
|
21669
|
-
/***/ }),
|
|
21670
|
-
|
|
21671
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-xhr-backend@3.2.2/node_modules/i18next-xhr-backend/dist/esm/i18nextXHRBackend.js":
|
|
21672
|
-
/*!*************************************************************************************************************************************!*\
|
|
21673
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-xhr-backend@3.2.2/node_modules/i18next-xhr-backend/dist/esm/i18nextXHRBackend.js ***!
|
|
21674
|
-
\*************************************************************************************************************************************/
|
|
21675
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
21676
|
-
|
|
21677
|
-
"use strict";
|
|
21678
|
-
__webpack_require__.r(__webpack_exports__);
|
|
21679
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21680
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
21681
|
-
/* harmony export */ });
|
|
21682
|
-
/* 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");
|
|
21683
|
-
/* 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");
|
|
21684
|
-
/* 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");
|
|
21685
|
-
/* 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");
|
|
21686
|
-
|
|
21687
|
-
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
var arr = [];
|
|
21692
|
-
var each = arr.forEach;
|
|
21693
|
-
var slice = arr.slice;
|
|
21694
|
-
function defaults(obj) {
|
|
21695
|
-
each.call(slice.call(arguments, 1), function (source) {
|
|
21696
|
-
if (source) {
|
|
21697
|
-
for (var prop in source) {
|
|
21698
|
-
if (obj[prop] === undefined) obj[prop] = source[prop];
|
|
21699
|
-
}
|
|
21700
|
-
}
|
|
21701
|
-
});
|
|
21702
|
-
return obj;
|
|
21703
|
-
}
|
|
21704
|
-
|
|
21705
|
-
function addQueryString(url, params) {
|
|
21706
|
-
if (params && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__["default"])(params) === 'object') {
|
|
21707
|
-
var queryString = '',
|
|
21708
|
-
e = encodeURIComponent; // Must encode data
|
|
21709
|
-
|
|
21710
|
-
for (var paramName in params) {
|
|
21711
|
-
queryString += '&' + e(paramName) + '=' + e(params[paramName]);
|
|
21712
|
-
}
|
|
21713
|
-
|
|
21714
|
-
if (!queryString) {
|
|
21715
|
-
return url;
|
|
21716
|
-
}
|
|
21717
|
-
|
|
21718
|
-
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
|
21719
|
-
}
|
|
21720
|
-
|
|
21721
|
-
return url;
|
|
21722
|
-
} // https://gist.github.com/Xeoncross/7663273
|
|
21723
|
-
|
|
21724
|
-
|
|
21725
|
-
function ajax(url, options, callback, data, cache) {
|
|
21726
|
-
if (data && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__["default"])(data) === 'object') {
|
|
21727
|
-
if (!cache) {
|
|
21728
|
-
data['_t'] = new Date();
|
|
21729
|
-
} // URL encoded form data must be in querystring format
|
|
21730
|
-
|
|
21731
|
-
|
|
21732
|
-
data = addQueryString('', data).slice(1);
|
|
21733
|
-
}
|
|
21734
|
-
|
|
21735
|
-
if (options.queryStringParams) {
|
|
21736
|
-
url = addQueryString(url, options.queryStringParams);
|
|
21737
|
-
}
|
|
21738
|
-
|
|
21739
|
-
try {
|
|
21740
|
-
var x;
|
|
21741
|
-
|
|
21742
|
-
if (XMLHttpRequest) {
|
|
21743
|
-
x = new XMLHttpRequest();
|
|
21744
|
-
} else {
|
|
21745
|
-
x = new ActiveXObject('MSXML2.XMLHTTP.3.0');
|
|
21746
|
-
}
|
|
21747
|
-
|
|
21748
|
-
x.open(data ? 'POST' : 'GET', url, 1);
|
|
21749
|
-
|
|
21750
|
-
if (!options.crossDomain) {
|
|
21751
|
-
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
21752
|
-
}
|
|
21753
|
-
|
|
21754
|
-
x.withCredentials = !!options.withCredentials;
|
|
21755
|
-
|
|
21756
|
-
if (data) {
|
|
21757
|
-
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
|
21758
|
-
}
|
|
21759
|
-
|
|
21760
|
-
if (x.overrideMimeType) {
|
|
21761
|
-
x.overrideMimeType("application/json");
|
|
21762
|
-
}
|
|
21763
|
-
|
|
21764
|
-
var h = options.customHeaders;
|
|
21765
|
-
h = typeof h === 'function' ? h() : h;
|
|
21766
|
-
|
|
21767
|
-
if (h) {
|
|
21768
|
-
for (var i in h) {
|
|
21769
|
-
x.setRequestHeader(i, h[i]);
|
|
21770
|
-
}
|
|
21771
|
-
}
|
|
21772
|
-
|
|
21773
|
-
x.onreadystatechange = function () {
|
|
21774
|
-
x.readyState > 3 && callback && callback(x.responseText, x);
|
|
21775
|
-
};
|
|
21776
|
-
|
|
21777
|
-
x.send(data);
|
|
21778
|
-
} catch (e) {
|
|
21779
|
-
console && console.log(e);
|
|
21780
|
-
}
|
|
21781
|
-
}
|
|
21782
|
-
|
|
21783
|
-
function getDefaults() {
|
|
21784
|
-
return {
|
|
21785
|
-
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
|
21786
|
-
addPath: '/locales/add/{{lng}}/{{ns}}',
|
|
21787
|
-
allowMultiLoading: false,
|
|
21788
|
-
parse: JSON.parse,
|
|
21789
|
-
parsePayload: function parsePayload(namespace, key, fallbackValue) {
|
|
21790
|
-
return (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, key, fallbackValue || '');
|
|
21791
|
-
},
|
|
21792
|
-
crossDomain: false,
|
|
21793
|
-
ajax: ajax
|
|
21794
|
-
};
|
|
21795
|
-
}
|
|
21796
|
-
|
|
21797
|
-
var Backend =
|
|
21798
|
-
/*#__PURE__*/
|
|
21799
|
-
function () {
|
|
21800
|
-
function Backend(services) {
|
|
21801
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
21802
|
-
|
|
21803
|
-
(0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Backend);
|
|
21804
|
-
|
|
21805
|
-
this.init(services, options);
|
|
21806
|
-
this.type = 'backend';
|
|
21807
|
-
}
|
|
21808
|
-
|
|
21809
|
-
(0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Backend, [{
|
|
21810
|
-
key: "init",
|
|
21811
|
-
value: function init(services) {
|
|
21812
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
21813
|
-
this.services = services;
|
|
21814
|
-
this.options = defaults(options, this.options || {}, getDefaults());
|
|
21815
|
-
}
|
|
21816
|
-
}, {
|
|
21817
|
-
key: "readMulti",
|
|
21818
|
-
value: function readMulti(languages, namespaces, callback) {
|
|
21819
|
-
var loadPath = this.options.loadPath;
|
|
21820
|
-
|
|
21821
|
-
if (typeof this.options.loadPath === 'function') {
|
|
21822
|
-
loadPath = this.options.loadPath(languages, namespaces);
|
|
21823
|
-
}
|
|
21824
|
-
|
|
21825
|
-
var url = this.services.interpolator.interpolate(loadPath, {
|
|
21826
|
-
lng: languages.join('+'),
|
|
21827
|
-
ns: namespaces.join('+')
|
|
21828
|
-
});
|
|
21829
|
-
this.loadUrl(url, callback);
|
|
21830
|
-
}
|
|
21831
|
-
}, {
|
|
21832
|
-
key: "read",
|
|
21833
|
-
value: function read(language, namespace, callback) {
|
|
21834
|
-
var loadPath = this.options.loadPath;
|
|
21835
|
-
|
|
21836
|
-
if (typeof this.options.loadPath === 'function') {
|
|
21837
|
-
loadPath = this.options.loadPath([language], [namespace]);
|
|
21838
|
-
}
|
|
21839
|
-
|
|
21840
|
-
var url = this.services.interpolator.interpolate(loadPath, {
|
|
21841
|
-
lng: language,
|
|
21842
|
-
ns: namespace
|
|
21843
|
-
});
|
|
21844
|
-
this.loadUrl(url, callback);
|
|
21845
|
-
}
|
|
21846
|
-
}, {
|
|
21847
|
-
key: "loadUrl",
|
|
21848
|
-
value: function loadUrl(url, callback) {
|
|
21849
|
-
var _this = this;
|
|
21850
|
-
|
|
21851
|
-
this.options.ajax(url, this.options, function (data, xhr) {
|
|
21852
|
-
if (xhr.status >= 500 && xhr.status < 600) return callback('failed loading ' + url, true
|
|
21853
|
-
/* retry */
|
|
21854
|
-
);
|
|
21855
|
-
if (xhr.status >= 400 && xhr.status < 500) return callback('failed loading ' + url, false
|
|
21856
|
-
/* no retry */
|
|
21857
|
-
);
|
|
21858
|
-
var ret, err;
|
|
21859
|
-
|
|
21860
|
-
try {
|
|
21861
|
-
ret = _this.options.parse(data, url);
|
|
21862
|
-
} catch (e) {
|
|
21863
|
-
err = 'failed parsing ' + url + ' to json';
|
|
21864
|
-
}
|
|
21865
|
-
|
|
21866
|
-
if (err) return callback(err, false);
|
|
21867
|
-
callback(null, ret);
|
|
21868
|
-
});
|
|
21869
|
-
}
|
|
21870
|
-
}, {
|
|
21871
|
-
key: "create",
|
|
21872
|
-
value: function create(languages, namespace, key, fallbackValue) {
|
|
21873
|
-
var _this2 = this;
|
|
21874
|
-
|
|
21875
|
-
if (typeof languages === 'string') languages = [languages];
|
|
21876
|
-
var payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
21877
|
-
languages.forEach(function (lng) {
|
|
21878
|
-
var url = _this2.services.interpolator.interpolate(_this2.options.addPath, {
|
|
21879
|
-
lng: lng,
|
|
21880
|
-
ns: namespace
|
|
21881
|
-
});
|
|
21882
|
-
|
|
21883
|
-
_this2.options.ajax(url, _this2.options, function (data, xhr) {//const statusCode = xhr.status.toString();
|
|
21884
|
-
// TODO: if statusCode === 4xx do log
|
|
21885
|
-
}, payload);
|
|
21886
|
-
});
|
|
21887
|
-
}
|
|
21888
|
-
}]);
|
|
21889
|
-
|
|
21890
|
-
return Backend;
|
|
21891
|
-
}();
|
|
21892
|
-
|
|
21893
|
-
Backend.type = 'backend';
|
|
21894
|
-
|
|
21895
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
|
|
21896
|
-
|
|
21897
|
-
|
|
21898
22233
|
/***/ }),
|
|
21899
22234
|
|
|
21900
22235
|
/***/ "../../common/temp/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js":
|
|
@@ -87546,7 +87881,7 @@ class RpcConfiguration {
|
|
|
87546
87881
|
/** The target interval (in milliseconds) between connection attempts for pending RPC operation requests. */
|
|
87547
87882
|
this.pendingOperationRetryInterval = 10000;
|
|
87548
87883
|
/** The maximum number of transient faults permitted before request failure. */
|
|
87549
|
-
this.transientFaultLimit =
|
|
87884
|
+
this.transientFaultLimit = 4;
|
|
87550
87885
|
/** @internal */
|
|
87551
87886
|
this.routing = _RpcRoutingToken__WEBPACK_IMPORTED_MODULE_5__.RpcRoutingToken["default"];
|
|
87552
87887
|
/** The control channel for the configuration.
|
|
@@ -87775,11 +88110,14 @@ var RpcRequestStatus;
|
|
|
87775
88110
|
RpcRequestStatus[RpcRequestStatus["BadGateway"] = 10] = "BadGateway";
|
|
87776
88111
|
RpcRequestStatus[RpcRequestStatus["ServiceUnavailable"] = 11] = "ServiceUnavailable";
|
|
87777
88112
|
RpcRequestStatus[RpcRequestStatus["GatewayTimeout"] = 12] = "GatewayTimeout";
|
|
88113
|
+
RpcRequestStatus[RpcRequestStatus["RequestTimeout"] = 13] = "RequestTimeout";
|
|
88114
|
+
RpcRequestStatus[RpcRequestStatus["TooManyRequests"] = 14] = "TooManyRequests";
|
|
87778
88115
|
})(RpcRequestStatus || (RpcRequestStatus = {}));
|
|
87779
88116
|
/** @public */
|
|
87780
88117
|
(function (RpcRequestStatus) {
|
|
87781
88118
|
function isTransientError(status) {
|
|
87782
|
-
return status === RpcRequestStatus.BadGateway || status === RpcRequestStatus.ServiceUnavailable || status === RpcRequestStatus.GatewayTimeout
|
|
88119
|
+
return status === RpcRequestStatus.BadGateway || status === RpcRequestStatus.ServiceUnavailable || status === RpcRequestStatus.GatewayTimeout
|
|
88120
|
+
|| status === RpcRequestStatus.RequestTimeout || status === RpcRequestStatus.TooManyRequests;
|
|
87783
88121
|
}
|
|
87784
88122
|
RpcRequestStatus.isTransientError = isTransientError;
|
|
87785
88123
|
})(RpcRequestStatus || (RpcRequestStatus = {}));
|
|
@@ -90452,6 +90790,8 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_3__.R
|
|
|
90452
90790
|
case 502: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.BadGateway;
|
|
90453
90791
|
case 503: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.ServiceUnavailable;
|
|
90454
90792
|
case 504: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.GatewayTimeout;
|
|
90793
|
+
case 408: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.RequestTimeout;
|
|
90794
|
+
case 429: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.TooManyRequests;
|
|
90455
90795
|
default: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Unknown;
|
|
90456
90796
|
}
|
|
90457
90797
|
}
|
|
@@ -90466,6 +90806,8 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_3__.R
|
|
|
90466
90806
|
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.BadGateway: return 502;
|
|
90467
90807
|
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.ServiceUnavailable: return 503;
|
|
90468
90808
|
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.GatewayTimeout: return 504;
|
|
90809
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.RequestTimeout: return 408;
|
|
90810
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.TooManyRequests: return 429;
|
|
90469
90811
|
default: return 501;
|
|
90470
90812
|
}
|
|
90471
90813
|
}
|
|
@@ -111334,6 +111676,12 @@ class ViewManager {
|
|
|
111334
111676
|
this.toolTipProviders.length = 0;
|
|
111335
111677
|
this._selectedView = undefined;
|
|
111336
111678
|
}
|
|
111679
|
+
/** Returns true if the specified viewport is currently being managed by this ViewManager.
|
|
111680
|
+
* @see [[addViewport]] to enable management of a viewport and [[dropViewport]] to disable it.
|
|
111681
|
+
*/
|
|
111682
|
+
hasViewport(viewport) {
|
|
111683
|
+
return this._viewports.includes(viewport);
|
|
111684
|
+
}
|
|
111337
111685
|
/** @internal */
|
|
111338
111686
|
endDynamicsMode() {
|
|
111339
111687
|
if (!this.inDynamicsMode)
|
|
@@ -111395,7 +111743,7 @@ class ViewManager {
|
|
|
111395
111743
|
* @note raises onViewOpen event with newVp.
|
|
111396
111744
|
*/
|
|
111397
111745
|
addViewport(newVp) {
|
|
111398
|
-
if (this.
|
|
111746
|
+
if (this.hasViewport(newVp)) // make sure its not already added
|
|
111399
111747
|
return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR;
|
|
111400
111748
|
newVp.setEventController(new _tools_EventController__WEBPACK_IMPORTED_MODULE_3__.EventController(newVp)); // this will direct events to the viewport
|
|
111401
111749
|
this._viewports.push(newVp);
|
|
@@ -114459,6 +114807,8 @@ class Viewport {
|
|
|
114459
114807
|
* @note Attempting to assign to [[flashedId]] from within the event callback will produce an exception.
|
|
114460
114808
|
*/
|
|
114461
114809
|
this.onFlashedIdChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
114810
|
+
/** @internal */
|
|
114811
|
+
this._hasMissingTiles = false;
|
|
114462
114812
|
/** A function executed by `setView()` when `this._view` changes. */
|
|
114463
114813
|
this._detachFromView = [];
|
|
114464
114814
|
this._detachFromDisplayStyle = [];
|
|
@@ -116198,6 +116548,7 @@ class Viewport {
|
|
|
116198
116548
|
const context = this.createSceneContext();
|
|
116199
116549
|
this.createScene(context);
|
|
116200
116550
|
context.requestMissingTiles();
|
|
116551
|
+
this._hasMissingTiles = context.hasMissingTiles || context.missingTiles.size > 0;
|
|
116201
116552
|
target.changeScene(context.scene);
|
|
116202
116553
|
isRedrawNeeded = true;
|
|
116203
116554
|
this._frameStatsCollector.endTime("createChangeSceneTime");
|
|
@@ -116313,6 +116664,45 @@ class Viewport {
|
|
|
116313
116664
|
readImageToCanvas() {
|
|
116314
116665
|
return this.target.readImageToCanvas();
|
|
116315
116666
|
}
|
|
116667
|
+
/** Returns a Promise that resolves after the contents of this viewport are fully loaded and rendered.
|
|
116668
|
+
* This can be useful, for example, when you want to capture an image of the viewport's contents, as in the following code:
|
|
116669
|
+
* ```ts
|
|
116670
|
+
* async function captureImage(vp: Viewport): Promise<ImageBuffer | undefined> {
|
|
116671
|
+
* await vp.waitForSceneCompletion();
|
|
116672
|
+
* return vp.readImageBuffer();
|
|
116673
|
+
* }
|
|
116674
|
+
* ```
|
|
116675
|
+
*/
|
|
116676
|
+
async waitForSceneCompletion() {
|
|
116677
|
+
const system = this.target.renderSystem;
|
|
116678
|
+
let haveNewTiles = true;
|
|
116679
|
+
let haveExternalTexRequests = true;
|
|
116680
|
+
while ((haveNewTiles || haveExternalTexRequests) && !this.isDisposed) {
|
|
116681
|
+
// 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.
|
|
116682
|
+
this.invalidateScene();
|
|
116683
|
+
this.renderFrame();
|
|
116684
|
+
haveExternalTexRequests = system.hasExternalTextureRequests;
|
|
116685
|
+
haveNewTiles = !this.areAllTileTreesLoaded || this._hasMissingTiles;
|
|
116686
|
+
if (!haveNewTiles) {
|
|
116687
|
+
// ViewAttachments and 3d section drawing attachments render to separate off-screen viewports - check those too.
|
|
116688
|
+
for (const vp of this.view.secondaryViewports) {
|
|
116689
|
+
if (vp.numRequestedTiles > 0) {
|
|
116690
|
+
haveNewTiles = true;
|
|
116691
|
+
break;
|
|
116692
|
+
}
|
|
116693
|
+
const tiles = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.tileAdmin.getTilesForUser(vp);
|
|
116694
|
+
if (tiles && tiles.external.requested > 0) {
|
|
116695
|
+
haveNewTiles = true;
|
|
116696
|
+
break;
|
|
116697
|
+
}
|
|
116698
|
+
}
|
|
116699
|
+
}
|
|
116700
|
+
// 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.
|
|
116701
|
+
if (haveNewTiles)
|
|
116702
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.tileAdmin.process();
|
|
116703
|
+
await _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration.wait(100);
|
|
116704
|
+
}
|
|
116705
|
+
}
|
|
116316
116706
|
/** Get the point at the specified x and y location in the pixel buffer in npc coordinates.
|
|
116317
116707
|
* @see [[getPixelDataWorldPoint]] to obtain the point in [[CoordSystem.World]].
|
|
116318
116708
|
*/
|
|
@@ -117019,6 +117409,61 @@ class ScreenViewport extends Viewport {
|
|
|
117019
117409
|
}
|
|
117020
117410
|
this.invalidateRenderPlan();
|
|
117021
117411
|
}
|
|
117412
|
+
/** @internal override */
|
|
117413
|
+
async waitForSceneCompletion() {
|
|
117414
|
+
if (!_IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.viewManager.hasViewport(this))
|
|
117415
|
+
return super.waitForSceneCompletion();
|
|
117416
|
+
const system = this.target.renderSystem;
|
|
117417
|
+
// Let the ViewManager/TileAdmin initiate all further requests for tiles until no more requests are pending.
|
|
117418
|
+
// We will latch onto the onRender event in order to know when tile requests are finished and the promise is fulfilled.
|
|
117419
|
+
const promise = new Promise((resolve, _reject) => {
|
|
117420
|
+
const removeOnRender = this.onRender.addListener(() => {
|
|
117421
|
+
const removeOnViewClose = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.viewManager.onViewClose.addListener((vp) => {
|
|
117422
|
+
if (vp === this) {
|
|
117423
|
+
removeOnViewClose();
|
|
117424
|
+
removeOnRender();
|
|
117425
|
+
resolve();
|
|
117426
|
+
return;
|
|
117427
|
+
}
|
|
117428
|
+
});
|
|
117429
|
+
if (this.isDisposed) {
|
|
117430
|
+
removeOnViewClose();
|
|
117431
|
+
removeOnRender();
|
|
117432
|
+
resolve();
|
|
117433
|
+
return;
|
|
117434
|
+
}
|
|
117435
|
+
let haveNewTiles = !this.areAllTileTreesLoaded || this._hasMissingTiles;
|
|
117436
|
+
if (!haveNewTiles) {
|
|
117437
|
+
// ViewAttachments and 3d section drawing attachments render to separate off-screen viewports - check those too.
|
|
117438
|
+
for (const vp of this.view.secondaryViewports) {
|
|
117439
|
+
if (vp.numRequestedTiles > 0) {
|
|
117440
|
+
haveNewTiles = true;
|
|
117441
|
+
break;
|
|
117442
|
+
}
|
|
117443
|
+
const tiles = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.tileAdmin.getTilesForUser(vp);
|
|
117444
|
+
if (tiles && tiles.external.requested > 0) {
|
|
117445
|
+
haveNewTiles = true;
|
|
117446
|
+
break;
|
|
117447
|
+
}
|
|
117448
|
+
}
|
|
117449
|
+
}
|
|
117450
|
+
if (!haveNewTiles && !system.hasExternalTextureRequests) {
|
|
117451
|
+
removeOnViewClose();
|
|
117452
|
+
removeOnRender();
|
|
117453
|
+
resolve();
|
|
117454
|
+
return;
|
|
117455
|
+
}
|
|
117456
|
+
});
|
|
117457
|
+
});
|
|
117458
|
+
// 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.
|
|
117459
|
+
while (!this.areAllTileTreesLoaded) {
|
|
117460
|
+
await _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration.wait(100);
|
|
117461
|
+
}
|
|
117462
|
+
// After all tile trees have loaded, kick off an initial request for tiles.
|
|
117463
|
+
this.invalidateScene();
|
|
117464
|
+
this.renderFrame();
|
|
117465
|
+
return promise;
|
|
117466
|
+
}
|
|
117022
117467
|
}
|
|
117023
117468
|
/** Settings that may be adjusted to control the way animations are applied to a [[ScreenViewport]] by methods like
|
|
117024
117469
|
* [[changeView]] and [[synchWithView].
|
|
@@ -122631,6 +123076,8 @@ class RenderSystem {
|
|
|
122631
123076
|
}
|
|
122632
123077
|
/** Return a Promise which when resolved indicates that all pending external textures have finished loading from the backend. */
|
|
122633
123078
|
async waitForAllExternalTextures() { return Promise.resolve(); }
|
|
123079
|
+
/** @internal */
|
|
123080
|
+
get hasExternalTextureRequests() { return false; }
|
|
122634
123081
|
/** Create a graphic that assumes ownership of another graphic.
|
|
122635
123082
|
* @param ownedGraphic The RenderGraphic to be owned.
|
|
122636
123083
|
* @returns The owning graphic that exposes a `disposeGraphic` method for explicitly disposing of the owned graphic.
|
|
@@ -143289,6 +143736,10 @@ class System extends _RenderSystem__WEBPACK_IMPORTED_MODULE_7__.RenderSystem {
|
|
|
143289
143736
|
});
|
|
143290
143737
|
return promise;
|
|
143291
143738
|
}
|
|
143739
|
+
get hasExternalTextureRequests() {
|
|
143740
|
+
const loader = _Texture__WEBPACK_IMPORTED_MODULE_33__.ExternalTextureLoader.instance;
|
|
143741
|
+
return loader.numActiveRequests > 0 || loader.numPendingRequests > 0;
|
|
143742
|
+
}
|
|
143292
143743
|
/** Attempt to create a WebGLRenderingContext, returning undefined if unsuccessful. */
|
|
143293
143744
|
static createContext(canvas, useWebGL2, inputContextAttributes) {
|
|
143294
143745
|
let contextAttributes = { powerPreference: "high-performance" };
|
|
@@ -183846,7 +184297,7 @@ class ViewPan extends HandleWithInertia {
|
|
|
183846
184297
|
const thisWorld = vp.npcToWorld(thisPtNpc);
|
|
183847
184298
|
const dist = thisWorld.vectorTo(lastWorld);
|
|
183848
184299
|
if (view.is3d()) {
|
|
183849
|
-
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_17__.ViewStatus.Success !== (
|
|
184300
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_17__.ViewStatus.Success !== (vp.viewingGlobe ? view.moveCameraGlobal(lastWorld, thisWorld) : view.moveCameraWorld(dist)))
|
|
183850
184301
|
return false;
|
|
183851
184302
|
this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it
|
|
183852
184303
|
}
|
|
@@ -266290,7 +266741,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
266290
266741
|
/* harmony export */ });
|
|
266291
266742
|
/* 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");
|
|
266292
266743
|
/* 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");
|
|
266293
|
-
/* harmony import */ var
|
|
266744
|
+
/* 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");
|
|
266294
266745
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
266295
266746
|
/*---------------------------------------------------------------------------------------------
|
|
266296
266747
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -266303,6 +266754,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
266303
266754
|
|
|
266304
266755
|
|
|
266305
266756
|
|
|
266757
|
+
const DEFAULT_MAX_RETRIES = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
|
|
266306
266758
|
/** Supplies localizations for iTwin.js
|
|
266307
266759
|
* @note this class uses the [i18next](https://www.i18next.com/) package.
|
|
266308
266760
|
* @public
|
|
@@ -266326,20 +266778,28 @@ class ITwinLocalization {
|
|
|
266326
266778
|
this._initOptions = {
|
|
266327
266779
|
interpolation: { escapeValue: true },
|
|
266328
266780
|
fallbackLng: "en",
|
|
266781
|
+
maxRetries: DEFAULT_MAX_RETRIES,
|
|
266329
266782
|
backend: this._backendOptions,
|
|
266330
266783
|
detection: this._detectionOptions,
|
|
266331
266784
|
...options === null || options === void 0 ? void 0 : options.initOptions,
|
|
266332
266785
|
};
|
|
266333
266786
|
this.i18next
|
|
266334
266787
|
.use((_b = options === null || options === void 0 ? void 0 : options.detectorPlugin) !== null && _b !== void 0 ? _b : i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__["default"])
|
|
266335
|
-
.use((_c = options === null || options === void 0 ? void 0 : options.backendPlugin) !== null && _c !== void 0 ? _c :
|
|
266788
|
+
.use((_c = options === null || options === void 0 ? void 0 : options.backendPlugin) !== null && _c !== void 0 ? _c : i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__["default"])
|
|
266336
266789
|
.use(TranslationLogger);
|
|
266337
266790
|
}
|
|
266338
266791
|
async initialize(namespaces) {
|
|
266792
|
+
var _a;
|
|
266793
|
+
// Also consider namespaces passed into constructor
|
|
266794
|
+
const initNamespaces = [this._initOptions.ns || []].flat();
|
|
266795
|
+
const combinedNamespaces = new Set([...namespaces, ...initNamespaces]); // without duplicates
|
|
266796
|
+
const defaultNamespace = (_a = this._initOptions.defaultNS) !== null && _a !== void 0 ? _a : namespaces[0];
|
|
266797
|
+
if (defaultNamespace)
|
|
266798
|
+
combinedNamespaces.add(defaultNamespace); // Make sure default namespace is in namespaces list
|
|
266339
266799
|
const initOptions = {
|
|
266340
266800
|
...this._initOptions,
|
|
266341
|
-
|
|
266342
|
-
|
|
266801
|
+
defaultNS: defaultNamespace,
|
|
266802
|
+
ns: [...combinedNamespaces],
|
|
266343
266803
|
};
|
|
266344
266804
|
// if in a development environment, set debugging
|
|
266345
266805
|
if (false)
|
|
@@ -266382,9 +266842,13 @@ class ITwinLocalization {
|
|
|
266382
266842
|
* @public
|
|
266383
266843
|
*/
|
|
266384
266844
|
getLocalizedString(key, options) {
|
|
266845
|
+
if ((options === null || options === void 0 ? void 0 : options.returnDetails) || (options === null || options === void 0 ? void 0 : options.returnObjects)) {
|
|
266846
|
+
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
266847
|
+
}
|
|
266385
266848
|
const value = this.i18next.t(key, options);
|
|
266386
|
-
if (typeof value !== "string")
|
|
266387
|
-
throw new Error("Translation key(s) not found");
|
|
266849
|
+
if (typeof value !== "string") {
|
|
266850
|
+
throw new Error("Translation key(s) string not found");
|
|
266851
|
+
}
|
|
266388
266852
|
return value;
|
|
266389
266853
|
}
|
|
266390
266854
|
/** Similar to `getLocalizedString` but the namespace is a separate param and the key does not include the namespace.
|
|
@@ -266414,6 +266878,9 @@ class ITwinLocalization {
|
|
|
266414
266878
|
* @internal
|
|
266415
266879
|
*/
|
|
266416
266880
|
getEnglishString(namespace, key, options) {
|
|
266881
|
+
if ((options === null || options === void 0 ? void 0 : options.returnDetails) || (options === null || options === void 0 ? void 0 : options.returnObjects)) {
|
|
266882
|
+
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
266883
|
+
}
|
|
266417
266884
|
const en = this.i18next.getFixedT("en", namespace);
|
|
266418
266885
|
const str = en(key, options);
|
|
266419
266886
|
if (typeof str !== "string")
|
|
@@ -266453,10 +266920,10 @@ class ITwinLocalization {
|
|
|
266453
266920
|
if (!err)
|
|
266454
266921
|
return resolve();
|
|
266455
266922
|
// Here we got a non-null err object.
|
|
266456
|
-
// This method is called when the system has attempted to load the resources for the
|
|
266457
|
-
//
|
|
266458
|
-
//
|
|
266459
|
-
// might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible
|
|
266923
|
+
// This method is called when the system has attempted to load the resources for the namespaces for each possible locale.
|
|
266924
|
+
// For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.
|
|
266925
|
+
// Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.
|
|
266926
|
+
// 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.
|
|
266460
266927
|
let locales = this.getLanguageList().map((thisLocale) => `/${thisLocale}/`);
|
|
266461
266928
|
try {
|
|
266462
266929
|
for (const thisError of err) {
|
|
@@ -287686,7 +288153,7 @@ class TestContext {
|
|
|
287686
288153
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
287687
288154
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
|
|
287688
288155
|
await core_frontend_1.NoRenderApp.startup({
|
|
287689
|
-
applicationVersion: "3.4.0-dev.
|
|
288156
|
+
applicationVersion: "3.4.0-dev.46",
|
|
287690
288157
|
applicationId: this.settings.gprid,
|
|
287691
288158
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
287692
288159
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -301439,6 +301906,31 @@ var WidgetState;
|
|
|
301439
301906
|
|
|
301440
301907
|
/* (ignored) */
|
|
301441
301908
|
|
|
301909
|
+
/***/ }),
|
|
301910
|
+
|
|
301911
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/getFetch.cjs":
|
|
301912
|
+
/*!**************************************************************************************************************************!*\
|
|
301913
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/getFetch.cjs ***!
|
|
301914
|
+
\**************************************************************************************************************************/
|
|
301915
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
301916
|
+
|
|
301917
|
+
var fetchApi
|
|
301918
|
+
if (typeof fetch === 'function') {
|
|
301919
|
+
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
|
|
301920
|
+
fetchApi = __webpack_require__.g.fetch
|
|
301921
|
+
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
301922
|
+
fetchApi = window.fetch
|
|
301923
|
+
}
|
|
301924
|
+
}
|
|
301925
|
+
|
|
301926
|
+
if ( true && (typeof window === 'undefined' || typeof window.document === 'undefined')) {
|
|
301927
|
+
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")
|
|
301928
|
+
if (f.default) f = f.default
|
|
301929
|
+
exports["default"] = f
|
|
301930
|
+
module.exports = exports.default
|
|
301931
|
+
}
|
|
301932
|
+
|
|
301933
|
+
|
|
301442
301934
|
/***/ }),
|
|
301443
301935
|
|
|
301444
301936
|
/***/ "../../common/temp/node_modules/.pnpm/flatbuffers@1.12.0/node_modules/flatbuffers/js/flatbuffers.mjs":
|
|
@@ -303393,6 +303885,438 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
303393
303885
|
|
|
303394
303886
|
/***/ }),
|
|
303395
303887
|
|
|
303888
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/index.js":
|
|
303889
|
+
/*!**********************************************************************************************************************!*\
|
|
303890
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/index.js ***!
|
|
303891
|
+
\**********************************************************************************************************************/
|
|
303892
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
303893
|
+
|
|
303894
|
+
"use strict";
|
|
303895
|
+
__webpack_require__.r(__webpack_exports__);
|
|
303896
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
303897
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
303898
|
+
/* harmony export */ });
|
|
303899
|
+
/* 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");
|
|
303900
|
+
/* 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");
|
|
303901
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
303902
|
+
|
|
303903
|
+
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); } }
|
|
303904
|
+
|
|
303905
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
303906
|
+
|
|
303907
|
+
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; }
|
|
303908
|
+
|
|
303909
|
+
|
|
303910
|
+
|
|
303911
|
+
|
|
303912
|
+
var getDefaults = function getDefaults() {
|
|
303913
|
+
return {
|
|
303914
|
+
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
|
303915
|
+
addPath: '/locales/add/{{lng}}/{{ns}}',
|
|
303916
|
+
allowMultiLoading: false,
|
|
303917
|
+
parse: function parse(data) {
|
|
303918
|
+
return JSON.parse(data);
|
|
303919
|
+
},
|
|
303920
|
+
stringify: JSON.stringify,
|
|
303921
|
+
parsePayload: function parsePayload(namespace, key, fallbackValue) {
|
|
303922
|
+
return _defineProperty({}, key, fallbackValue || '');
|
|
303923
|
+
},
|
|
303924
|
+
request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
303925
|
+
reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
|
|
303926
|
+
customHeaders: {},
|
|
303927
|
+
queryStringParams: {},
|
|
303928
|
+
crossDomain: false,
|
|
303929
|
+
withCredentials: false,
|
|
303930
|
+
overrideMimeType: false,
|
|
303931
|
+
requestOptions: {
|
|
303932
|
+
mode: 'cors',
|
|
303933
|
+
credentials: 'same-origin',
|
|
303934
|
+
cache: 'default'
|
|
303935
|
+
}
|
|
303936
|
+
};
|
|
303937
|
+
};
|
|
303938
|
+
|
|
303939
|
+
var Backend = function () {
|
|
303940
|
+
function Backend(services) {
|
|
303941
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
303942
|
+
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
303943
|
+
|
|
303944
|
+
_classCallCheck(this, Backend);
|
|
303945
|
+
|
|
303946
|
+
this.services = services;
|
|
303947
|
+
this.options = options;
|
|
303948
|
+
this.allOptions = allOptions;
|
|
303949
|
+
this.type = 'backend';
|
|
303950
|
+
this.init(services, options, allOptions);
|
|
303951
|
+
}
|
|
303952
|
+
|
|
303953
|
+
_createClass(Backend, [{
|
|
303954
|
+
key: "init",
|
|
303955
|
+
value: function init(services) {
|
|
303956
|
+
var _this = this;
|
|
303957
|
+
|
|
303958
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
303959
|
+
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
303960
|
+
this.services = services;
|
|
303961
|
+
this.options = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.defaults)(options, this.options || {}, getDefaults());
|
|
303962
|
+
this.allOptions = allOptions;
|
|
303963
|
+
|
|
303964
|
+
if (this.services && this.options.reloadInterval) {
|
|
303965
|
+
setInterval(function () {
|
|
303966
|
+
return _this.reload();
|
|
303967
|
+
}, this.options.reloadInterval);
|
|
303968
|
+
}
|
|
303969
|
+
}
|
|
303970
|
+
}, {
|
|
303971
|
+
key: "readMulti",
|
|
303972
|
+
value: function readMulti(languages, namespaces, callback) {
|
|
303973
|
+
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
303974
|
+
}
|
|
303975
|
+
}, {
|
|
303976
|
+
key: "read",
|
|
303977
|
+
value: function read(language, namespace, callback) {
|
|
303978
|
+
this._readAny([language], language, [namespace], namespace, callback);
|
|
303979
|
+
}
|
|
303980
|
+
}, {
|
|
303981
|
+
key: "_readAny",
|
|
303982
|
+
value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
303983
|
+
var _this2 = this;
|
|
303984
|
+
|
|
303985
|
+
var loadPath = this.options.loadPath;
|
|
303986
|
+
|
|
303987
|
+
if (typeof this.options.loadPath === 'function') {
|
|
303988
|
+
loadPath = this.options.loadPath(languages, namespaces);
|
|
303989
|
+
}
|
|
303990
|
+
|
|
303991
|
+
loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
|
|
303992
|
+
loadPath.then(function (resolvedLoadPath) {
|
|
303993
|
+
if (!resolvedLoadPath) return callback(null, {});
|
|
303994
|
+
|
|
303995
|
+
var url = _this2.services.interpolator.interpolate(resolvedLoadPath, {
|
|
303996
|
+
lng: languages.join('+'),
|
|
303997
|
+
ns: namespaces.join('+')
|
|
303998
|
+
});
|
|
303999
|
+
|
|
304000
|
+
_this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
304001
|
+
});
|
|
304002
|
+
}
|
|
304003
|
+
}, {
|
|
304004
|
+
key: "loadUrl",
|
|
304005
|
+
value: function loadUrl(url, callback, languages, namespaces) {
|
|
304006
|
+
var _this3 = this;
|
|
304007
|
+
|
|
304008
|
+
this.options.request(this.options, url, undefined, function (err, res) {
|
|
304009
|
+
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + url + '; status code: ' + res.status, true);
|
|
304010
|
+
if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + url + '; status code: ' + res.status, false);
|
|
304011
|
+
if (!res && err && err.message && err.message.indexOf('Failed to fetch') > -1) return callback('failed loading ' + url + ': ' + err.message, true);
|
|
304012
|
+
if (err) return callback(err, false);
|
|
304013
|
+
var ret, parseErr;
|
|
304014
|
+
|
|
304015
|
+
try {
|
|
304016
|
+
if (typeof res.data === 'string') {
|
|
304017
|
+
ret = _this3.options.parse(res.data, languages, namespaces);
|
|
304018
|
+
} else {
|
|
304019
|
+
ret = res.data;
|
|
304020
|
+
}
|
|
304021
|
+
} catch (e) {
|
|
304022
|
+
parseErr = 'failed parsing ' + url + ' to json';
|
|
304023
|
+
}
|
|
304024
|
+
|
|
304025
|
+
if (parseErr) return callback(parseErr, false);
|
|
304026
|
+
callback(null, ret);
|
|
304027
|
+
});
|
|
304028
|
+
}
|
|
304029
|
+
}, {
|
|
304030
|
+
key: "create",
|
|
304031
|
+
value: function create(languages, namespace, key, fallbackValue, callback) {
|
|
304032
|
+
var _this4 = this;
|
|
304033
|
+
|
|
304034
|
+
if (!this.options.addPath) return;
|
|
304035
|
+
if (typeof languages === 'string') languages = [languages];
|
|
304036
|
+
var payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
304037
|
+
var finished = 0;
|
|
304038
|
+
var dataArray = [];
|
|
304039
|
+
var resArray = [];
|
|
304040
|
+
languages.forEach(function (lng) {
|
|
304041
|
+
var addPath = _this4.options.addPath;
|
|
304042
|
+
|
|
304043
|
+
if (typeof _this4.options.addPath === 'function') {
|
|
304044
|
+
addPath = _this4.options.addPath(lng, namespace);
|
|
304045
|
+
}
|
|
304046
|
+
|
|
304047
|
+
var url = _this4.services.interpolator.interpolate(addPath, {
|
|
304048
|
+
lng: lng,
|
|
304049
|
+
ns: namespace
|
|
304050
|
+
});
|
|
304051
|
+
|
|
304052
|
+
_this4.options.request(_this4.options, url, payload, function (data, res) {
|
|
304053
|
+
finished += 1;
|
|
304054
|
+
dataArray.push(data);
|
|
304055
|
+
resArray.push(res);
|
|
304056
|
+
|
|
304057
|
+
if (finished === languages.length) {
|
|
304058
|
+
if (callback) callback(dataArray, resArray);
|
|
304059
|
+
}
|
|
304060
|
+
});
|
|
304061
|
+
});
|
|
304062
|
+
}
|
|
304063
|
+
}, {
|
|
304064
|
+
key: "reload",
|
|
304065
|
+
value: function reload() {
|
|
304066
|
+
var _this5 = this;
|
|
304067
|
+
|
|
304068
|
+
var _this$services = this.services,
|
|
304069
|
+
backendConnector = _this$services.backendConnector,
|
|
304070
|
+
languageUtils = _this$services.languageUtils,
|
|
304071
|
+
logger = _this$services.logger;
|
|
304072
|
+
var currentLanguage = backendConnector.language;
|
|
304073
|
+
if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
|
|
304074
|
+
var toLoad = [];
|
|
304075
|
+
|
|
304076
|
+
var append = function append(lng) {
|
|
304077
|
+
var lngs = languageUtils.toResolveHierarchy(lng);
|
|
304078
|
+
lngs.forEach(function (l) {
|
|
304079
|
+
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
304080
|
+
});
|
|
304081
|
+
};
|
|
304082
|
+
|
|
304083
|
+
append(currentLanguage);
|
|
304084
|
+
if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
|
|
304085
|
+
return append(l);
|
|
304086
|
+
});
|
|
304087
|
+
toLoad.forEach(function (lng) {
|
|
304088
|
+
_this5.allOptions.ns.forEach(function (ns) {
|
|
304089
|
+
backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
|
|
304090
|
+
if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
|
|
304091
|
+
if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
|
|
304092
|
+
backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
|
|
304093
|
+
});
|
|
304094
|
+
});
|
|
304095
|
+
});
|
|
304096
|
+
}
|
|
304097
|
+
}]);
|
|
304098
|
+
|
|
304099
|
+
return Backend;
|
|
304100
|
+
}();
|
|
304101
|
+
|
|
304102
|
+
Backend.type = 'backend';
|
|
304103
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
|
|
304104
|
+
|
|
304105
|
+
/***/ }),
|
|
304106
|
+
|
|
304107
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/request.js":
|
|
304108
|
+
/*!************************************************************************************************************************!*\
|
|
304109
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/request.js ***!
|
|
304110
|
+
\************************************************************************************************************************/
|
|
304111
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
304112
|
+
|
|
304113
|
+
"use strict";
|
|
304114
|
+
var _getFetch_cjs__WEBPACK_IMPORTED_MODULE_1___namespace_cache;
|
|
304115
|
+
__webpack_require__.r(__webpack_exports__);
|
|
304116
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
304117
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
304118
|
+
/* harmony export */ });
|
|
304119
|
+
/* 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");
|
|
304120
|
+
/* 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");
|
|
304121
|
+
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); }
|
|
304122
|
+
|
|
304123
|
+
|
|
304124
|
+
|
|
304125
|
+
var fetchApi;
|
|
304126
|
+
|
|
304127
|
+
if (typeof fetch === 'function') {
|
|
304128
|
+
if (typeof global !== 'undefined' && global.fetch) {
|
|
304129
|
+
fetchApi = global.fetch;
|
|
304130
|
+
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
304131
|
+
fetchApi = window.fetch;
|
|
304132
|
+
}
|
|
304133
|
+
}
|
|
304134
|
+
|
|
304135
|
+
var XmlHttpRequestApi;
|
|
304136
|
+
|
|
304137
|
+
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
|
|
304138
|
+
if (typeof global !== 'undefined' && global.XMLHttpRequest) {
|
|
304139
|
+
XmlHttpRequestApi = global.XMLHttpRequest;
|
|
304140
|
+
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
|
|
304141
|
+
XmlHttpRequestApi = window.XMLHttpRequest;
|
|
304142
|
+
}
|
|
304143
|
+
}
|
|
304144
|
+
|
|
304145
|
+
var ActiveXObjectApi;
|
|
304146
|
+
|
|
304147
|
+
if (typeof ActiveXObject === 'function') {
|
|
304148
|
+
if (typeof global !== 'undefined' && global.ActiveXObject) {
|
|
304149
|
+
ActiveXObjectApi = global.ActiveXObject;
|
|
304150
|
+
} else if (typeof window !== 'undefined' && window.ActiveXObject) {
|
|
304151
|
+
ActiveXObjectApi = window.ActiveXObject;
|
|
304152
|
+
}
|
|
304153
|
+
}
|
|
304154
|
+
|
|
304155
|
+
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)));
|
|
304156
|
+
if (typeof fetchApi !== 'function') fetchApi = undefined;
|
|
304157
|
+
|
|
304158
|
+
var addQueryString = function addQueryString(url, params) {
|
|
304159
|
+
if (params && _typeof(params) === 'object') {
|
|
304160
|
+
var queryString = '';
|
|
304161
|
+
|
|
304162
|
+
for (var paramName in params) {
|
|
304163
|
+
queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
|
|
304164
|
+
}
|
|
304165
|
+
|
|
304166
|
+
if (!queryString) return url;
|
|
304167
|
+
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
|
304168
|
+
}
|
|
304169
|
+
|
|
304170
|
+
return url;
|
|
304171
|
+
};
|
|
304172
|
+
|
|
304173
|
+
var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
|
|
304174
|
+
if (options.queryStringParams) {
|
|
304175
|
+
url = addQueryString(url, options.queryStringParams);
|
|
304176
|
+
}
|
|
304177
|
+
|
|
304178
|
+
var headers = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.defaults)({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
|
|
304179
|
+
if (payload) headers['Content-Type'] = 'application/json';
|
|
304180
|
+
fetchApi(url, (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.defaults)({
|
|
304181
|
+
method: payload ? 'POST' : 'GET',
|
|
304182
|
+
body: payload ? options.stringify(payload) : undefined,
|
|
304183
|
+
headers: headers
|
|
304184
|
+
}, typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions)).then(function (response) {
|
|
304185
|
+
if (!response.ok) return callback(response.statusText || 'Error', {
|
|
304186
|
+
status: response.status
|
|
304187
|
+
});
|
|
304188
|
+
response.text().then(function (data) {
|
|
304189
|
+
callback(null, {
|
|
304190
|
+
status: response.status,
|
|
304191
|
+
data: data
|
|
304192
|
+
});
|
|
304193
|
+
}).catch(callback);
|
|
304194
|
+
}).catch(callback);
|
|
304195
|
+
};
|
|
304196
|
+
|
|
304197
|
+
var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
|
|
304198
|
+
if (payload && _typeof(payload) === 'object') {
|
|
304199
|
+
payload = addQueryString('', payload).slice(1);
|
|
304200
|
+
}
|
|
304201
|
+
|
|
304202
|
+
if (options.queryStringParams) {
|
|
304203
|
+
url = addQueryString(url, options.queryStringParams);
|
|
304204
|
+
}
|
|
304205
|
+
|
|
304206
|
+
try {
|
|
304207
|
+
var x;
|
|
304208
|
+
|
|
304209
|
+
if (XmlHttpRequestApi) {
|
|
304210
|
+
x = new XmlHttpRequestApi();
|
|
304211
|
+
} else {
|
|
304212
|
+
x = new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
|
|
304213
|
+
}
|
|
304214
|
+
|
|
304215
|
+
x.open(payload ? 'POST' : 'GET', url, 1);
|
|
304216
|
+
|
|
304217
|
+
if (!options.crossDomain) {
|
|
304218
|
+
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
304219
|
+
}
|
|
304220
|
+
|
|
304221
|
+
x.withCredentials = !!options.withCredentials;
|
|
304222
|
+
|
|
304223
|
+
if (payload) {
|
|
304224
|
+
x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
304225
|
+
}
|
|
304226
|
+
|
|
304227
|
+
if (x.overrideMimeType) {
|
|
304228
|
+
x.overrideMimeType('application/json');
|
|
304229
|
+
}
|
|
304230
|
+
|
|
304231
|
+
var h = options.customHeaders;
|
|
304232
|
+
h = typeof h === 'function' ? h() : h;
|
|
304233
|
+
|
|
304234
|
+
if (h) {
|
|
304235
|
+
for (var i in h) {
|
|
304236
|
+
x.setRequestHeader(i, h[i]);
|
|
304237
|
+
}
|
|
304238
|
+
}
|
|
304239
|
+
|
|
304240
|
+
x.onreadystatechange = function () {
|
|
304241
|
+
x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
|
|
304242
|
+
status: x.status,
|
|
304243
|
+
data: x.responseText
|
|
304244
|
+
});
|
|
304245
|
+
};
|
|
304246
|
+
|
|
304247
|
+
x.send(payload);
|
|
304248
|
+
} catch (e) {
|
|
304249
|
+
console && console.log(e);
|
|
304250
|
+
}
|
|
304251
|
+
};
|
|
304252
|
+
|
|
304253
|
+
var request = function request(options, url, payload, callback) {
|
|
304254
|
+
if (typeof payload === 'function') {
|
|
304255
|
+
callback = payload;
|
|
304256
|
+
payload = undefined;
|
|
304257
|
+
}
|
|
304258
|
+
|
|
304259
|
+
callback = callback || function () {};
|
|
304260
|
+
|
|
304261
|
+
if (fetchApi) {
|
|
304262
|
+
return requestWithFetch(options, url, payload, callback);
|
|
304263
|
+
}
|
|
304264
|
+
|
|
304265
|
+
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
|
|
304266
|
+
return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
304267
|
+
}
|
|
304268
|
+
};
|
|
304269
|
+
|
|
304270
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
|
|
304271
|
+
|
|
304272
|
+
/***/ }),
|
|
304273
|
+
|
|
304274
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/utils.js":
|
|
304275
|
+
/*!**********************************************************************************************************************!*\
|
|
304276
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.1/node_modules/i18next-http-backend/esm/utils.js ***!
|
|
304277
|
+
\**********************************************************************************************************************/
|
|
304278
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
304279
|
+
|
|
304280
|
+
"use strict";
|
|
304281
|
+
__webpack_require__.r(__webpack_exports__);
|
|
304282
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
304283
|
+
/* harmony export */ "defaults": () => (/* binding */ defaults),
|
|
304284
|
+
/* harmony export */ "hasXMLHttpRequest": () => (/* binding */ hasXMLHttpRequest),
|
|
304285
|
+
/* harmony export */ "makePromise": () => (/* binding */ makePromise)
|
|
304286
|
+
/* harmony export */ });
|
|
304287
|
+
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); }
|
|
304288
|
+
|
|
304289
|
+
var arr = [];
|
|
304290
|
+
var each = arr.forEach;
|
|
304291
|
+
var slice = arr.slice;
|
|
304292
|
+
function defaults(obj) {
|
|
304293
|
+
each.call(slice.call(arguments, 1), function (source) {
|
|
304294
|
+
if (source) {
|
|
304295
|
+
for (var prop in source) {
|
|
304296
|
+
if (obj[prop] === undefined) obj[prop] = source[prop];
|
|
304297
|
+
}
|
|
304298
|
+
}
|
|
304299
|
+
});
|
|
304300
|
+
return obj;
|
|
304301
|
+
}
|
|
304302
|
+
function hasXMLHttpRequest() {
|
|
304303
|
+
return typeof XMLHttpRequest === 'function' || (typeof XMLHttpRequest === "undefined" ? "undefined" : _typeof(XMLHttpRequest)) === 'object';
|
|
304304
|
+
}
|
|
304305
|
+
|
|
304306
|
+
function isPromise(maybePromise) {
|
|
304307
|
+
return !!maybePromise && typeof maybePromise.then === 'function';
|
|
304308
|
+
}
|
|
304309
|
+
|
|
304310
|
+
function makePromise(maybePromise) {
|
|
304311
|
+
if (isPromise(maybePromise)) {
|
|
304312
|
+
return maybePromise;
|
|
304313
|
+
}
|
|
304314
|
+
|
|
304315
|
+
return Promise.resolve(maybePromise);
|
|
304316
|
+
}
|
|
304317
|
+
|
|
304318
|
+
/***/ }),
|
|
304319
|
+
|
|
303396
304320
|
/***/ "../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js":
|
|
303397
304321
|
/*!****************************************************************************************************!*\
|
|
303398
304322
|
!*** ../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js ***!
|
|
@@ -306253,7 +307177,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
306253
307177
|
/***/ ((module) => {
|
|
306254
307178
|
|
|
306255
307179
|
"use strict";
|
|
306256
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.
|
|
307180
|
+
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"}}]}}');
|
|
306257
307181
|
|
|
306258
307182
|
/***/ }),
|
|
306259
307183
|
|
|
@@ -306313,6 +307237,36 @@ module.exports = JSON.parse('{"$schema":"../../../node_modules/@itwin/presentati
|
|
|
306313
307237
|
/******/ };
|
|
306314
307238
|
/******/ })();
|
|
306315
307239
|
/******/
|
|
307240
|
+
/******/ /* webpack/runtime/create fake namespace object */
|
|
307241
|
+
/******/ (() => {
|
|
307242
|
+
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
307243
|
+
/******/ var leafPrototypes;
|
|
307244
|
+
/******/ // create a fake namespace object
|
|
307245
|
+
/******/ // mode & 1: value is a module id, require it
|
|
307246
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
307247
|
+
/******/ // mode & 4: return value when already ns object
|
|
307248
|
+
/******/ // mode & 16: return value when it's Promise-like
|
|
307249
|
+
/******/ // mode & 8|1: behave like require
|
|
307250
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
307251
|
+
/******/ if(mode & 1) value = this(value);
|
|
307252
|
+
/******/ if(mode & 8) return value;
|
|
307253
|
+
/******/ if(typeof value === 'object' && value) {
|
|
307254
|
+
/******/ if((mode & 4) && value.__esModule) return value;
|
|
307255
|
+
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
307256
|
+
/******/ }
|
|
307257
|
+
/******/ var ns = Object.create(null);
|
|
307258
|
+
/******/ __webpack_require__.r(ns);
|
|
307259
|
+
/******/ var def = {};
|
|
307260
|
+
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
307261
|
+
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
307262
|
+
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
307263
|
+
/******/ }
|
|
307264
|
+
/******/ def['default'] = () => (value);
|
|
307265
|
+
/******/ __webpack_require__.d(ns, def);
|
|
307266
|
+
/******/ return ns;
|
|
307267
|
+
/******/ };
|
|
307268
|
+
/******/ })();
|
|
307269
|
+
/******/
|
|
306316
307270
|
/******/ /* webpack/runtime/define property getters */
|
|
306317
307271
|
/******/ (() => {
|
|
306318
307272
|
/******/ // define getter functions for harmony exports
|