@itwin/rpcinterface-full-stack-tests 5.13.1 → 5.14.0-dev.10

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.
@@ -42515,6 +42515,122 @@ class PerfLogger {
42515
42515
  }
42516
42516
 
42517
42517
 
42518
+ /***/ },
42519
+
42520
+ /***/ "../../core/bentley/lib/esm/ObservableMap.js"
42521
+ /*!***************************************************!*\
42522
+ !*** ../../core/bentley/lib/esm/ObservableMap.js ***!
42523
+ \***************************************************/
42524
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
42525
+
42526
+ "use strict";
42527
+ __webpack_require__.r(__webpack_exports__);
42528
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
42529
+ /* harmony export */ ObservableMap: () => (/* binding */ ObservableMap)
42530
+ /* harmony export */ });
42531
+ /* harmony import */ var _BeEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BeEvent */ "../../core/bentley/lib/esm/BeEvent.js");
42532
+ /*---------------------------------------------------------------------------------------------
42533
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
42534
+ * See LICENSE.md in the project root for license terms and full copyright notice.
42535
+ *--------------------------------------------------------------------------------------------*/
42536
+ /** @packageDocumentation
42537
+ * @module Collections
42538
+ */
42539
+
42540
+ /** A standard [Map<K,V>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) that emits an event when its contents change.
42541
+ * @public
42542
+ */
42543
+ class ObservableMap extends Map {
42544
+ /** @internal */
42545
+ get [Symbol.toStringTag]() { return "ObservableMap"; }
42546
+ /** Emitted after any change to the contents of this map. */
42547
+ onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42548
+ /** Construct a new ObservableMap.
42549
+ * @param elements Optional elements with which to populate the new map.
42550
+ */
42551
+ constructor(elements) {
42552
+ // IMPORTANT: do not pass `elements` to `super()`. It will invoke `set` which is overridden to invoke `onChanged.raiseEvent`, but
42553
+ // `onChanged` is not initialized until `super()` returns.
42554
+ super();
42555
+ if (elements)
42556
+ this.setAll(elements);
42557
+ }
42558
+ /** Invokes [Map.set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set), raising
42559
+ * the [[onChanged]] event unless `key` is already present with the same `value`.
42560
+ */
42561
+ set(key, value) {
42562
+ const valueChanged = !this.has(key) || !Object.is(this.get(key), value);
42563
+ if (valueChanged)
42564
+ super.set(key, value);
42565
+ if (valueChanged) {
42566
+ this.onChanged.raiseEvent();
42567
+ }
42568
+ return this;
42569
+ }
42570
+ /** Invokes [Map.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete), raising
42571
+ * the [[onChanged]] event if the key was removed from the map.
42572
+ */
42573
+ delete(key) {
42574
+ const ret = super.delete(key);
42575
+ if (ret) {
42576
+ this.onChanged.raiseEvent();
42577
+ }
42578
+ return ret;
42579
+ }
42580
+ /** If this map is not already empty, invokes [Map.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear)
42581
+ * and raises the [[onChanged]] event.
42582
+ */
42583
+ clear() {
42584
+ if (0 !== this.size) {
42585
+ super.clear();
42586
+ this.onChanged.raiseEvent();
42587
+ }
42588
+ }
42589
+ /** Add or update multiple entries in the map, raising [[onChanged]] only once after all items are set, if the contents of
42590
+ * the map changed as a result.
42591
+ * This is more efficient than calling [[set]] in a loop when listeners need not be notified of each individual change.
42592
+ * @param items The entries to add or update.
42593
+ */
42594
+ setAll(items) {
42595
+ let changed = false;
42596
+ try {
42597
+ for (const [key, value] of items) {
42598
+ if (!this.has(key) || !Object.is(this.get(key), value)) {
42599
+ super.set(key, value);
42600
+ changed = true;
42601
+ }
42602
+ }
42603
+ }
42604
+ finally {
42605
+ if (changed) {
42606
+ this.onChanged.raiseEvent();
42607
+ }
42608
+ }
42609
+ }
42610
+ /** Delete multiple keys from the map, raising [[onChanged]] only once after all keys are deleted.
42611
+ * This is more efficient than calling [[delete]] in a loop when listeners need not be notified of each individual deletion.
42612
+ * @param keys The keys to delete.
42613
+ * @returns The number of keys that were actually deleted (i.e., were present in the map).
42614
+ */
42615
+ deleteAll(keys) {
42616
+ const prevSize = this.size;
42617
+ let deletedAny = false;
42618
+ try {
42619
+ for (const key of keys) {
42620
+ if (super.delete(key))
42621
+ deletedAny = true;
42622
+ }
42623
+ }
42624
+ finally {
42625
+ if (deletedAny) {
42626
+ this.onChanged.raiseEvent();
42627
+ }
42628
+ }
42629
+ return prevSize - this.size;
42630
+ }
42631
+ }
42632
+
42633
+
42518
42634
  /***/ },
42519
42635
 
42520
42636
  /***/ "../../core/bentley/lib/esm/ObservableSet.js"
@@ -42541,6 +42657,8 @@ __webpack_require__.r(__webpack_exports__);
42541
42657
  * @public
42542
42658
  */
42543
42659
  class ObservableSet extends Set {
42660
+ /** @internal */
42661
+ get [Symbol.toStringTag]() { return "ObservableSet"; }
42544
42662
  /** Emitted after `item` is added to this set. */
42545
42663
  onAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42546
42664
  /** Emitted after `item` is deleted from this set. */
@@ -42551,27 +42669,39 @@ class ObservableSet extends Set {
42551
42669
  onBatchAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42552
42670
  /** Emitted after multiple items are deleted from this set via [[deleteAll]]. */
42553
42671
  onBatchDeleted = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42672
+ /** Emitted after any change to the contents of this set. */
42673
+ onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42554
42674
  /** Construct a new ObservableSet.
42555
42675
  * @param elements Optional elements with which to populate the new set.
42556
42676
  */
42557
42677
  constructor(elements) {
42558
- // NB: Set constructor will invoke add(). Do not override until initialized.
42559
- super(elements);
42560
- this.add = (item) => {
42561
- const prevSize = this.size;
42562
- const ret = super.add(item);
42563
- if (this.size !== prevSize)
42564
- this.onAdded.raiseEvent(item);
42565
- return ret;
42566
- };
42678
+ // IMPORTANT: do not pass `elements` to `super()`. It will invoke `add` which is overridden to invoke `onAdded.raiseEvent`, but
42679
+ // `onAdded` is not initialized until `super()` returns.
42680
+ super();
42681
+ if (elements)
42682
+ this.addAll(elements);
42683
+ }
42684
+ /** Invokes [Set.add](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/add), raising
42685
+ * the [[onAdded]] event if the item was not already present in the set.
42686
+ */
42687
+ add(item) {
42688
+ const prevSize = this.size;
42689
+ const ret = super.add(item);
42690
+ if (this.size !== prevSize) {
42691
+ this.onAdded.raiseEvent(item);
42692
+ this.onChanged.raiseEvent();
42693
+ }
42694
+ return ret;
42567
42695
  }
42568
42696
  /** Invokes [Set.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/delete), raising
42569
42697
  * the [[onDeleted]] event if the item was removed from the set.
42570
42698
  */
42571
42699
  delete(item) {
42572
42700
  const ret = super.delete(item);
42573
- if (ret)
42701
+ if (ret) {
42574
42702
  this.onDeleted.raiseEvent(item);
42703
+ this.onChanged.raiseEvent();
42704
+ }
42575
42705
  return ret;
42576
42706
  }
42577
42707
  /** If this set is not already empty, invokes [Set.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/clear)
@@ -42581,6 +42711,7 @@ class ObservableSet extends Set {
42581
42711
  if (0 !== this.size) {
42582
42712
  super.clear();
42583
42713
  this.onCleared.raiseEvent();
42714
+ this.onChanged.raiseEvent();
42584
42715
  }
42585
42716
  }
42586
42717
  /** Add multiple items to the set, raising [[onBatchAdded]] only once after all items are added.
@@ -42590,10 +42721,21 @@ class ObservableSet extends Set {
42590
42721
  */
42591
42722
  addAll(items) {
42592
42723
  const prevSize = this.size;
42593
- for (const item of items)
42594
- super.add(item);
42595
- if (this.size !== prevSize)
42596
- this.onBatchAdded.raiseEvent();
42724
+ let addedAny = false;
42725
+ try {
42726
+ for (const item of items) {
42727
+ const prevSetSize = this.size;
42728
+ super.add(item);
42729
+ if (this.size !== prevSetSize)
42730
+ addedAny = true;
42731
+ }
42732
+ }
42733
+ finally {
42734
+ if (addedAny) {
42735
+ this.onBatchAdded.raiseEvent();
42736
+ this.onChanged.raiseEvent();
42737
+ }
42738
+ }
42597
42739
  return this.size - prevSize;
42598
42740
  }
42599
42741
  /** Delete multiple items from the set, raising [[onBatchDeleted]] only once after all items are deleted.
@@ -42603,10 +42745,21 @@ class ObservableSet extends Set {
42603
42745
  */
42604
42746
  deleteAll(items) {
42605
42747
  const prevSize = this.size;
42606
- for (const item of items)
42607
- super.delete(item);
42608
- if (this.size !== prevSize)
42609
- this.onBatchDeleted.raiseEvent();
42748
+ let deletedAny = false;
42749
+ try {
42750
+ for (const item of items) {
42751
+ const prevSetSize = this.size;
42752
+ super.delete(item);
42753
+ if (this.size !== prevSetSize)
42754
+ deletedAny = true;
42755
+ }
42756
+ }
42757
+ finally {
42758
+ if (deletedAny) {
42759
+ this.onBatchDeleted.raiseEvent();
42760
+ this.onChanged.raiseEvent();
42761
+ }
42762
+ }
42610
42763
  return prevSize - this.size;
42611
42764
  }
42612
42765
  }
@@ -45028,11 +45181,11 @@ class YieldManager {
45028
45181
  "use strict";
45029
45182
  __webpack_require__.r(__webpack_exports__);
45030
45183
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45031
- /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.AbandonedError),
45032
- /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeDuration),
45184
+ /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
45185
+ /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
45033
45186
  /* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
45034
45187
  /* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
45035
- /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeTimePoint),
45188
+ /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeTimePoint),
45036
45189
  /* harmony export */ BeUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUiEvent),
45037
45190
  /* harmony export */ BeUnorderedEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedEvent),
45038
45191
  /* harmony export */ BeUnorderedUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedUiEvent),
@@ -45043,15 +45196,15 @@ __webpack_require__.r(__webpack_exports__);
45043
45196
  /* harmony export */ ByteStream: () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
45044
45197
  /* harmony export */ ChangeSetStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
45045
45198
  /* harmony export */ CompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
45046
- /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbChangeStage),
45047
- /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictCause),
45048
- /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictResolution),
45199
+ /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbChangeStage),
45200
+ /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictCause),
45201
+ /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictResolution),
45049
45202
  /* harmony export */ DbOpcode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
45050
45203
  /* harmony export */ DbResult: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
45051
- /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbValueType),
45204
+ /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbValueType),
45052
45205
  /* harmony export */ Dictionary: () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
45053
45206
  /* harmony export */ DisposableList: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
45054
- /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.DuplicatePolicy),
45207
+ /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.DuplicatePolicy),
45055
45208
  /* harmony export */ Entry: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.Entry),
45056
45209
  /* harmony export */ ErrorCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.ErrorCategory),
45057
45210
  /* harmony export */ GeoServiceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.GeoServiceStatus),
@@ -45070,39 +45223,40 @@ __webpack_require__.r(__webpack_exports__);
45070
45223
  /* harmony export */ LogLevel: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.LogLevel),
45071
45224
  /* harmony export */ Logger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.Logger),
45072
45225
  /* harmony export */ MutableCompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.MutableCompressedId64Set),
45073
- /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_20__.ObservableSet),
45074
- /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.OneAtATimeAction),
45226
+ /* harmony export */ ObservableMap: () => (/* reexport safe */ _ObservableMap__WEBPACK_IMPORTED_MODULE_20__.ObservableMap),
45227
+ /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_21__.ObservableSet),
45228
+ /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.OneAtATimeAction),
45075
45229
  /* harmony export */ OpenMode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.OpenMode),
45076
45230
  /* harmony export */ OrderedId64Array: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.OrderedId64Array),
45077
- /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__.OrderedId64Iterable),
45078
- /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.OrderedSet),
45231
+ /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__.OrderedId64Iterable),
45232
+ /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.OrderedSet),
45079
45233
  /* harmony export */ PerfLogger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.PerfLogger),
45080
- /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__.PriorityQueue),
45081
- /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__.ProcessDetector),
45082
- /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.ReadonlyOrderedSet),
45083
- /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.ReadonlySortedArray),
45234
+ /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__.PriorityQueue),
45235
+ /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__.ProcessDetector),
45236
+ /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.ReadonlyOrderedSet),
45237
+ /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.ReadonlySortedArray),
45084
45238
  /* harmony export */ RealityDataStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RealityDataStatus),
45085
- /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.RepositoryStatus),
45239
+ /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.RepositoryStatus),
45086
45240
  /* harmony export */ RpcInterfaceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RpcInterfaceStatus),
45087
- /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.SortedArray),
45088
- /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.SpanKind),
45241
+ /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.SortedArray),
45242
+ /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.SpanKind),
45089
45243
  /* harmony export */ StatusCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.StatusCategory),
45090
- /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.StopWatch),
45244
+ /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.StopWatch),
45091
45245
  /* harmony export */ SuccessCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.SuccessCategory),
45092
- /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.Tracing),
45246
+ /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.Tracing),
45093
45247
  /* harmony export */ TransientIdSequence: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.TransientIdSequence),
45094
- /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__.TupleKeyedMap),
45095
- /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.TypedArrayBuilder),
45096
- /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint16ArrayBuilder),
45097
- /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint32ArrayBuilder),
45098
- /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint8ArrayBuilder),
45099
- /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.UintArrayBuilder),
45100
- /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__.UnexpectedErrors),
45101
- /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_36__.YieldManager),
45248
+ /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__.TupleKeyedMap),
45249
+ /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.TypedArrayBuilder),
45250
+ /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint16ArrayBuilder),
45251
+ /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint32ArrayBuilder),
45252
+ /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint8ArrayBuilder),
45253
+ /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.UintArrayBuilder),
45254
+ /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__.UnexpectedErrors),
45255
+ /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_37__.YieldManager),
45102
45256
  /* harmony export */ areEqualPossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.areEqualPossiblyUndefined),
45103
- /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.asInstanceOf),
45257
+ /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.asInstanceOf),
45104
45258
  /* harmony export */ assert: () => (/* reexport safe */ _Assert__WEBPACK_IMPORTED_MODULE_1__.assert),
45105
- /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.base64StringToUint8Array),
45259
+ /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.base64StringToUint8Array),
45106
45260
  /* harmony export */ compareArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareArrays),
45107
45261
  /* harmony export */ compareBooleans: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleans),
45108
45262
  /* harmony export */ compareBooleansOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleansOrUndefined),
@@ -45120,16 +45274,16 @@ __webpack_require__.r(__webpack_exports__);
45120
45274
  /* harmony export */ expectNotNull: () => (/* reexport safe */ _Expect__WEBPACK_IMPORTED_MODULE_13__.expectNotNull),
45121
45275
  /* harmony export */ isDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isDisposable),
45122
45276
  /* harmony export */ isIDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isIDisposable),
45123
- /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.isInstanceOf),
45277
+ /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.isInstanceOf),
45124
45278
  /* harmony export */ isProperSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isProperSubclassOf),
45125
45279
  /* harmony export */ isSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isSubclassOf),
45126
- /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.lowerBound),
45127
- /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.omit),
45128
- /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_24__.partitionArray),
45129
- /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.shallowClone),
45280
+ /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.lowerBound),
45281
+ /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.omit),
45282
+ /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_25__.partitionArray),
45283
+ /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.shallowClone),
45130
45284
  /* harmony export */ using: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.using),
45131
- /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.utf8ToString),
45132
- /* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__.wrapTimerCallback)
45285
+ /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.utf8ToString),
45286
+ /* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__.wrapTimerCallback)
45133
45287
  /* harmony export */ });
45134
45288
  /* harmony import */ var _AccessToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccessToken */ "../../core/bentley/lib/esm/AccessToken.js");
45135
45289
  /* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Assert */ "../../core/bentley/lib/esm/Assert.js");
@@ -45151,24 +45305,25 @@ __webpack_require__.r(__webpack_exports__);
45151
45305
  /* harmony import */ var _JsonUtils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./JsonUtils */ "../../core/bentley/lib/esm/JsonUtils.js");
45152
45306
  /* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Logger */ "../../core/bentley/lib/esm/Logger.js");
45153
45307
  /* harmony import */ var _LRUMap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LRUMap */ "../../core/bentley/lib/esm/LRUMap.js");
45154
- /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableSet */ "../../core/bentley/lib/esm/ObservableSet.js");
45155
- /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./OneAtATimeAction */ "../../core/bentley/lib/esm/OneAtATimeAction.js");
45156
- /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../../core/bentley/lib/esm/OrderedId64Iterable.js");
45157
- /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedSet */ "../../core/bentley/lib/esm/OrderedSet.js");
45158
- /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./partitionArray */ "../../core/bentley/lib/esm/partitionArray.js");
45159
- /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./PriorityQueue */ "../../core/bentley/lib/esm/PriorityQueue.js");
45160
- /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ProcessDetector */ "../../core/bentley/lib/esm/ProcessDetector.js");
45161
- /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./SortedArray */ "../../core/bentley/lib/esm/SortedArray.js");
45162
- /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./StringUtils */ "../../core/bentley/lib/esm/StringUtils.js");
45163
- /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Time */ "../../core/bentley/lib/esm/Time.js");
45164
- /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Tracing */ "../../core/bentley/lib/esm/Tracing.js");
45165
- /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./TupleKeyedMap */ "../../core/bentley/lib/esm/TupleKeyedMap.js");
45166
- /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../../core/bentley/lib/esm/TypedArrayBuilder.js");
45167
- /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UnexpectedErrors */ "../../core/bentley/lib/esm/UnexpectedErrors.js");
45168
- /* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UtilityFunctions */ "../../core/bentley/lib/esm/UtilityFunctions.js");
45169
- /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityTypes */ "../../core/bentley/lib/esm/UtilityTypes.js");
45170
- /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./YieldManager */ "../../core/bentley/lib/esm/YieldManager.js");
45171
- /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./internal/cross-package */ "../../core/bentley/lib/esm/internal/cross-package.js");
45308
+ /* harmony import */ var _ObservableMap__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableMap */ "../../core/bentley/lib/esm/ObservableMap.js");
45309
+ /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ObservableSet */ "../../core/bentley/lib/esm/ObservableSet.js");
45310
+ /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OneAtATimeAction */ "../../core/bentley/lib/esm/OneAtATimeAction.js");
45311
+ /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../../core/bentley/lib/esm/OrderedId64Iterable.js");
45312
+ /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./OrderedSet */ "../../core/bentley/lib/esm/OrderedSet.js");
45313
+ /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./partitionArray */ "../../core/bentley/lib/esm/partitionArray.js");
45314
+ /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./PriorityQueue */ "../../core/bentley/lib/esm/PriorityQueue.js");
45315
+ /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ProcessDetector */ "../../core/bentley/lib/esm/ProcessDetector.js");
45316
+ /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./SortedArray */ "../../core/bentley/lib/esm/SortedArray.js");
45317
+ /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./StringUtils */ "../../core/bentley/lib/esm/StringUtils.js");
45318
+ /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Time */ "../../core/bentley/lib/esm/Time.js");
45319
+ /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Tracing */ "../../core/bentley/lib/esm/Tracing.js");
45320
+ /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TupleKeyedMap */ "../../core/bentley/lib/esm/TupleKeyedMap.js");
45321
+ /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../../core/bentley/lib/esm/TypedArrayBuilder.js");
45322
+ /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UnexpectedErrors */ "../../core/bentley/lib/esm/UnexpectedErrors.js");
45323
+ /* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityFunctions */ "../../core/bentley/lib/esm/UtilityFunctions.js");
45324
+ /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./UtilityTypes */ "../../core/bentley/lib/esm/UtilityTypes.js");
45325
+ /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./YieldManager */ "../../core/bentley/lib/esm/YieldManager.js");
45326
+ /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./internal/cross-package */ "../../core/bentley/lib/esm/internal/cross-package.js");
45172
45327
  /*---------------------------------------------------------------------------------------------
45173
45328
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
45174
45329
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -45208,6 +45363,7 @@ __webpack_require__.r(__webpack_exports__);
45208
45363
 
45209
45364
 
45210
45365
 
45366
+
45211
45367
 
45212
45368
 
45213
45369
  // Temporarily (until 5.0) export top-level internal APIs to avoid breaking callers.
@@ -55775,6 +55931,7 @@ function isBinaryImageSource(source) {
55775
55931
  __webpack_require__.r(__webpack_exports__);
55776
55932
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
55777
55933
  /* harmony export */ getPullChangesIpcChannel: () => (/* binding */ getPullChangesIpcChannel),
55934
+ /* harmony export */ getPushChangesIpcChannel: () => (/* binding */ getPushChangesIpcChannel),
55778
55935
  /* harmony export */ ipcAppChannels: () => (/* binding */ ipcAppChannels)
55779
55936
  /* harmony export */ });
55780
55937
  /*---------------------------------------------------------------------------------------------
@@ -55785,9 +55942,16 @@ __webpack_require__.r(__webpack_exports__);
55785
55942
  * @module NativeApp
55786
55943
  */
55787
55944
  /** Get IPC channel name used for reporting progress of pulling changes into iModel.
55945
+ * @param key the key of the briefcase being pulled into.
55788
55946
  * @internal
55789
55947
  */
55790
- const getPullChangesIpcChannel = (iModelId) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;
55948
+ const getPullChangesIpcChannel = (key) => `${ipcAppChannels.functions}/pullChanges/${key}`;
55949
+ /** Get IPC channel name used for reporting the progress of the changeset download that [[IpcAppFunctions.pushChanges]] performs before
55950
+ * uploading. Kept distinct from [[getPullChangesIpcChannel]] so that a listener attached for a pull never observes a push's download.
55951
+ * @param key the key of the briefcase being pushed from.
55952
+ * @internal
55953
+ */
55954
+ const getPushChangesIpcChannel = (key) => `${ipcAppChannels.functions}/pushChanges/pullProgress/${key}`;
55791
55955
  /** @internal */
55792
55956
  const ipcAppChannels = {
55793
55957
  functions: "itwinjs-core/ipc-app",
@@ -65623,6 +65787,7 @@ __webpack_require__.r(__webpack_exports__);
65623
65787
  /* harmony export */ getMarkerText: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.getMarkerText),
65624
65788
  /* harmony export */ getMaximumMajorTileFormatVersion: () => (/* reexport safe */ _tile_TileMetadata__WEBPACK_IMPORTED_MODULE_163__.getMaximumMajorTileFormatVersion),
65625
65789
  /* harmony export */ getPullChangesIpcChannel: () => (/* reexport safe */ _IpcAppProps__WEBPACK_IMPORTED_MODULE_80__.getPullChangesIpcChannel),
65790
+ /* harmony export */ getPushChangesIpcChannel: () => (/* reexport safe */ _IpcAppProps__WEBPACK_IMPORTED_MODULE_80__.getPushChangesIpcChannel),
65626
65791
  /* harmony export */ getTileObjectReference: () => (/* reexport safe */ _TileProps__WEBPACK_IMPORTED_MODULE_122__.getTileObjectReference),
65627
65792
  /* harmony export */ iModelTileTreeIdToString: () => (/* reexport safe */ _tile_TileMetadata__WEBPACK_IMPORTED_MODULE_163__.iModelTileTreeIdToString),
65628
65793
  /* harmony export */ iTwinChannel: () => (/* reexport safe */ _ipc_IpcSocket__WEBPACK_IMPORTED_MODULE_74__.iTwinChannel),
@@ -82247,6 +82412,17 @@ class SchemaCache {
82247
82412
  return entry.schemaInfo;
82248
82413
  return undefined;
82249
82414
  }
82415
+ /**
82416
+ * Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded.
82417
+ * Does not await partially loaded schemas.
82418
+ * @param schemaKey The SchemaKey describing the schema to get from the cache.
82419
+ * @param matchType The match type to use when locating the schema
82420
+ */
82421
+ getSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
82422
+ if (this.count === 0)
82423
+ return undefined;
82424
+ return this.findEntry(schemaKey, matchType)?.schemaInfo;
82425
+ }
82250
82426
  /**
82251
82427
  * Gets the schema which matches the provided SchemaKey. If the schema is partially loaded an exception will be thrown.
82252
82428
  * @param schemaKey The SchemaKey describing the schema to get from the cache.
@@ -82444,6 +82620,16 @@ class SchemaContext {
82444
82620
  getCachedSchemaSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
82445
82621
  return this._knownSchemas.getSchemaSync(schemaKey, matchType);
82446
82622
  }
82623
+ /**
82624
+ * Attempts to get a SchemaInfo from the context's cache.
82625
+ * Returns the info even if the schema is only partially loaded.
82626
+ * @param schemaKey The SchemaKey to identify the Schema.
82627
+ * @param matchType The SchemaMatch type to use. Default is SchemaMatchType.Latest.
82628
+ * @internal
82629
+ */
82630
+ getCachedSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
82631
+ return this._knownSchemas.getSchemaInfoSync(schemaKey, matchType);
82632
+ }
82447
82633
  async getSchemaItem(schemaNameOrKey, itemNameOrCtor, itemConstructor) {
82448
82634
  let schemaKey;
82449
82635
  if (typeof schemaNameOrKey === "string") {
@@ -82719,11 +82905,25 @@ class SchemaReadHelper {
82719
82905
  }
82720
82906
  this._schemaInfo = schemaInfo;
82721
82907
  // Need to add this schema to the context to be able to locate schemaItems within the context.
82722
- if (addSchemaToCache && !this._context.schemaExists(schema.schemaKey)) {
82723
- await this._context.addSchemaPromise(schemaInfo, schema, this.loadSchema(schemaInfo, schema));
82908
+ if (addSchemaToCache) {
82909
+ this.checkForReadVersionConflict(schema.schemaKey);
82910
+ if (!this._context.schemaExists(schema.schemaKey))
82911
+ await this._context.addSchemaPromise(schemaInfo, schema, this.loadSchema(schemaInfo, schema));
82724
82912
  }
82725
82913
  return schemaInfo;
82726
82914
  }
82915
+ /**
82916
+ * Two read-incompatible versions of the same schema can never substitute for one another.
82917
+ * Detect it here and fail with a clear error.
82918
+ * @param schemaKey The exact key of the schema about to be loaded into the context.
82919
+ */
82920
+ checkForReadVersionConflict(schemaKey) {
82921
+ const existingInfo = this._context.getCachedSchemaInfoSync(new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(schemaKey.name), _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.Latest);
82922
+ if (existingInfo && existingInfo.schemaKey.readVersion !== schemaKey.readVersion) {
82923
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.DuplicateSchema, `The schema '${schemaKey.toString(true)}' cannot be loaded: the read-incompatible version '${existingInfo.schemaKey.toString(true)}' is already loaded in this context. ` +
82924
+ `A schema graph cannot require two read-incompatible versions of the same schema.`);
82925
+ }
82926
+ }
82727
82927
  /**
82728
82928
  * Populates the given Schema from a serialized representation.
82729
82929
  * @param schema The Schema to populate
@@ -82745,7 +82945,7 @@ class SchemaReadHelper {
82745
82945
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
82746
82946
  return loadedSchema;
82747
82947
  }
82748
- const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.Latest);
82948
+ const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.LatestReadCompatible);
82749
82949
  if (undefined === cachedSchema)
82750
82950
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
82751
82951
  return cachedSchema;
@@ -82797,6 +82997,7 @@ class SchemaReadHelper {
82797
82997
  schema.fromJSONSync(this._parser.parseSchema());
82798
82998
  this._schema = schema;
82799
82999
  // Need to add this schema to the context to be able to locate schemaItems within the context.
83000
+ this.checkForReadVersionConflict(schema.schemaKey);
82800
83001
  if (!this._context.schemaExists(schema.schemaKey))
82801
83002
  this._context.addSchemaSync(schema);
82802
83003
  // Load schema references first
@@ -105357,29 +105558,38 @@ class BriefcaseConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_5__
105357
105558
  async abandonChanges() {
105358
105559
  await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated
105359
105560
  }
105561
+ /** Subscribes to changeset download progress events on `channel` and wires `abortSignal` to `cancel`.
105562
+ * @returns a function that removes every listener that was added.
105563
+ */
105564
+ listenForChangesetDownloadProgress(args) {
105565
+ const { channel, cancel, downloadProgressCallback, abortSignal } = args;
105566
+ const removeListeners = [];
105567
+ if (downloadProgressCallback) {
105568
+ const handleProgress = (_evt, data) => downloadProgressCallback(data);
105569
+ removeListeners.push(_IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.addListener(channel, handleProgress));
105570
+ }
105571
+ if (abortSignal) {
105572
+ const abort = () => void cancel();
105573
+ abortSignal.addEventListener("abort", abort);
105574
+ removeListeners.push(() => abortSignal.removeEventListener("abort", abort));
105575
+ }
105576
+ return () => removeListeners.forEach((remove) => remove());
105577
+ }
105360
105578
  /** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase
105361
105579
  * @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.
105362
105580
  * @param options Options for pulling changes.
105363
105581
  * @see [[BriefcaseTxns.onChangesPulled]] for the event dispatched after changes are pulled.
105364
105582
  */
105365
105583
  async pullChanges(toIndex, options) {
105366
- const removeListeners = [];
105367
- const shouldReportProgress = !!options?.downloadProgressCallback;
105368
- if (shouldReportProgress) {
105369
- const handleProgress = (_evt, data) => {
105370
- options?.downloadProgressCallback?.(data);
105371
- };
105372
- const removeProgressListener = _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.addListener((0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.getPullChangesIpcChannel)(this.iModelId), handleProgress);
105373
- removeListeners.push(removeProgressListener);
105374
- }
105375
- if (options?.abortSignal) {
105376
- const abort = () => void _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key);
105377
- options?.abortSignal.addEventListener("abort", abort);
105378
- removeListeners.push(() => options?.abortSignal?.removeEventListener("abort", abort));
105379
- }
105380
105584
  this.requireTimeline();
105585
+ const removeListeners = this.listenForChangesetDownloadProgress({
105586
+ channel: (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.getPullChangesIpcChannel)(this.key),
105587
+ cancel: async () => _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key),
105588
+ downloadProgressCallback: options?.downloadProgressCallback,
105589
+ abortSignal: options?.abortSignal,
105590
+ });
105381
105591
  const ipcAppOptions = {
105382
- reportProgress: shouldReportProgress,
105592
+ reportProgress: !!options?.downloadProgressCallback,
105383
105593
  progressInterval: options?.progressInterval,
105384
105594
  enableCancellation: !!options?.abortSignal,
105385
105595
  };
@@ -105387,18 +105597,29 @@ class BriefcaseConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_5__
105387
105597
  this.changeset = await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.pullChanges(this.key, toIndex, ipcAppOptions);
105388
105598
  }
105389
105599
  finally {
105390
- removeListeners.forEach((remove) => remove());
105600
+ removeListeners();
105391
105601
  }
105392
105602
  await this.invalidateSchemaViewIfChanged();
105393
105603
  }
105394
- /** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.
105395
- * @param description The description for the changeset
105396
- * @returns the changesetId of the pushed changes
105397
- * @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.
105398
- */
105399
- async pushChanges(description) {
105604
+ async pushChanges(description, options) {
105400
105605
  this.requireTimeline();
105401
- return this.changeset = await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.pushChanges(this.key, description);
105606
+ const removeListeners = this.listenForChangesetDownloadProgress({
105607
+ channel: (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.getPushChangesIpcChannel)(this.key),
105608
+ cancel: async () => _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.cancelPushChangesRequest(this.key),
105609
+ downloadProgressCallback: options?.downloadProgressCallback,
105610
+ abortSignal: options?.abortSignal,
105611
+ });
105612
+ const ipcAppOptions = {
105613
+ reportDownloadProgress: !!options?.downloadProgressCallback,
105614
+ downloadProgressInterval: options?.downloadProgressInterval,
105615
+ enableCancellation: !!options?.abortSignal,
105616
+ };
105617
+ try {
105618
+ return this.changeset = await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.pushChanges(this.key, description, ipcAppOptions);
105619
+ }
105620
+ finally {
105621
+ removeListeners();
105622
+ }
105402
105623
  }
105403
105624
  /** The current graphical editing scope, if one is in progress.
105404
105625
  * @see [[enterEditingScope]] to begin graphical editing.
@@ -119047,20 +119268,11 @@ class TentativePoint {
119047
119268
  const vp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_6__.expectDefined)(ev.viewport);
119048
119269
  if (vp.isSnapAdjustmentRequired) {
119049
119270
  _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustPointToACS(point, vp, false);
119050
- const hit = new _HitDetail__WEBPACK_IMPORTED_MODULE_2__.HitDetail({
119051
- testPoint: point,
119052
- viewport: vp,
119053
- hitSource: _HitDetail__WEBPACK_IMPORTED_MODULE_2__.HitSource.TentativeSnap,
119054
- hitPoint: point,
119055
- sourceId: "",
119056
- priority: _HitDetail__WEBPACK_IMPORTED_MODULE_2__.HitPriority.Unknown,
119057
- distXY: 0,
119058
- distFraction: 0,
119059
- });
119060
- const snap = new _HitDetail__WEBPACK_IMPORTED_MODULE_2__.SnapDetail(hit);
119061
- this.setCurrSnap(snap);
119062
- _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustSnapPoint();
119063
- this.setPoint(this.getPoint());
119271
+ // NOTE: Apply similar adjustments as ToolAdmin.adjustSnapPoint for snap that isn't hot with AccuDraw is active...
119272
+ _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustPointToGrid(point, vp);
119273
+ if (!_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.accuDraw.adjustPoint(point, vp, false))
119274
+ _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustPointToACS(point, vp, true);
119275
+ this.setPoint(point);
119064
119276
  }
119065
119277
  else {
119066
119278
  _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.accuDraw.adjustPoint(point, vp, false);
@@ -174130,7 +174342,7 @@ function readPnts(stream, dataOffset, pnts) {
174130
174342
  }
174131
174343
  async function decodeDracoPointCloud(buf) {
174132
174344
  try {
174133
- const dracoLoader = (await __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_3_4__loaders_gl_core_4_3_4_node_modu-4c1fc9").then(() => (__webpack_require__(/*! @loaders.gl/draco */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@4.3.4_@loaders.gl+core@4.3.4/node_modules/@loaders.gl/draco/dist/index.js")))).DracoLoader;
174345
+ const dracoLoader = (await __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_4_5__loaders_gl_core_4_4_5_node_modu-5e3596").then(() => (__webpack_require__(/*! @loaders.gl/draco */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@4.4.5_@loaders.gl+core@4.4.5/node_modules/@loaders.gl/draco/dist/index.js")))).DracoLoader;
174134
174346
  const mesh = await dracoLoader.parse(buf, {});
174135
174347
  if (mesh.topology !== "point-list")
174136
174348
  return undefined;
@@ -186911,7 +187123,7 @@ class GltfReader {
186911
187123
  if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ProcessDetector.isIEBrowser) {
186912
187124
  throw new Error("Unsupported browser for Draco decoding");
186913
187125
  }
186914
- const dracoLoader = (await __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_3_4__loaders_gl_core_4_3_4_node_modu-4c1fc9").then(() => (__webpack_require__(/*! @loaders.gl/draco */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@4.3.4_@loaders.gl+core@4.3.4/node_modules/@loaders.gl/draco/dist/index.js")))).DracoLoader;
187126
+ const dracoLoader = (await __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_4_5__loaders_gl_core_4_4_5_node_modu-5e3596").then(() => (__webpack_require__(/*! @loaders.gl/draco */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@4.4.5_@loaders.gl+core@4.4.5/node_modules/@loaders.gl/draco/dist/index.js")))).DracoLoader;
186915
187127
  await Promise.all(dracoMeshes.map(async (x) => this.decodeDracoMesh(x, dracoLoader)));
186916
187128
  }
186917
187129
  catch (err) {
@@ -186955,8 +187167,10 @@ class GltfReader {
186955
187167
  "draco_wasm_wrapper.js": `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}scripts/draco_wasm_wrapper.js`,
186956
187168
  "draco_decoder.wasm": `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}scripts/draco_decoder.wasm`,
186957
187169
  },
186958
- worker: false,
186959
- useLocalLibraries: true,
187170
+ core: {
187171
+ worker: false,
187172
+ useLocalLibraries: true,
187173
+ },
186960
187174
  });
186961
187175
  if (mesh)
186962
187176
  this._dracoMeshes.set(ext, mesh);
@@ -215007,15 +215221,18 @@ __webpack_require__.r(__webpack_exports__);
215007
215221
 
215008
215222
 
215009
215223
  /**
215010
- * fitPoints and end condition data for [[AkimaCurve3d]]
215224
+ * Data for an [[AkimaCurve3d]]
215011
215225
  * * This is a "typed object" version of the serializer-friendly [[AkimaCurve3dProps]]
215012
- * * Typical use cases rarely require all parameters, so the constructor does not itemize them as parameters.
215013
215226
  * @public
215014
215227
  */
215015
215228
  class AkimaCurve3dOptions {
215229
+ /**
215230
+ * Points that the curve must pass through.
215231
+ * * Traditional DGN-style Akima curves interpret the first two and last two fit points as end tangent conditions,
215232
+ * however as the current implementation uses another interpolation algorithm, there is no such interpretation here.
215233
+ */
215016
215234
  fitPoints;
215017
215235
  /**
215018
- *
215019
215236
  * @param fitPoints points to CAPTURE
215020
215237
  * @param knots array to CAPTURE
215021
215238
  */
@@ -215026,7 +215243,7 @@ class AkimaCurve3dOptions {
215026
215243
  * First and last 2 points are "beyond the end" for control of end slope.
215027
215244
  fitPoints: Point3d[];
215028
215245
 
215029
- /** Clone with strongly typed members reduced to simple json. */
215246
+ /** Clone with strongly typed members reduced to simple json. */
215030
215247
  cloneAsAkimaCurve3dProps() {
215031
215248
  const props = {
215032
215249
  fitPoints: _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.cloneDeepJSONNumberArrays(this.fitPoints),
@@ -215043,24 +215260,25 @@ class AkimaCurve3dOptions {
215043
215260
  const result = new AkimaCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(source.fitPoints));
215044
215261
  return result;
215045
215262
  }
215263
+ /** Whether the two options are equivalent or both undefined. */
215046
215264
  static areAlmostEqual(dataA, dataB) {
215047
215265
  if (dataA === undefined && dataB === undefined)
215048
215266
  return true;
215049
- if (dataA !== undefined && dataB !== undefined) {
215267
+ if (dataA !== undefined && dataB !== undefined)
215050
215268
  return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.almostEqualArrays(dataA.fitPoints, dataB.fitPoints, (a, b) => a.isAlmostEqual(b));
215051
- }
215052
215269
  return false;
215053
215270
  }
215054
215271
  }
215055
215272
  /**
215056
- * Interpolating curve.
215273
+ * Interpolating curve using the Akima formulation.
215057
215274
  * * Derive from [[ProxyCurve]]
215058
215275
  * * Use a [[BSplineCurve3d]] as the proxy
215059
- * *
215276
+ * * Currently the Akima formulation is replaced with a Greville interpolation.
215060
215277
  * @public
215061
215278
  */
215062
215279
  class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyCurve {
215063
- curvePrimitiveType = "interpolationCurve";
215280
+ /** String name for schema properties. */
215281
+ curvePrimitiveType = "akimaCurve";
215064
215282
  _options;
215065
215283
  /** CAPTURE properties and proxy curve. */
215066
215284
  constructor(properties, proxyCurve) {
@@ -215075,9 +215293,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
215075
215293
  return result;
215076
215294
  }
215077
215295
  /**
215078
- * Create an [[AkimaCurve3d]] based on points, knots, and other properties in the [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].
215296
+ * Create an [[AkimaCurve3d]] based on an [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].
215079
215297
  * * This saves a COPY OF the options or props.
215080
- * * Use createCapture () if the options or props can be used without copy
215298
+ * * Use createCapture() if the options or props can be used without copy
215081
215299
  */
215082
215300
  static create(options) {
215083
215301
  let optionsCopy;
@@ -215130,11 +215348,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
215130
215348
  * Transform this [[AkimaCurve3d]] and its defining data in place
215131
215349
  */
215132
215350
  tryTransformInPlace(transform) {
215133
- const proxyOk = this._proxyCurve.tryTransformInPlace(transform);
215134
- if (proxyOk) {
215135
- transform.multiplyPoint3dArray(this._options.fitPoints);
215136
- }
215137
- return proxyOk;
215351
+ this._proxyCurve.tryTransformInPlace(transform);
215352
+ transform.multiplyPoint3dArray(this._options.fitPoints);
215353
+ return true; // we know this succeeds
215138
215354
  }
215139
215355
  /**
215140
215356
  * Find intervals of this CurvePrimitive that are interior to a clipper.
@@ -215156,6 +215372,7 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
215156
215372
  }
215157
215373
  /** Test if `other` is also an [[AkimaCurve3d]] */
215158
215374
  isSameGeometryClass(other) { return other instanceof AkimaCurve3d; }
215375
+ /** Test if this [[AkimaCurve3d]] is almost equal to another GeometryQuery object. */
215159
215376
  isAlmostEqual(other) {
215160
215377
  if (other instanceof AkimaCurve3d) {
215161
215378
  return AkimaCurve3dOptions.areAlmostEqual(this._options, other._options);
@@ -216060,10 +216277,11 @@ class BSplineCurve3d extends BSplineCurve3dBase {
216060
216277
  }
216061
216278
  /**
216062
216279
  * Create a B-spline curve from an Akima curve.
216063
- * @param options collection of points and end conditions.
216280
+ * * The Akima formulation of the curve is currently replaced by a Greville interpolation.
216281
+ * @param options data for construction
216064
216282
  */
216065
216283
  static createFromAkimaCurve3dOptions(options) {
216066
- return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4); // temporary
216284
+ return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4);
216067
216285
  }
216068
216286
  /**
216069
216287
  * Create a B-spline curve with given knots.
@@ -220100,8 +220318,7 @@ class InterpolationCurve3dOptions {
220100
220318
  result._endTangent = source.endTangent ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Vector3d.fromJSON(source.endTangent) : undefined;
220101
220319
  return result;
220102
220320
  }
220103
- // ugh.
220104
- // vector equality test with awkward rule that 000 matches undefined.
220321
+ /** Vector equality test, with the additional rule that the zero vector matches undefined. */
220105
220322
  static areAlmostEqualAllow000AsUndefined(a, b) {
220106
220323
  if (a !== undefined && a.maxAbs() === 0)
220107
220324
  a = undefined;
@@ -220111,6 +220328,7 @@ class InterpolationCurve3dOptions {
220111
220328
  return a.isAlmostEqual(b);
220112
220329
  return a === undefined && b === undefined;
220113
220330
  }
220331
+ /** Whether the two options are equivalent or both undefined. */
220114
220332
  static areAlmostEqual(dataA, dataB) {
220115
220333
  if (dataA === undefined && dataB === undefined)
220116
220334
  return true;
@@ -220159,6 +220377,7 @@ class InterpolationCurve3dOptions {
220159
220377
  * @public
220160
220378
  */
220161
220379
  class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1__.ProxyCurve {
220380
+ /** String name for schema properties. */
220162
220381
  curvePrimitiveType = "interpolationCurve";
220163
220382
  _options;
220164
220383
  /** CAPTURE properties and proxy curve. */
@@ -220231,15 +220450,13 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
220231
220450
  * Transform this [[InterpolationCurve3d]] and its defining data in place
220232
220451
  */
220233
220452
  tryTransformInPlace(transform) {
220234
- const proxyOk = this._proxyCurve.tryTransformInPlace(transform);
220235
- if (proxyOk) {
220236
- transform.multiplyPoint3dArrayInPlace(this._options.fitPoints);
220237
- if (this._options.startTangent)
220238
- transform.multiplyVectorInPlace(this._options.startTangent);
220239
- if (this._options.endTangent)
220240
- transform.multiplyVectorInPlace(this._options.endTangent);
220241
- }
220242
- return proxyOk;
220453
+ this._proxyCurve.tryTransformInPlace(transform);
220454
+ transform.multiplyPoint3dArrayInPlace(this._options.fitPoints);
220455
+ if (this._options.startTangent)
220456
+ transform.multiplyVectorInPlace(this._options.startTangent);
220457
+ if (this._options.endTangent)
220458
+ transform.multiplyVectorInPlace(this._options.endTangent);
220459
+ return true; // we know this succeeds
220243
220460
  }
220244
220461
  /**
220245
220462
  * Find intervals of this CurvePrimitive that are interior to a clipper.
@@ -220259,6 +220476,7 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
220259
220476
  cloneTransformed(transform) {
220260
220477
  return super.cloneTransformed(transform);
220261
220478
  }
220479
+ /** Test if this [[InterpolationCurve3d]] is almost equal to another GeometryQuery object. */
220262
220480
  isAlmostEqual(other) {
220263
220481
  if (other instanceof InterpolationCurve3d) {
220264
220482
  return InterpolationCurve3dOptions.areAlmostEqual(this._options, other._options);
@@ -223707,8 +223925,6 @@ class ClipUtilities {
223707
223925
  if (!worldToLocal)
223708
223926
  return result;
223709
223927
  const localRegion = region.cloneTransformed(worldToLocal); // parallel to xy-plane so we can ignore z
223710
- if (!localRegion)
223711
- return result;
223712
223928
  // We can only clip convex polygons with our clipper machinery, but the input region doesn't have to be
223713
223929
  // convex or even a polygon. We get around this limitation by using a Boolean operation, which admits
223714
223930
  // *any* planar regions, albeit in local coordinates. First, we clip a rectangle that covers the input region
@@ -229344,10 +229560,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
229344
229560
  * @param options how finely to stroke the path to create the distance index
229345
229561
  */
229346
229562
  cloneTransformed(transform, options) {
229347
- const c = this._path.clone();
229348
- if (c.tryTransformInPlace(transform))
229349
- return CurveChainWithDistanceIndex.createCapture(c, options);
229350
- return undefined;
229563
+ return CurveChainWithDistanceIndex.createCapture(this._path.cloneTransformed(transform), options);
229351
229564
  }
229352
229565
  /**
229353
229566
  * Reference to the contained path.
@@ -229368,8 +229581,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
229368
229581
  * @param options how finely to stroke the path to create the distance index
229369
229582
  */
229370
229583
  clone(options) {
229371
- const c = this._path.clone();
229372
- return CurveChainWithDistanceIndex.createCapture(c, options);
229584
+ return CurveChainWithDistanceIndex.createCapture(this._path.clone(), options);
229373
229585
  }
229374
229586
  /**
229375
229587
  * Return a portion of this curve with its own distance index.
@@ -229547,15 +229759,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
229547
229759
  * @return cloned flattened CurveChain, or reference to the input chain if no nesting
229548
229760
  */
229549
229761
  static flattenNestedChains(chain) {
229550
- if (-1 === chain.children.findIndex((child) => { return child instanceof CurveChainWithDistanceIndex; }))
229762
+ if (-1 === chain.children.findIndex((c) => c instanceof CurveChainWithDistanceIndex))
229551
229763
  return chain;
229552
229764
  const flatChain = chain.clone();
229553
- const flatChildren = flatChain.children.flatMap((child) => {
229554
- if (child instanceof CurveChainWithDistanceIndex)
229555
- return child.path.children;
229556
- else
229557
- return [child];
229558
- });
229765
+ const flatChildren = flatChain.children.flatMap((c) => c instanceof CurveChainWithDistanceIndex ? c.path.children : c);
229559
229766
  flatChain.children.splice(0, Infinity, ...flatChildren);
229560
229767
  return flatChain;
229561
229768
  }
@@ -229736,18 +229943,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
229736
229943
  return result;
229737
229944
  }
229738
229945
  /**
229739
- * Attempt to transform in place.
229740
- * * Warning: If any child transform fails, `this` object becomes invalid but that should never happen.
229741
- * @param transform the transform to be applied.
229742
- * @returns true if all of child transforms succeed and false otherwise.
229946
+ * Transform the chain in place.
229947
+ * * Does NOT recompute the distance index.
229948
+ * * For best results, use a rigid transform. Otherwise, it is better to call [[cloneTransformed]] so that the
229949
+ * distance index is recomputed.
229743
229950
  */
229744
229951
  tryTransformInPlace(transform) {
229745
- let numFail = 0;
229746
- for (const c of this._path.children) {
229747
- if (!c.tryTransformInPlace(transform))
229748
- numFail++;
229749
- }
229750
- return numFail === 0;
229952
+ return this._path.tryTransformInPlace(transform);
229751
229953
  }
229752
229954
  /** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */
229753
229955
  reverseInPlace() {
@@ -230050,8 +230252,6 @@ __webpack_require__.r(__webpack_exports__);
230050
230252
  class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__.GeometryQuery {
230051
230253
  /** String name for schema properties */
230052
230254
  geometryCategory = "curveCollection";
230053
- /** Flag for inner loop status. Only used by `Loop`. */
230054
- isInner = false;
230055
230255
  /** Return the sum of the lengths of all contained curves. */
230056
230256
  sumLengths() {
230057
230257
  return _internalContexts_SumLengthsContext__WEBPACK_IMPORTED_MODULE_13__.SumLengthsContext.sumLengths(this);
@@ -230333,6 +230533,21 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__.Geomet
230333
230533
  return undefined;
230334
230534
  }
230335
230535
  ;
230536
+ /**
230537
+ * Ask if the curves of the collection are within tolerance of the input plane.
230538
+ * @returns whether the collection is nonempty and its curves lie within tolerance of the plane.
230539
+ */
230540
+ isInPlane(plane) {
230541
+ if (0 === this.children.length)
230542
+ return false; // punt on empty parent...
230543
+ for (const child of this.children) {
230544
+ if (child instanceof CurveCollection && 0 === child.children.length)
230545
+ continue; // ...but ignore an empty child
230546
+ if (!child.isInPlane(plane))
230547
+ return false;
230548
+ }
230549
+ return true;
230550
+ }
230336
230551
  }
230337
230552
  /**
230338
230553
  * Shared base class for use by both open and closed paths.
@@ -230444,6 +230659,18 @@ class CurveChain extends CurveCollection {
230444
230659
  }
230445
230660
  return undefined;
230446
230661
  }
230662
+ /** Return a deep copy. */
230663
+ clone() {
230664
+ return super.clone();
230665
+ }
230666
+ /** Create a deep copy of transformed curves. */
230667
+ cloneTransformed(transform) {
230668
+ return super.cloneTransformed(transform);
230669
+ }
230670
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
230671
+ cloneWithExpandedLineStrings() {
230672
+ return super.cloneWithExpandedLineStrings();
230673
+ }
230447
230674
  /**
230448
230675
  * Add a child curve.
230449
230676
  * @param child curve to add to the chain. The curve is captured by this instance.
@@ -230574,6 +230801,18 @@ class BagOfCurves extends CurveCollection {
230574
230801
  cloneEmptyPeer() {
230575
230802
  return new BagOfCurves();
230576
230803
  }
230804
+ /** Return a deep copy. */
230805
+ clone() {
230806
+ return super.clone();
230807
+ }
230808
+ /** Create a deep copy of transformed curves. */
230809
+ cloneTransformed(transform) {
230810
+ return super.cloneTransformed(transform);
230811
+ }
230812
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
230813
+ cloneWithExpandedLineStrings() {
230814
+ return super.cloneWithExpandedLineStrings();
230815
+ }
230577
230816
  /** Add a child */
230578
230817
  tryAddChild(child) {
230579
230818
  if (child)
@@ -231565,11 +231804,10 @@ class CurveFactory {
231565
231804
  // The alignment condition is equivalent to positive projected curve area computed wrt to the plane normal.
231566
231805
  const toLocal = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRigidHeadsUp(planeNormal).transpose();
231567
231806
  const projection = closedCurve.cloneTransformed(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__.Transform.createOriginAndMatrix(undefined, toLocal));
231568
- if (projection) { // now we can ignore z-coords
231569
- const areaXY = _RegionOps__WEBPACK_IMPORTED_MODULE_25__.RegionOps.computeXYArea(projection);
231570
- if (areaXY && areaXY < 0)
231571
- curve.reverseInPlace();
231572
- }
231807
+ // now we can ignore z-coords
231808
+ const areaXY = _RegionOps__WEBPACK_IMPORTED_MODULE_25__.RegionOps.computeXYArea(projection);
231809
+ if (areaXY && areaXY < 0)
231810
+ curve.reverseInPlace();
231573
231811
  }
231574
231812
  }
231575
231813
  /**
@@ -232728,9 +232966,9 @@ __webpack_require__.r(__webpack_exports__);
232728
232966
  /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
232729
232967
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
232730
232968
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
232731
- /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
232732
- /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
232733
- /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
232969
+ /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
232970
+ /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
232971
+ /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
232734
232972
  /* harmony import */ var _internalContexts_CurveLengthContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/CurveLengthContext */ "../../core/geometry/lib/esm/curve/internalContexts/CurveLengthContext.js");
232735
232973
  /*---------------------------------------------------------------------------------------------
232736
232974
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -233149,7 +233387,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
233149
233387
  * @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
233150
233388
  */
233151
233389
  closestPoint(spacePoint, extend = false, result) {
233152
- const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.ClosestPointStrokeHandler(spacePoint, extend, result);
233390
+ const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result);
233153
233391
  this.emitStrokableParts(strokeHandler);
233154
233392
  return strokeHandler.claimResult();
233155
233393
  }
@@ -233165,7 +233403,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
233165
233403
  * @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
233166
233404
  */
233167
233405
  closestPointXY(spacePoint, extend = false, result) {
233168
- const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.ClosestPointStrokeHandler(spacePoint, extend, result, true);
233406
+ const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result, true);
233169
233407
  this.emitStrokableParts(strokeHandler);
233170
233408
  return strokeHandler.claimResult();
233171
233409
  }
@@ -233181,7 +233419,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
233181
233419
  * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
233182
233420
  */
233183
233421
  emitTangents(spacePoint, announceTangent, options) {
233184
- const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
233422
+ const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
233185
233423
  this.emitStrokableParts(strokeHandler, options?.strokeOptions);
233186
233424
  }
233187
233425
  /**
@@ -233276,7 +233514,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
233276
233514
  * @returns Return the number of CurveLocationDetail's added to the result array.
233277
233515
  */
233278
233516
  appendPlaneIntersectionPoints(plane, result) {
233279
- const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.AppendPlaneIntersectionStrokeHandler(plane, result);
233517
+ const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AppendPlaneIntersectionStrokeHandler(plane, result);
233280
233518
  const n0 = result.length;
233281
233519
  this.emitStrokableParts(strokeHandler);
233282
233520
  return result.length - n0;
@@ -233474,6 +233712,13 @@ __webpack_require__.r(__webpack_exports__);
233474
233712
  /* harmony export */ RecursiveCurveProcessorWithStack: () => (/* binding */ RecursiveCurveProcessorWithStack)
233475
233713
  /* harmony export */ });
233476
233714
  /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
233715
+ /*---------------------------------------------------------------------------------------------
233716
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
233717
+ * See LICENSE.md in the project root for license terms and full copyright notice.
233718
+ *--------------------------------------------------------------------------------------------*/
233719
+ /** @packageDocumentation
233720
+ * @module Curve
233721
+ */
233477
233722
 
233478
233723
  /** base class for detailed traversal of curve artifacts.
233479
233724
  * * This recurses to children in the quickest way (no records of path)
@@ -233509,7 +233754,10 @@ class RecursiveCurveProcessor {
233509
233754
  announceUnionRegion(data, _indexInParent = -1) {
233510
233755
  let i = 0;
233511
233756
  for (const child of data.children) {
233512
- child.announceToCurveProcessor(this, i++);
233757
+ if (child.curveCollectionType === "loop")
233758
+ this.announceLoop(child, i++);
233759
+ else
233760
+ this.announceParityRegion(child, i++);
233513
233761
  }
233514
233762
  }
233515
233763
  /** announce a bag of curves.
@@ -233571,9 +233819,15 @@ class RecursiveCurveProcessorWithStack extends RecursiveCurveProcessor {
233571
233819
  this.leave();
233572
233820
  }
233573
233821
  /** announce beginning or end of a parity region */
233574
- announceUnionRegion(data, indexInParent = -1) {
233822
+ announceUnionRegion(data, _indexInParent = -1) {
233575
233823
  this.enter(data);
233576
- super.announceUnionRegion(data, indexInParent);
233824
+ let i = 0;
233825
+ for (const child of data.children) {
233826
+ if (child.curveCollectionType === "loop")
233827
+ this.announceLoop(child, i++);
233828
+ else
233829
+ this.announceParityRegion(child, i++);
233830
+ }
233577
233831
  this.leave();
233578
233832
  }
233579
233833
  /**
@@ -233695,8 +233949,10 @@ __webpack_require__.r(__webpack_exports__);
233695
233949
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
233696
233950
  /* harmony export */ GeometryQuery: () => (/* binding */ GeometryQuery)
233697
233951
  /* harmony export */ });
233698
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
233699
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
233952
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
233953
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
233954
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
233955
+
233700
233956
 
233701
233957
 
233702
233958
  /**
@@ -233710,13 +233966,13 @@ class GeometryQuery {
233710
233966
  range(transform, result) {
233711
233967
  if (result)
233712
233968
  result.setNull();
233713
- const range = result ? result : _geometry3d_Range__WEBPACK_IMPORTED_MODULE_0__.Range3d.createNull();
233969
+ const range = result ? result : _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
233714
233970
  this.extendRange(range, transform);
233715
233971
  return range;
233716
233972
  }
233717
233973
  /** Try to move the geometry by dx,dy,dz. */
233718
233974
  tryTranslateInPlace(dx, dy = 0.0, dz = 0.0) {
233719
- return this.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslationXYZ(dx, dy, dz));
233975
+ return this.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createTranslationXYZ(dx, dy, dz));
233720
233976
  }
233721
233977
  /**
233722
233978
  * Return GeometryQuery children for recursive queries.
@@ -233766,6 +234022,57 @@ class GeometryQuery {
233766
234022
  return true;
233767
234023
  return false;
233768
234024
  }
234025
+ /**
234026
+ * Compute a distance tolerance appropriate for comparing the coordinates of `geom`.
234027
+ * * The formula is `absTol = minTol + relTol * geomSize`, where `geomSize` is the largest absolute coordinate of
234028
+ * the geometry range.
234029
+ * * Scaling tolerances by geometry size helps account for the decreased floating point resolution between large
234030
+ * coordinates. While using such scaled tolerances can enable more tolerance-sensitive constructions to succeed on
234031
+ * far-flung geometries, on extremely small geometries at extremely large coordinate magnitudes, geometric
234032
+ * constructions are generally more accurate when applied to the geometry temporarily translated to the origin.
234033
+ * @param geom geometry to measure
234034
+ * @param options bundle of options
234035
+ * @returns the computed absolute tolerance
234036
+ * @see [[scaleToleranceForGeometry]]
234037
+ */
234038
+ static computeScaledTolerance(geom, options) {
234039
+ const relTol = Math.abs(options?.relativeTolerance ?? _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance);
234040
+ const minTol = Math.abs(options?.minimumTolerance ?? _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistanceSquared);
234041
+ const geomRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
234042
+ (Array.isArray(geom) ? geom : [geom]).forEach((g) => g.extendRange(geomRange, options?.transform));
234043
+ const geomSize = geomRange.isNull ? 0 : options?.xyOnly ? geomRange.maxAbsXY() : geomRange.maxAbs();
234044
+ return minTol + relTol * geomSize;
234045
+ }
234046
+ /**
234047
+ * Scale the given distance tolerance as appropriate for comparing the coordinates of `geom`.
234048
+ * * Scaling tolerances by geometry size helps account for the decreased floating point resolution between large
234049
+ * coordinates. While using such scaled tolerances can enable more tolerance-sensitive constructions to succeed on
234050
+ * far-flung geometries, on extremely small geometries at extremely large coordinate magnitudes, geometric
234051
+ * constructions are generally more accurate when applied to the geometry temporarily translated to the origin.
234052
+ * @param geom geometry to measure
234053
+ * @param distanceTolerance positive input distance tolerance to examine
234054
+ * @param options bundle of options (`minimumTolerance` and `relativeTolerance` are ignored)
234055
+ * @return a distance tolerance >= `distanceTolerance`
234056
+ * @see [[computeScaledTolerance]]
234057
+ */
234058
+ static scaleToleranceForGeometry(geom, distanceTolerance, options) {
234059
+ if (distanceTolerance > 0) {
234060
+ const geomRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
234061
+ (Array.isArray(geom) ? geom : [geom]).forEach((g) => g.extendRange(geomRange, options?.transform));
234062
+ if (!geomRange.isNull) {
234063
+ const geomSize = options?.xyOnly ? geomRange.maxAbsXY() : geomRange.maxAbs();
234064
+ if (geomSize > 0) {
234065
+ // HEURISTIC: truncate the fractional part of a coordinate's base-10 significand to maxDigits digits.
234066
+ // Adding the tolerance to this number should change the significand; otherwise, it's too small.
234067
+ const maxDigits = 10; // comfortably far from IEEE double's 15 guaranteed fractional digits
234068
+ const requiredDigitsForTol = Math.floor(Math.log10(geomSize / distanceTolerance));
234069
+ if (requiredDigitsForTol > maxDigits)
234070
+ distanceTolerance *= Math.pow(10, requiredDigitsForTol - maxDigits);
234071
+ }
234072
+ }
234073
+ }
234074
+ return distanceTolerance;
234075
+ }
233769
234076
  }
233770
234077
 
233771
234078
 
@@ -234126,7 +234433,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__.CurveP
234126
234433
  this._point0 = this._point1;
234127
234434
  this._point1 = a;
234128
234435
  }
234129
- /** Transform the two endpoints of this LinSegment. */
234436
+ /** Transform the two endpoints of this line segment. */
234130
234437
  tryTransformInPlace(transform) {
234131
234438
  this._point0 = transform.multiplyPoint3d(this._point0, this._point0);
234132
234439
  this._point1 = transform.multiplyPoint3d(this._point1, this._point1);
@@ -235941,12 +236248,19 @@ __webpack_require__.r(__webpack_exports__);
235941
236248
  class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
235942
236249
  /** String name for schema properties */
235943
236250
  curveCollectionType = "loop";
235944
- /** Tag value that can be set to true for user code to mark inner and outer loops. */
236251
+ /**
236252
+ * Flag for inner loop status (default value is `false`).
236253
+ * * Typical usage is to set to `true` on hole `Loop`s in a `ParityRegion` to distinguish them from the outer `Loop`.
236254
+ * * This property is only set by the user, and does not affect region processing.
236255
+ * * This property is propagated through [[clone]] and JSON/FlatBuffer de/serialization.
236256
+ * * For best de/serialization results, avoid setting to `false` on multiple `Loop`s of a `ParityRegion`.
236257
+ */
235945
236258
  isInner = false;
235946
236259
  /** Test if `other` is a `Loop` */
235947
236260
  isSameGeometryClass(other) {
235948
236261
  return other instanceof Loop;
235949
236262
  }
236263
+ /** Construct an empty loop. */
235950
236264
  constructor() {
235951
236265
  super();
235952
236266
  }
@@ -236016,10 +236330,28 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
236016
236330
  emptyClone.isInner = this.isInner;
236017
236331
  return emptyClone;
236018
236332
  }
236333
+ /** Return a deep copy. */
236334
+ clone() {
236335
+ return super.clone();
236336
+ }
236337
+ /** Create a deep copy of transformed curves. */
236338
+ cloneTransformed(transform) {
236339
+ return super.cloneTransformed(transform);
236340
+ }
236341
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
236342
+ cloneWithExpandedLineStrings() {
236343
+ return super.cloneWithExpandedLineStrings();
236344
+ }
236019
236345
  /** Second step of double dispatch: call `handler.handleLoop(this)` */
236020
236346
  dispatchToGeometryHandler(handler) {
236021
236347
  return handler.handleLoop(this);
236022
236348
  }
236349
+ /** Test for near equality */
236350
+ isAlmostEqual(other) {
236351
+ if (!super.isAlmostEqual(other))
236352
+ return false;
236353
+ return this.isInner === other.isInner;
236354
+ }
236023
236355
  }
236024
236356
  /**
236025
236357
  * Structure carrying a pair of loops with curve geometry.
@@ -236327,14 +236659,15 @@ class ParityRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCo
236327
236659
  }
236328
236660
  /** Return a deep copy. */
236329
236661
  clone() {
236330
- const clone = new ParityRegion();
236331
- let child;
236332
- for (child of this.children) {
236333
- const childClone = child.clone();
236334
- if (childClone instanceof _Loop__WEBPACK_IMPORTED_MODULE_1__.Loop)
236335
- clone.children.push(childClone);
236336
- }
236337
- return clone;
236662
+ return super.clone();
236663
+ }
236664
+ /** Create a deep copy of transformed curves. */
236665
+ cloneTransformed(transform) {
236666
+ return super.cloneTransformed(transform);
236667
+ }
236668
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
236669
+ cloneWithExpandedLineStrings() {
236670
+ return super.cloneWithExpandedLineStrings();
236338
236671
  }
236339
236672
  /** Stroke these curves into a new ParityRegion. */
236340
236673
  cloneStroked(options) {
@@ -236463,6 +236796,18 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_2__.CurveChain {
236463
236796
  cloneEmptyPeer() {
236464
236797
  return new Path();
236465
236798
  }
236799
+ /** Return a deep copy. */
236800
+ clone() {
236801
+ return super.clone();
236802
+ }
236803
+ /** Create a deep copy of transformed curves. */
236804
+ cloneTransformed(transform) {
236805
+ return super.cloneTransformed(transform);
236806
+ }
236807
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
236808
+ cloneWithExpandedLineStrings() {
236809
+ return super.cloneWithExpandedLineStrings();
236810
+ }
236466
236811
  /** Second step of double dispatch: call `handler.handlePath(this)` */
236467
236812
  dispatchToGeometryHandler(handler) {
236468
236813
  return handler.handlePath(this);
@@ -236738,9 +237083,8 @@ class ProxyCurve extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.Curv
236738
237083
  /** Return a transformed clone. */
236739
237084
  cloneTransformed(transform) {
236740
237085
  const myClone = this.clone();
236741
- if (myClone.tryTransformInPlace(transform))
236742
- return myClone;
236743
- return undefined;
237086
+ myClone.tryTransformInPlace(transform);
237087
+ return myClone;
236744
237088
  }
236745
237089
  /** Implement by proxyCurve. Subclasses may eventually override this default implementation. */
236746
237090
  clonePartialCurve(fractionA, fractionB) {
@@ -237409,8 +237753,8 @@ __webpack_require__.r(__webpack_exports__);
237409
237753
 
237410
237754
 
237411
237755
 
237412
- /** @packageDocumentation
237413
- * @module Curve
237756
+ /**
237757
+ * @internal
237414
237758
  */
237415
237759
  class MapCurvePrimitiveToCurveLocationDetailPairArray {
237416
237760
  primitiveToPair = new Map();
@@ -237480,7 +237824,7 @@ class PlanarSubdivision {
237480
237824
  * @param allPairs array of curve-curve xy-intersections
237481
237825
  * @param mergeTolerance optional distance tolerance for clustering vertices. Default value is [[Geometry.smallMetricDistance]].
237482
237826
  */
237483
- static assembleHalfEdgeGraph(primitives, allPairs, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
237827
+ static assembleHalfEdgeGraph(primitives, allPairs, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance, radianTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians) {
237484
237828
  // map from key CurvePrimitive to CurveLocationDetailPair
237485
237829
  const detailByPrimitive = new MapCurvePrimitiveToCurveLocationDetailPairArray();
237486
237830
  for (const pair of allPairs)
@@ -237528,7 +237872,7 @@ class PlanarSubdivision {
237528
237872
  this.addHalfEdge(graph, p, last.point, last.fraction, p.endPoint(), 1.0, mergeTolerance);
237529
237873
  }
237530
237874
  // every edge got its sortAngle defined by addHalfEdge
237531
- _topology_Merging__WEBPACK_IMPORTED_MODULE_5__.HalfEdgeGraphMerge.clusterAndMergeXYTheta(graph, (he) => he.sortAngle ?? 0, mergeTolerance);
237875
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_5__.HalfEdgeGraphMerge.clusterAndMergeXYTheta(graph, (he) => he.sortAngle ?? 0, mergeTolerance, radianTolerance);
237532
237876
  return graph;
237533
237877
  }
237534
237878
  /**
@@ -238809,8 +239153,6 @@ class RegionOps {
238809
239153
  const worldToLocal = localToWorld.inverse();
238810
239154
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(worldToLocal !== undefined, "FrameBuilder's transform is invertible");
238811
239155
  regionXY = region.cloneTransformed(worldToLocal);
238812
- if (!regionXY)
238813
- return undefined;
238814
239156
  }
238815
239157
  const momentData = RegionOps.computeXYAreaMoments(regionXY);
238816
239158
  if (!momentData)
@@ -239673,6 +240015,7 @@ class RegionOps {
239673
240015
  * to the edge and a constituent curve in each.
239674
240016
  */
239675
240017
  static constructAllXYRegionLoops(curvesAndRegions, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance, addBridges = true) {
240018
+ tolerance = _GeometryQuery__WEBPACK_IMPORTED_MODULE_25__.GeometryQuery.scaleToleranceForGeometry(curvesAndRegions, tolerance, { xyOnly: true });
239676
240019
  let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
239677
240020
  primitives = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_28__.TransferWithSplitArcs.clone(_CurveCollection__WEBPACK_IMPORTED_MODULE_19__.BagOfCurves.create(...primitives)).children;
239678
240021
  let hasOpenCurve = false;
@@ -239695,8 +240038,9 @@ class RegionOps {
239695
240038
  });
239696
240039
  }
239697
240040
  }
240041
+ const radianTolerance = 10000 * _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians; // be generous, and rely on curvature to break ties
239698
240042
  const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_20__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
239699
- const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_38__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
240043
+ const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_38__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance, radianTolerance);
239700
240044
  if (addBridges && hasOpenCurve)
239701
240045
  RegionOps.removeExtraneousBridgeEdges(graph);
239702
240046
  const areaTol = this.computeMinimumArea(tolerance);
@@ -241037,6 +241381,18 @@ class UnionRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCol
241037
241381
  cloneEmptyPeer() {
241038
241382
  return new UnionRegion();
241039
241383
  }
241384
+ /** Return a deep copy. */
241385
+ clone() {
241386
+ return super.clone();
241387
+ }
241388
+ /** Create a deep copy of transformed curves. */
241389
+ cloneTransformed(transform) {
241390
+ return super.cloneTransformed(transform);
241391
+ }
241392
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
241393
+ cloneWithExpandedLineStrings() {
241394
+ return super.cloneWithExpandedLineStrings();
241395
+ }
241040
241396
  /**
241041
241397
  * Try to add a child (by capturing it).
241042
241398
  * * Returns false if the `AnyCurve` child is not a region type.
@@ -241649,6 +242005,7 @@ __webpack_require__.r(__webpack_exports__);
241649
242005
  * Algorithmic class for cloning curve collections.
241650
242006
  * * recurse through collection nodes, building image nodes as needed and inserting clones of children.
241651
242007
  * * for individual primitive, invoke doClone (protected) for direct clone; insert into parent
242008
+ * @internal
241652
242009
  */
241653
242010
  class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessorWithStack {
241654
242011
  _result;
@@ -241687,7 +242044,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
241687
242044
  const c = this.doClone(primitive);
241688
242045
  if (c !== undefined && this._stack.length > 0) {
241689
242046
  const parent = this._stack[this._stack.length - 1];
241690
- if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves)
242047
+ if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves) {
241691
242048
  if (Array.isArray(c)) {
241692
242049
  for (const c1 of c) {
241693
242050
  parent.tryAddChild(c1);
@@ -241696,6 +242053,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
241696
242053
  else {
241697
242054
  parent.tryAddChild(c);
241698
242055
  }
242056
+ }
241699
242057
  }
241700
242058
  }
241701
242059
  }
@@ -247523,26 +247881,34 @@ __webpack_require__.r(__webpack_exports__);
247523
247881
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
247524
247882
  /* harmony export */ TransformInPlaceContext: () => (/* binding */ TransformInPlaceContext)
247525
247883
  /* harmony export */ });
247526
- /* harmony import */ var _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CurveProcessor */ "../../core/geometry/lib/esm/curve/CurveProcessor.js");
247884
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
247885
+ /* harmony import */ var _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../CurveProcessor */ "../../core/geometry/lib/esm/curve/CurveProcessor.js");
247886
+ /*---------------------------------------------------------------------------------------------
247887
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
247888
+ * See LICENSE.md in the project root for license terms and full copyright notice.
247889
+ *--------------------------------------------------------------------------------------------*/
247890
+ /** @packageDocumentation
247891
+ * @module Curve
247892
+ */
247527
247893
 
247528
- /** Algorithmic class: Transform curves in place.
247894
+
247895
+ /** Algorithmic class: Transform curves in place. Always expected to succeed.
247529
247896
  * @internal
247530
247897
  */
247531
- class TransformInPlaceContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__.RecursiveCurveProcessor {
247532
- numFail;
247533
- numOK;
247898
+ class TransformInPlaceContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessor {
247534
247899
  transform;
247535
- constructor(transform) { super(); this.numFail = 0; this.numOK = 0; this.transform = transform; }
247900
+ constructor(transform) {
247901
+ super();
247902
+ this.transform = transform;
247903
+ }
247536
247904
  static tryTransformInPlace(target, transform) {
247537
247905
  const context = new TransformInPlaceContext(transform);
247538
247906
  target.announceToCurveProcessor(context);
247539
- return context.numFail === 0;
247907
+ return true;
247540
247908
  }
247541
247909
  announceCurvePrimitive(curvePrimitive, _indexInParent) {
247542
247910
  if (!curvePrimitive.tryTransformInPlace(this.transform))
247543
- this.numFail++;
247544
- else
247545
- this.numOK++;
247911
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "TransformInPlaceContext: unexpected failure of tryTransformInPlace");
247546
247912
  }
247547
247913
  }
247548
247914
 
@@ -250978,9 +251344,12 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_13__.T
250978
251344
  clone() {
250979
251345
  return new DirectSpiral3d(this.localToWorld.clone(), this._spiralType, this.designProperties?.clone(), this._nominalL1, this._nominalR1, this._activeFractionInterval?.clone(), this._evaluator.clone());
250980
251346
  }
250981
- /** Apply `transform` to this spiral's local to world transform. */
250982
- tryTransformInPlace(transformA) {
250983
- const rigidData = this.applyRigidPartOfTransform(transformA);
251347
+ /**
251348
+ * Apply `transform` to this spiral's local to world transform.
251349
+ * * Only the rigid part of the transform is applied.
251350
+ */
251351
+ tryTransformInPlace(transform) {
251352
+ const rigidData = this.applyRigidPartOfTransform(transform);
250984
251353
  if (rigidData !== undefined) {
250985
251354
  this._nominalL1 *= rigidData.scale;
250986
251355
  this._nominalR1 *= rigidData.scale;
@@ -251385,9 +251754,12 @@ class IntegratedSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15
251385
251754
  clone() {
251386
251755
  return new IntegratedSpiral3d(this._spiralType, this._evaluator, this.radius01.clone(), this.bearing01.clone(), this.activeFractionInterval.clone(), this.localToWorld.clone(), this._arcLength01, this._designProperties?.clone());
251387
251756
  }
251388
- /** Apply `transform` to this spiral's local to world transform. */
251389
- tryTransformInPlace(transformA) {
251390
- const rigidData = this.applyRigidPartOfTransform(transformA);
251757
+ /**
251758
+ * Apply `transform` to this spiral's local to world transform.
251759
+ * * Only the rigid part of the transform is applied.
251760
+ */
251761
+ tryTransformInPlace(transform) {
251762
+ const rigidData = this.applyRigidPartOfTransform(transform);
251391
251763
  if (rigidData !== undefined) {
251392
251764
  this._curvature01.x0 /= rigidData.scale;
251393
251765
  this._curvature01.x1 /= rigidData.scale;
@@ -265619,6 +265991,10 @@ class XYZ {
265619
265991
  maxAbs() {
265620
265992
  return Math.max(Math.abs(this.x), Math.abs(this.y), Math.abs(this.z));
265621
265993
  }
265994
+ /** Return the larger absolute value of the x and y components */
265995
+ maxAbsXY() {
265996
+ return Math.max(Math.abs(this.x), Math.abs(this.y));
265997
+ }
265622
265998
  /** Return the sqrt of the sum of squared x,y,z parts */
265623
265999
  magnitude() {
265624
266000
  return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
@@ -271424,6 +271800,12 @@ class Range3d extends RangeBase {
271424
271800
  return 0.0;
271425
271801
  return Math.max(this.low.maxAbs(), this.high.maxAbs());
271426
271802
  }
271803
+ /** Return the largest absolute value among the x and y coordinates in the box corners. */
271804
+ maxAbsXY() {
271805
+ if (this.isNull)
271806
+ return 0.0;
271807
+ return Math.max(this.low.maxAbsXY(), this.high.maxAbsXY());
271808
+ }
271427
271809
  /** Returns true if the x direction size is nearly zero */
271428
271810
  get isAlmostZeroX() {
271429
271811
  return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.xLength());
@@ -290587,9 +290969,9 @@ class PolyfaceQuery {
290587
290969
  let normalCounter = 0;
290588
290970
  for (visitor.reset(); visitor.moveToNextFacet();) {
290589
290971
  const numEdges = visitor.pointCount - 1;
290590
- const normal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_14__.PolygonOps.centroidAreaNormal(visitor.point);
290972
+ const normal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_14__.PolygonOps.areaNormalGo(visitor.point);
290591
290973
  if (normal === undefined)
290592
- return -2;
290974
+ continue; // skip degenerate facets
290593
290975
  facetNormals.push(normal);
290594
290976
  for (let i = 0; i < numEdges; i++) {
290595
290977
  const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
@@ -290622,8 +291004,8 @@ class PolyfaceQuery {
290622
291004
  else {
290623
291005
  edgeVector.setFrom(sideA.edgeVector);
290624
291006
  }
290625
- const facetNormalA = facetNormals[sideA.facetIndex].direction;
290626
- const facetNormalB = facetNormals[sideB.facetIndex].direction;
291007
+ const facetNormalA = facetNormals[sideA.facetIndex];
291008
+ const facetNormalB = facetNormals[sideB.facetIndex];
290627
291009
  const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
290628
291010
  if (dihedralAngle.isAlmostZero)
290629
291011
  numPlanar++;
@@ -302325,8 +302707,11 @@ function nullToUndefined(data) {
302325
302707
  function createTypedCurveCollection(collectionType) {
302326
302708
  if (collectionType === 1)
302327
302709
  return new _curve_Path__WEBPACK_IMPORTED_MODULE_14__.Path();
302328
- if (collectionType === 2 || collectionType === 3)
302329
- return new _curve_Loop__WEBPACK_IMPORTED_MODULE_12__.Loop();
302710
+ if (collectionType === 2 || collectionType === 3) {
302711
+ const loop = new _curve_Loop__WEBPACK_IMPORTED_MODULE_12__.Loop();
302712
+ loop.isInner = collectionType === 3;
302713
+ return loop;
302714
+ }
302330
302715
  if (collectionType === 4)
302331
302716
  return new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_13__.ParityRegion();
302332
302717
  if (collectionType === 5)
@@ -302560,9 +302945,8 @@ class BGFBWriter {
302560
302945
  let cvType = 0;
302561
302946
  if (cv instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path)
302562
302947
  cvType = 1;
302563
- else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop) {
302948
+ else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
302564
302949
  cvType = cv.isInner ? 3 : 2;
302565
- }
302566
302950
  else if (cv instanceof _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion)
302567
302951
  cvType = 4;
302568
302952
  else if (cv instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_21__.UnionRegion)
@@ -303768,16 +304152,17 @@ var IModelJson;
303768
304152
  return undefined;
303769
304153
  }
303770
304154
  /** parse contents of a curve collection to a CurveCollection instance */
303771
- static parseCurveCollectionMembers(result, data) {
303772
- if (data && Array.isArray(data)) {
303773
- for (const c of data) {
303774
- const g = Reader.parse(c);
303775
- if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_11__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
303776
- result.tryAddChild(g);
303777
- }
303778
- return result;
304155
+ static parseCurveCollectionMembers(result, data, isInner = false) {
304156
+ if (!data || !Array.isArray(data))
304157
+ return undefined;
304158
+ for (const c of data) {
304159
+ const g = Reader.parse(c);
304160
+ if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_11__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
304161
+ result.tryAddChild(g);
303779
304162
  }
303780
- return undefined;
304163
+ if (isInner && result instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
304164
+ result.isInner = true;
304165
+ return result;
303781
304166
  }
303782
304167
  /** Parse content of `bsurf` to BSplineSurface3d or BSplineSurface3dH */
303783
304168
  static parseBsurf(data) {
@@ -303995,7 +304380,7 @@ var IModelJson;
303995
304380
  return Reader.parseCurveCollectionMembers(new _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path(), json.path);
303996
304381
  }
303997
304382
  else if (json.hasOwnProperty("loop")) {
303998
- return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop);
304383
+ return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop, json.hasOwnProperty("isInner") && true === json.isInner);
303999
304384
  }
304000
304385
  else if (json.hasOwnProperty("parityRegion")) {
304001
304386
  return Reader.parseCurveCollectionMembers(new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion(), json.parityRegion);
@@ -304321,7 +304706,7 @@ var IModelJson;
304321
304706
  }
304322
304707
  /** Convert strongly typed instance to tagged json */
304323
304708
  handleLoop(data) {
304324
- return { loop: this.collectChildren(data) };
304709
+ return { loop: this.collectChildren(data), isInner: data.isInner ? true : undefined };
304325
304710
  }
304326
304711
  /** Convert strongly typed instance to tagged json */
304327
304712
  handleParityRegion(data) {
@@ -304337,12 +304722,10 @@ var IModelJson;
304337
304722
  }
304338
304723
  collectChildren(data) {
304339
304724
  const children = [];
304340
- if (data.children && Array.isArray(data.children)) {
304341
- for (const child of data.children) {
304342
- const cdata = child.dispatchToGeometryHandler(this);
304343
- if (cdata)
304344
- children.push(cdata);
304345
- }
304725
+ for (const child of data.children) {
304726
+ const cdata = child.dispatchToGeometryHandler(this);
304727
+ if (cdata)
304728
+ children.push(cdata);
304346
304729
  }
304347
304730
  return children;
304348
304731
  }
@@ -312160,16 +312543,17 @@ __webpack_require__.r(__webpack_exports__);
312160
312543
  /* harmony export */ VertexNeighborhoodSortData: () => (/* binding */ VertexNeighborhoodSortData)
312161
312544
  /* harmony export */ });
312162
312545
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
312163
- /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
312164
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
312165
- /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
312166
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
312167
- /* harmony import */ var _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../numerics/ClusterableArray */ "../../core/geometry/lib/esm/numerics/ClusterableArray.js");
312168
- /* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
312169
- /* harmony import */ var _Graph__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
312170
- /* harmony import */ var _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./HalfEdgePriorityQueue */ "../../core/geometry/lib/esm/topology/HalfEdgePriorityQueue.js");
312171
- /* harmony import */ var _RegularizeFace__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
312172
- /* harmony import */ var _Triangulation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
312546
+ /* harmony import */ var _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
312547
+ /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
312548
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
312549
+ /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
312550
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
312551
+ /* harmony import */ var _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../numerics/ClusterableArray */ "../../core/geometry/lib/esm/numerics/ClusterableArray.js");
312552
+ /* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
312553
+ /* harmony import */ var _Graph__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
312554
+ /* harmony import */ var _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./HalfEdgePriorityQueue */ "../../core/geometry/lib/esm/topology/HalfEdgePriorityQueue.js");
312555
+ /* harmony import */ var _RegularizeFace__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
312556
+ /* harmony import */ var _Triangulation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
312173
312557
  /*---------------------------------------------------------------------------------------------
312174
312558
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
312175
312559
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -312188,6 +312572,7 @@ __webpack_require__.r(__webpack_exports__);
312188
312572
 
312189
312573
 
312190
312574
 
312575
+
312191
312576
  // cspell:word XYUV
312192
312577
  class GraphSplitData {
312193
312578
  numUpEdge = 0;
@@ -312249,11 +312634,11 @@ class HalfEdgeGraphOps {
312249
312634
  * @param targetB target vertex of second vector
312250
312635
  */
312251
312636
  static crossProductToTargets(base, targetA, targetB) {
312252
- return _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.crossProductXYXY(targetA.x - base.x, targetA.y - base.y, targetB.x - base.x, targetB.y - base.y);
312637
+ return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(targetA.x - base.x, targetA.y - base.y, targetB.x - base.x, targetB.y - base.y);
312253
312638
  }
312254
312639
  /** Compute the range of the graph's vertices. */
312255
312640
  static graphRange(graph) {
312256
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.create();
312641
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__.Range3d.create();
312257
312642
  for (const node of graph.allHalfEdges) {
312258
312643
  range.extendXYZ(node.x, node.y, node.z);
312259
312644
  }
@@ -312261,7 +312646,7 @@ class HalfEdgeGraphOps {
312261
312646
  }
312262
312647
  /** Compute the xy-range of the graph's vertices. */
312263
312648
  static graphRangeXY(graph) {
312264
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range2d.createNull();
312649
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__.Range2d.createNull();
312265
312650
  for (const node of graph.allHalfEdges) {
312266
312651
  range.extendXY(node.x, node.y);
312267
312652
  }
@@ -312291,7 +312676,7 @@ class HalfEdgeGraphOps {
312291
312676
  static isolateAllEdges(graph) {
312292
312677
  for (const nodeA of graph.allHalfEdges) {
312293
312678
  const nodeB = nodeA.vertexPredecessor;
312294
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA, nodeB);
312679
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA, nodeB);
312295
312680
  }
312296
312681
  }
312297
312682
  /**
@@ -312319,7 +312704,7 @@ class HalfEdgeGraphOps {
312319
312704
  } while (vp !== base && vp.isMaskSet(ignore));
312320
312705
  if (vp === base)
312321
312706
  return false;
312322
- return _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.isSectorConvex(vs.edgeMate, base, vp.faceSuccessor, signedAreaTol);
312707
+ return _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.isSectorConvex(vs.edgeMate, base, vp.faceSuccessor, signedAreaTol);
312323
312708
  }
312324
312709
  /**
312325
312710
  * Mask edges between faces if the union of the faces is convex.
@@ -312330,8 +312715,8 @@ class HalfEdgeGraphOps {
312330
312715
  * @param barrier edges with this mask (on either side) will not be marked. Defaults to HalfEdgeMask.BOUNDARY_EDGE.
312331
312716
  * @return number of edges masked (half the number of HalfEdges masked)
312332
312717
  */
312333
- static markRemovableEdgesToExpandConvexFaces(graph, mark, barrier = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE) {
312334
- if (_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_MASK === mark)
312718
+ static markRemovableEdgesToExpandConvexFaces(graph, mark, barrier = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE) {
312719
+ if (_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_MASK === mark)
312335
312720
  return 0;
312336
312721
  const visit = graph.grabMask(true);
312337
312722
  let numMarked = 0;
@@ -312339,7 +312724,7 @@ class HalfEdgeGraphOps {
312339
312724
  if (!node.isMaskSet(visit)) {
312340
312725
  if (!node.isMaskSet(barrier) && !node.edgeMate.isMaskSet(barrier)) {
312341
312726
  // tol based on areas of *original* faces on each side of the edge to be removed
312342
- const signedAreaTol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistanceSquared * (node.signedFaceArea() + node.edgeMate.signedFaceArea());
312727
+ const signedAreaTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistanceSquared * (node.signedFaceArea() + node.edgeMate.signedFaceArea());
312343
312728
  if (this.isSectorConvexAfterEdgeRemoval(node, mark, barrier, signedAreaTol) && this.isSectorConvexAfterEdgeRemoval(node.edgeMate, mark, barrier, signedAreaTol)) {
312344
312729
  node.setMaskAroundEdge(mark);
312345
312730
  ++numMarked;
@@ -312359,7 +312744,7 @@ class HalfEdgeGraphOps {
312359
312744
  * @param barrier edges with this mask (on either side) will not be collected. Defaults to HalfEdgeMask.BOUNDARY_EDGE.
312360
312745
  * @return one HalfEdge per removable edge
312361
312746
  */
312362
- static collectRemovableEdgesToExpandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE) {
312747
+ static collectRemovableEdgesToExpandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE) {
312363
312748
  const removable = [];
312364
312749
  const mark = graph.grabMask(true);
312365
312750
  if (0 < this.markRemovableEdgesToExpandConvexFaces(graph, mark, barrier)) {
@@ -312383,7 +312768,7 @@ class HalfEdgeGraphOps {
312383
312768
  * @param barrier edges with this mask (on either side) will not be removed. Defaults to HalfEdgeMask.BOUNDARY_EDGE.
312384
312769
  * @return number of edges deleted
312385
312770
  */
312386
- static expandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE) {
312771
+ static expandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE) {
312387
312772
  const mark = graph.grabMask(true);
312388
312773
  const numRemovedEdges = this.markRemovableEdgesToExpandConvexFaces(graph, mark, barrier);
312389
312774
  if (numRemovedEdges > 0) {
@@ -312399,7 +312784,7 @@ class HalfEdgeGraphOps {
312399
312784
  * @param avoid faces with this mask will not be examined. Defaults to HalfEdgeMask.EXTERIOR.
312400
312785
  * @return whether every face in the graph is convex
312401
312786
  */
312402
- static isEveryFaceConvex(graph, avoid = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.EXTERIOR) {
312787
+ static isEveryFaceConvex(graph, avoid = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.EXTERIOR) {
312403
312788
  const allFaces = graph.collectFaceLoops();
312404
312789
  for (const node of allFaces) {
312405
312790
  if (node.isMaskedAroundFace(avoid))
@@ -312418,12 +312803,12 @@ class HalfEdgeGraphMerge {
312418
312803
  // return kC such that all angles k are equal, with kA <= k < kC <= kB.
312419
312804
  // * Assume: angles k are stored at extra data index 0.
312420
312805
  // * Note that the usual case (when angle at kA is not repeated) is kA+1 === kC
312421
- static getCommonThetaEndIndex(clusters, order, kA, kB) {
312806
+ static getCommonThetaEndIndex(clusters, order, kA, kB, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians) {
312422
312807
  let kC = kA + 1;
312423
312808
  const thetaA = clusters.getExtraData(order[kA], 0);
312424
312809
  while (kC < kB) {
312425
312810
  const thetaB = clusters.getExtraData(order[kC], 0);
312426
- if (!_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB)) {
312811
+ if (!_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB, radianTol)) {
312427
312812
  return kC;
312428
312813
  }
312429
312814
  kC++;
@@ -312455,10 +312840,10 @@ class HalfEdgeGraphMerge {
312455
312840
  // * only want to do anything here when curves are present.
312456
312841
  // * k0<=k<k1 are around a vertex
312457
312842
  // * These are sorted by theta.
312458
- static secondarySortAroundVertex(clusters, order, allNodes, k0, k1) {
312843
+ static secondarySortAroundVertex(clusters, order, allNodes, k0, k1, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians) {
312459
312844
  const sortData = [];
312460
312845
  for (let k = k0; k < k1;) {
312461
- const kB = this.getCommonThetaEndIndex(clusters, order, k, k1);
312846
+ const kB = this.getCommonThetaEndIndex(clusters, order, k, k1, radianTol);
312462
312847
  if (k + 1 < kB) {
312463
312848
  sortData.length = 0;
312464
312849
  for (let kA = k; kA < kB; kA++) {
@@ -312477,25 +312862,27 @@ class HalfEdgeGraphMerge {
312477
312862
  }
312478
312863
  /** Return the sort key for sorting by curvature.
312479
312864
  * * This is the signed distance from the curve at the edge start, to center of curvature.
312865
+ * * ASSUME: edgeTag is a `CurveLocationDetail` whose fractions [f0,f1] define the detail.curve segment traversed
312866
+ * by the edge. If sortData < 0, the edge traverses the curve segment in reverse order [f1,f0].
312480
312867
  * * NOTE: Currently does not account for higher derivatives in the case of higher-than-tangent match.
312481
312868
  */
312482
312869
  static curvatureSortKey(node) {
312483
- const cld = node.edgeTag;
312484
- if (cld !== undefined) {
312485
- const fraction = cld.fraction;
312486
- const curve = cld.curve;
312487
- if (curve) {
312488
- let radius = curve.fractionToSignedXYRadiusOfCurvature(fraction);
312489
- if (node.sortData !== undefined && node.sortData < 0)
312490
- radius = -radius;
312491
- return radius;
312870
+ if (node.edgeTag !== undefined) {
312871
+ if (node.edgeTag instanceof _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveLocationDetail) {
312872
+ const cld = node.edgeTag;
312873
+ if (cld.curve !== undefined) {
312874
+ const reverse = node.sortData !== undefined && node.sortData < 0;
312875
+ const fraction = (reverse && cld.fraction1 !== undefined) ? cld.fraction1 : cld.fraction;
312876
+ const radius = cld.curve.fractionToSignedXYRadiusOfCurvature(fraction);
312877
+ return reverse ? -radius : radius;
312878
+ }
312492
312879
  }
312493
312880
  }
312494
312881
  return 0.0;
312495
312882
  }
312496
312883
  /** Whether the HalfEdge is part of a null face, as marked by [[clusterAndMergeXYTheta]]. */
312497
312884
  static isNullFace(node) {
312498
- return node.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE) && node.faceSuccessor.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE) && node === node.faceSuccessor.faceSuccessor;
312885
+ return node.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE) && node.faceSuccessor.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE) && node === node.faceSuccessor.faceSuccessor;
312499
312886
  }
312500
312887
  /**
312501
312888
  * Cluster the HalfEdges so that xy-coordinates within `mergeTolerance` are equated.
@@ -312513,23 +312900,23 @@ class HalfEdgeGraphMerge {
312513
312900
  * @param outboundRadiansFunction optional function to compute the sort angle of an edge at its start vertex
312514
312901
  * @param clusterTol optional distance tolerance for clustering vertices. Default value is [[Geometry.smallMetricDistance]].
312515
312902
  */
312516
- static clusterAndMergeXYTheta(graph, outboundRadiansFunction, clusterTol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
312903
+ static clusterAndMergeXYTheta(graph, outboundRadiansFunction, clusterTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians) {
312517
312904
  const allNodes = graph.allHalfEdges;
312518
312905
  const numNodes = allNodes.length;
312519
- graph.clearMask(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE);
312520
- const clusters = new _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray(2, 2, numNodes); // data order: x,y,theta,nodeIndex. But theta is not set in first round.
312906
+ graph.clearMask(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE);
312907
+ const clusters = new _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__.ClusterableArray(2, 2, numNodes); // data block: dot,x,y,theta,nodeIndex --- dot and theta are set later
312521
312908
  for (let i = 0; i < numNodes; i++) {
312522
312909
  const nodeA = allNodes[i];
312523
312910
  const xA = nodeA.x;
312524
312911
  const yA = nodeA.y;
312525
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA, nodeA.vertexSuccessor); // pull it out of its current vertex loop.
312912
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA, nodeA.vertexSuccessor); // pull it out of its current vertex loop.
312526
312913
  clusters.addDirect(xA, yA, 0.0, i);
312527
312914
  }
312528
- const order = clusters.clusterIndicesLexical(clusterTol);
312915
+ const order = clusters.clusterIndicesLexical(clusterTol); // assign primary sort dot product
312529
312916
  let k0 = 0;
312530
312917
  const numK = order.length;
312531
312918
  for (let k1 = 0; k1 < numK; k1++) {
312532
- if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray.clusterTerminator) {
312919
+ if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__.ClusterableArray.clusterTerminator) {
312533
312920
  // nodes identified in order[k0]..order[k1-1] are at a vertex cluster; equate their xy
312534
312921
  if (k1 > k0) {
312535
312922
  const iA = clusters.getExtraData(order[k0], 1);
@@ -312549,18 +312936,18 @@ class HalfEdgeGraphMerge {
312549
312936
  // 2) Hence ready do sort (at each vertex) by theta.
312550
312937
  // insert theta as extra data in the sort table . . .
312551
312938
  for (const clusterTableIndex of order) {
312552
- if (clusterTableIndex !== _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray.clusterTerminator) {
312939
+ if (clusterTableIndex !== _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__.ClusterableArray.clusterTerminator) {
312553
312940
  const nodeA = allNodes[clusterTableIndex];
312554
312941
  const nodeB = nodeA.faceSuccessor;
312555
312942
  let getPrecomputedRadians = outboundRadiansFunction;
312556
312943
  if (getPrecomputedRadians) {
312557
312944
  // Recompute theta when edge geometry is completely determined by the vertices, which may have been perturbed by clustering.
312558
312945
  const detail = nodeA.edgeTag;
312559
- if (undefined === detail || undefined === detail.curve || detail.curve instanceof _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_1__.LineSegment3d)
312946
+ if (undefined === detail || undefined === detail.curve || detail.curve instanceof _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d)
312560
312947
  getPrecomputedRadians = undefined;
312561
312948
  }
312562
312949
  let radians = getPrecomputedRadians ? getPrecomputedRadians(nodeA) : Math.atan2(nodeB.y - nodeA.y, nodeB.x - nodeA.x);
312563
- if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, -Math.PI))
312950
+ if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, -Math.PI, radianTol))
312564
312951
  radians = Math.PI;
312565
312952
  clusters.setExtraData(clusterTableIndex, 0, radians);
312566
312953
  }
@@ -312571,11 +312958,11 @@ class HalfEdgeGraphMerge {
312571
312958
  let thetaA, thetaB;
312572
312959
  // now pinch each neighboring pair together
312573
312960
  for (let k1 = 0; k1 < numK; k1++) {
312574
- if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray.clusterTerminator) {
312575
- // nodes identified in order[k0]..order[k1-1] are properly sorted around a vertex.
312961
+ if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__.ClusterableArray.clusterTerminator) {
312962
+ // nodes identified in order[k0]..order[k1-1] are tentatively sorted around a vertex by theta
312576
312963
  if (k1 > k0) {
312577
312964
  if (k1 > k0 + 1)
312578
- this.secondarySortAroundVertex(clusters, order, allNodes, k0, k1);
312965
+ this.secondarySortAroundVertex(clusters, order, allNodes, k0, k1, radianTol); // finalize order by resolving ties via curvature
312579
312966
  this.doAnnounceVertexNeighborhood(clusters, order, allNodes, k0, k1);
312580
312967
  const iA = clusters.getExtraData(order[k0], 1);
312581
312968
  thetaA = clusters.getExtraData(order[k0], 0);
@@ -312585,7 +312972,7 @@ class HalfEdgeGraphMerge {
312585
312972
  const iB = clusters.getExtraData(order[k], 1);
312586
312973
  thetaB = clusters.getExtraData(order[k], 0);
312587
312974
  const nodeB = allNodes[iB];
312588
- if (nodeA.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE)) {
312975
+ if (nodeA.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE)) {
312589
312976
  // nope, this edge was flagged and pinched from the other end.
312590
312977
  const j = unmatchedNullFaceNodes.findIndex((node) => nodeA === node);
312591
312978
  if (j >= 0) {
@@ -312595,7 +312982,7 @@ class HalfEdgeGraphMerge {
312595
312982
  nodeA = nodeB;
312596
312983
  thetaA = thetaB;
312597
312984
  }
312598
- else if (nodeB.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE)) {
312985
+ else if (nodeB.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE)) {
312599
312986
  const j = unmatchedNullFaceNodes.findIndex((node) => nodeB === node);
312600
312987
  if (j >= 0) {
312601
312988
  unmatchedNullFaceNodes[j] = unmatchedNullFaceNodes[unmatchedNullFaceNodes.length - 1];
@@ -312604,22 +312991,22 @@ class HalfEdgeGraphMerge {
312604
312991
  // NO leave nodeA and thetaA ignore nodeB -- later step will get the outside of its banana.
312605
312992
  }
312606
312993
  else {
312607
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA, nodeB);
312994
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA, nodeB);
312608
312995
  // Detect null face using the heuristic:
312609
312996
  // * near vertex angles are same (periodic, toleranced)
312610
312997
  // * far vertex is clustered (exactly equal)
312611
312998
  // * near vertex curvatures are same (toleranced)
312612
312999
  // Note that near vertex is already clustered.
312613
- if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB)) {
313000
+ if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB, radianTol)) {
312614
313001
  const nodeA1 = nodeA.faceSuccessor;
312615
313002
  const nodeB1 = nodeB.edgeMate;
312616
313003
  if (nodeA1.isEqualXY(nodeB1)) {
312617
313004
  const cA = this.curvatureSortKey(nodeA);
312618
313005
  const cB = this.curvatureSortKey(nodeB);
312619
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinate(cA, cB, clusterTol)) { // rule out banana
312620
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA1, nodeB1);
312621
- nodeA.setMask(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE);
312622
- nodeB1.setMask(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE);
313006
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinate(cA, cB, clusterTol)) { // rule out banana
313007
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA1, nodeB1);
313008
+ nodeA.setMask(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE);
313009
+ nodeB1.setMask(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE);
312623
313010
  unmatchedNullFaceNodes.push(nodeB1);
312624
313011
  }
312625
313012
  }
@@ -312634,7 +313021,7 @@ class HalfEdgeGraphMerge {
312634
313021
  }
312635
313022
  }
312636
313023
  static buildVerticalSweepPriorityQueue(graph) {
312637
- const sweepHeap = new _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_8__.HalfEdgePriorityQueueWithPartnerArray();
313024
+ const sweepHeap = new _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_9__.HalfEdgePriorityQueueWithPartnerArray();
312638
313025
  for (const p of graph.allHalfEdges) {
312639
313026
  if (HalfEdgeGraphOps.compareNodesYXUp(p, p.faceSuccessor) < 0) {
312640
313027
  sweepHeap.priorityQueue.push(p);
@@ -312642,19 +313029,19 @@ class HalfEdgeGraphMerge {
312642
313029
  }
312643
313030
  return sweepHeap;
312644
313031
  }
312645
- static computeIntersectionFractionsOnEdges(nodeA0, nodeB0, tol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
313032
+ static computeIntersectionFractionsOnEdges(nodeA0, nodeB0, tol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
312646
313033
  const nodeA1 = nodeA0.faceSuccessor;
312647
313034
  const aDir = { x: nodeA1.x - nodeA0.x, y: nodeA1.y - nodeA0.y };
312648
313035
  const nodeB1 = nodeB0.faceSuccessor;
312649
313036
  const bDir = { x: nodeB1.x - nodeB0.x, y: nodeB1.y - nodeB0.y };
312650
- let fractions = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegmentXYUVIntersectionUnbounded(nodeA0, aDir, nodeB0, bDir, tol);
313037
+ let fractions = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__.SmallSystem.lineSegmentXYUVIntersectionUnbounded(nodeA0, aDir, nodeB0, bDir, tol);
312651
313038
  if (fractions) {
312652
313039
  const snapFractionToSegment = (fraction, segStart, segEnd) => {
312653
- const x = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(segStart.x, fraction, segEnd.x);
312654
- const y = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(segStart.y, fraction, segEnd.y);
312655
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(x, y, segStart.x, segStart.y, tol))
313040
+ const x = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(segStart.x, fraction, segEnd.x);
313041
+ const y = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(segStart.y, fraction, segEnd.y);
313042
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(x, y, segStart.x, segStart.y, tol))
312656
313043
  return 0.0;
312657
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(x, y, segEnd.x, segEnd.y, tol))
313044
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(x, y, segEnd.x, segEnd.y, tol))
312658
313045
  return 1.0;
312659
313046
  return fraction;
312660
313047
  };
@@ -312664,9 +313051,9 @@ class HalfEdgeGraphMerge {
312664
313051
  fractions.f1.x = snapFractionToSegment(fractions.f1.x, nodeA0, nodeA1);
312665
313052
  fractions.f1.y = snapFractionToSegment(fractions.f1.y, nodeB0, nodeB1);
312666
313053
  }
312667
- if (fractions.f1 && !(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f1.x) && _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f1.y)))
313054
+ if (fractions.f1 && !(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f1.x) && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f1.y)))
312668
313055
  fractions.f1 = undefined; // overlap ends beyond a segment; downgrade to simple intersection
312669
- if (!(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f0.x) && _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f0.y))) {
313056
+ if (!(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f0.x) && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f0.y))) {
312670
313057
  if (fractions.f1) {
312671
313058
  fractions.f0 = fractions.f1; // overlap starts beyond a segment; downgrade to simple intersection
312672
313059
  fractions.f1 = undefined;
@@ -312682,7 +313069,7 @@ class HalfEdgeGraphMerge {
312682
313069
  * * This is a large operation.
312683
313070
  * @param graph
312684
313071
  */
312685
- static splitIntersectingEdges(graph, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, fractionTol = 1.0e-8) {
313072
+ static splitIntersectingEdges(graph, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance, fractionTol = 1.0e-8) {
312686
313073
  const data = new GraphSplitData();
312687
313074
  const sweepHeap = this.buildVerticalSweepPriorityQueue(graph);
312688
313075
  let nodeA0, nodeB1;
@@ -312698,10 +313085,10 @@ class HalfEdgeGraphMerge {
312698
313085
  for (i = 0; i < sweepHeap.activeEdges.length; i++) {
312699
313086
  nodeB0 = sweepHeap.activeEdges[i];
312700
313087
  nodeB1 = nodeB0.faceSuccessor;
312701
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(nodeA0.x, nodeA0.y, nodeB0.x, nodeB0.y, distanceTol)) {
313088
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(nodeA0.x, nodeA0.y, nodeB0.x, nodeB0.y, distanceTol)) {
312702
313089
  data.numA0B0++;
312703
313090
  }
312704
- else if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(nodeB1.x, nodeB1.y, nodeA0.x, nodeA0.y, distanceTol)) {
313091
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(nodeB1.x, nodeB1.y, nodeA0.x, nodeA0.y, distanceTol)) {
312705
313092
  data.numA0B1++;
312706
313093
  }
312707
313094
  else {
@@ -312738,8 +313125,8 @@ class HalfEdgeGraphMerge {
312738
313125
  */
312739
313126
  static formGraphFromSegments(lineSegments) {
312740
313127
  // Structure of an index of the array: { xyTheta: Point3d, node: Node }
312741
- const graph = new _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeGraph();
312742
- HalfEdgeGraphOps.segmentArrayToGraphEdges(lineSegments, graph, _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE);
313128
+ const graph = new _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeGraph();
313129
+ HalfEdgeGraphOps.segmentArrayToGraphEdges(lineSegments, graph, _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE);
312743
313130
  this.splitIntersectingEdges(graph);
312744
313131
  this.clusterAndMergeXYTheta(graph);
312745
313132
  return graph;
@@ -312749,17 +313136,17 @@ class HalfEdgeGraphMerge {
312749
313136
  * * Graph gets full splitEdges, regularize (optional), and triangulate.
312750
313137
  * @returns graph, or undefined if bad data.
312751
313138
  */
312752
- static formGraphFromChains(chains, regularize = true, mask = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.PRIMARY_EDGE) {
313139
+ static formGraphFromChains(chains, regularize = true, mask = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.PRIMARY_EDGE) {
312753
313140
  if (chains.length < 1)
312754
313141
  return undefined;
312755
- const graph = new _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeGraph();
312756
- const chainSeeds = _Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateChainsFromCoordinates(graph, chains);
313142
+ const graph = new _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeGraph();
313143
+ const chainSeeds = _Triangulation__WEBPACK_IMPORTED_MODULE_11__.Triangulator.directCreateChainsFromCoordinates(graph, chains);
312757
313144
  for (const seed of chainSeeds)
312758
313145
  seed.setMaskAroundFace(mask);
312759
313146
  this.splitIntersectingEdges(graph);
312760
313147
  this.clusterAndMergeXYTheta(graph);
312761
313148
  if (regularize) {
312762
- const context = new _RegularizeFace__WEBPACK_IMPORTED_MODULE_9__.RegularizationContext(graph);
313149
+ const context = new _RegularizeFace__WEBPACK_IMPORTED_MODULE_10__.RegularizationContext(graph);
312763
313150
  context.regularizeGraph(true, true);
312764
313151
  }
312765
313152
  return graph;
@@ -315576,23 +315963,9 @@ class ITwinLocalization {
315576
315963
  this.i18next.loadNamespaces(name, (err) => {
315577
315964
  if (!err)
315578
315965
  return resolve();
315579
- // Here we got a non-null err object.
315580
- // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.
315581
- // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.
315582
- // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.
315583
- // There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.
315584
- let locales = this.getLanguageList().map((thisLocale) => `/${thisLocale}/`);
315585
- try {
315586
- for (const thisError of err) {
315587
- if (typeof thisError === "string")
315588
- locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));
315589
- }
315590
- }
315591
- catch {
315592
- locales = [];
315593
- }
315594
- // if we removed every locale from the array, it wasn't loaded.
315595
- if (locales.length === 0)
315966
+ // i18next can return errors from other concurrent namespace loads in this callback.
315967
+ const wasLoaded = this.getLanguageList().some((language) => this.i18next.hasResourceBundle(language, name));
315968
+ if (!wasLoaded)
315596
315969
  _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__.Logger.logError("i18n", `No resources for namespace ${name} could be loaded`);
315597
315970
  resolve();
315598
315971
  });
@@ -343017,7 +343390,7 @@ class TestContext {
343017
343390
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
343018
343391
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
343019
343392
  await core_frontend_1.NoRenderApp.startup({
343020
- applicationVersion: "5.13.1",
343393
+ applicationVersion: "5.14.0-dev.10",
343021
343394
  applicationId: this.settings.gprid,
343022
343395
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
343023
343396
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -369759,7 +370132,7 @@ class WMS {
369759
370132
  (module) {
369760
370133
 
369761
370134
  "use strict";
369762
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.13.1","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 build:workers && npm run -s copy:draco","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 ES2022 --outDir lib/esm","clean":"rimraf -g 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:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
370135
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.10","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 build:workers && npm run -s copy:draco","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 ES2022 --outDir lib/esm","clean":"rimraf -g 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:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
369763
370136
 
369764
370137
  /***/ },
369765
370138