@itwin/rpcinterface-full-stack-tests 4.5.0-dev.21 → 4.5.0-dev.24

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.
@@ -25392,6 +25392,59 @@ var config = {
25392
25392
  };
25393
25393
 
25394
25394
 
25395
+ /***/ }),
25396
+
25397
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/concat.js":
25398
+ /*!*****************************************************************************************************************!*\
25399
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/concat.js ***!
25400
+ \*****************************************************************************************************************/
25401
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25402
+
25403
+ "use strict";
25404
+ __webpack_require__.r(__webpack_exports__);
25405
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25406
+ /* harmony export */ "concat": () => (/* binding */ concat)
25407
+ /* harmony export */ });
25408
+ /* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/concatAll */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js");
25409
+ /* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/args */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/args.js");
25410
+ /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/from.js");
25411
+
25412
+
25413
+
25414
+ function concat() {
25415
+ var args = [];
25416
+ for (var _i = 0; _i < arguments.length; _i++) {
25417
+ args[_i] = arguments[_i];
25418
+ }
25419
+ return (0,_operators_concatAll__WEBPACK_IMPORTED_MODULE_0__.concatAll)()((0,_from__WEBPACK_IMPORTED_MODULE_1__.from)(args, (0,_util_args__WEBPACK_IMPORTED_MODULE_2__.popScheduler)(args)));
25420
+ }
25421
+
25422
+
25423
+ /***/ }),
25424
+
25425
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/empty.js":
25426
+ /*!****************************************************************************************************************!*\
25427
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/empty.js ***!
25428
+ \****************************************************************************************************************/
25429
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25430
+
25431
+ "use strict";
25432
+ __webpack_require__.r(__webpack_exports__);
25433
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25434
+ /* harmony export */ "EMPTY": () => (/* binding */ EMPTY),
25435
+ /* harmony export */ "empty": () => (/* binding */ empty)
25436
+ /* harmony export */ });
25437
+ /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Observable.js");
25438
+
25439
+ var EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) { return subscriber.complete(); });
25440
+ function empty(scheduler) {
25441
+ return scheduler ? emptyScheduled(scheduler) : EMPTY;
25442
+ }
25443
+ function emptyScheduled(scheduler) {
25444
+ return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
25445
+ }
25446
+
25447
+
25395
25448
  /***/ }),
25396
25449
 
25397
25450
  /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/from.js":
@@ -25589,6 +25642,84 @@ function process(asyncIterable, subscriber) {
25589
25642
  }
25590
25643
 
25591
25644
 
25645
+ /***/ }),
25646
+
25647
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/of.js":
25648
+ /*!*************************************************************************************************************!*\
25649
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/of.js ***!
25650
+ \*************************************************************************************************************/
25651
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25652
+
25653
+ "use strict";
25654
+ __webpack_require__.r(__webpack_exports__);
25655
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25656
+ /* harmony export */ "of": () => (/* binding */ of)
25657
+ /* harmony export */ });
25658
+ /* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/args */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/args.js");
25659
+ /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/from.js");
25660
+
25661
+
25662
+ function of() {
25663
+ var args = [];
25664
+ for (var _i = 0; _i < arguments.length; _i++) {
25665
+ args[_i] = arguments[_i];
25666
+ }
25667
+ var scheduler = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popScheduler)(args);
25668
+ return (0,_from__WEBPACK_IMPORTED_MODULE_1__.from)(args, scheduler);
25669
+ }
25670
+
25671
+
25672
+ /***/ }),
25673
+
25674
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/range.js":
25675
+ /*!****************************************************************************************************************!*\
25676
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/range.js ***!
25677
+ \****************************************************************************************************************/
25678
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25679
+
25680
+ "use strict";
25681
+ __webpack_require__.r(__webpack_exports__);
25682
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25683
+ /* harmony export */ "range": () => (/* binding */ range)
25684
+ /* harmony export */ });
25685
+ /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Observable.js");
25686
+ /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./empty */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/empty.js");
25687
+
25688
+
25689
+ function range(start, count, scheduler) {
25690
+ if (count == null) {
25691
+ count = start;
25692
+ start = 0;
25693
+ }
25694
+ if (count <= 0) {
25695
+ return _empty__WEBPACK_IMPORTED_MODULE_0__.EMPTY;
25696
+ }
25697
+ var end = count + start;
25698
+ return new _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable(scheduler
25699
+ ?
25700
+ function (subscriber) {
25701
+ var n = start;
25702
+ return scheduler.schedule(function () {
25703
+ if (n < end) {
25704
+ subscriber.next(n++);
25705
+ this.schedule();
25706
+ }
25707
+ else {
25708
+ subscriber.complete();
25709
+ }
25710
+ });
25711
+ }
25712
+ :
25713
+ function (subscriber) {
25714
+ var n = start;
25715
+ while (n < end && !subscriber.closed) {
25716
+ subscriber.next(n++);
25717
+ }
25718
+ subscriber.complete();
25719
+ });
25720
+ }
25721
+
25722
+
25592
25723
  /***/ }),
25593
25724
 
25594
25725
  /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js":
@@ -25667,6 +25798,189 @@ var OperatorSubscriber = (function (_super) {
25667
25798
 
25668
25799
 
25669
25800
 
25801
+ /***/ }),
25802
+
25803
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js":
25804
+ /*!*******************************************************************************************************************!*\
25805
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js ***!
25806
+ \*******************************************************************************************************************/
25807
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25808
+
25809
+ "use strict";
25810
+ __webpack_require__.r(__webpack_exports__);
25811
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25812
+ /* harmony export */ "concatAll": () => (/* binding */ concatAll)
25813
+ /* harmony export */ });
25814
+ /* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeAll */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js");
25815
+
25816
+ function concatAll() {
25817
+ return (0,_mergeAll__WEBPACK_IMPORTED_MODULE_0__.mergeAll)(1);
25818
+ }
25819
+
25820
+
25821
+ /***/ }),
25822
+
25823
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/map.js":
25824
+ /*!*************************************************************************************************************!*\
25825
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/map.js ***!
25826
+ \*************************************************************************************************************/
25827
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25828
+
25829
+ "use strict";
25830
+ __webpack_require__.r(__webpack_exports__);
25831
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25832
+ /* harmony export */ "map": () => (/* binding */ map)
25833
+ /* harmony export */ });
25834
+ /* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/lift.js");
25835
+ /* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");
25836
+
25837
+
25838
+ function map(project, thisArg) {
25839
+ return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)(function (source, subscriber) {
25840
+ var index = 0;
25841
+ source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, function (value) {
25842
+ subscriber.next(project.call(thisArg, value, index++));
25843
+ }));
25844
+ });
25845
+ }
25846
+
25847
+
25848
+ /***/ }),
25849
+
25850
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js":
25851
+ /*!******************************************************************************************************************!*\
25852
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js ***!
25853
+ \******************************************************************************************************************/
25854
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25855
+
25856
+ "use strict";
25857
+ __webpack_require__.r(__webpack_exports__);
25858
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25859
+ /* harmony export */ "mergeAll": () => (/* binding */ mergeAll)
25860
+ /* harmony export */ });
25861
+ /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js");
25862
+ /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/identity.js");
25863
+
25864
+
25865
+ function mergeAll(concurrent) {
25866
+ if (concurrent === void 0) { concurrent = Infinity; }
25867
+ return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(_util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, concurrent);
25868
+ }
25869
+
25870
+
25871
+ /***/ }),
25872
+
25873
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js":
25874
+ /*!************************************************************************************************************************!*\
25875
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js ***!
25876
+ \************************************************************************************************************************/
25877
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25878
+
25879
+ "use strict";
25880
+ __webpack_require__.r(__webpack_exports__);
25881
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25882
+ /* harmony export */ "mergeInternals": () => (/* binding */ mergeInternals)
25883
+ /* harmony export */ });
25884
+ /* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/innerFrom */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js");
25885
+ /* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/executeSchedule */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js");
25886
+ /* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");
25887
+
25888
+
25889
+
25890
+ function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
25891
+ var buffer = [];
25892
+ var active = 0;
25893
+ var index = 0;
25894
+ var isComplete = false;
25895
+ var checkComplete = function () {
25896
+ if (isComplete && !buffer.length && !active) {
25897
+ subscriber.complete();
25898
+ }
25899
+ };
25900
+ var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };
25901
+ var doInnerSub = function (value) {
25902
+ expand && subscriber.next(value);
25903
+ active++;
25904
+ var innerComplete = false;
25905
+ (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__.innerFrom)(project(value, index++)).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, function (innerValue) {
25906
+ onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
25907
+ if (expand) {
25908
+ outerNext(innerValue);
25909
+ }
25910
+ else {
25911
+ subscriber.next(innerValue);
25912
+ }
25913
+ }, function () {
25914
+ innerComplete = true;
25915
+ }, undefined, function () {
25916
+ if (innerComplete) {
25917
+ try {
25918
+ active--;
25919
+ var _loop_1 = function () {
25920
+ var bufferedValue = buffer.shift();
25921
+ if (innerSubScheduler) {
25922
+ (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__.executeSchedule)(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });
25923
+ }
25924
+ else {
25925
+ doInnerSub(bufferedValue);
25926
+ }
25927
+ };
25928
+ while (buffer.length && active < concurrent) {
25929
+ _loop_1();
25930
+ }
25931
+ checkComplete();
25932
+ }
25933
+ catch (err) {
25934
+ subscriber.error(err);
25935
+ }
25936
+ }
25937
+ }));
25938
+ };
25939
+ source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, outerNext, function () {
25940
+ isComplete = true;
25941
+ checkComplete();
25942
+ }));
25943
+ return function () {
25944
+ additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
25945
+ };
25946
+ }
25947
+
25948
+
25949
+ /***/ }),
25950
+
25951
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js":
25952
+ /*!******************************************************************************************************************!*\
25953
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js ***!
25954
+ \******************************************************************************************************************/
25955
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25956
+
25957
+ "use strict";
25958
+ __webpack_require__.r(__webpack_exports__);
25959
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25960
+ /* harmony export */ "mergeMap": () => (/* binding */ mergeMap)
25961
+ /* harmony export */ });
25962
+ /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/map.js");
25963
+ /* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/innerFrom */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js");
25964
+ /* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/lift */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/lift.js");
25965
+ /* harmony import */ var _mergeInternals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mergeInternals */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js");
25966
+ /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js");
25967
+
25968
+
25969
+
25970
+
25971
+
25972
+ function mergeMap(project, resultSelector, concurrent) {
25973
+ if (concurrent === void 0) { concurrent = Infinity; }
25974
+ if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(resultSelector)) {
25975
+ return mergeMap(function (a, i) { return (0,_map__WEBPACK_IMPORTED_MODULE_1__.map)(function (b, ii) { return resultSelector(a, b, i, ii); })((0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.innerFrom)(project(a, i))); }, concurrent);
25976
+ }
25977
+ else if (typeof resultSelector === 'number') {
25978
+ concurrent = resultSelector;
25979
+ }
25980
+ return (0,_util_lift__WEBPACK_IMPORTED_MODULE_3__.operate)(function (source, subscriber) { return (0,_mergeInternals__WEBPACK_IMPORTED_MODULE_4__.mergeInternals)(source, subscriber, project, concurrent); });
25981
+ }
25982
+
25983
+
25670
25984
  /***/ }),
25671
25985
 
25672
25986
  /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js":
@@ -25694,6 +26008,65 @@ function observeOn(scheduler, delay) {
25694
26008
  }
25695
26009
 
25696
26010
 
26011
+ /***/ }),
26012
+
26013
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scan.js":
26014
+ /*!**************************************************************************************************************!*\
26015
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scan.js ***!
26016
+ \**************************************************************************************************************/
26017
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26018
+
26019
+ "use strict";
26020
+ __webpack_require__.r(__webpack_exports__);
26021
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26022
+ /* harmony export */ "scan": () => (/* binding */ scan)
26023
+ /* harmony export */ });
26024
+ /* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/lift.js");
26025
+ /* harmony import */ var _scanInternals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scanInternals */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js");
26026
+
26027
+
26028
+ function scan(accumulator, seed) {
26029
+ return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((0,_scanInternals__WEBPACK_IMPORTED_MODULE_1__.scanInternals)(accumulator, seed, arguments.length >= 2, true));
26030
+ }
26031
+
26032
+
26033
+ /***/ }),
26034
+
26035
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js":
26036
+ /*!***********************************************************************************************************************!*\
26037
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js ***!
26038
+ \***********************************************************************************************************************/
26039
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26040
+
26041
+ "use strict";
26042
+ __webpack_require__.r(__webpack_exports__);
26043
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26044
+ /* harmony export */ "scanInternals": () => (/* binding */ scanInternals)
26045
+ /* harmony export */ });
26046
+ /* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./OperatorSubscriber */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js");
26047
+
26048
+ function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {
26049
+ return function (source, subscriber) {
26050
+ var hasState = hasSeed;
26051
+ var state = seed;
26052
+ var index = 0;
26053
+ source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_0__.createOperatorSubscriber)(subscriber, function (value) {
26054
+ var i = index++;
26055
+ state = hasState
26056
+ ?
26057
+ accumulator(state, value, i)
26058
+ :
26059
+ ((hasState = true), value);
26060
+ emitOnNext && subscriber.next(state);
26061
+ }, emitBeforeComplete &&
26062
+ (function () {
26063
+ hasState && subscriber.next(state);
26064
+ subscriber.complete();
26065
+ })));
26066
+ };
26067
+ }
26068
+
26069
+
25697
26070
  /***/ }),
25698
26071
 
25699
26072
  /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/share.js":
@@ -26259,6 +26632,39 @@ var UnsubscriptionError = (0,_createErrorClass__WEBPACK_IMPORTED_MODULE_0__.crea
26259
26632
  });
26260
26633
 
26261
26634
 
26635
+ /***/ }),
26636
+
26637
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/args.js":
26638
+ /*!*********************************************************************************************************!*\
26639
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/args.js ***!
26640
+ \*********************************************************************************************************/
26641
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26642
+
26643
+ "use strict";
26644
+ __webpack_require__.r(__webpack_exports__);
26645
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26646
+ /* harmony export */ "popNumber": () => (/* binding */ popNumber),
26647
+ /* harmony export */ "popResultSelector": () => (/* binding */ popResultSelector),
26648
+ /* harmony export */ "popScheduler": () => (/* binding */ popScheduler)
26649
+ /* harmony export */ });
26650
+ /* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js");
26651
+ /* harmony import */ var _isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isScheduler */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js");
26652
+
26653
+
26654
+ function last(arr) {
26655
+ return arr[arr.length - 1];
26656
+ }
26657
+ function popResultSelector(args) {
26658
+ return (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(last(args)) ? args.pop() : undefined;
26659
+ }
26660
+ function popScheduler(args) {
26661
+ return (0,_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(last(args)) ? args.pop() : undefined;
26662
+ }
26663
+ function popNumber(args, defaultValue) {
26664
+ return typeof last(args) === 'number' ? args.pop() : defaultValue;
26665
+ }
26666
+
26667
+
26262
26668
  /***/ }),
26263
26669
 
26264
26670
  /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js":
@@ -26573,6 +26979,26 @@ function isReadableStreamLike(obj) {
26573
26979
  }
26574
26980
 
26575
26981
 
26982
+ /***/ }),
26983
+
26984
+ /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js":
26985
+ /*!****************************************************************************************************************!*\
26986
+ !*** ../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js ***!
26987
+ \****************************************************************************************************************/
26988
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26989
+
26990
+ "use strict";
26991
+ __webpack_require__.r(__webpack_exports__);
26992
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26993
+ /* harmony export */ "isScheduler": () => (/* binding */ isScheduler)
26994
+ /* harmony export */ });
26995
+ /* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js");
26996
+
26997
+ function isScheduler(value) {
26998
+ return value && (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(value.schedule);
26999
+ }
27000
+
27001
+
26576
27002
  /***/ }),
26577
27003
 
26578
27004
  /***/ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/lift.js":
@@ -27695,6 +28121,7 @@ var IModelStatus;
27695
28121
  IModelStatus[IModelStatus["NotRegistered"] = 65605] = "NotRegistered";
27696
28122
  IModelStatus[IModelStatus["FunctionNotFound"] = 65606] = "FunctionNotFound";
27697
28123
  IModelStatus[IModelStatus["NoActiveCommand"] = 65607] = "NoActiveCommand";
28124
+ IModelStatus[IModelStatus["Aborted"] = 65608] = "Aborted";
27698
28125
  })(IModelStatus || (IModelStatus = {}));
27699
28126
  /** Error statuses produced by various briefcase operations, typically encountered as the `errorNumber` of an [IModelError]($common).
27700
28127
  * @public
@@ -32065,7 +32492,10 @@ class StatusCategory {
32065
32492
  return category;
32066
32493
  }
32067
32494
  }
32068
- return lookupCategory(error);
32495
+ const errorNumber = error.errorNumber;
32496
+ if (typeof errorNumber === "number")
32497
+ return lookupHttpStatusCategory(errorNumber);
32498
+ return new UnknownError();
32069
32499
  }
32070
32500
  }
32071
32501
  StatusCategory.handlers = new Set();
@@ -32301,8 +32731,10 @@ class UnknownError extends HTTP.InternalServerError {
32301
32731
  }
32302
32732
  class NotImplemented extends HTTP.NotImplemented {
32303
32733
  }
32304
- function lookupCategory(error) {
32305
- switch (error.errorNumber) {
32734
+ class Aborted extends HTTP.BadRequest {
32735
+ }
32736
+ function lookupHttpStatusCategory(statusCode) {
32737
+ switch (statusCode) {
32306
32738
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS: return new Success();
32307
32739
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR: return new UnknownError();
32308
32740
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.Success: return new Success();
@@ -32376,6 +32808,7 @@ function lookupCategory(error) {
32376
32808
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.NotRegistered: return new NotImplemented();
32377
32809
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.FunctionNotFound: return new NotImplemented();
32378
32810
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.NoActiveCommand: return new StateViolation();
32811
+ case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.Aborted: return new Aborted();
32379
32812
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BriefcaseStatus.CannotAcquire: return new OperationFailed();
32380
32813
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BriefcaseStatus.CannotDownload: return new OperationFailed();
32381
32814
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BriefcaseStatus.CannotUpload: return new OperationFailed();
@@ -61693,7 +62126,7 @@ class RpcInvocation {
61693
62126
  status.responseValue = rawResult; // for ipc case
61694
62127
  fulfillment.rawResult = status;
61695
62128
  }
61696
- if (rawResult instanceof _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError) {
62129
+ if (rawResult instanceof Error) {
61697
62130
  fulfillment.status = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.StatusCategory["for"](rawResult).code;
61698
62131
  }
61699
62132
  }
@@ -95044,6 +95477,10 @@ class ViewManager {
95044
95477
  clearTimeout(this._idleWorkTimer);
95045
95478
  this._idleWorkTimer = undefined;
95046
95479
  }
95480
+ this._viewports.map((viewport) => {
95481
+ if (!viewport.isDisposed)
95482
+ this.dropViewport(viewport, true);
95483
+ });
95047
95484
  this._viewports.length = 0;
95048
95485
  this.decorators.length = 0;
95049
95486
  this.toolTipProviders.length = 0;
@@ -207376,7 +207813,7 @@ class MXCubicAlongArcEvaluator extends _CubicEvaluator__WEBPACK_IMPORTED_MODULE_
207376
207813
  super.scaleInPlace(scaleFactor);
207377
207814
  }
207378
207815
  /** return a deep copy of the evaluator */
207379
- clone() { return new MXCubicAlongArcEvaluator(this.nominalLength1, this.nominalRadius1, super._axisLength, this.cubicM); }
207816
+ clone() { return new MXCubicAlongArcEvaluator(this.nominalLength1, this.nominalRadius1, this.axisLength, this.cubicM); }
207380
207817
  /** Member by member matchup ... */
207381
207818
  isAlmostEqual(other) {
207382
207819
  if (other instanceof MXCubicAlongArcEvaluator) {
@@ -207666,7 +208103,7 @@ class PolishCubicEvaluator extends _CubicEvaluator__WEBPACK_IMPORTED_MODULE_0__.
207666
208103
  super.scaleInPlace(scaleFactor);
207667
208104
  }
207668
208105
  /** return a deep copy of the evaluator */
207669
- clone() { return new PolishCubicEvaluator(this.nominalLength1, this.nominalRadius1, super._axisLength, this.cubicM); }
208106
+ clone() { return new PolishCubicEvaluator(this.nominalLength1, this.nominalRadius1, this.axisLength, this.cubicM); }
207670
208107
  /** Member by member matchup ... */
207671
208108
  isAlmostEqual(other) {
207672
208109
  if (other instanceof PolishCubicEvaluator) {
@@ -211679,6 +212116,9 @@ class FrameBuilder {
211679
212116
  break;
211680
212117
  }
211681
212118
  }
212119
+ else if (data.hasOwnProperty("x") && data.hasOwnProperty("y") && data.hasOwnProperty("z")) {
212120
+ this.announcePoint(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create(data.x, data.y, data.z));
212121
+ }
211682
212122
  }
211683
212123
  /**
211684
212124
  * Create a localToWorld frame for the given data.
@@ -213762,7 +214202,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
213762
214202
  this._xyzInUse = 0;
213763
214203
  }
213764
214204
  /**
213765
- * Get a point by index, strongly typed as a Point3d. This is unchecked. Use getPoint3dAtCheckedPointIndex to have validity test.
214205
+ * Get a point by index, strongly typed as a Point3d. This is unchecked. Use [[getPoint3dAtCheckedPointIndex]] to have validity test.
213766
214206
  * @param pointIndex index to access
213767
214207
  * @param result optional result
213768
214208
  */
@@ -213771,7 +214211,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
213771
214211
  return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
213772
214212
  }
213773
214213
  /**
213774
- * Get a point by index, strongly typed as a Point2d. This is unchecked. Use getPoint2dAtCheckedPointIndex to have validity test.
214214
+ * Get a point by index, strongly typed as a Point2d. This is unchecked. Use [[getPoint2dAtCheckedPointIndex]] to have validity test.
213775
214215
  * @param pointIndex index to access
213776
214216
  * @param result optional result
213777
214217
  */
@@ -213779,6 +214219,15 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
213779
214219
  const index = 3 * pointIndex;
213780
214220
  return _Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__.Point2d.create(this._data[index], this._data[index + 1], result);
213781
214221
  }
214222
+ /**
214223
+ * Get a vector by index, strongly typed as a Vector3d. This is unchecked. Use [[getVector3dAtCheckedVectorIndex]] to have validity test.
214224
+ * @param vectorIndex index to access
214225
+ * @param result optional result
214226
+ */
214227
+ getVector3dAtUncheckedVectorIndex(vectorIndex, result) {
214228
+ const index = 3 * vectorIndex;
214229
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
214230
+ }
213782
214231
  /** copy xyz into strongly typed Point3d */
213783
214232
  getPoint3dAtCheckedPointIndex(pointIndex, result) {
213784
214233
  if (this.isIndexValid(pointIndex)) {
@@ -238849,7 +239298,7 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
238849
239298
  this._currentFacetIndex = facetIndex;
238850
239299
  this._nextFacetIndex = facetIndex + 1;
238851
239300
  this._numEdges = this._polyface.numEdgeInFacet(facetIndex);
238852
- this.resizeAllDataArrays(this._numEdges + this._numWrap);
239301
+ this.resizeAllArrays(this._numEdges + this._numWrap);
238853
239302
  this.gatherIndexedData(this._polyface.data, this._polyface.facetIndex0(this._currentFacetIndex), this._polyface.facetIndex1(this._currentFacetIndex), this._numWrap);
238854
239303
  return true;
238855
239304
  }
@@ -239069,6 +239518,7 @@ __webpack_require__.r(__webpack_exports__);
239069
239518
  * @module Polyface
239070
239519
  */
239071
239520
  /* eslint-disable @typescript-eslint/naming-convention, no-empty */
239521
+ // cspell:word internaldocs
239072
239522
 
239073
239523
 
239074
239524
 
@@ -239358,10 +239808,10 @@ class IndexedPolyface extends Polyface {
239358
239808
  }
239359
239809
  /**
239360
239810
  * Create an empty facet set with coordinate and index data to be supplied later.
239361
- * @param needNormals true if normals will be constructed.
239362
- * @param needParams true if uv parameters will be constructed.
239363
- * @param needColors true if colors will be constructed.
239364
- * @param twoSided true if the facets are to be considered viewable from the back.
239811
+ * @param needNormals `true` to allocate empty normal data and index arrays; `false` (default) to leave undefined.
239812
+ * @param needParams `true` to allocate empty uv parameter data and index arrays; `false` (default) to leave undefined.
239813
+ * @param needColors `true` to allocate empty color data and index arrays; `false` (default) to leave undefined.
239814
+ * @param twoSided `true` if the facets are to be considered viewable from the back; `false` (default) if not.
239365
239815
  */
239366
239816
  static create(needNormals = false, needParams = false, needColors = false, twoSided = false) {
239367
239817
  return new IndexedPolyface(new _PolyfaceData__WEBPACK_IMPORTED_MODULE_3__.PolyfaceData(needNormals, needParams, needColors, twoSided));
@@ -239430,19 +239880,19 @@ class IndexedPolyface extends Polyface {
239430
239880
  */
239431
239881
  addNormal(normal, priorIndexA, priorIndexB) {
239432
239882
  // check if `normal` is duplicate of `dataNormal` at index `i`
239433
- const normalIsDuplicate = (dataNormal, i) => {
239434
- const distance = dataNormal.distanceIndexToPoint(i, normal);
239883
+ const normalIsDuplicate = (i) => {
239884
+ const distance = this.data.normal.distanceIndexToPoint(i, normal);
239435
239885
  return distance !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSmallMetricDistance(distance);
239436
239886
  };
239437
239887
  if (this.data.normal !== undefined) {
239438
- if (priorIndexA !== undefined && normalIsDuplicate(this.data.normal, priorIndexA))
239888
+ if (priorIndexA !== undefined && normalIsDuplicate(priorIndexA))
239439
239889
  return priorIndexA;
239440
- if (priorIndexB !== undefined && normalIsDuplicate(this.data.normal, priorIndexB))
239890
+ if (priorIndexB !== undefined && normalIsDuplicate(priorIndexB))
239441
239891
  return priorIndexB;
239442
239892
  // check the tail index for possible duplicate
239443
239893
  if (priorIndexA !== undefined || priorIndexB !== undefined) {
239444
239894
  const tailIndex = this.data.normal.length - 1;
239445
- if (normalIsDuplicate(this.data.normal, tailIndex))
239895
+ if (normalIsDuplicate(tailIndex))
239446
239896
  return tailIndex;
239447
239897
  }
239448
239898
  }
@@ -239529,10 +239979,16 @@ class IndexedPolyface extends Polyface {
239529
239979
  messages.push("colorIndex count must equal pointIndex count");
239530
239980
  if (this.data.edgeVisible.length !== lengthB)
239531
239981
  messages.push("visibleIndex count must equal pointIndex count");
239982
+ if (!Polyface.areIndicesValid(this.data.pointIndex, lengthA, lengthB, this.data.point, this.data.point ? this.data.point.length : 0))
239983
+ messages.push("invalid point indices in the last facet");
239532
239984
  if (!Polyface.areIndicesValid(this.data.normalIndex, lengthA, lengthB, this.data.normal, this.data.normal ? this.data.normal.length : 0))
239533
239985
  messages.push("invalid normal indices in the last facet");
239986
+ if (!Polyface.areIndicesValid(this.data.paramIndex, lengthA, lengthB, this.data.param, this.data.param ? this.data.param.length : 0))
239987
+ messages.push("invalid param indices in the last facet");
239988
+ if (!Polyface.areIndicesValid(this.data.colorIndex, lengthA, lengthB, this.data.color, this.data.color ? this.data.color.length : 0))
239989
+ messages.push("invalid color indices in the last facet");
239534
239990
  if (messages.length > 0) {
239535
- this.data.trimAllIndexArrays(lengthB);
239991
+ this.data.trimAllIndexArrays(lengthA);
239536
239992
  return messages;
239537
239993
  }
239538
239994
  }
@@ -239776,8 +240232,8 @@ class FacetSector {
239776
240232
  */
239777
240233
  loadIndexedPointAndDerivativeCoordinatesFromPackedArrays(i, packedXYZ, packedDerivatives, fractions, v) {
239778
240234
  packedXYZ.getPoint3dAtCheckedPointIndex(i, this.xyz);
239779
- if (fractions && v !== undefined)
239780
- this.uv = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(fractions.atUncheckedIndex(i), v);
240235
+ if (this.uv && fractions && v !== undefined)
240236
+ this.uv.set(fractions.atUncheckedIndex(i), v);
239781
240237
  this.xyzIndex = -1;
239782
240238
  this.normalIndex = -1;
239783
240239
  this.uvIndex = -1;
@@ -240462,8 +240918,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
240462
240918
  this.addIndexedTriangleNormalIndexes(sectorA0.normalIndex, sectorA1.normalIndex, sectorA2.normalIndex);
240463
240919
  if (this._options.needParams)
240464
240920
  this.addIndexedTriangleParamIndexes(sectorA0.uvIndex, sectorA1.uvIndex, sectorA2.uvIndex);
240465
- this.addIndexedTrianglePointIndexes(sectorA0.xyzIndex, sectorA1.xyzIndex, sectorA2.xyzIndex);
240466
- this._polyface.terminateFacet();
240921
+ this.addIndexedTrianglePointIndexes(sectorA0.xyzIndex, sectorA1.xyzIndex, sectorA2.xyzIndex, true);
240467
240922
  }
240468
240923
  }
240469
240924
  addSectorQuadA01B01(sectorA0, sectorA1, sectorB0, sectorB1) {
@@ -240479,8 +240934,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
240479
240934
  this.addIndexedQuadNormalIndexes(sectorA0.normalIndex, sectorA1.normalIndex, sectorB0.normalIndex, sectorB1.normalIndex);
240480
240935
  if (this._options.needParams)
240481
240936
  this.addIndexedQuadParamIndexes(sectorA0.uvIndex, sectorA1.uvIndex, sectorB0.uvIndex, sectorB1.uvIndex);
240482
- this.addIndexedQuadPointIndexes(sectorA0.xyzIndex, sectorA1.xyzIndex, sectorB0.xyzIndex, sectorB1.xyzIndex);
240483
- this._polyface.terminateFacet();
240937
+ this.addIndexedQuadPointIndexes(sectorA0.xyzIndex, sectorA1.xyzIndex, sectorB0.xyzIndex, sectorB1.xyzIndex, true);
240484
240938
  }
240485
240939
  }
240486
240940
  /** Add facets between lineStrings with matched point counts.
@@ -240552,14 +241006,14 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
240552
241006
  for (let i = 1; i < numPoints; i++) {
240553
241007
  if (this.options.shouldTriangulate) {
240554
241008
  if (distinctIndices(pointA.atUncheckedIndex(i - 1), pointA.atUncheckedIndex(i), pointB.atUncheckedIndex(i))) {
240555
- this.addIndexedTrianglePointIndexes(pointA.atUncheckedIndex(i - 1), pointA.atUncheckedIndex(i), pointB.atUncheckedIndex(i));
241009
+ this.addIndexedTrianglePointIndexes(pointA.atUncheckedIndex(i - 1), pointA.atUncheckedIndex(i), pointB.atUncheckedIndex(i), false);
240556
241010
  if (normalA && normalB)
240557
241011
  this.addIndexedTriangleNormalIndexes(normalA.atUncheckedIndex(i - 1), normalA.atUncheckedIndex(i), normalB.atUncheckedIndex(i - 1));
240558
241012
  if (paramA && paramB)
240559
241013
  this.addIndexedTriangleParamIndexes(paramA.atUncheckedIndex(i - 1), paramA.atUncheckedIndex(i), paramB.atUncheckedIndex(i - 1));
240560
241014
  }
240561
241015
  if (distinctIndices(pointB.atUncheckedIndex(i), pointB.atUncheckedIndex(i - 1), pointA.atUncheckedIndex(i - 1))) {
240562
- this.addIndexedTrianglePointIndexes(pointA.atUncheckedIndex(i - 1), pointB.atUncheckedIndex(i), pointB.atUncheckedIndex(i - 1));
241016
+ this.addIndexedTrianglePointIndexes(pointA.atUncheckedIndex(i - 1), pointB.atUncheckedIndex(i), pointB.atUncheckedIndex(i - 1), false);
240563
241017
  if (normalA && normalB)
240564
241018
  this.addIndexedTriangleNormalIndexes(normalA.atUncheckedIndex(i - 1), normalB.atUncheckedIndex(i), normalB.atUncheckedIndex(i - 1));
240565
241019
  if (paramA && paramB)
@@ -240568,14 +241022,14 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
240568
241022
  }
240569
241023
  else {
240570
241024
  if (pointA.atUncheckedIndex(i - 1) !== pointA.atUncheckedIndex(i) || pointB.atUncheckedIndex(i - 1) !== pointB.atUncheckedIndex(i)) {
240571
- this.addIndexedQuadPointIndexes(pointA.atUncheckedIndex(i - 1), pointA.atUncheckedIndex(i), pointB.atUncheckedIndex(i - 1), pointB.atUncheckedIndex(i));
241025
+ this.addIndexedQuadPointIndexes(pointA.atUncheckedIndex(i - 1), pointA.atUncheckedIndex(i), pointB.atUncheckedIndex(i - 1), pointB.atUncheckedIndex(i), false);
240572
241026
  if (normalA && normalB)
240573
241027
  this.addIndexedQuadNormalIndexes(normalA.atUncheckedIndex(i - 1), normalA.atUncheckedIndex(i), normalB.atUncheckedIndex(i - 1), normalB.atUncheckedIndex(i));
240574
241028
  if (paramA && paramB)
240575
241029
  this.addIndexedQuadParamIndexes(paramA.atUncheckedIndex(i - 1), paramA.atUncheckedIndex(i), paramB.atUncheckedIndex(i - 1), paramB.atUncheckedIndex(i));
240576
241030
  }
240577
- this._polyface.terminateFacet();
240578
241031
  }
241032
+ this._polyface.terminateFacet();
240579
241033
  }
240580
241034
  }
240581
241035
  /** Add facets between lineStrings with matched point counts.
@@ -241219,11 +241673,14 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
241219
241673
  /** add facets for a GeometryQuery object. This is double dispatch through `dispatchToGeometryHandler(this)` */
241220
241674
  addGeometryQuery(g) { g.dispatchToGeometryHandler(this); }
241221
241675
  /**
241222
- *
241223
- * * Visit all faces
241224
- * * Test each face with f(node) for any node on the face.
241225
- * * For each face that passes, pass its coordinates to the builder.
241226
- * * Rely on the builder's compress step to find common vertex coordinates
241676
+ * Add a graph to the builder.
241677
+ * * Visit one node per face
241678
+ * * If `acceptFaceFunction(node)` returns true, pass face coordinates to the builder
241679
+ * * Accepted face edge visibility is determined by `isEdgeVisibleFunction`.
241680
+ * * Rely on the builder's compress step to find common vertex coordinates.
241681
+ * @param graph faces to add as facets
241682
+ * @param acceptFaceFunction optional test for whether to add a given face. Default: ignore exterior faces
241683
+ * @param isEdgeVisibleFunction optional test for whether to hide an edge. Default: hide interior edges
241227
241684
  * @internal
241228
241685
  */
241229
241686
  addGraph(graph, acceptFaceFunction = (node) => _topology_Graph__WEBPACK_IMPORTED_MODULE_23__.HalfEdge.testNodeMaskNotExterior(node), isEdgeVisibleFunction = (node) => _topology_Graph__WEBPACK_IMPORTED_MODULE_23__.HalfEdge.testMateMaskExterior(node)) {
@@ -241262,7 +241719,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
241262
241719
  * * terminate the facet
241263
241720
  * @internal
241264
241721
  */
241265
- addGraphFaces(_graph, faces) {
241722
+ addGraphFaces(faces) {
241266
241723
  let index = 0;
241267
241724
  for (const seed of faces) {
241268
241725
  let node = seed;
@@ -241274,21 +241731,26 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
241274
241731
  this._polyface.terminateFacet();
241275
241732
  }
241276
241733
  }
241277
- /** Create a polyface containing the faces of a HalfEdgeGraph, with test function to filter faces.
241734
+ /**
241735
+ * Create a polyface containing the faces of a HalfEdgeGraph, with test functions to filter faces and hide edges.
241736
+ * * This is a static wrapper of [[addGraph]].
241737
+ * @param graph faces to add as facets
241738
+ * @param acceptFaceFunction optional test for whether to add a given face. Default: ignore exterior faces
241739
+ * @param isEdgeVisibleFunction optional test for whether to hide an edge. Default: hide interior edges
241278
241740
  * @internal
241279
241741
  */
241280
- static graphToPolyface(graph, options, acceptFaceFunction = (node) => _topology_Graph__WEBPACK_IMPORTED_MODULE_23__.HalfEdge.testNodeMaskNotExterior(node)) {
241742
+ static graphToPolyface(graph, options, acceptFaceFunction = (node) => _topology_Graph__WEBPACK_IMPORTED_MODULE_23__.HalfEdge.testNodeMaskNotExterior(node), isEdgeVisibleFunction = (node) => _topology_Graph__WEBPACK_IMPORTED_MODULE_23__.HalfEdge.testMateMaskExterior(node)) {
241281
241743
  const builder = PolyfaceBuilder.create(options);
241282
- builder.addGraph(graph, acceptFaceFunction);
241744
+ builder.addGraph(graph, acceptFaceFunction, isEdgeVisibleFunction);
241283
241745
  builder.endFace();
241284
241746
  return builder.claimPolyface();
241285
241747
  }
241286
241748
  /** Create a polyface containing the faces of a HalfEdgeGraph that are specified by the HalfEdge array.
241287
241749
  * @internal
241288
241750
  */
241289
- static graphFacesToPolyface(graph, faces) {
241751
+ static graphFacesToPolyface(faces) {
241290
241752
  const builder = PolyfaceBuilder.create();
241291
- builder.addGraphFaces(graph, faces);
241753
+ builder.addGraphFaces(faces);
241292
241754
  builder.endFace();
241293
241755
  return builder.claimPolyface();
241294
241756
  }
@@ -242301,39 +242763,28 @@ __webpack_require__.r(__webpack_exports__);
242301
242763
 
242302
242764
 
242303
242765
 
242766
+ // cspell:word internaldocs
242304
242767
  /**
242305
- * PolyfaceData carries data arrays for point, normal, param, color and their indices.
242306
- *
242307
- * * IndexedPolyface carries a PolyfaceData as a member. (NOT as a base class -- it already has GeometryQuery as base)
242308
- * * IndexedPolyfaceVisitor uses PolyfaceData as a base class. In this use there is only a single facet in the polyfaceData.
242309
- * * PolyfaceData does not know (!!!) what indices range constitute a facet. That is managed by derived class or carrier class.
242768
+ * `PolyfaceData` carries data arrays for point, normal, uv-parameters, and color, and index arrays for each.
242769
+ * * Normal, uv-parameter, and color data are optional.
242770
+ * * A given data array is defined if and only if its corresponding index array is defined.
242771
+ * * All defined index arrays have parallel face loop order and structure, and thus the same length.
242772
+ * * `IndexedPolyface` carries a PolyfaceData as a member (NOT as a base class; it already has `GeometryQuery` as base).
242773
+ * * `IndexedPolyfaceVisitor` uses PolyfaceData as a base class. In this use, there is only a single facet in `PolyfaceData`.
242774
+ * * `PolyfaceData` does not know what index range constitutes a given facet. This is managed by a derived/carrier class.
242310
242775
  * @public
242311
242776
  */
242312
242777
  class PolyfaceData {
242313
- /** boolean tag indicating if the facets are to be considered viewable from the back */
242314
- get twoSided() { return this._twoSided; }
242315
- set twoSided(value) { this._twoSided = value; }
242316
- /** set the `taggedNumericData` member */
242317
- setTaggedNumericData(data) {
242318
- this.taggedNumericData = data;
242319
- }
242320
242778
  /**
242321
- * Flag indicating if the mesh closure is unknown (0), open sheet (1), closed solid (2).
242322
- * * A boundary edge of a mesh is defined as an edge with only one connected facet.
242323
- * * Closed solid is a mesh with no boundary edge. Open sheet is a mesh that has boundary edge(s).
242324
- */
242325
- get expectedClosure() { return this._expectedClosure; }
242326
- set expectedClosure(value) { this._expectedClosure = value; }
242327
- /** Constructor for facets.
242328
- * * The various params control whether respective arrays are to be allocated.
242329
- * * If arrayData is provided, all other params are IGNORED.
242330
- * *
242779
+ * Constructor for facets.
242780
+ * @param needNormals `true` to allocate empty normal data and index arrays; `false` (default) to leave undefined.
242781
+ * @param needParams `true` to allocate empty uv parameter data and index arrays; `false` (default) to leave undefined.
242782
+ * @param needColors `true` to allocate empty color data and index arrays; `false` (default) to leave undefined.
242783
+ * @param twoSided `true` if the facets are to be considered viewable from the back; `false` (default) if not.
242331
242784
  */
242332
242785
  constructor(needNormals = false, needParams = false, needColors = false, twoSided = false) {
242333
- this.face = [];
242334
242786
  this.point = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_0__.GrowableXYZArray();
242335
242787
  this.pointIndex = [];
242336
- this.edgeVisible = [];
242337
242788
  if (needNormals) {
242338
242789
  this.normal = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_0__.GrowableXYZArray();
242339
242790
  this.normalIndex = [];
@@ -242346,6 +242797,8 @@ class PolyfaceData {
242346
242797
  this.color = [];
242347
242798
  this.colorIndex = [];
242348
242799
  }
242800
+ this.face = [];
242801
+ this.edgeVisible = [];
242349
242802
  this._twoSided = twoSided;
242350
242803
  this._expectedClosure = 0;
242351
242804
  }
@@ -242354,30 +242807,29 @@ class PolyfaceData {
242354
242807
  const result = new PolyfaceData();
242355
242808
  result.point = this.point.clone();
242356
242809
  result.pointIndex = this.pointIndex.slice();
242357
- result.edgeVisible = this.edgeVisible.slice();
242358
- result.face = this.face.slice();
242359
- result.twoSided = this.twoSided;
242360
- result.expectedClosure = this.expectedClosure;
242361
242810
  if (this.normal)
242362
242811
  result.normal = this.normal.clone();
242363
- if (this.param)
242364
- result.param = this.param.clone();
242365
- if (this.color)
242366
- result.color = this.color.slice();
242367
242812
  if (this.normalIndex)
242368
242813
  result.normalIndex = this.normalIndex.slice();
242814
+ if (this.param)
242815
+ result.param = this.param.clone();
242369
242816
  if (this.paramIndex)
242370
242817
  result.paramIndex = this.paramIndex.slice();
242818
+ if (this.color)
242819
+ result.color = this.color.slice();
242371
242820
  if (this.colorIndex)
242372
242821
  result.colorIndex = this.colorIndex.slice();
242822
+ result.face = this.face.slice();
242373
242823
  if (this.auxData)
242374
242824
  result.auxData = this.auxData.clone();
242375
- if (this.taggedNumericData) {
242825
+ if (this.taggedNumericData)
242376
242826
  result.taggedNumericData = this.taggedNumericData.clone();
242377
- }
242827
+ result.edgeVisible = this.edgeVisible.slice();
242828
+ result.twoSided = this.twoSided;
242829
+ result.expectedClosure = this.expectedClosure;
242378
242830
  return result;
242379
242831
  }
242380
- /** Test for equal indices and nearly equal coordinates */
242832
+ /** Test for equal indices and nearly equal coordinates. */
242381
242833
  isAlmostEqual(other) {
242382
242834
  if (!_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_0__.GrowableXYZArray.isAlmostEqual(this.point, other.point))
242383
242835
  return false;
@@ -242395,77 +242847,133 @@ class PolyfaceData {
242395
242847
  return false;
242396
242848
  if (!_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.NumberArray.isExactEqual(this.colorIndex, other.colorIndex))
242397
242849
  return false;
242398
- if (!_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.NumberArray.isExactEqual(this.edgeVisible, other.edgeVisible))
242399
- return false;
242400
242850
  if (!_AuxData__WEBPACK_IMPORTED_MODULE_3__.PolyfaceAuxData.isAlmostEqual(this.auxData, other.auxData))
242401
242851
  return false;
242852
+ if (!_TaggedNumericData__WEBPACK_IMPORTED_MODULE_4__.TaggedNumericData.areAlmostEqual(this.taggedNumericData, other.taggedNumericData))
242853
+ return false;
242854
+ if (!_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.NumberArray.isExactEqual(this.edgeVisible, other.edgeVisible))
242855
+ return false;
242402
242856
  if (this.twoSided !== other.twoSided)
242403
242857
  return false;
242404
242858
  if (this.expectedClosure !== other.expectedClosure)
242405
242859
  return false;
242406
- if (!_TaggedNumericData__WEBPACK_IMPORTED_MODULE_4__.TaggedNumericData.areAlmostEqual(this.taggedNumericData, other.taggedNumericData))
242407
- return false;
242408
242860
  return true;
242409
242861
  }
242410
242862
  /** Ask if normals are required in this mesh. */
242411
- get requireNormals() { return undefined !== this.normal; }
242863
+ get requireNormals() {
242864
+ return undefined !== this.normal;
242865
+ }
242866
+ /** Ask if params are required in this mesh. */
242867
+ get requireParams() {
242868
+ return undefined !== this.param;
242869
+ }
242870
+ /** Ask if colors are required in this mesh. */
242871
+ get requireColors() {
242872
+ return undefined !== this.color;
242873
+ }
242412
242874
  /** Get the point count */
242413
- get pointCount() { return this.point.length; }
242875
+ get pointCount() {
242876
+ return this.point.length;
242877
+ }
242414
242878
  /** Get the normal count */
242415
- get normalCount() { return this.normal ? this.normal.length : 0; }
242879
+ get normalCount() {
242880
+ return this.normal ? this.normal.length : 0;
242881
+ }
242416
242882
  /** Get the param count */
242417
- get paramCount() { return this.param ? this.param.length : 0; }
242883
+ get paramCount() {
242884
+ return this.param ? this.param.length : 0;
242885
+ }
242418
242886
  /** Get the color count */
242419
- get colorCount() { return this.color ? this.color.length : 0; }
242420
- /** Get the index count. Note that there is one count, and all index arrays (point, normal, param, color) must match */
242421
- get indexCount() { return this.pointIndex.length; } // ALWAYS INDEXED ... all index vectors must have same length.
242422
- /** Get the number of faces.
242887
+ get colorCount() {
242888
+ return this.color ? this.color.length : 0;
242889
+ }
242890
+ /** Get the index count. Note that the point array is always indexed, and index arrays all have the same length. */
242891
+ get indexCount() {
242892
+ return this.pointIndex.length;
242893
+ }
242894
+ /**
242895
+ * Get the number of faces.
242423
242896
  * * Note that a "face" is not a facet.
242424
- * * A "face" is a subset of facets grouped for application purposes.
242425
- */
242426
- get faceCount() { return this.face.length; }
242427
- /** return indexed point. This is a copy of the coordinates, not a reference. */
242428
- getPoint(i, out) {
242429
- return this.point.getPoint3dAtCheckedPointIndex(i, out);
242430
- }
242431
- /** return indexed normal. This is the COPY to the normal, not a reference. */
242432
- getNormal(i) { return this.normal ? this.normal.getVector3dAtCheckedVectorIndex(i) : undefined; }
242433
- /** return indexed param. This is the COPY of the coordinates, not a reference. */
242434
- getParam(i) { return this.param ? this.param.getPoint2dAtCheckedPointIndex(i) : undefined; }
242435
- /** return indexed color */
242436
- getColor(i) { return this.color ? this.color[i] : 0; }
242437
- /** return indexed visibility */
242438
- getEdgeVisible(i) { return this.edgeVisible[i]; }
242439
- /** Copy the contents (not pointer) of point[i] into dest. */
242440
- copyPointTo(i, dest) { this.point.getPoint3dAtUncheckedPointIndex(i, dest); }
242441
- /** Copy the contents (not pointer) of normal[i] into dest. */
242442
- copyNormalTo(i, dest) { if (this.normal)
242443
- this.normal.getVector3dAtCheckedVectorIndex(i, dest); }
242444
- /** Copy the contents (not pointer) of param[i] into dest. */
242445
- copyParamTo(i, dest) { if (this.param)
242446
- this.param.getPoint2dAtCheckedPointIndex(i, dest); }
242447
- /** test if normal at a specified index matches uv */
242448
- isAlmostEqualParamIndexUV(index, u, v) {
242449
- if (this.param !== undefined && index >= 0 && index < this.param.length)
242450
- return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSameCoordinate(u, this.param.getXAtUncheckedPointIndex(index))
242451
- && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSameCoordinate(v, this.param.getYAtUncheckedPointIndex(index));
242897
+ * * A face is a subset of the Polyface's facets grouped for application purposes.
242898
+ */
242899
+ get faceCount() {
242900
+ return this.face.length;
242901
+ }
242902
+ /** Return indexed point at index `i`. This is a COPY of the coordinates, not a reference. */
242903
+ getPoint(i, result) {
242904
+ return this.point.getPoint3dAtCheckedPointIndex(i, result);
242905
+ }
242906
+ /** Return indexed normal at index `i`. This is a COPY of the normal, not a reference. */
242907
+ getNormal(i, result) {
242908
+ return this.normal ? this.normal.getVector3dAtCheckedVectorIndex(i, result) : undefined;
242909
+ }
242910
+ /** Return indexed param at index `i`. This is a COPY of the coordinates, not a reference. */
242911
+ getParam(i, result) {
242912
+ return this.param ? this.param.getPoint2dAtCheckedPointIndex(i, result) : undefined;
242913
+ }
242914
+ /** Return indexed color at index `i`. Index `i` is not checked for validity. */
242915
+ getColor(i) {
242916
+ return this.color ? this.color[i] : 0;
242917
+ }
242918
+ /** Return indexed visibility. at index `i`. Index `i` is not checked for validity. */
242919
+ getEdgeVisible(i) {
242920
+ return this.edgeVisible[i];
242921
+ }
242922
+ /** Get boolean tag indicating if the facets are to be considered viewable from the back. */
242923
+ get twoSided() {
242924
+ return this._twoSided;
242925
+ }
242926
+ set twoSided(value) {
242927
+ this._twoSided = value;
242928
+ }
242929
+ /** Get flag indicating if the mesh closure is unknown (0), open sheet (1), closed solid (2). */
242930
+ get expectedClosure() {
242931
+ return this._expectedClosure;
242932
+ }
242933
+ set expectedClosure(value) {
242934
+ this._expectedClosure = value;
242935
+ }
242936
+ /** Set the tagged geometry data. */
242937
+ setTaggedNumericData(data) {
242938
+ this.taggedNumericData = data;
242939
+ }
242940
+ /** Copy the contents (not pointer) of `point[i]` into `dest`. Index `i` is not checked for validity. */
242941
+ copyPointTo(i, dest) {
242942
+ this.point.getPoint3dAtUncheckedPointIndex(i, dest);
242943
+ }
242944
+ /** Copy the contents (not pointer) of `normal[i]` into `dest`. Index `i` is not checked for validity. */
242945
+ copyNormalTo(i, dest) {
242946
+ if (this.normal)
242947
+ this.normal.getVector3dAtUncheckedVectorIndex(i, dest);
242948
+ }
242949
+ /** Copy the contents (not pointer) of `param[i]` into `dest`. Index `i` is not checked for validity. */
242950
+ copyParamTo(i, dest) {
242951
+ if (this.param)
242952
+ this.param.getPoint2dAtUncheckedPointIndex(i, dest);
242953
+ }
242954
+ /** Test if param at a index `i` matches the given uv */
242955
+ isAlmostEqualParamIndexUV(i, u, v) {
242956
+ if (this.param !== undefined && i >= 0 && i < this.param.length)
242957
+ return _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSameCoordinate(u, this.param.getXAtUncheckedPointIndex(i))
242958
+ && _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.isSameCoordinate(v, this.param.getYAtUncheckedPointIndex(i));
242452
242959
  return false;
242453
242960
  }
242454
242961
  /**
242455
- * * Copy data from other to this.
242962
+ * Copy data from `other` to `this`.
242456
242963
  * * This is the essence of transferring coordinates spread throughout a large polyface into a visitor's single facet.
242457
- * * "other" is the large polyface
242458
- * * "this" is the visitor
242459
- * * does NOT copy face data - visitors reference the FacetFaceData array for the whole polyface!!
242964
+ * * Common usage: "other" is a Polyface, "this" is a PolyfaceVisitor to receive data from a single facet of the Polyface.
242965
+ * * Does NOT copy face data - visitors reference the FacetFaceData array for the whole polyface.
242460
242966
  * @param other polyface data being mined.
242461
- * @param index0 start index in other's index arrays
242462
- * @param index1 end index (one beyond last data accessed0 in other's index arrays
242967
+ * @param index0 start index in other's index arrays.
242968
+ * @param index1 end index (one beyond last data accessed) in other's index arrays.
242463
242969
  * @param numWrap number of points to replicate as wraparound.
242464
242970
  */
242465
242971
  gatherIndexedData(other, index0, index1, numWrap) {
242466
242972
  const numEdge = index1 - index0;
242973
+ if (numWrap > numEdge)
242974
+ numWrap = numEdge;
242467
242975
  const numTotal = numEdge + numWrap;
242468
- this.resizeAllDataArrays(numTotal);
242976
+ this.resizeAllArrays(numTotal);
242469
242977
  // copy wrapped points
242470
242978
  for (let i = 0; i < numEdge; i++)
242471
242979
  this.point.transferFromGrowableXYZArray(i, other.point, other.pointIndex[index0 + i]);
@@ -242476,41 +242984,48 @@ class PolyfaceData {
242476
242984
  this.pointIndex[i] = other.pointIndex[index0 + i];
242477
242985
  for (let i = 0; i < numWrap; i++)
242478
242986
  this.pointIndex[numEdge + i] = this.pointIndex[i];
242479
- // copy wrapped edge visibility
242480
- for (let i = 0; i < numEdge; i++)
242481
- this.edgeVisible[i] = other.edgeVisible[index0 + i];
242482
- for (let i = 0; i < numWrap; i++)
242483
- this.edgeVisible[numEdge + i] = this.edgeVisible[i];
242987
+ // copy wrapped normals
242484
242988
  if (this.normal && this.normalIndex && other.normal && other.normalIndex) {
242485
242989
  for (let i = 0; i < numEdge; i++)
242486
242990
  this.normal.transferFromGrowableXYZArray(i, other.normal, other.normalIndex[index0 + i]);
242487
242991
  for (let i = 0; i < numWrap; i++)
242488
242992
  this.normal.transferFromGrowableXYZArray(numEdge + i, this.normal, i);
242993
+ // copy wrapped normalIndex
242489
242994
  for (let i = 0; i < numEdge; i++)
242490
242995
  this.normalIndex[i] = other.normalIndex[index0 + i];
242491
242996
  for (let i = 0; i < numWrap; i++)
242492
242997
  this.normalIndex[numEdge + i] = this.normalIndex[i];
242493
242998
  }
242999
+ // copy wrapped params
242494
243000
  if (this.param && this.paramIndex && other.param && other.paramIndex) {
242495
243001
  for (let i = 0; i < numEdge; i++)
242496
243002
  this.param.transferFromGrowableXYArray(i, other.param, other.paramIndex[index0 + i]);
242497
243003
  for (let i = 0; i < numWrap; i++)
242498
243004
  this.param.transferFromGrowableXYArray(numEdge + i, this.param, i);
243005
+ // copy wrapped paramIndex
242499
243006
  for (let i = 0; i < numEdge; i++)
242500
243007
  this.paramIndex[i] = other.paramIndex[index0 + i];
242501
243008
  for (let i = 0; i < numWrap; i++)
242502
243009
  this.paramIndex[numEdge + i] = this.paramIndex[i];
242503
243010
  }
243011
+ // copy wrapped colors
242504
243012
  if (this.color && this.colorIndex && other.color && other.colorIndex) {
242505
243013
  for (let i = 0; i < numEdge; i++)
242506
243014
  this.color[i] = other.color[other.colorIndex[index0 + i]];
242507
243015
  for (let i = 0; i < numWrap; i++)
242508
243016
  this.color[numEdge + i] = this.color[i];
243017
+ // copy wrapped colorIndex
242509
243018
  for (let i = 0; i < numEdge; i++)
242510
243019
  this.colorIndex[i] = other.colorIndex[index0 + i];
242511
243020
  for (let i = 0; i < numWrap; i++)
242512
243021
  this.colorIndex[numEdge + i] = this.colorIndex[i];
242513
243022
  }
243023
+ // copy wrapped edge visibility
243024
+ for (let i = 0; i < numEdge; i++)
243025
+ this.edgeVisible[i] = other.edgeVisible[index0 + i];
243026
+ for (let i = 0; i < numWrap; i++)
243027
+ this.edgeVisible[numEdge + i] = this.edgeVisible[i];
243028
+ // copy wrapped auxData
242514
243029
  if (this.auxData && other.auxData && this.auxData.channels.length === other.auxData.channels.length) {
242515
243030
  for (let iChannel = 0; iChannel < this.auxData.channels.length; iChannel++) {
242516
243031
  const thisChannel = this.auxData.channels[iChannel];
@@ -242527,19 +243042,21 @@ class PolyfaceData {
242527
243042
  }
242528
243043
  }
242529
243044
  }
243045
+ // copy wrapped auxData index
242530
243046
  for (let i = 0; i < numEdge; i++)
242531
243047
  this.auxData.indices[i] = other.auxData.indices[index0 + i];
242532
243048
  for (let i = 0; i < numWrap; i++)
242533
243049
  this.auxData.indices[numEdge + i] = this.auxData.indices[i];
242534
243050
  }
242535
243051
  }
243052
+ /** Trim the `data` arrays to the stated `length`. */
242536
243053
  static trimArray(data, length) {
242537
243054
  if (data && length < data.length)
242538
243055
  data.length = length;
242539
243056
  }
242540
243057
  /**
242541
- * Trim all index arrays to the stated length.
242542
- * This is called by PolyfaceBuilder to clean up after an aborted construction sequence.
243058
+ * Trim all index arrays to the stated `length`.
243059
+ * * This is called by PolyfaceBuilder to clean up after an aborted construction sequence.
242543
243060
  */
242544
243061
  trimAllIndexArrays(length) {
242545
243062
  PolyfaceData.trimArray(this.pointIndex, length);
@@ -242555,7 +243072,78 @@ class PolyfaceData {
242555
243072
  }
242556
243073
  }
242557
243074
  }
242558
- /** Resize all data arrays to specified length */
243075
+ /**
243076
+ * Resize all data and index arrays to the specified `length`.
243077
+ * * This is used by visitors, whose data and index arrays are all parallel.
243078
+ */
243079
+ resizeAllArrays(length) {
243080
+ if (length > this.point.length) {
243081
+ while (this.point.length < length)
243082
+ this.point.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create());
243083
+ while (this.pointIndex.length < length)
243084
+ this.pointIndex.push(-1);
243085
+ if (this.normal)
243086
+ while (this.normal.length < length)
243087
+ this.normal.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create());
243088
+ if (this.normalIndex)
243089
+ while (this.normalIndex.length < length)
243090
+ this.normalIndex.push(-1);
243091
+ if (this.param)
243092
+ while (this.param.length < length)
243093
+ this.param.push(_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__.Point2d.create());
243094
+ if (this.paramIndex)
243095
+ while (this.paramIndex.length < length)
243096
+ this.paramIndex.push(-1);
243097
+ if (this.color)
243098
+ while (this.color.length < length)
243099
+ this.color.push(0);
243100
+ if (this.colorIndex)
243101
+ while (this.colorIndex.length < length)
243102
+ this.colorIndex.push(-1);
243103
+ while (this.edgeVisible.length < length)
243104
+ this.edgeVisible.push(false);
243105
+ if (this.auxData) {
243106
+ for (const channel of this.auxData.channels) {
243107
+ for (const channelData of channel.data) {
243108
+ while (channelData.values.length < length * channel.entriesPerValue)
243109
+ channelData.values.push(0);
243110
+ }
243111
+ }
243112
+ if (this.auxData.indices)
243113
+ this.auxData.indices.push(-1);
243114
+ }
243115
+ }
243116
+ else if (length < this.point.length) {
243117
+ this.point.resize(length);
243118
+ this.pointIndex.length = length;
243119
+ if (this.normal)
243120
+ this.normal.resize(length);
243121
+ if (this.normalIndex)
243122
+ this.normalIndex.length = length;
243123
+ if (this.param)
243124
+ this.param.resize(length);
243125
+ if (this.paramIndex)
243126
+ this.paramIndex.length = length;
243127
+ if (this.color)
243128
+ this.color.length = length;
243129
+ if (this.colorIndex)
243130
+ this.colorIndex.length = length;
243131
+ this.edgeVisible.length = length;
243132
+ if (this.auxData) {
243133
+ for (const channel of this.auxData.channels) {
243134
+ for (const channelData of channel.data) {
243135
+ channelData.values.length = length * channel.entriesPerValue;
243136
+ }
243137
+ }
243138
+ if (this.auxData.indices)
243139
+ this.auxData.indices.length = length;
243140
+ }
243141
+ }
243142
+ }
243143
+ /**
243144
+ * Resize all data arrays to the specified `length`.
243145
+ * @deprecated in 4.x because name is misleading. Call [[PolyfaceData.resizeAllArrays]] instead.
243146
+ */
242559
243147
  resizeAllDataArrays(length) {
242560
243148
  if (length > this.point.length) {
242561
243149
  while (this.point.length < length)
@@ -242601,19 +243189,21 @@ class PolyfaceData {
242601
243189
  }
242602
243190
  }
242603
243191
  }
242604
- /** Return the range of the point array (optionally transformed) */
243192
+ /** Return the range of the point array (optionally transformed). */
242605
243193
  range(result, transform) {
242606
243194
  result = result ? result : _geometry3d_Range__WEBPACK_IMPORTED_MODULE_8__.Range3d.createNull();
242607
243195
  result.extendArray(this.point, transform);
242608
243196
  return result;
242609
243197
  }
242610
- /** reverse indices facet-by-facet, with the given facetStartIndex array delimiting faces.
242611
- *
242612
- * * facetStartIndex[0] == 0 always -- start of facet zero.
242613
- * * facet k has indices from facetStartIndex[k] <= i < facetStartIndex[k+1]
242614
- * * hence for "internal" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.
242615
- * *
242616
- */
243198
+ /**
243199
+ * Reverse the indices for the specified facets in the index arrays (pointIndex, normalIndex, paramIndex, colorIndex,
243200
+ * and edgeVisible).
243201
+ * @param facetStartIndex start indices of *consecutive* facets to be reversed.
243202
+ * * Consecutive indices in this array define where a given facet is represented in each of the parallel index arrays.
243203
+ * * The indices for facet k are `facetStartIndex[k]` up to (but not including) `facetStartIndex[k + 1]`.
243204
+ * * This implies `facetStartIndex[k + 1]` is both the upper limit of facet k's indices, and the start index of facet k+1.
243205
+ * * For example, passing an IndexedPolyface's _facetStart array into this method reverses every facet.
243206
+ */
242617
243207
  reverseIndices(facetStartIndex) {
242618
243208
  if (facetStartIndex && PolyfaceData.isValidFacetStartIndexArray(facetStartIndex)) {
242619
243209
  PolyfaceData.reverseIndices(facetStartIndex, this.pointIndex, true);
@@ -242626,31 +243216,33 @@ class PolyfaceData {
242626
243216
  PolyfaceData.reverseIndices(facetStartIndex, this.edgeVisible, false);
242627
243217
  }
242628
243218
  }
242629
- /** reverse indices facet-by-facet, with the given facetStartIndex array delimiting faces.
242630
- *
242631
- * * facetStartIndex[0] == 0 always -- start of facet zero.
242632
- * * facet k has indices from facetStartIndex[k] <= i < facetStartIndex[k+1]
242633
- * * hence for "internal" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.
242634
- * *
243219
+ /**
243220
+ * Reverse the indices for the specified facet in the index arrays (pointIndex, normalIndex, paramIndex, colorIndex,
243221
+ * and edgeVisible).
243222
+ * @param facetIndex index of the facet to reverse. The entries of each index array to be reversed are found at
243223
+ * `facetStartIndex[facetIndex] <= i < facetStartIndex[facetIndex + 1]`.
243224
+ * @param facetStartIndex start indices of *consecutive* facets, e.g., an IndexedPolyface's _facetStart array.
243225
+ * See [[reverseIndices]].
242635
243226
  */
242636
- reverseIndicesSingleFacet(facetId, facetStartIndex) {
242637
- PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.pointIndex, true);
243227
+ reverseIndicesSingleFacet(facetIndex, facetStartIndex) {
243228
+ PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.pointIndex, true);
242638
243229
  if (this.normalIndex !== this.pointIndex)
242639
- PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.normalIndex, true);
243230
+ PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.normalIndex, true);
242640
243231
  if (this.paramIndex !== this.pointIndex)
242641
- PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.paramIndex, true);
243232
+ PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.paramIndex, true);
242642
243233
  if (this.colorIndex !== this.pointIndex)
242643
- PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.colorIndex, true);
242644
- PolyfaceData.reverseIndicesSingleFacet(facetId, facetStartIndex, this.edgeVisible, false);
243234
+ PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.colorIndex, true);
243235
+ PolyfaceData.reverseIndicesSingleFacet(facetIndex, facetStartIndex, this.edgeVisible, false);
242645
243236
  }
242646
- /** Scale all the normals by -1 */
243237
+ /** Scale all the normals by -1. */
242647
243238
  reverseNormals() {
242648
243239
  if (this.normal)
242649
243240
  this.normal.scaleInPlace(-1.0);
242650
243241
  }
242651
- /** Apply `transform` to point and normal arrays and to auxData.
242652
- * * IMPORTANT This base class is just a data carrier. It does not know if the index order and normal directions have special meaning.
242653
- * * i.e. caller must separately reverse index order and normal direction if needed.
243242
+ /**
243243
+ * Apply `transform` to point and normal arrays and to auxData.
243244
+ * * IMPORTANT This base class is just a data carrier. It does not know if the index order and normal directions
243245
+ * have special meaning, i.e., caller must separately reverse index order and normal direction if needed.
242654
243246
  */
242655
243247
  tryTransformInPlace(transform) {
242656
243248
  this.point.multiplyTransformInPlace(transform);
@@ -242663,13 +243255,14 @@ class PolyfaceData {
242663
243255
  * * Search for duplicates within points, normals, params, and colors.
242664
243256
  * * Compress each data array.
242665
243257
  * * Revise all indexing for the relocated data.
242666
- * @param tolerance optional tolerance for clustering mesh vertices. Default is [[Geometry.smallMetricDistance]].
243258
+ * @param tolerance (optional) tolerance for clustering mesh vertices. Default is [[Geometry.smallMetricDistance]].
242667
243259
  */
242668
243260
  compress(tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.smallMetricDistance) {
243261
+ // more info can be found at geometry/internaldocs/Polyface.md
242669
243262
  const packedPoints = _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_9__.ClusterableArray.clusterGrowablePoint3dArray(this.point, tolerance);
242670
243263
  this.point = packedPoints.growablePackedPoints;
242671
243264
  packedPoints.updateIndices(this.pointIndex);
242672
- // for now, normals, params, and colors use the default tolerance for clustering...
243265
+ // for now, normals, params, and colors use the default tolerance for clustering
242673
243266
  if (this.normalIndex && this.normal) {
242674
243267
  const packedNormals = _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_9__.ClusterableArray.clusterGrowablePoint3dArray(this.normal);
242675
243268
  this.normal = packedNormals.growablePackedPoints;
@@ -242687,10 +243280,11 @@ class PolyfaceData {
242687
243280
  }
242688
243281
  }
242689
243282
  /**
242690
- * Test if facetStartIndex is (minimally!) valid:
242691
- * * length must be nonzero (recall that for "no facets" the facetStartIndexArray still must contain a 0)
243283
+ * Test if `facetStartIndex` is (minimally) valid.
243284
+ * * Length must be nonzero (recall that for "no facets", the `facetStartIndex` array still must contain a 0).
242692
243285
  * * Each entry must be strictly smaller than the one that follows.
242693
- * @param facetStartIndex array of facetStart data. facet `i` has indices at `facetsStartIndex[i]` to (one before) `facetStartIndex[i+1]`
243286
+ * @param facetStartIndex start indices of all facets. Facet k starts at facetStartIndex[k] up to (but not including)
243287
+ * `facetStartIndex[k + 1]`
242694
243288
  */
242695
243289
  static isValidFacetStartIndexArray(facetStartIndex) {
242696
243290
  // facetStartIndex for empty facets has a single entry "0" -- empty array is not allowed
@@ -242701,8 +243295,14 @@ class PolyfaceData {
242701
243295
  return false;
242702
243296
  return true;
242703
243297
  }
242704
- /** Reverse data in entire facet indexing arrays.
242705
- * * parameterized over type T so non-number data -- e.g. boolean visibility flags -- can be reversed.
243298
+ /**
243299
+ * Reverse the indices for the specified facets in the given index array.
243300
+ * * Parameterized over type T so non-number data (e.g., boolean visibility flags) can be reversed.
243301
+ * @param facetStartIndex start indices of *consecutive* facets to be reversed, e.g., an IndexedPolyface's _facetStart
243302
+ * array. See the non-static [[reverseIndices]].
243303
+ * @param indices the index array, e.g., pointIndex, normalIndex, etc.
243304
+ * @param preserveStart `true` to preserve the start index of each facet (e.g., facet [1,2,3,4] becomes [1,4,3,2]);
243305
+ * `false` to reverse all indices (e.g., facet [1,2,3,4] becomes [4,3,2,1]).
242706
243306
  */
242707
243307
  static reverseIndices(facetStartIndex, indices, preserveStart) {
242708
243308
  if (!indices || indices.length === 0)
@@ -242712,8 +243312,7 @@ class PolyfaceData {
242712
243312
  for (let i = 0; i + 1 < facetStartIndex.length; i++) {
242713
243313
  let index0 = facetStartIndex[i];
242714
243314
  let index1 = facetStartIndex[i + 1];
242715
- if (preserveStart) {
242716
- // leave [index0] as is so reversed facet starts at same vertex
243315
+ if (preserveStart) { // leave "index0" as is so reversed facet starts at same vertex
242717
243316
  while (index1 > index0 + 2) {
242718
243317
  index1--;
242719
243318
  index0++;
@@ -242722,8 +243321,7 @@ class PolyfaceData {
242722
243321
  indices[index1] = a;
242723
243322
  }
242724
243323
  }
242725
- else {
242726
- // reverse all
243324
+ else { // reverse all
242727
243325
  while (index1 > index0 + 1) {
242728
243326
  index1--;
242729
243327
  const a = indices[index0];
@@ -242738,19 +243336,26 @@ class PolyfaceData {
242738
243336
  }
242739
243337
  return false;
242740
243338
  }
242741
- /** Reverse data in entire facet indexing arrays.
242742
- * * parameterized over type T so non-number data -- e.g. boolean visibility flags -- can be reversed.
243339
+ /**
243340
+ * Reverse the indices for the specified facet in the specified index array.
243341
+ * * Parameterized over type T so non-number data (e.g., boolean visibility flags) can be reversed.
243342
+ * @param facetIndex index of the facet to reverse. The entries of `indices` to be reversed are found at
243343
+ * `facetStartIndex[facetIndex] <= i < facetStartIndex[facetIndex + 1]`.
243344
+ * @param facetStartIndex start indices of *consecutive* facets, e.g., an IndexedPolyface's _facetStart array.
243345
+ * See [[reverseIndices]].
243346
+ * @param indices the index array, e.g., pointIndex, normalIndex, etc.
243347
+ * @param preserveStart `true` to preserve the start index of each facet (e.g., facet [1,2,3,4] becomes [1,4,3,2]);
243348
+ * `false` to reverse all indices (e.g., facet [1,2,3,4] becomes [4,3,2,1]).
242743
243349
  */
242744
- static reverseIndicesSingleFacet(facetId, facetStartIndex, indices, preserveStart) {
243350
+ static reverseIndicesSingleFacet(facetIndex, facetStartIndex, indices, preserveStart) {
242745
243351
  if (!indices || indices.length === 0)
242746
243352
  return true; // empty case
242747
243353
  if (indices.length > 0) {
242748
243354
  if (facetStartIndex[facetStartIndex.length - 1] === indices.length
242749
- && facetId >= 0 && facetId + 1 < facetStartIndex.length) {
242750
- let index0 = facetStartIndex[facetId];
242751
- let index1 = facetStartIndex[facetId + 1];
242752
- if (preserveStart) {
242753
- // leave [index0] as is so reversed facet starts at same vertex
243355
+ && facetIndex >= 0 && facetIndex + 1 < facetStartIndex.length) {
243356
+ let index0 = facetStartIndex[facetIndex];
243357
+ let index1 = facetStartIndex[facetIndex + 1];
243358
+ if (preserveStart) { // leave "index0" as is so reversed facet starts at same vertex
242754
243359
  while (index1 > index0 + 2) {
242755
243360
  index1--;
242756
243361
  index0++;
@@ -242759,8 +243364,7 @@ class PolyfaceData {
242759
243364
  indices[index1] = a;
242760
243365
  }
242761
243366
  }
242762
- else {
242763
- // reverse all
243367
+ else { // reverse all
242764
243368
  while (index1 > index0 + 1) {
242765
243369
  index1--;
242766
243370
  const a = indices[index0];
@@ -242775,18 +243379,10 @@ class PolyfaceData {
242775
243379
  return false;
242776
243380
  }
242777
243381
  }
242778
- // <ul
242779
- // <li>optional arrays (normal, uv, color) must be indicated at constructor time.
242780
- // <li>all arrays are (independently) indexed.
242781
- // <li>with regret, the point, param, normal, and color arrays are exposed publicly.
242782
- // <li>getX methods are "trusting" -- no bounds check
242783
- // <li>getX methods return references to X.
242784
- // <li> EXCEPT -- for optional arrays, the return 000.
242785
- // <li>copyX methods move data to caller-supplied result..
242786
- // </ul>
242787
- /** Relative tolerance used in tests for planar facets
243382
+ /**
243383
+ * Relative tolerance used in tests for planar facets.
242788
243384
  * @internal
242789
- */
243385
+ */
242790
243386
  PolyfaceData.planarityLocalRelTol = 1.0e-13;
242791
243387
 
242792
243388
 
@@ -263761,7 +264357,6 @@ class HalfEdgeGraph {
263761
264357
  }
263762
264358
  /** Returns the number of vertex loops in a graph structure. */
263763
264359
  countVertexLoops() {
263764
- this.clearMask(HalfEdgeMask.VISITED);
263765
264360
  let count = 0;
263766
264361
  this.announceVertexLoops((_graph, _seed) => {
263767
264362
  count++;
@@ -263771,7 +264366,6 @@ class HalfEdgeGraph {
263771
264366
  }
263772
264367
  /** Returns the number of face loops in a graph structure. */
263773
264368
  countFaceLoops() {
263774
- this.clearMask(HalfEdgeMask.VISITED);
263775
264369
  let count = 0;
263776
264370
  this.announceFaceLoops((_graph, _seed) => {
263777
264371
  count++;
@@ -263781,7 +264375,6 @@ class HalfEdgeGraph {
263781
264375
  }
263782
264376
  /** Returns the number of face loops satisfying a filter function with mask argument. */
263783
264377
  countFaceLoopsWithMaskFilter(filter, mask) {
263784
- this.clearMask(HalfEdgeMask.VISITED);
263785
264378
  let count = 0;
263786
264379
  this.announceFaceLoops((_graph, seed) => {
263787
264380
  if (filter(seed, mask))
@@ -267120,14 +267713,15 @@ __webpack_require__.r(__webpack_exports__);
267120
267713
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
267121
267714
  /* harmony export */ "Triangulator": () => (/* binding */ Triangulator)
267122
267715
  /* harmony export */ });
267123
- /* harmony import */ var _clipping_ClipUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../clipping/ClipUtils */ "../../core/geometry/lib/esm/clipping/ClipUtils.js");
267716
+ /* harmony import */ var _clipping_ClipUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../clipping/ClipUtils */ "../../core/geometry/lib/esm/clipping/ClipUtils.js");
267124
267717
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
267125
- /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
267126
- /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
267127
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
267718
+ /* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
267719
+ /* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
267720
+ /* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
267721
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
267128
267722
  /* harmony import */ var _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/PointHelpers */ "../../core/geometry/lib/esm/geometry3d/PointHelpers.js");
267129
- /* harmony import */ var _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/PointStreaming */ "../../core/geometry/lib/esm/geometry3d/PointStreaming.js");
267130
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
267723
+ /* harmony import */ var _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/PointStreaming */ "../../core/geometry/lib/esm/geometry3d/PointStreaming.js");
267724
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
267131
267725
  /* harmony import */ var _Graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
267132
267726
  /* harmony import */ var _HalfEdgeMarkSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HalfEdgeMarkSet */ "../../core/geometry/lib/esm/topology/HalfEdgeMarkSet.js");
267133
267727
  /* harmony import */ var _InsertAndRetriangulateContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./InsertAndRetriangulateContext */ "../../core/geometry/lib/esm/topology/InsertAndRetriangulateContext.js");
@@ -267149,6 +267743,7 @@ __webpack_require__.r(__webpack_exports__);
267149
267743
 
267150
267744
 
267151
267745
 
267746
+
267152
267747
  /**
267153
267748
  * (static) methods for triangulating polygons
267154
267749
  * * @internal
@@ -267361,7 +267956,10 @@ class Triangulator {
267361
267956
  return undefined;
267362
267957
  }
267363
267958
  /**
267364
- * Triangulate all positive area faces of a graph.
267959
+ * Triangulate all positive area faces of a (planar) graph.
267960
+ * * Area is computed using `HalfEdge.signedFaceArea`, which ignores z-coordinates.
267961
+ * @returns whether all indicated faces were triangulated successfully
267962
+ * @see [[triangulateAllInteriorFaces]]
267365
267963
  */
267366
267964
  static triangulateAllPositiveAreaFaces(graph) {
267367
267965
  const seeds = graph.collectFaceLoops();
@@ -267376,6 +267974,44 @@ class Triangulator {
267376
267974
  }
267377
267975
  return numFail === 0;
267378
267976
  }
267977
+ /**
267978
+ * Triangulate all interior faces of a graph.
267979
+ * * A random node is checked for each face; if it has the `HalfEdgeMask.EXTERIOR` mask, the face is ignored.
267980
+ * @param useLocalCoords whether to transform each face into local coords before triangulating.
267981
+ * This is useful if the graph has z-coordinates.
267982
+ * @returns whether all indicated faces were triangulated successfully
267983
+ * @see [[triangulateAllPositiveAreaFaces]]
267984
+ */
267985
+ static triangulateAllInteriorFaces(graph, useLocalCoords) {
267986
+ const seeds = graph.collectFaceLoops();
267987
+ const visited = useLocalCoords ? graph.grabMask() : _Graph__WEBPACK_IMPORTED_MODULE_0__.HalfEdgeMask.NULL_MASK;
267988
+ let localToWorld;
267989
+ let nodes;
267990
+ let nodeCount = 0;
267991
+ let numFail = 0;
267992
+ for (const face of seeds) {
267993
+ if (face.countEdgesAroundFace() > 3) {
267994
+ if (face.getMask(_Graph__WEBPACK_IMPORTED_MODULE_0__.HalfEdgeMask.EXTERIOR))
267995
+ continue;
267996
+ if (useLocalCoords) {
267997
+ nodeCount = graph.countNodes();
267998
+ nodes = face.collectAroundFace();
267999
+ localToWorld = this._workTransform = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_5__.FrameBuilder.createRightHandedLocalToWorld(nodes, this._workTransform);
268000
+ localToWorld?.multiplyInversePoint3dArrayInPlace(nodes);
268001
+ }
268002
+ // don't flip triangles if using local coords; an edge of this face can be flipped out of plane if the neighboring triangle is non-coplanar.
268003
+ if (!Triangulator.triangulateSingleFace(graph, face, useLocalCoords))
268004
+ numFail++;
268005
+ if (localToWorld && nodes) {
268006
+ for (let iNewNode = nodeCount; iNewNode < graph.countNodes(); ++iNewNode)
268007
+ nodes.push(graph.allHalfEdges[iNewNode]);
268008
+ localToWorld.multiplyPoint3dArrayInPlace(nodes);
268009
+ }
268010
+ }
268011
+ }
268012
+ graph.dropMask(visited);
268013
+ return numFail === 0;
268014
+ }
267379
268015
  /**
267380
268016
  * Triangulate the polygon made up of by a series of points.
267381
268017
  * * The loop may be either CCW or CW -- CCW order will be used for triangles.
@@ -267424,7 +268060,7 @@ class Triangulator {
267424
268060
  let n = data.length;
267425
268061
  let x0, y0, x1, y1;
267426
268062
  while (n > 1) {
267427
- if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__.IndexedXYZCollection) {
268063
+ if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
267428
268064
  x0 = data.getXAtUncheckedPointIndex(0);
267429
268065
  y0 = data.getYAtUncheckedPointIndex(0);
267430
268066
  x1 = data.getXAtUncheckedPointIndex(n - 1);
@@ -267456,8 +268092,8 @@ class Triangulator {
267456
268092
  static directCreateFaceLoopFromCoordinates(graph, data) {
267457
268093
  const n = this.getUnwrappedLength(data); // open it up to allow starting at a bridge edge
267458
268094
  let baseNode;
267459
- if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__.IndexedXYZCollection) {
267460
- const xyz = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
268095
+ if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_6__.IndexedXYZCollection) {
268096
+ const xyz = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
267461
268097
  for (let i = 0; i < n; i++) {
267462
268098
  data.getPoint3dAtCheckedPointIndex(i, xyz);
267463
268099
  baseNode = Triangulator.interiorEdgeSplit(graph, baseNode, xyz);
@@ -267478,7 +268114,7 @@ class Triangulator {
267478
268114
  */
267479
268115
  static directCreateChainsFromCoordinates(graph, data, id = 0) {
267480
268116
  const assembler = new AssembleXYZXYZChains(graph, id);
267481
- _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_7__.VariantPointDataStream.streamXYZ(data, assembler);
268117
+ _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_8__.VariantPointDataStream.streamXYZ(data, assembler);
267482
268118
  return assembler.claimSeeds();
267483
268119
  }
267484
268120
  /**
@@ -267604,14 +268240,12 @@ class Triangulator {
267604
268240
  return b0;
267605
268241
  }
267606
268242
  /**
267607
- * main ear slicing loop which triangulates a polygon (given as a linked list)
267608
- * While there still exists ear nodes that have not yet been triangulated...
267609
- *
267610
- * * Check if the ear is hashed, and can easily be split off. If so, "join" that ear.
267611
- * * If not hashed, move on to a separate ear.
267612
- * * If no ears are currently hashed, attempt to cure self intersections or split the polygon into two before continuing
268243
+ * Main ear slicing loop which triangulates the face starting at `ear`.
268244
+ * @param graph containing graph to receive new edges
268245
+ * @param ear sector at which to start triangulation of the containing face.
268246
+ * @param noFlips if false (default) perform edge-flipping after each ear cut for better aspect ratio. Pass true if your graph isn't planar.
267613
268247
  */
267614
- static triangulateSingleFace(graph, ear) {
268248
+ static triangulateSingleFace(graph, ear, noFlips = false) {
267615
268249
  if (!ear) {
267616
268250
  Triangulator.setDebugGraph(graph);
267617
268251
  return false;
@@ -267662,7 +268296,8 @@ class Triangulator {
267662
268296
  // If we already have a separated triangle, do not join
267663
268297
  if (ear.faceSuccessor.faceSuccessor !== ear.facePredecessor) {
267664
268298
  Triangulator.joinNeighborsOfEar(graph, ear);
267665
- ear = Triangulator.doPostCutFlips(ear);
268299
+ if (!noFlips)
268300
+ ear = Triangulator.doPostCutFlips(ear);
267666
268301
  ear = ear.faceSuccessor.edgeMate.faceSuccessor;
267667
268302
  // another step? Nate's 2017 code went one more.
267668
268303
  }
@@ -267726,15 +268361,15 @@ class Triangulator {
267726
268361
  if (area <= 0)
267727
268362
  return false; // reflex, can't be an ear
267728
268363
  const planes = this._planes;
267729
- if (!_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_8__.Plane3dByOriginAndUnitNormal.createOriginAndTargetXY(a, b, planes[0])
267730
- || !_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_8__.Plane3dByOriginAndUnitNormal.createOriginAndTargetXY(b, c, planes[1])
267731
- || !_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_8__.Plane3dByOriginAndUnitNormal.createOriginAndTargetXY(c, a, planes[2]))
268364
+ if (!_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_9__.Plane3dByOriginAndUnitNormal.createOriginAndTargetXY(a, b, planes[0])
268365
+ || !_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_9__.Plane3dByOriginAndUnitNormal.createOriginAndTargetXY(b, c, planes[1])
268366
+ || !_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_9__.Plane3dByOriginAndUnitNormal.createOriginAndTargetXY(c, a, planes[2]))
267732
268367
  return false;
267733
268368
  // now make sure we don't have other points inside the potential ear, or edges crossing.
267734
268369
  const earRange = this._earRange;
267735
268370
  const edgeRange = this._edgeRange;
267736
268371
  const edgeInterval = this._edgeInterval;
267737
- _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__.Range2d.createXYXYXY(a.x, a.y, b.x, b.y, c.x, c.y, earRange);
268372
+ _geometry3d_Range__WEBPACK_IMPORTED_MODULE_10__.Range2d.createXYXYXY(a.x, a.y, b.x, b.y, c.x, c.y, earRange);
267738
268373
  earRange.expandInPlace(_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance);
267739
268374
  let p = c;
267740
268375
  const zeroPlus = 1.0e-8;
@@ -267744,11 +268379,11 @@ class Triangulator {
267744
268379
  const clipTolerance = 1.0e-10 * area;
267745
268380
  while (p !== a) {
267746
268381
  const q = p.faceSuccessor;
267747
- _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__.Range2d.createXYXY(p.x, p.y, q.x, q.y, edgeRange);
268382
+ _geometry3d_Range__WEBPACK_IMPORTED_MODULE_10__.Range2d.createXYXY(p.x, p.y, q.x, q.y, edgeRange);
267748
268383
  if (earRange.intersectsRange(edgeRange)) {
267749
268384
  // Does pq impinge on the triangle abc?
267750
- _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__.Range1d.createXX(zeroMinus, onePlus, edgeInterval);
267751
- _clipping_ClipUtils__WEBPACK_IMPORTED_MODULE_10__.ClipUtilities.clipSegmentBelowPlanesXY(planes, p, q, edgeInterval, clipTolerance);
268385
+ _geometry3d_Range__WEBPACK_IMPORTED_MODULE_10__.Range1d.createXX(zeroMinus, onePlus, edgeInterval);
268386
+ _clipping_ClipUtils__WEBPACK_IMPORTED_MODULE_11__.ClipUtilities.clipSegmentBelowPlanesXY(planes, p, q, edgeInterval, clipTolerance);
267752
268387
  if (!edgeInterval.isNull) {
267753
268388
  if (edgeInterval.low > oneMinus) {
267754
268389
  // only q touches triangle abc, so b might still be an ear if q lies at a vertex
@@ -268076,20 +268711,20 @@ class Triangulator {
268076
268711
  /** @internal */
268077
268712
  Triangulator.sEnableDebugGraphCapture = false;
268078
268713
  // for reuse over all calls to isEar ....
268079
- Triangulator._edgeInterval = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__.Range1d.createNull();
268080
- Triangulator._earRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__.Range2d.createNull();
268081
- Triangulator._edgeRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_9__.Range2d.createNull();
268714
+ Triangulator._edgeInterval = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_10__.Range1d.createNull();
268715
+ Triangulator._earRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_10__.Range2d.createNull();
268716
+ Triangulator._edgeRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_10__.Range2d.createNull();
268082
268717
  Triangulator._planes = [
268083
- _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_8__.Plane3dByOriginAndUnitNormal.createXYPlane(),
268084
- _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_8__.Plane3dByOriginAndUnitNormal.createXYPlane(),
268085
- _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_8__.Plane3dByOriginAndUnitNormal.createXYPlane(),
268718
+ _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_9__.Plane3dByOriginAndUnitNormal.createXYPlane(),
268719
+ _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_9__.Plane3dByOriginAndUnitNormal.createXYPlane(),
268720
+ _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_9__.Plane3dByOriginAndUnitNormal.createXYPlane(),
268086
268721
  ];
268087
268722
 
268088
268723
  /**
268089
268724
  * Internal class for assembling chains
268090
268725
  * @internal
268091
268726
  */
268092
- class AssembleXYZXYZChains extends _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_7__.PointStreamXYZXYZHandlerBase {
268727
+ class AssembleXYZXYZChains extends _geometry3d_PointStreaming__WEBPACK_IMPORTED_MODULE_8__.PointStreamXYZXYZHandlerBase {
268093
268728
  constructor(graph, id) {
268094
268729
  super();
268095
268730
  this._graph = graph;
@@ -288859,7 +289494,7 @@ class TestContext {
288859
289494
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
288860
289495
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
288861
289496
  await core_frontend_1.NoRenderApp.startup({
288862
- applicationVersion: "4.5.0-dev.21",
289497
+ applicationVersion: "4.5.0-dev.24",
288863
289498
  applicationId: this.settings.gprid,
288864
289499
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
288865
289500
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -295267,7 +295902,6 @@ __webpack_require__.r(__webpack_exports__);
295267
295902
  /* harmony export */ "SelectionScopesManager": () => (/* reexport safe */ _presentation_frontend_selection_SelectionScopesManager__WEBPACK_IMPORTED_MODULE_11__.SelectionScopesManager),
295268
295903
  /* harmony export */ "TRANSIENT_ELEMENT_CLASSNAME": () => (/* reexport safe */ _presentation_frontend_selection_SelectionManager__WEBPACK_IMPORTED_MODULE_10__.TRANSIENT_ELEMENT_CLASSNAME),
295269
295904
  /* harmony export */ "ToolSelectionSyncHandler": () => (/* reexport safe */ _presentation_frontend_selection_SelectionManager__WEBPACK_IMPORTED_MODULE_10__.ToolSelectionSyncHandler),
295270
- /* harmony export */ "buildPagedArrayResponse": () => (/* reexport safe */ _presentation_frontend_PresentationManager__WEBPACK_IMPORTED_MODULE_1__.buildPagedArrayResponse),
295271
295905
  /* harmony export */ "consoleDiagnosticsHandler": () => (/* reexport safe */ _presentation_frontend_Diagnostics__WEBPACK_IMPORTED_MODULE_6__.consoleDiagnosticsHandler),
295272
295906
  /* harmony export */ "createCombinedDiagnosticsHandler": () => (/* reexport safe */ _presentation_frontend_Diagnostics__WEBPACK_IMPORTED_MODULE_6__.createCombinedDiagnosticsHandler),
295273
295907
  /* harmony export */ "createFavoritePropertiesStorage": () => (/* reexport safe */ _presentation_frontend_favorite_properties_FavoritePropertiesStorage__WEBPACK_IMPORTED_MODULE_5__.createFavoritePropertiesStorage),
@@ -295793,8 +296427,7 @@ class Presentation {
295793
296427
  "use strict";
295794
296428
  __webpack_require__.r(__webpack_exports__);
295795
296429
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
295796
- /* harmony export */ "PresentationManager": () => (/* binding */ PresentationManager),
295797
- /* harmony export */ "buildPagedArrayResponse": () => (/* binding */ buildPagedArrayResponse)
296430
+ /* harmony export */ "PresentationManager": () => (/* binding */ PresentationManager)
295798
296431
  /* harmony export */ });
295799
296432
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
295800
296433
  /* harmony import */ var _itwin_core_frontend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-frontend */ "../../core/frontend/lib/esm/core-frontend.js");
@@ -295804,6 +296437,7 @@ __webpack_require__.r(__webpack_exports__);
295804
296437
  /* harmony import */ var _RulesetManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RulesetManager */ "../../presentation/frontend/lib/esm/presentation-frontend/RulesetManager.js");
295805
296438
  /* harmony import */ var _RulesetVariablesManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./RulesetVariablesManager */ "../../presentation/frontend/lib/esm/presentation-frontend/RulesetVariablesManager.js");
295806
296439
  /* harmony import */ var _selection_SelectionManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./selection/SelectionManager */ "../../presentation/frontend/lib/esm/presentation-frontend/selection/SelectionManager.js");
296440
+ /* harmony import */ var _StreamedResponseGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./StreamedResponseGenerator */ "../../presentation/frontend/lib/esm/presentation-frontend/StreamedResponseGenerator.js");
295807
296441
  /*---------------------------------------------------------------------------------------------
295808
296442
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
295809
296443
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -295819,6 +296453,7 @@ __webpack_require__.r(__webpack_exports__);
295819
296453
 
295820
296454
 
295821
296455
 
296456
+
295822
296457
  /**
295823
296458
  * Frontend Presentation manager which basically just forwards all calls to
295824
296459
  * the backend implementation.
@@ -295995,14 +296630,31 @@ class PresentationManager {
295995
296630
  }
295996
296631
  return { ...options, rulesetOrId: foundRulesetOrId, rulesetVariables: variables };
295997
296632
  }
295998
- /** Retrieves nodes */
295999
- async getNodes(requestOptions) {
296633
+ /** Returns an iterator that polls nodes asynchronously. */
296634
+ async getNodesIterator(requestOptions) {
296000
296635
  this.startIModelInitialization(requestOptions.imodel);
296001
296636
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
296002
296637
  const rpcOptions = this.toRpcTokenOptions({ ...options });
296003
- const result = await buildPagedArrayResponse(options.paging, async (partialPageOptions) => this._requestsHandler.getPagedNodes({ ...rpcOptions, paging: partialPageOptions }));
296004
- // eslint-disable-next-line deprecation/deprecation
296005
- return this._localizationHelper.getLocalizedNodes(result.items.map(_itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Node.fromJSON));
296638
+ const generator = new _StreamedResponseGenerator__WEBPACK_IMPORTED_MODULE_8__.StreamedResponseGenerator({
296639
+ ...requestOptions,
296640
+ getBatch: async (paging) => {
296641
+ const result = await this._requestsHandler.getPagedNodes({ ...rpcOptions, paging });
296642
+ return {
296643
+ total: result.total,
296644
+ // eslint-disable-next-line deprecation/deprecation
296645
+ items: this._localizationHelper.getLocalizedNodes(result.items.map(_itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Node.fromJSON)),
296646
+ };
296647
+ },
296648
+ });
296649
+ return generator.createAsyncIteratorResponse();
296650
+ }
296651
+ /**
296652
+ * Retrieves nodes
296653
+ * @deprecated in 4.5. Use [[getNodesIterator]] instead.
296654
+ */
296655
+ async getNodes(requestOptions) {
296656
+ const result = await this.getNodesIterator(requestOptions);
296657
+ return collect(result.items);
296006
296658
  }
296007
296659
  /** Retrieves nodes count. */
296008
296660
  async getNodesCount(requestOptions) {
@@ -296011,16 +296663,15 @@ class PresentationManager {
296011
296663
  const rpcOptions = this.toRpcTokenOptions({ ...options });
296012
296664
  return this._requestsHandler.getNodesCount(rpcOptions);
296013
296665
  }
296014
- /** Retrieves total nodes count and a single page of nodes. */
296666
+ /**
296667
+ * Retrieves total nodes count and a single page of nodes.
296668
+ * @deprecated in 4.5. Use [[getNodesIterator]] instead.
296669
+ */
296015
296670
  async getNodesAndCount(requestOptions) {
296016
- this.startIModelInitialization(requestOptions.imodel);
296017
- const options = await this.addRulesetAndVariablesToOptions(requestOptions);
296018
- const rpcOptions = this.toRpcTokenOptions({ ...options });
296019
- const result = await buildPagedArrayResponse(options.paging, async (partialPageOptions) => this._requestsHandler.getPagedNodes({ ...rpcOptions, paging: partialPageOptions }));
296671
+ const result = await this.getNodesIterator(requestOptions);
296020
296672
  return {
296021
296673
  count: result.total,
296022
- // eslint-disable-next-line deprecation/deprecation
296023
- nodes: this._localizationHelper.getLocalizedNodes(result.items.map(_itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Node.fromJSON)),
296674
+ nodes: await collect(result.items),
296024
296675
  };
296025
296676
  }
296026
296677
  /**
@@ -296096,54 +296747,92 @@ class PresentationManager {
296096
296747
  });
296097
296748
  return this._requestsHandler.getContentSetSize(rpcOptions);
296098
296749
  }
296099
- /** Retrieves content which consists of a content descriptor and a page of records. */
296100
- async getContent(requestOptions) {
296101
- return (await this.getContentAndSize(requestOptions))?.content;
296102
- }
296103
- /** Retrieves content set size and content which consists of a content descriptor and a page of records. */
296104
- async getContentAndSize(requestOptions) {
296105
- this.startIModelInitialization(requestOptions.imodel);
296106
- try {
296107
- const options = await this.addRulesetAndVariablesToOptions(requestOptions);
296108
- const rpcOptions = this.toRpcTokenOptions({
296109
- ...options,
296110
- descriptor: getDescriptorOverrides(requestOptions.descriptor),
296111
- keys: stripTransientElementKeys(requestOptions.keys).toJSON(),
296112
- ...(!requestOptions.omitFormattedValues && this._schemaContextProvider !== undefined ? { omitFormattedValues: true } : undefined),
296113
- });
296114
- let descriptor = requestOptions.descriptor instanceof _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Descriptor ? requestOptions.descriptor : undefined;
296115
- const result = await buildPagedArrayResponse(options.paging, async (partialPageOptions, requestIndex) => {
296116
- if (0 === requestIndex && !descriptor) {
296117
- const content = await this._requestsHandler.getPagedContent({ ...rpcOptions, paging: partialPageOptions });
296118
- if (content) {
296119
- descriptor = _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Descriptor.fromJSON(content.descriptor);
296120
- return content.contentSet;
296121
- }
296122
- return { total: 0, items: [] };
296123
- }
296124
- return this._requestsHandler.getPagedContentSet({ ...rpcOptions, paging: partialPageOptions });
296125
- });
296126
- if (!descriptor) {
296750
+ async getContentIteratorInternal(requestOptions) {
296751
+ const options = await this.addRulesetAndVariablesToOptions(requestOptions);
296752
+ const rpcOptions = this.toRpcTokenOptions({
296753
+ ...options,
296754
+ descriptor: getDescriptorOverrides(requestOptions.descriptor),
296755
+ keys: stripTransientElementKeys(requestOptions.keys).toJSON(),
296756
+ ...(!requestOptions.omitFormattedValues && this._schemaContextProvider !== undefined ? { omitFormattedValues: true } : undefined),
296757
+ });
296758
+ let contentFormatter;
296759
+ if (!requestOptions.omitFormattedValues && this._schemaContextProvider) {
296760
+ const koqPropertyFormatter = new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.KoqPropertyValueFormatter(this._schemaContextProvider(requestOptions.imodel), this._defaultFormats);
296761
+ contentFormatter = new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.ContentFormatter(new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? _itwin_core_frontend__WEBPACK_IMPORTED_MODULE_1__.IModelApp.quantityFormatter.activeUnitSystem);
296762
+ }
296763
+ let descriptor = requestOptions.descriptor instanceof _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Descriptor ? requestOptions.descriptor : undefined;
296764
+ let firstPage;
296765
+ if (!descriptor) {
296766
+ const firstPageResponse = await this._requestsHandler.getPagedContent(rpcOptions);
296767
+ if (!firstPageResponse?.descriptor || !firstPageResponse.contentSet) {
296127
296768
  return undefined;
296128
296769
  }
296129
- const items = result.items.map((itemJson) => _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Item.fromJSON(itemJson)).filter((item) => item !== undefined);
296130
- const resultContent = new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Content(descriptor, items);
296131
- if (!requestOptions.omitFormattedValues && this._schemaContextProvider) {
296132
- const koqPropertyFormatter = new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.KoqPropertyValueFormatter(this._schemaContextProvider(requestOptions.imodel), this._defaultFormats);
296133
- const contentFormatter = new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.ContentFormatter(new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? _itwin_core_frontend__WEBPACK_IMPORTED_MODULE_1__.IModelApp.quantityFormatter.activeUnitSystem);
296134
- await contentFormatter.formatContent(resultContent);
296770
+ descriptor = _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Descriptor.fromJSON(firstPageResponse?.descriptor);
296771
+ firstPage = firstPageResponse?.contentSet;
296772
+ }
296773
+ // istanbul ignore if
296774
+ if (!descriptor) {
296775
+ return undefined;
296776
+ }
296777
+ descriptor = this._localizationHelper.getLocalizedContentDescriptor(descriptor);
296778
+ const getPage = async (paging, requestIndex) => {
296779
+ let contentSet = requestIndex === 0 ? firstPage : undefined;
296780
+ contentSet ??= await this._requestsHandler.getPagedContentSet({ ...rpcOptions, paging });
296781
+ let items = contentSet.items.map((x) => _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Item.fromJSON(x)).filter((x) => x !== undefined);
296782
+ if (contentFormatter) {
296783
+ items = await contentFormatter.formatContentItems(items, descriptor);
296135
296784
  }
296785
+ items = this._localizationHelper.getLocalizedContentItems(items);
296136
296786
  return {
296137
- size: result.total,
296138
- content: this._localizationHelper.getLocalizedContent(resultContent),
296787
+ total: contentSet.total,
296788
+ items,
296139
296789
  };
296790
+ };
296791
+ const generator = new _StreamedResponseGenerator__WEBPACK_IMPORTED_MODULE_8__.StreamedResponseGenerator({
296792
+ ...requestOptions,
296793
+ getBatch: getPage,
296794
+ });
296795
+ return {
296796
+ ...(await generator.createAsyncIteratorResponse()),
296797
+ descriptor,
296798
+ };
296799
+ }
296800
+ /** Retrieves a content descriptor, item count and async generator for the items themselves. */
296801
+ async getContentIterator(requestOptions) {
296802
+ this.startIModelInitialization(requestOptions.imodel);
296803
+ const response = await this.getContentIteratorInternal(requestOptions);
296804
+ if (!response) {
296805
+ return undefined;
296140
296806
  }
296141
- finally {
296142
- await this.ensureIModelInitialized(requestOptions.imodel);
296807
+ await this.ensureIModelInitialized(requestOptions.imodel);
296808
+ return response;
296809
+ }
296810
+ /**
296811
+ * Retrieves content which consists of a content descriptor and a page of records.
296812
+ * @deprecated in 4.5. Use [[getContentIterator]] instead.
296813
+ */
296814
+ async getContent(requestOptions) {
296815
+ // eslint-disable-next-line deprecation/deprecation
296816
+ return (await this.getContentAndSize(requestOptions))?.content;
296817
+ }
296818
+ /**
296819
+ * Retrieves content set size and content which consists of a content descriptor and a page of records.
296820
+ * @deprecated in 4.5. Use [[getContentIterator]] instead.
296821
+ */
296822
+ async getContentAndSize(requestOptions) {
296823
+ const response = await this.getContentIterator(requestOptions);
296824
+ if (!response) {
296825
+ return undefined;
296143
296826
  }
296827
+ const { descriptor, total } = response;
296828
+ const items = await collect(response.items);
296829
+ return {
296830
+ content: new _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Content(descriptor, items),
296831
+ size: total,
296832
+ };
296144
296833
  }
296145
- /** Retrieves distinct values of specific field from the content. */
296146
- async getPagedDistinctValues(requestOptions) {
296834
+ /** Returns an iterator that asynchronously polls distinct values of specific field from the content. */
296835
+ async getDistinctValuesIterator(requestOptions) {
296147
296836
  this.startIModelInitialization(requestOptions.imodel);
296148
296837
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
296149
296838
  const rpcOptions = {
@@ -296151,11 +296840,28 @@ class PresentationManager {
296151
296840
  descriptor: getDescriptorOverrides(options.descriptor),
296152
296841
  keys: stripTransientElementKeys(options.keys).toJSON(),
296153
296842
  };
296154
- const result = await buildPagedArrayResponse(requestOptions.paging, async (partialPageOptions) => this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging: partialPageOptions }));
296843
+ const generator = new _StreamedResponseGenerator__WEBPACK_IMPORTED_MODULE_8__.StreamedResponseGenerator({
296844
+ ...requestOptions,
296845
+ getBatch: async (paging) => {
296846
+ const response = await this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging });
296847
+ return {
296848
+ total: response.total,
296849
+ // eslint-disable-next-line deprecation/deprecation
296850
+ items: response.items.map((x) => this._localizationHelper.getLocalizedDisplayValueGroup(_itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.DisplayValueGroup.fromJSON(x))),
296851
+ };
296852
+ },
296853
+ });
296854
+ return generator.createAsyncIteratorResponse();
296855
+ }
296856
+ /**
296857
+ * Retrieves distinct values of specific field from the content.
296858
+ * @deprecated in 4.5. Use [[getDistinctValuesIterator]] instead.
296859
+ */
296860
+ async getPagedDistinctValues(requestOptions) {
296861
+ const result = await this.getDistinctValuesIterator(requestOptions);
296155
296862
  return {
296156
- ...result,
296157
- // eslint-disable-next-line deprecation/deprecation
296158
- items: result.items.map(_itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.DisplayValueGroup.fromJSON).map((g) => this._localizationHelper.getLocalizedDisplayValueGroup(g)),
296863
+ total: result.total,
296864
+ items: await collect(result.items),
296159
296865
  };
296160
296866
  }
296161
296867
  /**
@@ -296182,9 +296888,9 @@ class PresentationManager {
296182
296888
  ...this.toRpcTokenOptions(options),
296183
296889
  keys: stripTransientElementKeys(options.keys).toJSON(),
296184
296890
  };
296185
- const props = {
296186
- page: requestOptions.paging,
296187
- get: async (page) => {
296891
+ const generator = new _StreamedResponseGenerator__WEBPACK_IMPORTED_MODULE_8__.StreamedResponseGenerator({
296892
+ ...requestOptions,
296893
+ getBatch: async (page) => {
296188
296894
  const keys = await this._requestsHandler.getContentInstanceKeys({ ...rpcOptions, paging: page });
296189
296895
  return {
296190
296896
  total: keys.total,
@@ -296196,8 +296902,14 @@ class PresentationManager {
296196
296902
  }, new Array()),
296197
296903
  };
296198
296904
  },
296905
+ });
296906
+ const { total, items } = await generator.createAsyncIteratorResponse();
296907
+ return {
296908
+ total,
296909
+ async *items() {
296910
+ yield* items;
296911
+ },
296199
296912
  };
296200
- return createPagedGeneratorResponse(props);
296201
296913
  }
296202
296914
  /** Retrieves display label definition of specific item. */
296203
296915
  async getDisplayLabelDefinition(requestOptions) {
@@ -296207,14 +296919,27 @@ class PresentationManager {
296207
296919
  return this._localizationHelper.getLocalizedLabelDefinition(result);
296208
296920
  }
296209
296921
  /** Retrieves display label definition of specific items. */
296210
- async getDisplayLabelDefinitions(requestOptions) {
296922
+ async getDisplayLabelDefinitionsIterator(requestOptions) {
296211
296923
  this.startIModelInitialization(requestOptions.imodel);
296212
296924
  const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });
296213
- const result = await buildPagedArrayResponse(undefined, async (partialPageOptions) => {
296214
- const partialKeys = !partialPageOptions.start ? rpcOptions.keys : rpcOptions.keys.slice(partialPageOptions.start);
296215
- return this._requestsHandler.getPagedDisplayLabelDefinitions({ ...rpcOptions, keys: partialKeys });
296925
+ const generator = new _StreamedResponseGenerator__WEBPACK_IMPORTED_MODULE_8__.StreamedResponseGenerator({
296926
+ ...requestOptions,
296927
+ getBatch: async (page) => {
296928
+ const partialKeys = !page.start ? rpcOptions.keys : rpcOptions.keys.slice(page.start);
296929
+ const result = await this._requestsHandler.getPagedDisplayLabelDefinitions({ ...rpcOptions, keys: partialKeys });
296930
+ result.items = this._localizationHelper.getLocalizedLabelDefinitions(result.items);
296931
+ return result;
296932
+ },
296216
296933
  });
296217
- return this._localizationHelper.getLocalizedLabelDefinitions(result.items);
296934
+ return generator.createAsyncIteratorResponse();
296935
+ }
296936
+ /**
296937
+ * Retrieves display label definition of specific items.
296938
+ * @deprecated in 4.5. Use [[getDisplayLabelDefinitionsIterator]] instead.
296939
+ */
296940
+ async getDisplayLabelDefinitions(requestOptions) {
296941
+ const { items } = await this.getDisplayLabelDefinitionsIterator(requestOptions);
296942
+ return collect(items);
296218
296943
  }
296219
296944
  }
296220
296945
  const getDescriptorOverrides = (descriptorOrOverrides) => {
@@ -296223,47 +296948,6 @@ const getDescriptorOverrides = (descriptorOrOverrides) => {
296223
296948
  }
296224
296949
  return descriptorOrOverrides;
296225
296950
  };
296226
- async function createPagedGeneratorResponse(props) {
296227
- let pageStart = props.page?.start ?? 0;
296228
- let pageSize = props.page?.size ?? 0;
296229
- let requestIndex = 0;
296230
- const firstPage = await props.get({ start: pageStart, size: pageSize }, requestIndex++);
296231
- return {
296232
- total: firstPage.total,
296233
- async *items() {
296234
- let partialResult = firstPage;
296235
- while (true) {
296236
- for (const item of partialResult.items) {
296237
- yield item;
296238
- }
296239
- const receivedItemsCount = partialResult.items.length;
296240
- if (partialResult.total !== 0 && receivedItemsCount === 0) {
296241
- if (pageStart >= partialResult.total) {
296242
- throw new Error(`Requested page with start index ${pageStart} is out of bounds. Total number of items: ${partialResult.total}`);
296243
- }
296244
- throw new Error("Paged request returned non zero total count but no items");
296245
- }
296246
- if ((pageSize !== 0 && receivedItemsCount >= pageSize) || receivedItemsCount >= partialResult.total - pageStart) {
296247
- break;
296248
- }
296249
- if (pageSize !== 0) {
296250
- pageSize -= receivedItemsCount;
296251
- }
296252
- pageStart += receivedItemsCount;
296253
- partialResult = await props.get({ start: pageStart, size: pageSize }, requestIndex++);
296254
- }
296255
- },
296256
- };
296257
- }
296258
- /** @internal */
296259
- const buildPagedArrayResponse = async (requestedPage, getter) => {
296260
- const items = new Array();
296261
- const gen = await createPagedGeneratorResponse({ page: requestedPage, get: getter });
296262
- for await (const item of gen.items()) {
296263
- items.push(item);
296264
- }
296265
- return { total: gen.total, items };
296266
- };
296267
296951
  const stripTransientElementKeys = (keys) => {
296268
296952
  if (!keys.some((key) => _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Key.isInstanceKey(key) && key.className === _selection_SelectionManager__WEBPACK_IMPORTED_MODULE_7__.TRANSIENT_ELEMENT_CLASSNAME)) {
296269
296953
  return keys;
@@ -296279,6 +296963,13 @@ const stripTransientElementKeys = (keys) => {
296279
296963
  });
296280
296964
  return copy;
296281
296965
  };
296966
+ async function collect(iter) {
296967
+ const result = new Array();
296968
+ for await (const value of iter) {
296969
+ result.push(value);
296970
+ }
296971
+ return result;
296972
+ }
296282
296973
 
296283
296974
 
296284
296975
  /***/ }),
@@ -296613,6 +297304,142 @@ function arraysEqual(lhs, rhs) {
296613
297304
  }
296614
297305
 
296615
297306
 
297307
+ /***/ }),
297308
+
297309
+ /***/ "../../presentation/frontend/lib/esm/presentation-frontend/StreamedResponseGenerator.js":
297310
+ /*!**********************************************************************************************!*\
297311
+ !*** ../../presentation/frontend/lib/esm/presentation-frontend/StreamedResponseGenerator.js ***!
297312
+ \**********************************************************************************************/
297313
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
297314
+
297315
+ "use strict";
297316
+ __webpack_require__.r(__webpack_exports__);
297317
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
297318
+ /* harmony export */ "StreamedResponseGenerator": () => (/* binding */ StreamedResponseGenerator)
297319
+ /* harmony export */ });
297320
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js");
297321
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/of.js");
297322
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/concat.js");
297323
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/range.js");
297324
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js");
297325
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scan.js");
297326
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ "../../common/temp/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/map.js");
297327
+ /* harmony import */ var rxjs_for_await__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs-for-await */ "../../common/temp/node_modules/.pnpm/rxjs-for-await@1.0.0_rxjs@7.8.1/node_modules/rxjs-for-await/dist/esm/index.js");
297328
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
297329
+ /*---------------------------------------------------------------------------------------------
297330
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
297331
+ * See LICENSE.md in the project root for license terms and full copyright notice.
297332
+ *--------------------------------------------------------------------------------------------*/
297333
+
297334
+
297335
+
297336
+ /**
297337
+ * This class allows loading values in multiple parallel batches and return them either as an array or an async iterator.
297338
+ * Pages are prefetched in advanced according to the `parallelism` argument.
297339
+ * @internal
297340
+ */
297341
+ class StreamedResponseGenerator {
297342
+ constructor(_props) {
297343
+ this._props = _props;
297344
+ }
297345
+ /** Creates a response with the total item count and an async iterator. */
297346
+ async createAsyncIteratorResponse() {
297347
+ const firstPage = await this.fetchFirstPage();
297348
+ return {
297349
+ total: firstPage.total,
297350
+ items: (0,rxjs_for_await__WEBPACK_IMPORTED_MODULE_1__.eachValueFrom)(this.getRemainingPages(firstPage).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_2__.concatAll)())),
297351
+ };
297352
+ }
297353
+ /**
297354
+ * Fetches the first page.
297355
+ * This function has to be called in order to retrieve the total items count.
297356
+ */
297357
+ async fetchFirstPage() {
297358
+ const start = this._props.paging?.start ?? 0;
297359
+ const batchSize = this._props.paging?.size ?? 0;
297360
+ return this._props.getBatch({ start, size: batchSize }, 0);
297361
+ }
297362
+ getRemainingPages(firstPage) {
297363
+ const pageStart = this._props.paging?.start ?? 0;
297364
+ const maxParallelRequests = this._props.maxParallelRequests;
297365
+ const pageSize = this._props.paging?.size;
297366
+ const { total, items: firstPageItems } = firstPage;
297367
+ // If there are no items, return a single empty page.
297368
+ if (total === 0) {
297369
+ return (0,rxjs__WEBPACK_IMPORTED_MODULE_3__.of)([]);
297370
+ }
297371
+ // If the response is empty, something went wrong.
297372
+ const receivedItemsLength = firstPage.items.length;
297373
+ if (!receivedItemsLength) {
297374
+ handleEmptyPageResult(pageStart, total);
297375
+ }
297376
+ const totalItemsToFetch = total - pageStart;
297377
+ if (receivedItemsLength === totalItemsToFetch) {
297378
+ return (0,rxjs__WEBPACK_IMPORTED_MODULE_3__.of)(firstPageItems);
297379
+ }
297380
+ let itemsToFetch;
297381
+ let batchSize;
297382
+ if (pageSize) {
297383
+ itemsToFetch = Math.min(totalItemsToFetch, pageSize) - receivedItemsLength;
297384
+ batchSize = Math.min(pageSize, receivedItemsLength);
297385
+ }
297386
+ else {
297387
+ itemsToFetch = totalItemsToFetch - receivedItemsLength;
297388
+ batchSize = receivedItemsLength;
297389
+ }
297390
+ const remainingBatches = Math.ceil(itemsToFetch / batchSize);
297391
+ // Return the first page and then stream the remaining ones.
297392
+ return (0,rxjs__WEBPACK_IMPORTED_MODULE_4__.concat)((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.of)(firstPage.items), (0,rxjs__WEBPACK_IMPORTED_MODULE_5__.range)(1, remainingBatches).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_6__.mergeMap)(async (idx) => {
297393
+ const start = pageStart + idx * batchSize;
297394
+ const size = Math.min(total - start, batchSize);
297395
+ const page = await this._props.getBatch({ start, size }, idx);
297396
+ if (!page.items.length) {
297397
+ handleEmptyPageResult(start, total);
297398
+ }
297399
+ // Pass along the index, so that the items could be sorted.
297400
+ return { idx, items: page.items };
297401
+ }, maxParallelRequests), (0,rxjs__WEBPACK_IMPORTED_MODULE_7__.scan)(
297402
+ // Collect the emitted pages an emit them in the correct order.
297403
+ (acc, value) => {
297404
+ let { lastEmitted } = acc;
297405
+ const { accumulatedBatches } = acc;
297406
+ const { idx } = value;
297407
+ // If current batch is not in order, put it in the accumulator
297408
+ if (idx - 1 !== lastEmitted) {
297409
+ accumulatedBatches.insert(value);
297410
+ return { lastEmitted, accumulatedBatches, itemsToEmit: [] };
297411
+ }
297412
+ // Collect all batches to emit in order.
297413
+ lastEmitted = idx;
297414
+ const batchesToEmit = [value];
297415
+ for (const batch of accumulatedBatches) {
297416
+ if (batch.idx - 1 !== lastEmitted) {
297417
+ break;
297418
+ }
297419
+ lastEmitted = batch.idx;
297420
+ batchesToEmit.push(batch);
297421
+ }
297422
+ // Remove batches to emit from the accumulator.
297423
+ for (const batch of batchesToEmit) {
297424
+ accumulatedBatches.remove(batch);
297425
+ }
297426
+ const itemsToEmit = batchesToEmit.flatMap((x) => x.items);
297427
+ return { lastEmitted, accumulatedBatches, itemsToEmit };
297428
+ }, {
297429
+ lastEmitted: 0,
297430
+ accumulatedBatches: new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.SortedArray((a, b) => a.idx - b.idx),
297431
+ itemsToEmit: new Array(),
297432
+ }), (0,rxjs__WEBPACK_IMPORTED_MODULE_8__.map)(({ itemsToEmit }) => itemsToEmit)));
297433
+ }
297434
+ }
297435
+ function handleEmptyPageResult(pageStart, total) {
297436
+ if (pageStart >= total) {
297437
+ throw new Error(`Requested page with start index ${pageStart} is out of bounds. Total number of items: ${total}`);
297438
+ }
297439
+ throw new Error("Paged request returned non zero total count but no items");
297440
+ }
297441
+
297442
+
296616
297443
  /***/ }),
296617
297444
 
296618
297445
  /***/ "../../presentation/frontend/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js":
@@ -297697,7 +298524,7 @@ class HiliteSetProvider {
297697
298524
  for (const batch of keyBatches) {
297698
298525
  let loadedItems = 0;
297699
298526
  while (true) {
297700
- const content = await _Presentation__WEBPACK_IMPORTED_MODULE_1__.Presentation.presentation.getContentAndSize({
298527
+ const content = await _Presentation__WEBPACK_IMPORTED_MODULE_1__.Presentation.presentation.getContentIterator({
297701
298528
  ...options,
297702
298529
  paging: { start: loadedItems, size: CONTENT_SET_PAGE_SIZE },
297703
298530
  keys: batch,
@@ -297705,10 +298532,14 @@ class HiliteSetProvider {
297705
298532
  if (!content) {
297706
298533
  break;
297707
298534
  }
297708
- const result = this.createHiliteSet(content.content.contentSet);
298535
+ const items = new Array();
298536
+ for await (const item of content.items) {
298537
+ items.push(item);
298538
+ }
298539
+ const result = this.createHiliteSet(items);
297709
298540
  yield result;
297710
- loadedItems += content.content.contentSet.length;
297711
- if (loadedItems >= content.size) {
298541
+ loadedItems += items.length;
298542
+ if (loadedItems >= content.total) {
297712
298543
  break;
297713
298544
  }
297714
298545
  }
@@ -308182,7 +309013,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
308182
309013
  /***/ ((module) => {
308183
309014
 
308184
309015
  "use strict";
308185
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.5.0-dev.21","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 && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/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 -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -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 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.5.0-dev.21","@itwin/core-bentley":"workspace:^4.5.0-dev.21","@itwin/core-common":"workspace:^4.5.0-dev.21","@itwin/core-geometry":"workspace:^4.5.0-dev.21","@itwin/core-orbitgt":"workspace:^4.5.0-dev.21","@itwin/core-quantity":"workspace:^4.5.0-dev.21"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
309016
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.5.0-dev.24","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 && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/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 -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -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 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.5.0-dev.24","@itwin/core-bentley":"workspace:^4.5.0-dev.24","@itwin/core-common":"workspace:^4.5.0-dev.24","@itwin/core-geometry":"workspace:^4.5.0-dev.24","@itwin/core-orbitgt":"workspace:^4.5.0-dev.24","@itwin/core-quantity":"workspace:^4.5.0-dev.24"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
308186
309017
 
308187
309018
  /***/ }),
308188
309019
 
@@ -309118,19 +309949,12 @@ describe("PresentationRpcInterface tests", () => {
309118
309949
  presentation_frontend_1.Presentation.terminate();
309119
309950
  });
309120
309951
  it("getNodes works as expected", async () => {
309121
- const rootNodes = await presentation_frontend_1.Presentation.presentation.getNodes({
309952
+ const rootNodes = await presentation_frontend_1.Presentation.presentation.getNodesIterator({
309122
309953
  imodel,
309123
309954
  rulesetOrId: createNodesRuleset(),
309124
309955
  });
309125
309956
  (0, chai_1.expect)(rootNodes).to.not.be.empty;
309126
309957
  });
309127
- it("getNodesAndCount works as expected", async () => {
309128
- const nodesAndCount = await presentation_frontend_1.Presentation.presentation.getNodesAndCount({
309129
- imodel,
309130
- rulesetOrId: createNodesRuleset(),
309131
- });
309132
- (0, chai_1.expect)(nodesAndCount.count).to.not.be.undefined;
309133
- });
309134
309958
  it("getNodesCount works as expected", async () => {
309135
309959
  const count = await presentation_frontend_1.Presentation.presentation.getNodesCount({
309136
309960
  imodel,
@@ -309178,6 +310002,7 @@ describe("PresentationRpcInterface tests", () => {
309178
310002
  const key1 = { id: core_bentley_1.Id64.fromString("0x1"), className: "BisCore:Subject" };
309179
310003
  const key2 = { id: core_bentley_1.Id64.fromString("0x17"), className: "BisCore:SpatialCategory" };
309180
310004
  const keys = new presentation_common_1.KeySet([key1, key2]);
310005
+ // eslint-disable-next-line deprecation/deprecation
309181
310006
  const contentAndSize = await presentation_frontend_1.Presentation.presentation.getContentAndSize({
309182
310007
  imodel,
309183
310008
  rulesetOrId: createContentRuleset(),
@@ -309190,6 +310015,7 @@ describe("PresentationRpcInterface tests", () => {
309190
310015
  const key1 = { id: core_bentley_1.Id64.fromString("0x1"), className: "BisCore:Subject" };
309191
310016
  const key2 = { id: core_bentley_1.Id64.fromString("0x17"), className: "BisCore:SpatialCategory" };
309192
310017
  const keys = new presentation_common_1.KeySet([key1, key2]);
310018
+ // eslint-disable-next-line deprecation/deprecation
309193
310019
  const content = await presentation_frontend_1.Presentation.presentation.getContent({
309194
310020
  imodel,
309195
310021
  rulesetOrId: createContentRuleset(),
@@ -309227,7 +310053,7 @@ describe("PresentationRpcInterface tests", () => {
309227
310053
  it("getDisplayLabelDefinitions works as expected", async () => {
309228
310054
  const key1 = { id: core_bentley_1.Id64.fromString("0x1"), className: "BisCore:Subject" };
309229
310055
  const key2 = { id: core_bentley_1.Id64.fromString("0x17"), className: "BisCore:SpatialCategory" };
309230
- const displayLabels = await presentation_frontend_1.Presentation.presentation.getDisplayLabelDefinitions({
310056
+ const displayLabels = await presentation_frontend_1.Presentation.presentation.getDisplayLabelDefinitionsIterator({
309231
310057
  imodel,
309232
310058
  keys: [key1, key2],
309233
310059
  });