@itwin/ecschema-rpcinterface-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.
@@ -22506,6 +22506,122 @@ class PerfLogger {
22506
22506
  }
22507
22507
 
22508
22508
 
22509
+ /***/ },
22510
+
22511
+ /***/ "../../core/bentley/lib/esm/ObservableMap.js"
22512
+ /*!***************************************************!*\
22513
+ !*** ../../core/bentley/lib/esm/ObservableMap.js ***!
22514
+ \***************************************************/
22515
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
22516
+
22517
+ "use strict";
22518
+ __webpack_require__.r(__webpack_exports__);
22519
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22520
+ /* harmony export */ ObservableMap: () => (/* binding */ ObservableMap)
22521
+ /* harmony export */ });
22522
+ /* harmony import */ var _BeEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BeEvent */ "../../core/bentley/lib/esm/BeEvent.js");
22523
+ /*---------------------------------------------------------------------------------------------
22524
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
22525
+ * See LICENSE.md in the project root for license terms and full copyright notice.
22526
+ *--------------------------------------------------------------------------------------------*/
22527
+ /** @packageDocumentation
22528
+ * @module Collections
22529
+ */
22530
+
22531
+ /** 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.
22532
+ * @public
22533
+ */
22534
+ class ObservableMap extends Map {
22535
+ /** @internal */
22536
+ get [Symbol.toStringTag]() { return "ObservableMap"; }
22537
+ /** Emitted after any change to the contents of this map. */
22538
+ onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
22539
+ /** Construct a new ObservableMap.
22540
+ * @param elements Optional elements with which to populate the new map.
22541
+ */
22542
+ constructor(elements) {
22543
+ // IMPORTANT: do not pass `elements` to `super()`. It will invoke `set` which is overridden to invoke `onChanged.raiseEvent`, but
22544
+ // `onChanged` is not initialized until `super()` returns.
22545
+ super();
22546
+ if (elements)
22547
+ this.setAll(elements);
22548
+ }
22549
+ /** Invokes [Map.set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set), raising
22550
+ * the [[onChanged]] event unless `key` is already present with the same `value`.
22551
+ */
22552
+ set(key, value) {
22553
+ const valueChanged = !this.has(key) || !Object.is(this.get(key), value);
22554
+ if (valueChanged)
22555
+ super.set(key, value);
22556
+ if (valueChanged) {
22557
+ this.onChanged.raiseEvent();
22558
+ }
22559
+ return this;
22560
+ }
22561
+ /** Invokes [Map.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete), raising
22562
+ * the [[onChanged]] event if the key was removed from the map.
22563
+ */
22564
+ delete(key) {
22565
+ const ret = super.delete(key);
22566
+ if (ret) {
22567
+ this.onChanged.raiseEvent();
22568
+ }
22569
+ return ret;
22570
+ }
22571
+ /** If this map is not already empty, invokes [Map.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear)
22572
+ * and raises the [[onChanged]] event.
22573
+ */
22574
+ clear() {
22575
+ if (0 !== this.size) {
22576
+ super.clear();
22577
+ this.onChanged.raiseEvent();
22578
+ }
22579
+ }
22580
+ /** Add or update multiple entries in the map, raising [[onChanged]] only once after all items are set, if the contents of
22581
+ * the map changed as a result.
22582
+ * This is more efficient than calling [[set]] in a loop when listeners need not be notified of each individual change.
22583
+ * @param items The entries to add or update.
22584
+ */
22585
+ setAll(items) {
22586
+ let changed = false;
22587
+ try {
22588
+ for (const [key, value] of items) {
22589
+ if (!this.has(key) || !Object.is(this.get(key), value)) {
22590
+ super.set(key, value);
22591
+ changed = true;
22592
+ }
22593
+ }
22594
+ }
22595
+ finally {
22596
+ if (changed) {
22597
+ this.onChanged.raiseEvent();
22598
+ }
22599
+ }
22600
+ }
22601
+ /** Delete multiple keys from the map, raising [[onChanged]] only once after all keys are deleted.
22602
+ * This is more efficient than calling [[delete]] in a loop when listeners need not be notified of each individual deletion.
22603
+ * @param keys The keys to delete.
22604
+ * @returns The number of keys that were actually deleted (i.e., were present in the map).
22605
+ */
22606
+ deleteAll(keys) {
22607
+ const prevSize = this.size;
22608
+ let deletedAny = false;
22609
+ try {
22610
+ for (const key of keys) {
22611
+ if (super.delete(key))
22612
+ deletedAny = true;
22613
+ }
22614
+ }
22615
+ finally {
22616
+ if (deletedAny) {
22617
+ this.onChanged.raiseEvent();
22618
+ }
22619
+ }
22620
+ return prevSize - this.size;
22621
+ }
22622
+ }
22623
+
22624
+
22509
22625
  /***/ },
22510
22626
 
22511
22627
  /***/ "../../core/bentley/lib/esm/ObservableSet.js"
@@ -22532,6 +22648,8 @@ __webpack_require__.r(__webpack_exports__);
22532
22648
  * @public
22533
22649
  */
22534
22650
  class ObservableSet extends Set {
22651
+ /** @internal */
22652
+ get [Symbol.toStringTag]() { return "ObservableSet"; }
22535
22653
  /** Emitted after `item` is added to this set. */
22536
22654
  onAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
22537
22655
  /** Emitted after `item` is deleted from this set. */
@@ -22542,27 +22660,39 @@ class ObservableSet extends Set {
22542
22660
  onBatchAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
22543
22661
  /** Emitted after multiple items are deleted from this set via [[deleteAll]]. */
22544
22662
  onBatchDeleted = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
22663
+ /** Emitted after any change to the contents of this set. */
22664
+ onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
22545
22665
  /** Construct a new ObservableSet.
22546
22666
  * @param elements Optional elements with which to populate the new set.
22547
22667
  */
22548
22668
  constructor(elements) {
22549
- // NB: Set constructor will invoke add(). Do not override until initialized.
22550
- super(elements);
22551
- this.add = (item) => {
22552
- const prevSize = this.size;
22553
- const ret = super.add(item);
22554
- if (this.size !== prevSize)
22555
- this.onAdded.raiseEvent(item);
22556
- return ret;
22557
- };
22669
+ // IMPORTANT: do not pass `elements` to `super()`. It will invoke `add` which is overridden to invoke `onAdded.raiseEvent`, but
22670
+ // `onAdded` is not initialized until `super()` returns.
22671
+ super();
22672
+ if (elements)
22673
+ this.addAll(elements);
22674
+ }
22675
+ /** Invokes [Set.add](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/add), raising
22676
+ * the [[onAdded]] event if the item was not already present in the set.
22677
+ */
22678
+ add(item) {
22679
+ const prevSize = this.size;
22680
+ const ret = super.add(item);
22681
+ if (this.size !== prevSize) {
22682
+ this.onAdded.raiseEvent(item);
22683
+ this.onChanged.raiseEvent();
22684
+ }
22685
+ return ret;
22558
22686
  }
22559
22687
  /** Invokes [Set.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/delete), raising
22560
22688
  * the [[onDeleted]] event if the item was removed from the set.
22561
22689
  */
22562
22690
  delete(item) {
22563
22691
  const ret = super.delete(item);
22564
- if (ret)
22692
+ if (ret) {
22565
22693
  this.onDeleted.raiseEvent(item);
22694
+ this.onChanged.raiseEvent();
22695
+ }
22566
22696
  return ret;
22567
22697
  }
22568
22698
  /** If this set is not already empty, invokes [Set.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/clear)
@@ -22572,6 +22702,7 @@ class ObservableSet extends Set {
22572
22702
  if (0 !== this.size) {
22573
22703
  super.clear();
22574
22704
  this.onCleared.raiseEvent();
22705
+ this.onChanged.raiseEvent();
22575
22706
  }
22576
22707
  }
22577
22708
  /** Add multiple items to the set, raising [[onBatchAdded]] only once after all items are added.
@@ -22581,10 +22712,21 @@ class ObservableSet extends Set {
22581
22712
  */
22582
22713
  addAll(items) {
22583
22714
  const prevSize = this.size;
22584
- for (const item of items)
22585
- super.add(item);
22586
- if (this.size !== prevSize)
22587
- this.onBatchAdded.raiseEvent();
22715
+ let addedAny = false;
22716
+ try {
22717
+ for (const item of items) {
22718
+ const prevSetSize = this.size;
22719
+ super.add(item);
22720
+ if (this.size !== prevSetSize)
22721
+ addedAny = true;
22722
+ }
22723
+ }
22724
+ finally {
22725
+ if (addedAny) {
22726
+ this.onBatchAdded.raiseEvent();
22727
+ this.onChanged.raiseEvent();
22728
+ }
22729
+ }
22588
22730
  return this.size - prevSize;
22589
22731
  }
22590
22732
  /** Delete multiple items from the set, raising [[onBatchDeleted]] only once after all items are deleted.
@@ -22594,10 +22736,21 @@ class ObservableSet extends Set {
22594
22736
  */
22595
22737
  deleteAll(items) {
22596
22738
  const prevSize = this.size;
22597
- for (const item of items)
22598
- super.delete(item);
22599
- if (this.size !== prevSize)
22600
- this.onBatchDeleted.raiseEvent();
22739
+ let deletedAny = false;
22740
+ try {
22741
+ for (const item of items) {
22742
+ const prevSetSize = this.size;
22743
+ super.delete(item);
22744
+ if (this.size !== prevSetSize)
22745
+ deletedAny = true;
22746
+ }
22747
+ }
22748
+ finally {
22749
+ if (deletedAny) {
22750
+ this.onBatchDeleted.raiseEvent();
22751
+ this.onChanged.raiseEvent();
22752
+ }
22753
+ }
22601
22754
  return prevSize - this.size;
22602
22755
  }
22603
22756
  }
@@ -25019,11 +25172,11 @@ class YieldManager {
25019
25172
  "use strict";
25020
25173
  __webpack_require__.r(__webpack_exports__);
25021
25174
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25022
- /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.AbandonedError),
25023
- /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeDuration),
25175
+ /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
25176
+ /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
25024
25177
  /* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
25025
25178
  /* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
25026
- /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeTimePoint),
25179
+ /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeTimePoint),
25027
25180
  /* harmony export */ BeUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUiEvent),
25028
25181
  /* harmony export */ BeUnorderedEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedEvent),
25029
25182
  /* harmony export */ BeUnorderedUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedUiEvent),
@@ -25034,15 +25187,15 @@ __webpack_require__.r(__webpack_exports__);
25034
25187
  /* harmony export */ ByteStream: () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
25035
25188
  /* harmony export */ ChangeSetStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
25036
25189
  /* harmony export */ CompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
25037
- /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbChangeStage),
25038
- /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictCause),
25039
- /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictResolution),
25190
+ /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbChangeStage),
25191
+ /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictCause),
25192
+ /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictResolution),
25040
25193
  /* harmony export */ DbOpcode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
25041
25194
  /* harmony export */ DbResult: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
25042
- /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbValueType),
25195
+ /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbValueType),
25043
25196
  /* harmony export */ Dictionary: () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
25044
25197
  /* harmony export */ DisposableList: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
25045
- /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.DuplicatePolicy),
25198
+ /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.DuplicatePolicy),
25046
25199
  /* harmony export */ Entry: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.Entry),
25047
25200
  /* harmony export */ ErrorCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.ErrorCategory),
25048
25201
  /* harmony export */ GeoServiceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.GeoServiceStatus),
@@ -25061,39 +25214,40 @@ __webpack_require__.r(__webpack_exports__);
25061
25214
  /* harmony export */ LogLevel: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.LogLevel),
25062
25215
  /* harmony export */ Logger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.Logger),
25063
25216
  /* harmony export */ MutableCompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.MutableCompressedId64Set),
25064
- /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_20__.ObservableSet),
25065
- /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.OneAtATimeAction),
25217
+ /* harmony export */ ObservableMap: () => (/* reexport safe */ _ObservableMap__WEBPACK_IMPORTED_MODULE_20__.ObservableMap),
25218
+ /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_21__.ObservableSet),
25219
+ /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.OneAtATimeAction),
25066
25220
  /* harmony export */ OpenMode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.OpenMode),
25067
25221
  /* harmony export */ OrderedId64Array: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.OrderedId64Array),
25068
- /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__.OrderedId64Iterable),
25069
- /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.OrderedSet),
25222
+ /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__.OrderedId64Iterable),
25223
+ /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.OrderedSet),
25070
25224
  /* harmony export */ PerfLogger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.PerfLogger),
25071
- /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__.PriorityQueue),
25072
- /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__.ProcessDetector),
25073
- /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.ReadonlyOrderedSet),
25074
- /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.ReadonlySortedArray),
25225
+ /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__.PriorityQueue),
25226
+ /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__.ProcessDetector),
25227
+ /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.ReadonlyOrderedSet),
25228
+ /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.ReadonlySortedArray),
25075
25229
  /* harmony export */ RealityDataStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RealityDataStatus),
25076
- /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.RepositoryStatus),
25230
+ /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.RepositoryStatus),
25077
25231
  /* harmony export */ RpcInterfaceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RpcInterfaceStatus),
25078
- /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.SortedArray),
25079
- /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.SpanKind),
25232
+ /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.SortedArray),
25233
+ /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.SpanKind),
25080
25234
  /* harmony export */ StatusCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.StatusCategory),
25081
- /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.StopWatch),
25235
+ /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.StopWatch),
25082
25236
  /* harmony export */ SuccessCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.SuccessCategory),
25083
- /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.Tracing),
25237
+ /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.Tracing),
25084
25238
  /* harmony export */ TransientIdSequence: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.TransientIdSequence),
25085
- /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__.TupleKeyedMap),
25086
- /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.TypedArrayBuilder),
25087
- /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint16ArrayBuilder),
25088
- /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint32ArrayBuilder),
25089
- /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint8ArrayBuilder),
25090
- /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.UintArrayBuilder),
25091
- /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__.UnexpectedErrors),
25092
- /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_36__.YieldManager),
25239
+ /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__.TupleKeyedMap),
25240
+ /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.TypedArrayBuilder),
25241
+ /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint16ArrayBuilder),
25242
+ /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint32ArrayBuilder),
25243
+ /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint8ArrayBuilder),
25244
+ /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.UintArrayBuilder),
25245
+ /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__.UnexpectedErrors),
25246
+ /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_37__.YieldManager),
25093
25247
  /* harmony export */ areEqualPossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.areEqualPossiblyUndefined),
25094
- /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.asInstanceOf),
25248
+ /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.asInstanceOf),
25095
25249
  /* harmony export */ assert: () => (/* reexport safe */ _Assert__WEBPACK_IMPORTED_MODULE_1__.assert),
25096
- /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.base64StringToUint8Array),
25250
+ /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.base64StringToUint8Array),
25097
25251
  /* harmony export */ compareArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareArrays),
25098
25252
  /* harmony export */ compareBooleans: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleans),
25099
25253
  /* harmony export */ compareBooleansOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleansOrUndefined),
@@ -25111,16 +25265,16 @@ __webpack_require__.r(__webpack_exports__);
25111
25265
  /* harmony export */ expectNotNull: () => (/* reexport safe */ _Expect__WEBPACK_IMPORTED_MODULE_13__.expectNotNull),
25112
25266
  /* harmony export */ isDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isDisposable),
25113
25267
  /* harmony export */ isIDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isIDisposable),
25114
- /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.isInstanceOf),
25268
+ /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.isInstanceOf),
25115
25269
  /* harmony export */ isProperSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isProperSubclassOf),
25116
25270
  /* harmony export */ isSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isSubclassOf),
25117
- /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.lowerBound),
25118
- /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.omit),
25119
- /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_24__.partitionArray),
25120
- /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.shallowClone),
25271
+ /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.lowerBound),
25272
+ /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.omit),
25273
+ /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_25__.partitionArray),
25274
+ /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.shallowClone),
25121
25275
  /* harmony export */ using: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.using),
25122
- /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.utf8ToString),
25123
- /* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__.wrapTimerCallback)
25276
+ /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.utf8ToString),
25277
+ /* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__.wrapTimerCallback)
25124
25278
  /* harmony export */ });
25125
25279
  /* harmony import */ var _AccessToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccessToken */ "../../core/bentley/lib/esm/AccessToken.js");
25126
25280
  /* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Assert */ "../../core/bentley/lib/esm/Assert.js");
@@ -25142,24 +25296,25 @@ __webpack_require__.r(__webpack_exports__);
25142
25296
  /* harmony import */ var _JsonUtils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./JsonUtils */ "../../core/bentley/lib/esm/JsonUtils.js");
25143
25297
  /* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Logger */ "../../core/bentley/lib/esm/Logger.js");
25144
25298
  /* harmony import */ var _LRUMap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LRUMap */ "../../core/bentley/lib/esm/LRUMap.js");
25145
- /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableSet */ "../../core/bentley/lib/esm/ObservableSet.js");
25146
- /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./OneAtATimeAction */ "../../core/bentley/lib/esm/OneAtATimeAction.js");
25147
- /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../../core/bentley/lib/esm/OrderedId64Iterable.js");
25148
- /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedSet */ "../../core/bentley/lib/esm/OrderedSet.js");
25149
- /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./partitionArray */ "../../core/bentley/lib/esm/partitionArray.js");
25150
- /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./PriorityQueue */ "../../core/bentley/lib/esm/PriorityQueue.js");
25151
- /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ProcessDetector */ "../../core/bentley/lib/esm/ProcessDetector.js");
25152
- /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./SortedArray */ "../../core/bentley/lib/esm/SortedArray.js");
25153
- /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./StringUtils */ "../../core/bentley/lib/esm/StringUtils.js");
25154
- /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Time */ "../../core/bentley/lib/esm/Time.js");
25155
- /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Tracing */ "../../core/bentley/lib/esm/Tracing.js");
25156
- /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./TupleKeyedMap */ "../../core/bentley/lib/esm/TupleKeyedMap.js");
25157
- /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../../core/bentley/lib/esm/TypedArrayBuilder.js");
25158
- /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UnexpectedErrors */ "../../core/bentley/lib/esm/UnexpectedErrors.js");
25159
- /* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UtilityFunctions */ "../../core/bentley/lib/esm/UtilityFunctions.js");
25160
- /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityTypes */ "../../core/bentley/lib/esm/UtilityTypes.js");
25161
- /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./YieldManager */ "../../core/bentley/lib/esm/YieldManager.js");
25162
- /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./internal/cross-package */ "../../core/bentley/lib/esm/internal/cross-package.js");
25299
+ /* harmony import */ var _ObservableMap__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableMap */ "../../core/bentley/lib/esm/ObservableMap.js");
25300
+ /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ObservableSet */ "../../core/bentley/lib/esm/ObservableSet.js");
25301
+ /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OneAtATimeAction */ "../../core/bentley/lib/esm/OneAtATimeAction.js");
25302
+ /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../../core/bentley/lib/esm/OrderedId64Iterable.js");
25303
+ /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./OrderedSet */ "../../core/bentley/lib/esm/OrderedSet.js");
25304
+ /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./partitionArray */ "../../core/bentley/lib/esm/partitionArray.js");
25305
+ /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./PriorityQueue */ "../../core/bentley/lib/esm/PriorityQueue.js");
25306
+ /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ProcessDetector */ "../../core/bentley/lib/esm/ProcessDetector.js");
25307
+ /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./SortedArray */ "../../core/bentley/lib/esm/SortedArray.js");
25308
+ /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./StringUtils */ "../../core/bentley/lib/esm/StringUtils.js");
25309
+ /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Time */ "../../core/bentley/lib/esm/Time.js");
25310
+ /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Tracing */ "../../core/bentley/lib/esm/Tracing.js");
25311
+ /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TupleKeyedMap */ "../../core/bentley/lib/esm/TupleKeyedMap.js");
25312
+ /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../../core/bentley/lib/esm/TypedArrayBuilder.js");
25313
+ /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UnexpectedErrors */ "../../core/bentley/lib/esm/UnexpectedErrors.js");
25314
+ /* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityFunctions */ "../../core/bentley/lib/esm/UtilityFunctions.js");
25315
+ /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./UtilityTypes */ "../../core/bentley/lib/esm/UtilityTypes.js");
25316
+ /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./YieldManager */ "../../core/bentley/lib/esm/YieldManager.js");
25317
+ /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./internal/cross-package */ "../../core/bentley/lib/esm/internal/cross-package.js");
25163
25318
  /*---------------------------------------------------------------------------------------------
25164
25319
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
25165
25320
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -25199,6 +25354,7 @@ __webpack_require__.r(__webpack_exports__);
25199
25354
 
25200
25355
 
25201
25356
 
25357
+
25202
25358
 
25203
25359
 
25204
25360
  // Temporarily (until 5.0) export top-level internal APIs to avoid breaking callers.
@@ -35766,6 +35922,7 @@ function isBinaryImageSource(source) {
35766
35922
  __webpack_require__.r(__webpack_exports__);
35767
35923
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35768
35924
  /* harmony export */ getPullChangesIpcChannel: () => (/* binding */ getPullChangesIpcChannel),
35925
+ /* harmony export */ getPushChangesIpcChannel: () => (/* binding */ getPushChangesIpcChannel),
35769
35926
  /* harmony export */ ipcAppChannels: () => (/* binding */ ipcAppChannels)
35770
35927
  /* harmony export */ });
35771
35928
  /*---------------------------------------------------------------------------------------------
@@ -35776,9 +35933,16 @@ __webpack_require__.r(__webpack_exports__);
35776
35933
  * @module NativeApp
35777
35934
  */
35778
35935
  /** Get IPC channel name used for reporting progress of pulling changes into iModel.
35936
+ * @param key the key of the briefcase being pulled into.
35937
+ * @internal
35938
+ */
35939
+ const getPullChangesIpcChannel = (key) => `${ipcAppChannels.functions}/pullChanges/${key}`;
35940
+ /** Get IPC channel name used for reporting the progress of the changeset download that [[IpcAppFunctions.pushChanges]] performs before
35941
+ * uploading. Kept distinct from [[getPullChangesIpcChannel]] so that a listener attached for a pull never observes a push's download.
35942
+ * @param key the key of the briefcase being pushed from.
35779
35943
  * @internal
35780
35944
  */
35781
- const getPullChangesIpcChannel = (iModelId) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;
35945
+ const getPushChangesIpcChannel = (key) => `${ipcAppChannels.functions}/pushChanges/pullProgress/${key}`;
35782
35946
  /** @internal */
35783
35947
  const ipcAppChannels = {
35784
35948
  functions: "itwinjs-core/ipc-app",
@@ -45614,6 +45778,7 @@ __webpack_require__.r(__webpack_exports__);
45614
45778
  /* harmony export */ getMarkerText: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.getMarkerText),
45615
45779
  /* harmony export */ getMaximumMajorTileFormatVersion: () => (/* reexport safe */ _tile_TileMetadata__WEBPACK_IMPORTED_MODULE_163__.getMaximumMajorTileFormatVersion),
45616
45780
  /* harmony export */ getPullChangesIpcChannel: () => (/* reexport safe */ _IpcAppProps__WEBPACK_IMPORTED_MODULE_80__.getPullChangesIpcChannel),
45781
+ /* harmony export */ getPushChangesIpcChannel: () => (/* reexport safe */ _IpcAppProps__WEBPACK_IMPORTED_MODULE_80__.getPushChangesIpcChannel),
45617
45782
  /* harmony export */ getTileObjectReference: () => (/* reexport safe */ _TileProps__WEBPACK_IMPORTED_MODULE_122__.getTileObjectReference),
45618
45783
  /* harmony export */ iModelTileTreeIdToString: () => (/* reexport safe */ _tile_TileMetadata__WEBPACK_IMPORTED_MODULE_163__.iModelTileTreeIdToString),
45619
45784
  /* harmony export */ iTwinChannel: () => (/* reexport safe */ _ipc_IpcSocket__WEBPACK_IMPORTED_MODULE_74__.iTwinChannel),
@@ -62238,6 +62403,17 @@ class SchemaCache {
62238
62403
  return entry.schemaInfo;
62239
62404
  return undefined;
62240
62405
  }
62406
+ /**
62407
+ * Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded.
62408
+ * Does not await partially loaded schemas.
62409
+ * @param schemaKey The SchemaKey describing the schema to get from the cache.
62410
+ * @param matchType The match type to use when locating the schema
62411
+ */
62412
+ getSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
62413
+ if (this.count === 0)
62414
+ return undefined;
62415
+ return this.findEntry(schemaKey, matchType)?.schemaInfo;
62416
+ }
62241
62417
  /**
62242
62418
  * Gets the schema which matches the provided SchemaKey. If the schema is partially loaded an exception will be thrown.
62243
62419
  * @param schemaKey The SchemaKey describing the schema to get from the cache.
@@ -62435,6 +62611,16 @@ class SchemaContext {
62435
62611
  getCachedSchemaSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
62436
62612
  return this._knownSchemas.getSchemaSync(schemaKey, matchType);
62437
62613
  }
62614
+ /**
62615
+ * Attempts to get a SchemaInfo from the context's cache.
62616
+ * Returns the info even if the schema is only partially loaded.
62617
+ * @param schemaKey The SchemaKey to identify the Schema.
62618
+ * @param matchType The SchemaMatch type to use. Default is SchemaMatchType.Latest.
62619
+ * @internal
62620
+ */
62621
+ getCachedSchemaInfoSync(schemaKey, matchType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaMatchType.Latest) {
62622
+ return this._knownSchemas.getSchemaInfoSync(schemaKey, matchType);
62623
+ }
62438
62624
  async getSchemaItem(schemaNameOrKey, itemNameOrCtor, itemConstructor) {
62439
62625
  let schemaKey;
62440
62626
  if (typeof schemaNameOrKey === "string") {
@@ -62710,11 +62896,25 @@ class SchemaReadHelper {
62710
62896
  }
62711
62897
  this._schemaInfo = schemaInfo;
62712
62898
  // Need to add this schema to the context to be able to locate schemaItems within the context.
62713
- if (addSchemaToCache && !this._context.schemaExists(schema.schemaKey)) {
62714
- await this._context.addSchemaPromise(schemaInfo, schema, this.loadSchema(schemaInfo, schema));
62899
+ if (addSchemaToCache) {
62900
+ this.checkForReadVersionConflict(schema.schemaKey);
62901
+ if (!this._context.schemaExists(schema.schemaKey))
62902
+ await this._context.addSchemaPromise(schemaInfo, schema, this.loadSchema(schemaInfo, schema));
62715
62903
  }
62716
62904
  return schemaInfo;
62717
62905
  }
62906
+ /**
62907
+ * Two read-incompatible versions of the same schema can never substitute for one another.
62908
+ * Detect it here and fail with a clear error.
62909
+ * @param schemaKey The exact key of the schema about to be loaded into the context.
62910
+ */
62911
+ checkForReadVersionConflict(schemaKey) {
62912
+ const existingInfo = this._context.getCachedSchemaInfoSync(new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(schemaKey.name), _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.Latest);
62913
+ if (existingInfo && existingInfo.schemaKey.readVersion !== schemaKey.readVersion) {
62914
+ 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. ` +
62915
+ `A schema graph cannot require two read-incompatible versions of the same schema.`);
62916
+ }
62917
+ }
62718
62918
  /**
62719
62919
  * Populates the given Schema from a serialized representation.
62720
62920
  * @param schema The Schema to populate
@@ -62736,7 +62936,7 @@ class SchemaReadHelper {
62736
62936
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
62737
62937
  return loadedSchema;
62738
62938
  }
62739
- const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.Latest);
62939
+ const cachedSchema = await this._context.getCachedSchema(schemaInfo.schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.LatestReadCompatible);
62740
62940
  if (undefined === cachedSchema)
62741
62941
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECSchemaStatus.UnableToLoadSchema, `Could not load schema ${schema.schemaKey.toString()}`);
62742
62942
  return cachedSchema;
@@ -62788,6 +62988,7 @@ class SchemaReadHelper {
62788
62988
  schema.fromJSONSync(this._parser.parseSchema());
62789
62989
  this._schema = schema;
62790
62990
  // Need to add this schema to the context to be able to locate schemaItems within the context.
62991
+ this.checkForReadVersionConflict(schema.schemaKey);
62791
62992
  if (!this._context.schemaExists(schema.schemaKey))
62792
62993
  this._context.addSchemaSync(schema);
62793
62994
  // Load schema references first
@@ -85348,29 +85549,38 @@ class BriefcaseConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_5__
85348
85549
  async abandonChanges() {
85349
85550
  await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated
85350
85551
  }
85552
+ /** Subscribes to changeset download progress events on `channel` and wires `abortSignal` to `cancel`.
85553
+ * @returns a function that removes every listener that was added.
85554
+ */
85555
+ listenForChangesetDownloadProgress(args) {
85556
+ const { channel, cancel, downloadProgressCallback, abortSignal } = args;
85557
+ const removeListeners = [];
85558
+ if (downloadProgressCallback) {
85559
+ const handleProgress = (_evt, data) => downloadProgressCallback(data);
85560
+ removeListeners.push(_IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.addListener(channel, handleProgress));
85561
+ }
85562
+ if (abortSignal) {
85563
+ const abort = () => void cancel();
85564
+ abortSignal.addEventListener("abort", abort);
85565
+ removeListeners.push(() => abortSignal.removeEventListener("abort", abort));
85566
+ }
85567
+ return () => removeListeners.forEach((remove) => remove());
85568
+ }
85351
85569
  /** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase
85352
85570
  * @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.
85353
85571
  * @param options Options for pulling changes.
85354
85572
  * @see [[BriefcaseTxns.onChangesPulled]] for the event dispatched after changes are pulled.
85355
85573
  */
85356
85574
  async pullChanges(toIndex, options) {
85357
- const removeListeners = [];
85358
- const shouldReportProgress = !!options?.downloadProgressCallback;
85359
- if (shouldReportProgress) {
85360
- const handleProgress = (_evt, data) => {
85361
- options?.downloadProgressCallback?.(data);
85362
- };
85363
- const removeProgressListener = _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.addListener((0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.getPullChangesIpcChannel)(this.iModelId), handleProgress);
85364
- removeListeners.push(removeProgressListener);
85365
- }
85366
- if (options?.abortSignal) {
85367
- const abort = () => void _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key);
85368
- options?.abortSignal.addEventListener("abort", abort);
85369
- removeListeners.push(() => options?.abortSignal?.removeEventListener("abort", abort));
85370
- }
85371
85575
  this.requireTimeline();
85576
+ const removeListeners = this.listenForChangesetDownloadProgress({
85577
+ channel: (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.getPullChangesIpcChannel)(this.key),
85578
+ cancel: async () => _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key),
85579
+ downloadProgressCallback: options?.downloadProgressCallback,
85580
+ abortSignal: options?.abortSignal,
85581
+ });
85372
85582
  const ipcAppOptions = {
85373
- reportProgress: shouldReportProgress,
85583
+ reportProgress: !!options?.downloadProgressCallback,
85374
85584
  progressInterval: options?.progressInterval,
85375
85585
  enableCancellation: !!options?.abortSignal,
85376
85586
  };
@@ -85378,18 +85588,29 @@ class BriefcaseConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_5__
85378
85588
  this.changeset = await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.pullChanges(this.key, toIndex, ipcAppOptions);
85379
85589
  }
85380
85590
  finally {
85381
- removeListeners.forEach((remove) => remove());
85591
+ removeListeners();
85382
85592
  }
85383
85593
  await this.invalidateSchemaViewIfChanged();
85384
85594
  }
85385
- /** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.
85386
- * @param description The description for the changeset
85387
- * @returns the changesetId of the pushed changes
85388
- * @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.
85389
- */
85390
- async pushChanges(description) {
85595
+ async pushChanges(description, options) {
85391
85596
  this.requireTimeline();
85392
- return this.changeset = await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.pushChanges(this.key, description);
85597
+ const removeListeners = this.listenForChangesetDownloadProgress({
85598
+ channel: (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.getPushChangesIpcChannel)(this.key),
85599
+ cancel: async () => _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.cancelPushChangesRequest(this.key),
85600
+ downloadProgressCallback: options?.downloadProgressCallback,
85601
+ abortSignal: options?.abortSignal,
85602
+ });
85603
+ const ipcAppOptions = {
85604
+ reportDownloadProgress: !!options?.downloadProgressCallback,
85605
+ downloadProgressInterval: options?.downloadProgressInterval,
85606
+ enableCancellation: !!options?.abortSignal,
85607
+ };
85608
+ try {
85609
+ return this.changeset = await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.pushChanges(this.key, description, ipcAppOptions);
85610
+ }
85611
+ finally {
85612
+ removeListeners();
85613
+ }
85393
85614
  }
85394
85615
  /** The current graphical editing scope, if one is in progress.
85395
85616
  * @see [[enterEditingScope]] to begin graphical editing.
@@ -99038,20 +99259,11 @@ class TentativePoint {
99038
99259
  const vp = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_6__.expectDefined)(ev.viewport);
99039
99260
  if (vp.isSnapAdjustmentRequired) {
99040
99261
  _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustPointToACS(point, vp, false);
99041
- const hit = new _HitDetail__WEBPACK_IMPORTED_MODULE_2__.HitDetail({
99042
- testPoint: point,
99043
- viewport: vp,
99044
- hitSource: _HitDetail__WEBPACK_IMPORTED_MODULE_2__.HitSource.TentativeSnap,
99045
- hitPoint: point,
99046
- sourceId: "",
99047
- priority: _HitDetail__WEBPACK_IMPORTED_MODULE_2__.HitPriority.Unknown,
99048
- distXY: 0,
99049
- distFraction: 0,
99050
- });
99051
- const snap = new _HitDetail__WEBPACK_IMPORTED_MODULE_2__.SnapDetail(hit);
99052
- this.setCurrSnap(snap);
99053
- _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustSnapPoint();
99054
- this.setPoint(this.getPoint());
99262
+ // NOTE: Apply similar adjustments as ToolAdmin.adjustSnapPoint for snap that isn't hot with AccuDraw is active...
99263
+ _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustPointToGrid(point, vp);
99264
+ if (!_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.accuDraw.adjustPoint(point, vp, false))
99265
+ _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.adjustPointToACS(point, vp, true);
99266
+ this.setPoint(point);
99055
99267
  }
99056
99268
  else {
99057
99269
  _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.accuDraw.adjustPoint(point, vp, false);
@@ -154121,7 +154333,7 @@ function readPnts(stream, dataOffset, pnts) {
154121
154333
  }
154122
154334
  async function decodeDracoPointCloud(buf) {
154123
154335
  try {
154124
- 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;
154336
+ 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;
154125
154337
  const mesh = await dracoLoader.parse(buf, {});
154126
154338
  if (mesh.topology !== "point-list")
154127
154339
  return undefined;
@@ -166902,7 +167114,7 @@ class GltfReader {
166902
167114
  if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ProcessDetector.isIEBrowser) {
166903
167115
  throw new Error("Unsupported browser for Draco decoding");
166904
167116
  }
166905
- 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;
167117
+ 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;
166906
167118
  await Promise.all(dracoMeshes.map(async (x) => this.decodeDracoMesh(x, dracoLoader)));
166907
167119
  }
166908
167120
  catch (err) {
@@ -166946,8 +167158,10 @@ class GltfReader {
166946
167158
  "draco_wasm_wrapper.js": `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}scripts/draco_wasm_wrapper.js`,
166947
167159
  "draco_decoder.wasm": `${_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.publicPath}scripts/draco_decoder.wasm`,
166948
167160
  },
166949
- worker: false,
166950
- useLocalLibraries: true,
167161
+ core: {
167162
+ worker: false,
167163
+ useLocalLibraries: true,
167164
+ },
166951
167165
  });
166952
167166
  if (mesh)
166953
167167
  this._dracoMeshes.set(ext, mesh);
@@ -194998,15 +195212,18 @@ __webpack_require__.r(__webpack_exports__);
194998
195212
 
194999
195213
 
195000
195214
  /**
195001
- * fitPoints and end condition data for [[AkimaCurve3d]]
195215
+ * Data for an [[AkimaCurve3d]]
195002
195216
  * * This is a "typed object" version of the serializer-friendly [[AkimaCurve3dProps]]
195003
- * * Typical use cases rarely require all parameters, so the constructor does not itemize them as parameters.
195004
195217
  * @public
195005
195218
  */
195006
195219
  class AkimaCurve3dOptions {
195220
+ /**
195221
+ * Points that the curve must pass through.
195222
+ * * Traditional DGN-style Akima curves interpret the first two and last two fit points as end tangent conditions,
195223
+ * however as the current implementation uses another interpolation algorithm, there is no such interpretation here.
195224
+ */
195007
195225
  fitPoints;
195008
195226
  /**
195009
- *
195010
195227
  * @param fitPoints points to CAPTURE
195011
195228
  * @param knots array to CAPTURE
195012
195229
  */
@@ -195017,7 +195234,7 @@ class AkimaCurve3dOptions {
195017
195234
  * First and last 2 points are "beyond the end" for control of end slope.
195018
195235
  fitPoints: Point3d[];
195019
195236
 
195020
- /** Clone with strongly typed members reduced to simple json. */
195237
+ /** Clone with strongly typed members reduced to simple json. */
195021
195238
  cloneAsAkimaCurve3dProps() {
195022
195239
  const props = {
195023
195240
  fitPoints: _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.cloneDeepJSONNumberArrays(this.fitPoints),
@@ -195034,24 +195251,25 @@ class AkimaCurve3dOptions {
195034
195251
  const result = new AkimaCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.Point3dArray.clonePoint3dArray(source.fitPoints));
195035
195252
  return result;
195036
195253
  }
195254
+ /** Whether the two options are equivalent or both undefined. */
195037
195255
  static areAlmostEqual(dataA, dataB) {
195038
195256
  if (dataA === undefined && dataB === undefined)
195039
195257
  return true;
195040
- if (dataA !== undefined && dataB !== undefined) {
195258
+ if (dataA !== undefined && dataB !== undefined)
195041
195259
  return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.almostEqualArrays(dataA.fitPoints, dataB.fitPoints, (a, b) => a.isAlmostEqual(b));
195042
- }
195043
195260
  return false;
195044
195261
  }
195045
195262
  }
195046
195263
  /**
195047
- * Interpolating curve.
195264
+ * Interpolating curve using the Akima formulation.
195048
195265
  * * Derive from [[ProxyCurve]]
195049
195266
  * * Use a [[BSplineCurve3d]] as the proxy
195050
- * *
195267
+ * * Currently the Akima formulation is replaced with a Greville interpolation.
195051
195268
  * @public
195052
195269
  */
195053
195270
  class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyCurve {
195054
- curvePrimitiveType = "interpolationCurve";
195271
+ /** String name for schema properties. */
195272
+ curvePrimitiveType = "akimaCurve";
195055
195273
  _options;
195056
195274
  /** CAPTURE properties and proxy curve. */
195057
195275
  constructor(properties, proxyCurve) {
@@ -195066,9 +195284,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
195066
195284
  return result;
195067
195285
  }
195068
195286
  /**
195069
- * Create an [[AkimaCurve3d]] based on points, knots, and other properties in the [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].
195287
+ * Create an [[AkimaCurve3d]] based on an [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].
195070
195288
  * * This saves a COPY OF the options or props.
195071
- * * Use createCapture () if the options or props can be used without copy
195289
+ * * Use createCapture() if the options or props can be used without copy
195072
195290
  */
195073
195291
  static create(options) {
195074
195292
  let optionsCopy;
@@ -195121,11 +195339,9 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
195121
195339
  * Transform this [[AkimaCurve3d]] and its defining data in place
195122
195340
  */
195123
195341
  tryTransformInPlace(transform) {
195124
- const proxyOk = this._proxyCurve.tryTransformInPlace(transform);
195125
- if (proxyOk) {
195126
- transform.multiplyPoint3dArray(this._options.fitPoints);
195127
- }
195128
- return proxyOk;
195342
+ this._proxyCurve.tryTransformInPlace(transform);
195343
+ transform.multiplyPoint3dArray(this._options.fitPoints);
195344
+ return true; // we know this succeeds
195129
195345
  }
195130
195346
  /**
195131
195347
  * Find intervals of this CurvePrimitive that are interior to a clipper.
@@ -195147,6 +195363,7 @@ class AkimaCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_0__.ProxyC
195147
195363
  }
195148
195364
  /** Test if `other` is also an [[AkimaCurve3d]] */
195149
195365
  isSameGeometryClass(other) { return other instanceof AkimaCurve3d; }
195366
+ /** Test if this [[AkimaCurve3d]] is almost equal to another GeometryQuery object. */
195150
195367
  isAlmostEqual(other) {
195151
195368
  if (other instanceof AkimaCurve3d) {
195152
195369
  return AkimaCurve3dOptions.areAlmostEqual(this._options, other._options);
@@ -196051,10 +196268,11 @@ class BSplineCurve3d extends BSplineCurve3dBase {
196051
196268
  }
196052
196269
  /**
196053
196270
  * Create a B-spline curve from an Akima curve.
196054
- * @param options collection of points and end conditions.
196271
+ * * The Akima formulation of the curve is currently replaced by a Greville interpolation.
196272
+ * @param options data for construction
196055
196273
  */
196056
196274
  static createFromAkimaCurve3dOptions(options) {
196057
- return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4); // temporary
196275
+ return _BSplineCurveOps__WEBPACK_IMPORTED_MODULE_19__.BSplineCurveOps.createThroughPoints(options.fitPoints, 4);
196058
196276
  }
196059
196277
  /**
196060
196278
  * Create a B-spline curve with given knots.
@@ -200091,8 +200309,7 @@ class InterpolationCurve3dOptions {
200091
200309
  result._endTangent = source.endTangent ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Vector3d.fromJSON(source.endTangent) : undefined;
200092
200310
  return result;
200093
200311
  }
200094
- // ugh.
200095
- // vector equality test with awkward rule that 000 matches undefined.
200312
+ /** Vector equality test, with the additional rule that the zero vector matches undefined. */
200096
200313
  static areAlmostEqualAllow000AsUndefined(a, b) {
200097
200314
  if (a !== undefined && a.maxAbs() === 0)
200098
200315
  a = undefined;
@@ -200102,6 +200319,7 @@ class InterpolationCurve3dOptions {
200102
200319
  return a.isAlmostEqual(b);
200103
200320
  return a === undefined && b === undefined;
200104
200321
  }
200322
+ /** Whether the two options are equivalent or both undefined. */
200105
200323
  static areAlmostEqual(dataA, dataB) {
200106
200324
  if (dataA === undefined && dataB === undefined)
200107
200325
  return true;
@@ -200150,6 +200368,7 @@ class InterpolationCurve3dOptions {
200150
200368
  * @public
200151
200369
  */
200152
200370
  class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1__.ProxyCurve {
200371
+ /** String name for schema properties. */
200153
200372
  curvePrimitiveType = "interpolationCurve";
200154
200373
  _options;
200155
200374
  /** CAPTURE properties and proxy curve. */
@@ -200222,15 +200441,13 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
200222
200441
  * Transform this [[InterpolationCurve3d]] and its defining data in place
200223
200442
  */
200224
200443
  tryTransformInPlace(transform) {
200225
- const proxyOk = this._proxyCurve.tryTransformInPlace(transform);
200226
- if (proxyOk) {
200227
- transform.multiplyPoint3dArrayInPlace(this._options.fitPoints);
200228
- if (this._options.startTangent)
200229
- transform.multiplyVectorInPlace(this._options.startTangent);
200230
- if (this._options.endTangent)
200231
- transform.multiplyVectorInPlace(this._options.endTangent);
200232
- }
200233
- return proxyOk;
200444
+ this._proxyCurve.tryTransformInPlace(transform);
200445
+ transform.multiplyPoint3dArrayInPlace(this._options.fitPoints);
200446
+ if (this._options.startTangent)
200447
+ transform.multiplyVectorInPlace(this._options.startTangent);
200448
+ if (this._options.endTangent)
200449
+ transform.multiplyVectorInPlace(this._options.endTangent);
200450
+ return true; // we know this succeeds
200234
200451
  }
200235
200452
  /**
200236
200453
  * Find intervals of this CurvePrimitive that are interior to a clipper.
@@ -200250,6 +200467,7 @@ class InterpolationCurve3d extends _curve_ProxyCurve__WEBPACK_IMPORTED_MODULE_1_
200250
200467
  cloneTransformed(transform) {
200251
200468
  return super.cloneTransformed(transform);
200252
200469
  }
200470
+ /** Test if this [[InterpolationCurve3d]] is almost equal to another GeometryQuery object. */
200253
200471
  isAlmostEqual(other) {
200254
200472
  if (other instanceof InterpolationCurve3d) {
200255
200473
  return InterpolationCurve3dOptions.areAlmostEqual(this._options, other._options);
@@ -203698,8 +203916,6 @@ class ClipUtilities {
203698
203916
  if (!worldToLocal)
203699
203917
  return result;
203700
203918
  const localRegion = region.cloneTransformed(worldToLocal); // parallel to xy-plane so we can ignore z
203701
- if (!localRegion)
203702
- return result;
203703
203919
  // We can only clip convex polygons with our clipper machinery, but the input region doesn't have to be
203704
203920
  // convex or even a polygon. We get around this limitation by using a Boolean operation, which admits
203705
203921
  // *any* planar regions, albeit in local coordinates. First, we clip a rectangle that covers the input region
@@ -209335,10 +209551,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209335
209551
  * @param options how finely to stroke the path to create the distance index
209336
209552
  */
209337
209553
  cloneTransformed(transform, options) {
209338
- const c = this._path.clone();
209339
- if (c.tryTransformInPlace(transform))
209340
- return CurveChainWithDistanceIndex.createCapture(c, options);
209341
- return undefined;
209554
+ return CurveChainWithDistanceIndex.createCapture(this._path.cloneTransformed(transform), options);
209342
209555
  }
209343
209556
  /**
209344
209557
  * Reference to the contained path.
@@ -209359,8 +209572,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209359
209572
  * @param options how finely to stroke the path to create the distance index
209360
209573
  */
209361
209574
  clone(options) {
209362
- const c = this._path.clone();
209363
- return CurveChainWithDistanceIndex.createCapture(c, options);
209575
+ return CurveChainWithDistanceIndex.createCapture(this._path.clone(), options);
209364
209576
  }
209365
209577
  /**
209366
209578
  * Return a portion of this curve with its own distance index.
@@ -209538,15 +209750,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209538
209750
  * @return cloned flattened CurveChain, or reference to the input chain if no nesting
209539
209751
  */
209540
209752
  static flattenNestedChains(chain) {
209541
- if (-1 === chain.children.findIndex((child) => { return child instanceof CurveChainWithDistanceIndex; }))
209753
+ if (-1 === chain.children.findIndex((c) => c instanceof CurveChainWithDistanceIndex))
209542
209754
  return chain;
209543
209755
  const flatChain = chain.clone();
209544
- const flatChildren = flatChain.children.flatMap((child) => {
209545
- if (child instanceof CurveChainWithDistanceIndex)
209546
- return child.path.children;
209547
- else
209548
- return [child];
209549
- });
209756
+ const flatChildren = flatChain.children.flatMap((c) => c instanceof CurveChainWithDistanceIndex ? c.path.children : c);
209550
209757
  flatChain.children.splice(0, Infinity, ...flatChildren);
209551
209758
  return flatChain;
209552
209759
  }
@@ -209727,18 +209934,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
209727
209934
  return result;
209728
209935
  }
209729
209936
  /**
209730
- * Attempt to transform in place.
209731
- * * Warning: If any child transform fails, `this` object becomes invalid but that should never happen.
209732
- * @param transform the transform to be applied.
209733
- * @returns true if all of child transforms succeed and false otherwise.
209937
+ * Transform the chain in place.
209938
+ * * Does NOT recompute the distance index.
209939
+ * * For best results, use a rigid transform. Otherwise, it is better to call [[cloneTransformed]] so that the
209940
+ * distance index is recomputed.
209734
209941
  */
209735
209942
  tryTransformInPlace(transform) {
209736
- let numFail = 0;
209737
- for (const c of this._path.children) {
209738
- if (!c.tryTransformInPlace(transform))
209739
- numFail++;
209740
- }
209741
- return numFail === 0;
209943
+ return this._path.tryTransformInPlace(transform);
209742
209944
  }
209743
209945
  /** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */
209744
209946
  reverseInPlace() {
@@ -210041,8 +210243,6 @@ __webpack_require__.r(__webpack_exports__);
210041
210243
  class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__.GeometryQuery {
210042
210244
  /** String name for schema properties */
210043
210245
  geometryCategory = "curveCollection";
210044
- /** Flag for inner loop status. Only used by `Loop`. */
210045
- isInner = false;
210046
210246
  /** Return the sum of the lengths of all contained curves. */
210047
210247
  sumLengths() {
210048
210248
  return _internalContexts_SumLengthsContext__WEBPACK_IMPORTED_MODULE_13__.SumLengthsContext.sumLengths(this);
@@ -210324,6 +210524,21 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__.Geomet
210324
210524
  return undefined;
210325
210525
  }
210326
210526
  ;
210527
+ /**
210528
+ * Ask if the curves of the collection are within tolerance of the input plane.
210529
+ * @returns whether the collection is nonempty and its curves lie within tolerance of the plane.
210530
+ */
210531
+ isInPlane(plane) {
210532
+ if (0 === this.children.length)
210533
+ return false; // punt on empty parent...
210534
+ for (const child of this.children) {
210535
+ if (child instanceof CurveCollection && 0 === child.children.length)
210536
+ continue; // ...but ignore an empty child
210537
+ if (!child.isInPlane(plane))
210538
+ return false;
210539
+ }
210540
+ return true;
210541
+ }
210327
210542
  }
210328
210543
  /**
210329
210544
  * Shared base class for use by both open and closed paths.
@@ -210435,6 +210650,18 @@ class CurveChain extends CurveCollection {
210435
210650
  }
210436
210651
  return undefined;
210437
210652
  }
210653
+ /** Return a deep copy. */
210654
+ clone() {
210655
+ return super.clone();
210656
+ }
210657
+ /** Create a deep copy of transformed curves. */
210658
+ cloneTransformed(transform) {
210659
+ return super.cloneTransformed(transform);
210660
+ }
210661
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
210662
+ cloneWithExpandedLineStrings() {
210663
+ return super.cloneWithExpandedLineStrings();
210664
+ }
210438
210665
  /**
210439
210666
  * Add a child curve.
210440
210667
  * @param child curve to add to the chain. The curve is captured by this instance.
@@ -210565,6 +210792,18 @@ class BagOfCurves extends CurveCollection {
210565
210792
  cloneEmptyPeer() {
210566
210793
  return new BagOfCurves();
210567
210794
  }
210795
+ /** Return a deep copy. */
210796
+ clone() {
210797
+ return super.clone();
210798
+ }
210799
+ /** Create a deep copy of transformed curves. */
210800
+ cloneTransformed(transform) {
210801
+ return super.cloneTransformed(transform);
210802
+ }
210803
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
210804
+ cloneWithExpandedLineStrings() {
210805
+ return super.cloneWithExpandedLineStrings();
210806
+ }
210568
210807
  /** Add a child */
210569
210808
  tryAddChild(child) {
210570
210809
  if (child)
@@ -211556,11 +211795,10 @@ class CurveFactory {
211556
211795
  // The alignment condition is equivalent to positive projected curve area computed wrt to the plane normal.
211557
211796
  const toLocal = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_4__.Matrix3d.createRigidHeadsUp(planeNormal).transpose();
211558
211797
  const projection = closedCurve.cloneTransformed(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__.Transform.createOriginAndMatrix(undefined, toLocal));
211559
- if (projection) { // now we can ignore z-coords
211560
- const areaXY = _RegionOps__WEBPACK_IMPORTED_MODULE_25__.RegionOps.computeXYArea(projection);
211561
- if (areaXY && areaXY < 0)
211562
- curve.reverseInPlace();
211563
- }
211798
+ // now we can ignore z-coords
211799
+ const areaXY = _RegionOps__WEBPACK_IMPORTED_MODULE_25__.RegionOps.computeXYArea(projection);
211800
+ if (areaXY && areaXY < 0)
211801
+ curve.reverseInPlace();
211564
211802
  }
211565
211803
  }
211566
211804
  /**
@@ -212719,9 +212957,9 @@ __webpack_require__.r(__webpack_exports__);
212719
212957
  /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
212720
212958
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
212721
212959
  /* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
212722
- /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
212723
- /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
212724
- /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
212960
+ /* harmony import */ var _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/AnnounceTangentStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js");
212961
+ /* harmony import */ var _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/AppendPlaneIntersectionStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js");
212962
+ /* harmony import */ var _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/ClosestPointStrokeHandler */ "../../core/geometry/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js");
212725
212963
  /* harmony import */ var _internalContexts_CurveLengthContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/CurveLengthContext */ "../../core/geometry/lib/esm/curve/internalContexts/CurveLengthContext.js");
212726
212964
  /*---------------------------------------------------------------------------------------------
212727
212965
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -213140,7 +213378,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213140
213378
  * @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
213141
213379
  */
213142
213380
  closestPoint(spacePoint, extend = false, result) {
213143
- const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.ClosestPointStrokeHandler(spacePoint, extend, result);
213381
+ const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result);
213144
213382
  this.emitStrokableParts(strokeHandler);
213145
213383
  return strokeHandler.claimResult();
213146
213384
  }
@@ -213156,7 +213394,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213156
213394
  * @returns details `d` of the closest point. The distance from spacePoint to the closest point is stored in `d.a`.
213157
213395
  */
213158
213396
  closestPointXY(spacePoint, extend = false, result) {
213159
- const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.ClosestPointStrokeHandler(spacePoint, extend, result, true);
213397
+ const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.ClosestPointStrokeHandler(spacePoint, extend, result, true);
213160
213398
  this.emitStrokableParts(strokeHandler);
213161
213399
  return strokeHandler.claimResult();
213162
213400
  }
@@ -213172,7 +213410,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213172
213410
  * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
213173
213411
  */
213174
213412
  emitTangents(spacePoint, announceTangent, options) {
213175
- const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_12__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
213413
+ const strokeHandler = new _internalContexts_AnnounceTangentStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
213176
213414
  this.emitStrokableParts(strokeHandler, options?.strokeOptions);
213177
213415
  }
213178
213416
  /**
@@ -213267,7 +213505,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_9__.Geometr
213267
213505
  * @returns Return the number of CurveLocationDetail's added to the result array.
213268
213506
  */
213269
213507
  appendPlaneIntersectionPoints(plane, result) {
213270
- const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.AppendPlaneIntersectionStrokeHandler(plane, result);
213508
+ const strokeHandler = new _internalContexts_AppendPlaneIntersectionStrokeHandler__WEBPACK_IMPORTED_MODULE_11__.AppendPlaneIntersectionStrokeHandler(plane, result);
213271
213509
  const n0 = result.length;
213272
213510
  this.emitStrokableParts(strokeHandler);
213273
213511
  return result.length - n0;
@@ -213465,6 +213703,13 @@ __webpack_require__.r(__webpack_exports__);
213465
213703
  /* harmony export */ RecursiveCurveProcessorWithStack: () => (/* binding */ RecursiveCurveProcessorWithStack)
213466
213704
  /* harmony export */ });
213467
213705
  /* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
213706
+ /*---------------------------------------------------------------------------------------------
213707
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
213708
+ * See LICENSE.md in the project root for license terms and full copyright notice.
213709
+ *--------------------------------------------------------------------------------------------*/
213710
+ /** @packageDocumentation
213711
+ * @module Curve
213712
+ */
213468
213713
 
213469
213714
  /** base class for detailed traversal of curve artifacts.
213470
213715
  * * This recurses to children in the quickest way (no records of path)
@@ -213500,7 +213745,10 @@ class RecursiveCurveProcessor {
213500
213745
  announceUnionRegion(data, _indexInParent = -1) {
213501
213746
  let i = 0;
213502
213747
  for (const child of data.children) {
213503
- child.announceToCurveProcessor(this, i++);
213748
+ if (child.curveCollectionType === "loop")
213749
+ this.announceLoop(child, i++);
213750
+ else
213751
+ this.announceParityRegion(child, i++);
213504
213752
  }
213505
213753
  }
213506
213754
  /** announce a bag of curves.
@@ -213562,9 +213810,15 @@ class RecursiveCurveProcessorWithStack extends RecursiveCurveProcessor {
213562
213810
  this.leave();
213563
213811
  }
213564
213812
  /** announce beginning or end of a parity region */
213565
- announceUnionRegion(data, indexInParent = -1) {
213813
+ announceUnionRegion(data, _indexInParent = -1) {
213566
213814
  this.enter(data);
213567
- super.announceUnionRegion(data, indexInParent);
213815
+ let i = 0;
213816
+ for (const child of data.children) {
213817
+ if (child.curveCollectionType === "loop")
213818
+ this.announceLoop(child, i++);
213819
+ else
213820
+ this.announceParityRegion(child, i++);
213821
+ }
213568
213822
  this.leave();
213569
213823
  }
213570
213824
  /**
@@ -213686,8 +213940,10 @@ __webpack_require__.r(__webpack_exports__);
213686
213940
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
213687
213941
  /* harmony export */ GeometryQuery: () => (/* binding */ GeometryQuery)
213688
213942
  /* harmony export */ });
213689
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
213690
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
213943
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
213944
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
213945
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
213946
+
213691
213947
 
213692
213948
 
213693
213949
  /**
@@ -213701,13 +213957,13 @@ class GeometryQuery {
213701
213957
  range(transform, result) {
213702
213958
  if (result)
213703
213959
  result.setNull();
213704
- const range = result ? result : _geometry3d_Range__WEBPACK_IMPORTED_MODULE_0__.Range3d.createNull();
213960
+ const range = result ? result : _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
213705
213961
  this.extendRange(range, transform);
213706
213962
  return range;
213707
213963
  }
213708
213964
  /** Try to move the geometry by dx,dy,dz. */
213709
213965
  tryTranslateInPlace(dx, dy = 0.0, dz = 0.0) {
213710
- return this.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslationXYZ(dx, dy, dz));
213966
+ return this.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createTranslationXYZ(dx, dy, dz));
213711
213967
  }
213712
213968
  /**
213713
213969
  * Return GeometryQuery children for recursive queries.
@@ -213757,6 +214013,57 @@ class GeometryQuery {
213757
214013
  return true;
213758
214014
  return false;
213759
214015
  }
214016
+ /**
214017
+ * Compute a distance tolerance appropriate for comparing the coordinates of `geom`.
214018
+ * * The formula is `absTol = minTol + relTol * geomSize`, where `geomSize` is the largest absolute coordinate of
214019
+ * the geometry range.
214020
+ * * Scaling tolerances by geometry size helps account for the decreased floating point resolution between large
214021
+ * coordinates. While using such scaled tolerances can enable more tolerance-sensitive constructions to succeed on
214022
+ * far-flung geometries, on extremely small geometries at extremely large coordinate magnitudes, geometric
214023
+ * constructions are generally more accurate when applied to the geometry temporarily translated to the origin.
214024
+ * @param geom geometry to measure
214025
+ * @param options bundle of options
214026
+ * @returns the computed absolute tolerance
214027
+ * @see [[scaleToleranceForGeometry]]
214028
+ */
214029
+ static computeScaledTolerance(geom, options) {
214030
+ const relTol = Math.abs(options?.relativeTolerance ?? _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance);
214031
+ const minTol = Math.abs(options?.minimumTolerance ?? _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistanceSquared);
214032
+ const geomRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
214033
+ (Array.isArray(geom) ? geom : [geom]).forEach((g) => g.extendRange(geomRange, options?.transform));
214034
+ const geomSize = geomRange.isNull ? 0 : options?.xyOnly ? geomRange.maxAbsXY() : geomRange.maxAbs();
214035
+ return minTol + relTol * geomSize;
214036
+ }
214037
+ /**
214038
+ * Scale the given distance tolerance as appropriate for comparing the coordinates of `geom`.
214039
+ * * Scaling tolerances by geometry size helps account for the decreased floating point resolution between large
214040
+ * coordinates. While using such scaled tolerances can enable more tolerance-sensitive constructions to succeed on
214041
+ * far-flung geometries, on extremely small geometries at extremely large coordinate magnitudes, geometric
214042
+ * constructions are generally more accurate when applied to the geometry temporarily translated to the origin.
214043
+ * @param geom geometry to measure
214044
+ * @param distanceTolerance positive input distance tolerance to examine
214045
+ * @param options bundle of options (`minimumTolerance` and `relativeTolerance` are ignored)
214046
+ * @return a distance tolerance >= `distanceTolerance`
214047
+ * @see [[computeScaledTolerance]]
214048
+ */
214049
+ static scaleToleranceForGeometry(geom, distanceTolerance, options) {
214050
+ if (distanceTolerance > 0) {
214051
+ const geomRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
214052
+ (Array.isArray(geom) ? geom : [geom]).forEach((g) => g.extendRange(geomRange, options?.transform));
214053
+ if (!geomRange.isNull) {
214054
+ const geomSize = options?.xyOnly ? geomRange.maxAbsXY() : geomRange.maxAbs();
214055
+ if (geomSize > 0) {
214056
+ // HEURISTIC: truncate the fractional part of a coordinate's base-10 significand to maxDigits digits.
214057
+ // Adding the tolerance to this number should change the significand; otherwise, it's too small.
214058
+ const maxDigits = 10; // comfortably far from IEEE double's 15 guaranteed fractional digits
214059
+ const requiredDigitsForTol = Math.floor(Math.log10(geomSize / distanceTolerance));
214060
+ if (requiredDigitsForTol > maxDigits)
214061
+ distanceTolerance *= Math.pow(10, requiredDigitsForTol - maxDigits);
214062
+ }
214063
+ }
214064
+ }
214065
+ return distanceTolerance;
214066
+ }
213760
214067
  }
213761
214068
 
213762
214069
 
@@ -214117,7 +214424,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_11__.CurveP
214117
214424
  this._point0 = this._point1;
214118
214425
  this._point1 = a;
214119
214426
  }
214120
- /** Transform the two endpoints of this LinSegment. */
214427
+ /** Transform the two endpoints of this line segment. */
214121
214428
  tryTransformInPlace(transform) {
214122
214429
  this._point0 = transform.multiplyPoint3d(this._point0, this._point0);
214123
214430
  this._point1 = transform.multiplyPoint3d(this._point1, this._point1);
@@ -215932,12 +216239,19 @@ __webpack_require__.r(__webpack_exports__);
215932
216239
  class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
215933
216240
  /** String name for schema properties */
215934
216241
  curveCollectionType = "loop";
215935
- /** Tag value that can be set to true for user code to mark inner and outer loops. */
216242
+ /**
216243
+ * Flag for inner loop status (default value is `false`).
216244
+ * * Typical usage is to set to `true` on hole `Loop`s in a `ParityRegion` to distinguish them from the outer `Loop`.
216245
+ * * This property is only set by the user, and does not affect region processing.
216246
+ * * This property is propagated through [[clone]] and JSON/FlatBuffer de/serialization.
216247
+ * * For best de/serialization results, avoid setting to `false` on multiple `Loop`s of a `ParityRegion`.
216248
+ */
215936
216249
  isInner = false;
215937
216250
  /** Test if `other` is a `Loop` */
215938
216251
  isSameGeometryClass(other) {
215939
216252
  return other instanceof Loop;
215940
216253
  }
216254
+ /** Construct an empty loop. */
215941
216255
  constructor() {
215942
216256
  super();
215943
216257
  }
@@ -216007,10 +216321,28 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_1__.CurveChain {
216007
216321
  emptyClone.isInner = this.isInner;
216008
216322
  return emptyClone;
216009
216323
  }
216324
+ /** Return a deep copy. */
216325
+ clone() {
216326
+ return super.clone();
216327
+ }
216328
+ /** Create a deep copy of transformed curves. */
216329
+ cloneTransformed(transform) {
216330
+ return super.cloneTransformed(transform);
216331
+ }
216332
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
216333
+ cloneWithExpandedLineStrings() {
216334
+ return super.cloneWithExpandedLineStrings();
216335
+ }
216010
216336
  /** Second step of double dispatch: call `handler.handleLoop(this)` */
216011
216337
  dispatchToGeometryHandler(handler) {
216012
216338
  return handler.handleLoop(this);
216013
216339
  }
216340
+ /** Test for near equality */
216341
+ isAlmostEqual(other) {
216342
+ if (!super.isAlmostEqual(other))
216343
+ return false;
216344
+ return this.isInner === other.isInner;
216345
+ }
216014
216346
  }
216015
216347
  /**
216016
216348
  * Structure carrying a pair of loops with curve geometry.
@@ -216318,14 +216650,15 @@ class ParityRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCo
216318
216650
  }
216319
216651
  /** Return a deep copy. */
216320
216652
  clone() {
216321
- const clone = new ParityRegion();
216322
- let child;
216323
- for (child of this.children) {
216324
- const childClone = child.clone();
216325
- if (childClone instanceof _Loop__WEBPACK_IMPORTED_MODULE_1__.Loop)
216326
- clone.children.push(childClone);
216327
- }
216328
- return clone;
216653
+ return super.clone();
216654
+ }
216655
+ /** Create a deep copy of transformed curves. */
216656
+ cloneTransformed(transform) {
216657
+ return super.cloneTransformed(transform);
216658
+ }
216659
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
216660
+ cloneWithExpandedLineStrings() {
216661
+ return super.cloneWithExpandedLineStrings();
216329
216662
  }
216330
216663
  /** Stroke these curves into a new ParityRegion. */
216331
216664
  cloneStroked(options) {
@@ -216454,6 +216787,18 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_2__.CurveChain {
216454
216787
  cloneEmptyPeer() {
216455
216788
  return new Path();
216456
216789
  }
216790
+ /** Return a deep copy. */
216791
+ clone() {
216792
+ return super.clone();
216793
+ }
216794
+ /** Create a deep copy of transformed curves. */
216795
+ cloneTransformed(transform) {
216796
+ return super.cloneTransformed(transform);
216797
+ }
216798
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
216799
+ cloneWithExpandedLineStrings() {
216800
+ return super.cloneWithExpandedLineStrings();
216801
+ }
216457
216802
  /** Second step of double dispatch: call `handler.handlePath(this)` */
216458
216803
  dispatchToGeometryHandler(handler) {
216459
216804
  return handler.handlePath(this);
@@ -216729,9 +217074,8 @@ class ProxyCurve extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.Curv
216729
217074
  /** Return a transformed clone. */
216730
217075
  cloneTransformed(transform) {
216731
217076
  const myClone = this.clone();
216732
- if (myClone.tryTransformInPlace(transform))
216733
- return myClone;
216734
- return undefined;
217077
+ myClone.tryTransformInPlace(transform);
217078
+ return myClone;
216735
217079
  }
216736
217080
  /** Implement by proxyCurve. Subclasses may eventually override this default implementation. */
216737
217081
  clonePartialCurve(fractionA, fractionB) {
@@ -217400,8 +217744,8 @@ __webpack_require__.r(__webpack_exports__);
217400
217744
 
217401
217745
 
217402
217746
 
217403
- /** @packageDocumentation
217404
- * @module Curve
217747
+ /**
217748
+ * @internal
217405
217749
  */
217406
217750
  class MapCurvePrimitiveToCurveLocationDetailPairArray {
217407
217751
  primitiveToPair = new Map();
@@ -217471,7 +217815,7 @@ class PlanarSubdivision {
217471
217815
  * @param allPairs array of curve-curve xy-intersections
217472
217816
  * @param mergeTolerance optional distance tolerance for clustering vertices. Default value is [[Geometry.smallMetricDistance]].
217473
217817
  */
217474
- static assembleHalfEdgeGraph(primitives, allPairs, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
217818
+ static assembleHalfEdgeGraph(primitives, allPairs, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance, radianTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians) {
217475
217819
  // map from key CurvePrimitive to CurveLocationDetailPair
217476
217820
  const detailByPrimitive = new MapCurvePrimitiveToCurveLocationDetailPairArray();
217477
217821
  for (const pair of allPairs)
@@ -217519,7 +217863,7 @@ class PlanarSubdivision {
217519
217863
  this.addHalfEdge(graph, p, last.point, last.fraction, p.endPoint(), 1.0, mergeTolerance);
217520
217864
  }
217521
217865
  // every edge got its sortAngle defined by addHalfEdge
217522
- _topology_Merging__WEBPACK_IMPORTED_MODULE_5__.HalfEdgeGraphMerge.clusterAndMergeXYTheta(graph, (he) => he.sortAngle ?? 0, mergeTolerance);
217866
+ _topology_Merging__WEBPACK_IMPORTED_MODULE_5__.HalfEdgeGraphMerge.clusterAndMergeXYTheta(graph, (he) => he.sortAngle ?? 0, mergeTolerance, radianTolerance);
217523
217867
  return graph;
217524
217868
  }
217525
217869
  /**
@@ -218800,8 +219144,6 @@ class RegionOps {
218800
219144
  const worldToLocal = localToWorld.inverse();
218801
219145
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(worldToLocal !== undefined, "FrameBuilder's transform is invertible");
218802
219146
  regionXY = region.cloneTransformed(worldToLocal);
218803
- if (!regionXY)
218804
- return undefined;
218805
219147
  }
218806
219148
  const momentData = RegionOps.computeXYAreaMoments(regionXY);
218807
219149
  if (!momentData)
@@ -219664,6 +220006,7 @@ class RegionOps {
219664
220006
  * to the edge and a constituent curve in each.
219665
220007
  */
219666
220008
  static constructAllXYRegionLoops(curvesAndRegions, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance, addBridges = true) {
220009
+ tolerance = _GeometryQuery__WEBPACK_IMPORTED_MODULE_25__.GeometryQuery.scaleToleranceForGeometry(curvesAndRegions, tolerance, { xyOnly: true });
219667
220010
  let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
219668
220011
  primitives = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_28__.TransferWithSplitArcs.clone(_CurveCollection__WEBPACK_IMPORTED_MODULE_19__.BagOfCurves.create(...primitives)).children;
219669
220012
  let hasOpenCurve = false;
@@ -219686,8 +220029,9 @@ class RegionOps {
219686
220029
  });
219687
220030
  }
219688
220031
  }
220032
+ const radianTolerance = 10000 * _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallAngleRadians; // be generous, and rely on curvature to break ties
219689
220033
  const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_20__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
219690
- const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_38__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
220034
+ const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_38__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance, radianTolerance);
219691
220035
  if (addBridges && hasOpenCurve)
219692
220036
  RegionOps.removeExtraneousBridgeEdges(graph);
219693
220037
  const areaTol = this.computeMinimumArea(tolerance);
@@ -221028,6 +221372,18 @@ class UnionRegion extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveCol
221028
221372
  cloneEmptyPeer() {
221029
221373
  return new UnionRegion();
221030
221374
  }
221375
+ /** Return a deep copy. */
221376
+ clone() {
221377
+ return super.clone();
221378
+ }
221379
+ /** Create a deep copy of transformed curves. */
221380
+ cloneTransformed(transform) {
221381
+ return super.cloneTransformed(transform);
221382
+ }
221383
+ /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */
221384
+ cloneWithExpandedLineStrings() {
221385
+ return super.cloneWithExpandedLineStrings();
221386
+ }
221031
221387
  /**
221032
221388
  * Try to add a child (by capturing it).
221033
221389
  * * Returns false if the `AnyCurve` child is not a region type.
@@ -221640,6 +221996,7 @@ __webpack_require__.r(__webpack_exports__);
221640
221996
  * Algorithmic class for cloning curve collections.
221641
221997
  * * recurse through collection nodes, building image nodes as needed and inserting clones of children.
221642
221998
  * * for individual primitive, invoke doClone (protected) for direct clone; insert into parent
221999
+ * @internal
221643
222000
  */
221644
222001
  class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessorWithStack {
221645
222002
  _result;
@@ -221678,7 +222035,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
221678
222035
  const c = this.doClone(primitive);
221679
222036
  if (c !== undefined && this._stack.length > 0) {
221680
222037
  const parent = this._stack[this._stack.length - 1];
221681
- if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves)
222038
+ if (parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain || parent instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.BagOfCurves) {
221682
222039
  if (Array.isArray(c)) {
221683
222040
  for (const c1 of c) {
221684
222041
  parent.tryAddChild(c1);
@@ -221687,6 +222044,7 @@ class CloneCurvesContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.Re
221687
222044
  else {
221688
222045
  parent.tryAddChild(c);
221689
222046
  }
222047
+ }
221690
222048
  }
221691
222049
  }
221692
222050
  }
@@ -227514,26 +227872,34 @@ __webpack_require__.r(__webpack_exports__);
227514
227872
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
227515
227873
  /* harmony export */ TransformInPlaceContext: () => (/* binding */ TransformInPlaceContext)
227516
227874
  /* harmony export */ });
227517
- /* harmony import */ var _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CurveProcessor */ "../../core/geometry/lib/esm/curve/CurveProcessor.js");
227875
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
227876
+ /* harmony import */ var _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../CurveProcessor */ "../../core/geometry/lib/esm/curve/CurveProcessor.js");
227877
+ /*---------------------------------------------------------------------------------------------
227878
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
227879
+ * See LICENSE.md in the project root for license terms and full copyright notice.
227880
+ *--------------------------------------------------------------------------------------------*/
227881
+ /** @packageDocumentation
227882
+ * @module Curve
227883
+ */
227518
227884
 
227519
- /** Algorithmic class: Transform curves in place.
227885
+
227886
+ /** Algorithmic class: Transform curves in place. Always expected to succeed.
227520
227887
  * @internal
227521
227888
  */
227522
- class TransformInPlaceContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_0__.RecursiveCurveProcessor {
227523
- numFail;
227524
- numOK;
227889
+ class TransformInPlaceContext extends _CurveProcessor__WEBPACK_IMPORTED_MODULE_1__.RecursiveCurveProcessor {
227525
227890
  transform;
227526
- constructor(transform) { super(); this.numFail = 0; this.numOK = 0; this.transform = transform; }
227891
+ constructor(transform) {
227892
+ super();
227893
+ this.transform = transform;
227894
+ }
227527
227895
  static tryTransformInPlace(target, transform) {
227528
227896
  const context = new TransformInPlaceContext(transform);
227529
227897
  target.announceToCurveProcessor(context);
227530
- return context.numFail === 0;
227898
+ return true;
227531
227899
  }
227532
227900
  announceCurvePrimitive(curvePrimitive, _indexInParent) {
227533
227901
  if (!curvePrimitive.tryTransformInPlace(this.transform))
227534
- this.numFail++;
227535
- else
227536
- this.numOK++;
227902
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "TransformInPlaceContext: unexpected failure of tryTransformInPlace");
227537
227903
  }
227538
227904
  }
227539
227905
 
@@ -230969,9 +231335,12 @@ class DirectSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_13__.T
230969
231335
  clone() {
230970
231336
  return new DirectSpiral3d(this.localToWorld.clone(), this._spiralType, this.designProperties?.clone(), this._nominalL1, this._nominalR1, this._activeFractionInterval?.clone(), this._evaluator.clone());
230971
231337
  }
230972
- /** Apply `transform` to this spiral's local to world transform. */
230973
- tryTransformInPlace(transformA) {
230974
- const rigidData = this.applyRigidPartOfTransform(transformA);
231338
+ /**
231339
+ * Apply `transform` to this spiral's local to world transform.
231340
+ * * Only the rigid part of the transform is applied.
231341
+ */
231342
+ tryTransformInPlace(transform) {
231343
+ const rigidData = this.applyRigidPartOfTransform(transform);
230975
231344
  if (rigidData !== undefined) {
230976
231345
  this._nominalL1 *= rigidData.scale;
230977
231346
  this._nominalR1 *= rigidData.scale;
@@ -231376,9 +231745,12 @@ class IntegratedSpiral3d extends _TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15
231376
231745
  clone() {
231377
231746
  return new IntegratedSpiral3d(this._spiralType, this._evaluator, this.radius01.clone(), this.bearing01.clone(), this.activeFractionInterval.clone(), this.localToWorld.clone(), this._arcLength01, this._designProperties?.clone());
231378
231747
  }
231379
- /** Apply `transform` to this spiral's local to world transform. */
231380
- tryTransformInPlace(transformA) {
231381
- const rigidData = this.applyRigidPartOfTransform(transformA);
231748
+ /**
231749
+ * Apply `transform` to this spiral's local to world transform.
231750
+ * * Only the rigid part of the transform is applied.
231751
+ */
231752
+ tryTransformInPlace(transform) {
231753
+ const rigidData = this.applyRigidPartOfTransform(transform);
231382
231754
  if (rigidData !== undefined) {
231383
231755
  this._curvature01.x0 /= rigidData.scale;
231384
231756
  this._curvature01.x1 /= rigidData.scale;
@@ -245610,6 +245982,10 @@ class XYZ {
245610
245982
  maxAbs() {
245611
245983
  return Math.max(Math.abs(this.x), Math.abs(this.y), Math.abs(this.z));
245612
245984
  }
245985
+ /** Return the larger absolute value of the x and y components */
245986
+ maxAbsXY() {
245987
+ return Math.max(Math.abs(this.x), Math.abs(this.y));
245988
+ }
245613
245989
  /** Return the sqrt of the sum of squared x,y,z parts */
245614
245990
  magnitude() {
245615
245991
  return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
@@ -251415,6 +251791,12 @@ class Range3d extends RangeBase {
251415
251791
  return 0.0;
251416
251792
  return Math.max(this.low.maxAbs(), this.high.maxAbs());
251417
251793
  }
251794
+ /** Return the largest absolute value among the x and y coordinates in the box corners. */
251795
+ maxAbsXY() {
251796
+ if (this.isNull)
251797
+ return 0.0;
251798
+ return Math.max(this.low.maxAbsXY(), this.high.maxAbsXY());
251799
+ }
251418
251800
  /** Returns true if the x direction size is nearly zero */
251419
251801
  get isAlmostZeroX() {
251420
251802
  return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.xLength());
@@ -270578,9 +270960,9 @@ class PolyfaceQuery {
270578
270960
  let normalCounter = 0;
270579
270961
  for (visitor.reset(); visitor.moveToNextFacet();) {
270580
270962
  const numEdges = visitor.pointCount - 1;
270581
- const normal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_14__.PolygonOps.centroidAreaNormal(visitor.point);
270963
+ const normal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_14__.PolygonOps.areaNormalGo(visitor.point);
270582
270964
  if (normal === undefined)
270583
- return -2;
270965
+ continue; // skip degenerate facets
270584
270966
  facetNormals.push(normal);
270585
270967
  for (let i = 0; i < numEdges; i++) {
270586
270968
  const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
@@ -270613,8 +270995,8 @@ class PolyfaceQuery {
270613
270995
  else {
270614
270996
  edgeVector.setFrom(sideA.edgeVector);
270615
270997
  }
270616
- const facetNormalA = facetNormals[sideA.facetIndex].direction;
270617
- const facetNormalB = facetNormals[sideB.facetIndex].direction;
270998
+ const facetNormalA = facetNormals[sideA.facetIndex];
270999
+ const facetNormalB = facetNormals[sideB.facetIndex];
270618
271000
  const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
270619
271001
  if (dihedralAngle.isAlmostZero)
270620
271002
  numPlanar++;
@@ -282316,8 +282698,11 @@ function nullToUndefined(data) {
282316
282698
  function createTypedCurveCollection(collectionType) {
282317
282699
  if (collectionType === 1)
282318
282700
  return new _curve_Path__WEBPACK_IMPORTED_MODULE_14__.Path();
282319
- if (collectionType === 2 || collectionType === 3)
282320
- return new _curve_Loop__WEBPACK_IMPORTED_MODULE_12__.Loop();
282701
+ if (collectionType === 2 || collectionType === 3) {
282702
+ const loop = new _curve_Loop__WEBPACK_IMPORTED_MODULE_12__.Loop();
282703
+ loop.isInner = collectionType === 3;
282704
+ return loop;
282705
+ }
282321
282706
  if (collectionType === 4)
282322
282707
  return new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_13__.ParityRegion();
282323
282708
  if (collectionType === 5)
@@ -282551,9 +282936,8 @@ class BGFBWriter {
282551
282936
  let cvType = 0;
282552
282937
  if (cv instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path)
282553
282938
  cvType = 1;
282554
- else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop) {
282939
+ else if (cv instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
282555
282940
  cvType = cv.isInner ? 3 : 2;
282556
- }
282557
282941
  else if (cv instanceof _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion)
282558
282942
  cvType = 4;
282559
282943
  else if (cv instanceof _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_21__.UnionRegion)
@@ -283759,16 +284143,17 @@ var IModelJson;
283759
284143
  return undefined;
283760
284144
  }
283761
284145
  /** parse contents of a curve collection to a CurveCollection instance */
283762
- static parseCurveCollectionMembers(result, data) {
283763
- if (data && Array.isArray(data)) {
283764
- for (const c of data) {
283765
- const g = Reader.parse(c);
283766
- if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_11__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
283767
- result.tryAddChild(g);
283768
- }
283769
- return result;
284146
+ static parseCurveCollectionMembers(result, data, isInner = false) {
284147
+ if (!data || !Array.isArray(data))
284148
+ return undefined;
284149
+ for (const c of data) {
284150
+ const g = Reader.parse(c);
284151
+ if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_11__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
284152
+ result.tryAddChild(g);
283770
284153
  }
283771
- return undefined;
284154
+ if (isInner && result instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop)
284155
+ result.isInner = true;
284156
+ return result;
283772
284157
  }
283773
284158
  /** Parse content of `bsurf` to BSplineSurface3d or BSplineSurface3dH */
283774
284159
  static parseBsurf(data) {
@@ -283986,7 +284371,7 @@ var IModelJson;
283986
284371
  return Reader.parseCurveCollectionMembers(new _curve_Path__WEBPACK_IMPORTED_MODULE_16__.Path(), json.path);
283987
284372
  }
283988
284373
  else if (json.hasOwnProperty("loop")) {
283989
- return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop);
284374
+ return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_14__.Loop(), json.loop, json.hasOwnProperty("isInner") && true === json.isInner);
283990
284375
  }
283991
284376
  else if (json.hasOwnProperty("parityRegion")) {
283992
284377
  return Reader.parseCurveCollectionMembers(new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_15__.ParityRegion(), json.parityRegion);
@@ -284312,7 +284697,7 @@ var IModelJson;
284312
284697
  }
284313
284698
  /** Convert strongly typed instance to tagged json */
284314
284699
  handleLoop(data) {
284315
- return { loop: this.collectChildren(data) };
284700
+ return { loop: this.collectChildren(data), isInner: data.isInner ? true : undefined };
284316
284701
  }
284317
284702
  /** Convert strongly typed instance to tagged json */
284318
284703
  handleParityRegion(data) {
@@ -284328,12 +284713,10 @@ var IModelJson;
284328
284713
  }
284329
284714
  collectChildren(data) {
284330
284715
  const children = [];
284331
- if (data.children && Array.isArray(data.children)) {
284332
- for (const child of data.children) {
284333
- const cdata = child.dispatchToGeometryHandler(this);
284334
- if (cdata)
284335
- children.push(cdata);
284336
- }
284716
+ for (const child of data.children) {
284717
+ const cdata = child.dispatchToGeometryHandler(this);
284718
+ if (cdata)
284719
+ children.push(cdata);
284337
284720
  }
284338
284721
  return children;
284339
284722
  }
@@ -292151,16 +292534,17 @@ __webpack_require__.r(__webpack_exports__);
292151
292534
  /* harmony export */ VertexNeighborhoodSortData: () => (/* binding */ VertexNeighborhoodSortData)
292152
292535
  /* harmony export */ });
292153
292536
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
292154
- /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
292155
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
292156
- /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
292157
- /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
292158
- /* harmony import */ var _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../numerics/ClusterableArray */ "../../core/geometry/lib/esm/numerics/ClusterableArray.js");
292159
- /* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
292160
- /* harmony import */ var _Graph__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
292161
- /* harmony import */ var _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./HalfEdgePriorityQueue */ "../../core/geometry/lib/esm/topology/HalfEdgePriorityQueue.js");
292162
- /* harmony import */ var _RegularizeFace__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
292163
- /* harmony import */ var _Triangulation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
292537
+ /* harmony import */ var _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
292538
+ /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
292539
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
292540
+ /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
292541
+ /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
292542
+ /* harmony import */ var _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../numerics/ClusterableArray */ "../../core/geometry/lib/esm/numerics/ClusterableArray.js");
292543
+ /* harmony import */ var _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../numerics/SmallSystem */ "../../core/geometry/lib/esm/numerics/SmallSystem.js");
292544
+ /* harmony import */ var _Graph__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
292545
+ /* harmony import */ var _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./HalfEdgePriorityQueue */ "../../core/geometry/lib/esm/topology/HalfEdgePriorityQueue.js");
292546
+ /* harmony import */ var _RegularizeFace__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
292547
+ /* harmony import */ var _Triangulation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Triangulation */ "../../core/geometry/lib/esm/topology/Triangulation.js");
292164
292548
  /*---------------------------------------------------------------------------------------------
292165
292549
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
292166
292550
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -292179,6 +292563,7 @@ __webpack_require__.r(__webpack_exports__);
292179
292563
 
292180
292564
 
292181
292565
 
292566
+
292182
292567
  // cspell:word XYUV
292183
292568
  class GraphSplitData {
292184
292569
  numUpEdge = 0;
@@ -292240,11 +292625,11 @@ class HalfEdgeGraphOps {
292240
292625
  * @param targetB target vertex of second vector
292241
292626
  */
292242
292627
  static crossProductToTargets(base, targetA, targetB) {
292243
- return _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.crossProductXYXY(targetA.x - base.x, targetA.y - base.y, targetB.x - base.x, targetB.y - base.y);
292628
+ return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(targetA.x - base.x, targetA.y - base.y, targetB.x - base.x, targetB.y - base.y);
292244
292629
  }
292245
292630
  /** Compute the range of the graph's vertices. */
292246
292631
  static graphRange(graph) {
292247
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.create();
292632
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__.Range3d.create();
292248
292633
  for (const node of graph.allHalfEdges) {
292249
292634
  range.extendXYZ(node.x, node.y, node.z);
292250
292635
  }
@@ -292252,7 +292637,7 @@ class HalfEdgeGraphOps {
292252
292637
  }
292253
292638
  /** Compute the xy-range of the graph's vertices. */
292254
292639
  static graphRangeXY(graph) {
292255
- const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range2d.createNull();
292640
+ const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__.Range2d.createNull();
292256
292641
  for (const node of graph.allHalfEdges) {
292257
292642
  range.extendXY(node.x, node.y);
292258
292643
  }
@@ -292282,7 +292667,7 @@ class HalfEdgeGraphOps {
292282
292667
  static isolateAllEdges(graph) {
292283
292668
  for (const nodeA of graph.allHalfEdges) {
292284
292669
  const nodeB = nodeA.vertexPredecessor;
292285
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA, nodeB);
292670
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA, nodeB);
292286
292671
  }
292287
292672
  }
292288
292673
  /**
@@ -292310,7 +292695,7 @@ class HalfEdgeGraphOps {
292310
292695
  } while (vp !== base && vp.isMaskSet(ignore));
292311
292696
  if (vp === base)
292312
292697
  return false;
292313
- return _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.isSectorConvex(vs.edgeMate, base, vp.faceSuccessor, signedAreaTol);
292698
+ return _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.isSectorConvex(vs.edgeMate, base, vp.faceSuccessor, signedAreaTol);
292314
292699
  }
292315
292700
  /**
292316
292701
  * Mask edges between faces if the union of the faces is convex.
@@ -292321,8 +292706,8 @@ class HalfEdgeGraphOps {
292321
292706
  * @param barrier edges with this mask (on either side) will not be marked. Defaults to HalfEdgeMask.BOUNDARY_EDGE.
292322
292707
  * @return number of edges masked (half the number of HalfEdges masked)
292323
292708
  */
292324
- static markRemovableEdgesToExpandConvexFaces(graph, mark, barrier = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE) {
292325
- if (_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_MASK === mark)
292709
+ static markRemovableEdgesToExpandConvexFaces(graph, mark, barrier = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE) {
292710
+ if (_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_MASK === mark)
292326
292711
  return 0;
292327
292712
  const visit = graph.grabMask(true);
292328
292713
  let numMarked = 0;
@@ -292330,7 +292715,7 @@ class HalfEdgeGraphOps {
292330
292715
  if (!node.isMaskSet(visit)) {
292331
292716
  if (!node.isMaskSet(barrier) && !node.edgeMate.isMaskSet(barrier)) {
292332
292717
  // tol based on areas of *original* faces on each side of the edge to be removed
292333
- const signedAreaTol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistanceSquared * (node.signedFaceArea() + node.edgeMate.signedFaceArea());
292718
+ const signedAreaTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistanceSquared * (node.signedFaceArea() + node.edgeMate.signedFaceArea());
292334
292719
  if (this.isSectorConvexAfterEdgeRemoval(node, mark, barrier, signedAreaTol) && this.isSectorConvexAfterEdgeRemoval(node.edgeMate, mark, barrier, signedAreaTol)) {
292335
292720
  node.setMaskAroundEdge(mark);
292336
292721
  ++numMarked;
@@ -292350,7 +292735,7 @@ class HalfEdgeGraphOps {
292350
292735
  * @param barrier edges with this mask (on either side) will not be collected. Defaults to HalfEdgeMask.BOUNDARY_EDGE.
292351
292736
  * @return one HalfEdge per removable edge
292352
292737
  */
292353
- static collectRemovableEdgesToExpandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE) {
292738
+ static collectRemovableEdgesToExpandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE) {
292354
292739
  const removable = [];
292355
292740
  const mark = graph.grabMask(true);
292356
292741
  if (0 < this.markRemovableEdgesToExpandConvexFaces(graph, mark, barrier)) {
@@ -292374,7 +292759,7 @@ class HalfEdgeGraphOps {
292374
292759
  * @param barrier edges with this mask (on either side) will not be removed. Defaults to HalfEdgeMask.BOUNDARY_EDGE.
292375
292760
  * @return number of edges deleted
292376
292761
  */
292377
- static expandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE) {
292762
+ static expandConvexFaces(graph, barrier = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE) {
292378
292763
  const mark = graph.grabMask(true);
292379
292764
  const numRemovedEdges = this.markRemovableEdgesToExpandConvexFaces(graph, mark, barrier);
292380
292765
  if (numRemovedEdges > 0) {
@@ -292390,7 +292775,7 @@ class HalfEdgeGraphOps {
292390
292775
  * @param avoid faces with this mask will not be examined. Defaults to HalfEdgeMask.EXTERIOR.
292391
292776
  * @return whether every face in the graph is convex
292392
292777
  */
292393
- static isEveryFaceConvex(graph, avoid = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.EXTERIOR) {
292778
+ static isEveryFaceConvex(graph, avoid = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.EXTERIOR) {
292394
292779
  const allFaces = graph.collectFaceLoops();
292395
292780
  for (const node of allFaces) {
292396
292781
  if (node.isMaskedAroundFace(avoid))
@@ -292409,12 +292794,12 @@ class HalfEdgeGraphMerge {
292409
292794
  // return kC such that all angles k are equal, with kA <= k < kC <= kB.
292410
292795
  // * Assume: angles k are stored at extra data index 0.
292411
292796
  // * Note that the usual case (when angle at kA is not repeated) is kA+1 === kC
292412
- static getCommonThetaEndIndex(clusters, order, kA, kB) {
292797
+ static getCommonThetaEndIndex(clusters, order, kA, kB, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians) {
292413
292798
  let kC = kA + 1;
292414
292799
  const thetaA = clusters.getExtraData(order[kA], 0);
292415
292800
  while (kC < kB) {
292416
292801
  const thetaB = clusters.getExtraData(order[kC], 0);
292417
- if (!_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB)) {
292802
+ if (!_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB, radianTol)) {
292418
292803
  return kC;
292419
292804
  }
292420
292805
  kC++;
@@ -292446,10 +292831,10 @@ class HalfEdgeGraphMerge {
292446
292831
  // * only want to do anything here when curves are present.
292447
292832
  // * k0<=k<k1 are around a vertex
292448
292833
  // * These are sorted by theta.
292449
- static secondarySortAroundVertex(clusters, order, allNodes, k0, k1) {
292834
+ static secondarySortAroundVertex(clusters, order, allNodes, k0, k1, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians) {
292450
292835
  const sortData = [];
292451
292836
  for (let k = k0; k < k1;) {
292452
- const kB = this.getCommonThetaEndIndex(clusters, order, k, k1);
292837
+ const kB = this.getCommonThetaEndIndex(clusters, order, k, k1, radianTol);
292453
292838
  if (k + 1 < kB) {
292454
292839
  sortData.length = 0;
292455
292840
  for (let kA = k; kA < kB; kA++) {
@@ -292468,25 +292853,27 @@ class HalfEdgeGraphMerge {
292468
292853
  }
292469
292854
  /** Return the sort key for sorting by curvature.
292470
292855
  * * This is the signed distance from the curve at the edge start, to center of curvature.
292856
+ * * ASSUME: edgeTag is a `CurveLocationDetail` whose fractions [f0,f1] define the detail.curve segment traversed
292857
+ * by the edge. If sortData < 0, the edge traverses the curve segment in reverse order [f1,f0].
292471
292858
  * * NOTE: Currently does not account for higher derivatives in the case of higher-than-tangent match.
292472
292859
  */
292473
292860
  static curvatureSortKey(node) {
292474
- const cld = node.edgeTag;
292475
- if (cld !== undefined) {
292476
- const fraction = cld.fraction;
292477
- const curve = cld.curve;
292478
- if (curve) {
292479
- let radius = curve.fractionToSignedXYRadiusOfCurvature(fraction);
292480
- if (node.sortData !== undefined && node.sortData < 0)
292481
- radius = -radius;
292482
- return radius;
292861
+ if (node.edgeTag !== undefined) {
292862
+ if (node.edgeTag instanceof _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveLocationDetail) {
292863
+ const cld = node.edgeTag;
292864
+ if (cld.curve !== undefined) {
292865
+ const reverse = node.sortData !== undefined && node.sortData < 0;
292866
+ const fraction = (reverse && cld.fraction1 !== undefined) ? cld.fraction1 : cld.fraction;
292867
+ const radius = cld.curve.fractionToSignedXYRadiusOfCurvature(fraction);
292868
+ return reverse ? -radius : radius;
292869
+ }
292483
292870
  }
292484
292871
  }
292485
292872
  return 0.0;
292486
292873
  }
292487
292874
  /** Whether the HalfEdge is part of a null face, as marked by [[clusterAndMergeXYTheta]]. */
292488
292875
  static isNullFace(node) {
292489
- 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;
292876
+ 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;
292490
292877
  }
292491
292878
  /**
292492
292879
  * Cluster the HalfEdges so that xy-coordinates within `mergeTolerance` are equated.
@@ -292504,23 +292891,23 @@ class HalfEdgeGraphMerge {
292504
292891
  * @param outboundRadiansFunction optional function to compute the sort angle of an edge at its start vertex
292505
292892
  * @param clusterTol optional distance tolerance for clustering vertices. Default value is [[Geometry.smallMetricDistance]].
292506
292893
  */
292507
- static clusterAndMergeXYTheta(graph, outboundRadiansFunction, clusterTol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
292894
+ static clusterAndMergeXYTheta(graph, outboundRadiansFunction, clusterTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance, radianTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians) {
292508
292895
  const allNodes = graph.allHalfEdges;
292509
292896
  const numNodes = allNodes.length;
292510
- graph.clearMask(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE);
292511
- 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.
292897
+ graph.clearMask(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE);
292898
+ 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
292512
292899
  for (let i = 0; i < numNodes; i++) {
292513
292900
  const nodeA = allNodes[i];
292514
292901
  const xA = nodeA.x;
292515
292902
  const yA = nodeA.y;
292516
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA, nodeA.vertexSuccessor); // pull it out of its current vertex loop.
292903
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA, nodeA.vertexSuccessor); // pull it out of its current vertex loop.
292517
292904
  clusters.addDirect(xA, yA, 0.0, i);
292518
292905
  }
292519
- const order = clusters.clusterIndicesLexical(clusterTol);
292906
+ const order = clusters.clusterIndicesLexical(clusterTol); // assign primary sort dot product
292520
292907
  let k0 = 0;
292521
292908
  const numK = order.length;
292522
292909
  for (let k1 = 0; k1 < numK; k1++) {
292523
- if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray.clusterTerminator) {
292910
+ if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__.ClusterableArray.clusterTerminator) {
292524
292911
  // nodes identified in order[k0]..order[k1-1] are at a vertex cluster; equate their xy
292525
292912
  if (k1 > k0) {
292526
292913
  const iA = clusters.getExtraData(order[k0], 1);
@@ -292540,18 +292927,18 @@ class HalfEdgeGraphMerge {
292540
292927
  // 2) Hence ready do sort (at each vertex) by theta.
292541
292928
  // insert theta as extra data in the sort table . . .
292542
292929
  for (const clusterTableIndex of order) {
292543
- if (clusterTableIndex !== _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray.clusterTerminator) {
292930
+ if (clusterTableIndex !== _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__.ClusterableArray.clusterTerminator) {
292544
292931
  const nodeA = allNodes[clusterTableIndex];
292545
292932
  const nodeB = nodeA.faceSuccessor;
292546
292933
  let getPrecomputedRadians = outboundRadiansFunction;
292547
292934
  if (getPrecomputedRadians) {
292548
292935
  // Recompute theta when edge geometry is completely determined by the vertices, which may have been perturbed by clustering.
292549
292936
  const detail = nodeA.edgeTag;
292550
- if (undefined === detail || undefined === detail.curve || detail.curve instanceof _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_1__.LineSegment3d)
292937
+ if (undefined === detail || undefined === detail.curve || detail.curve instanceof _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d)
292551
292938
  getPrecomputedRadians = undefined;
292552
292939
  }
292553
292940
  let radians = getPrecomputedRadians ? getPrecomputedRadians(nodeA) : Math.atan2(nodeB.y - nodeA.y, nodeB.x - nodeA.x);
292554
- if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, -Math.PI))
292941
+ if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, -Math.PI, radianTol))
292555
292942
  radians = Math.PI;
292556
292943
  clusters.setExtraData(clusterTableIndex, 0, radians);
292557
292944
  }
@@ -292562,11 +292949,11 @@ class HalfEdgeGraphMerge {
292562
292949
  let thetaA, thetaB;
292563
292950
  // now pinch each neighboring pair together
292564
292951
  for (let k1 = 0; k1 < numK; k1++) {
292565
- if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray.clusterTerminator) {
292566
- // nodes identified in order[k0]..order[k1-1] are properly sorted around a vertex.
292952
+ if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_6__.ClusterableArray.clusterTerminator) {
292953
+ // nodes identified in order[k0]..order[k1-1] are tentatively sorted around a vertex by theta
292567
292954
  if (k1 > k0) {
292568
292955
  if (k1 > k0 + 1)
292569
- this.secondarySortAroundVertex(clusters, order, allNodes, k0, k1);
292956
+ this.secondarySortAroundVertex(clusters, order, allNodes, k0, k1, radianTol); // finalize order by resolving ties via curvature
292570
292957
  this.doAnnounceVertexNeighborhood(clusters, order, allNodes, k0, k1);
292571
292958
  const iA = clusters.getExtraData(order[k0], 1);
292572
292959
  thetaA = clusters.getExtraData(order[k0], 0);
@@ -292576,7 +292963,7 @@ class HalfEdgeGraphMerge {
292576
292963
  const iB = clusters.getExtraData(order[k], 1);
292577
292964
  thetaB = clusters.getExtraData(order[k], 0);
292578
292965
  const nodeB = allNodes[iB];
292579
- if (nodeA.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE)) {
292966
+ if (nodeA.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE)) {
292580
292967
  // nope, this edge was flagged and pinched from the other end.
292581
292968
  const j = unmatchedNullFaceNodes.findIndex((node) => nodeA === node);
292582
292969
  if (j >= 0) {
@@ -292586,7 +292973,7 @@ class HalfEdgeGraphMerge {
292586
292973
  nodeA = nodeB;
292587
292974
  thetaA = thetaB;
292588
292975
  }
292589
- else if (nodeB.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE)) {
292976
+ else if (nodeB.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE)) {
292590
292977
  const j = unmatchedNullFaceNodes.findIndex((node) => nodeB === node);
292591
292978
  if (j >= 0) {
292592
292979
  unmatchedNullFaceNodes[j] = unmatchedNullFaceNodes[unmatchedNullFaceNodes.length - 1];
@@ -292595,22 +292982,22 @@ class HalfEdgeGraphMerge {
292595
292982
  // NO leave nodeA and thetaA ignore nodeB -- later step will get the outside of its banana.
292596
292983
  }
292597
292984
  else {
292598
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA, nodeB);
292985
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA, nodeB);
292599
292986
  // Detect null face using the heuristic:
292600
292987
  // * near vertex angles are same (periodic, toleranced)
292601
292988
  // * far vertex is clustered (exactly equal)
292602
292989
  // * near vertex curvatures are same (toleranced)
292603
292990
  // Note that near vertex is already clustered.
292604
- if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB)) {
292991
+ if (_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(thetaA, thetaB, radianTol)) {
292605
292992
  const nodeA1 = nodeA.faceSuccessor;
292606
292993
  const nodeB1 = nodeB.edgeMate;
292607
292994
  if (nodeA1.isEqualXY(nodeB1)) {
292608
292995
  const cA = this.curvatureSortKey(nodeA);
292609
292996
  const cB = this.curvatureSortKey(nodeB);
292610
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinate(cA, cB, clusterTol)) { // rule out banana
292611
- _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdge.pinch(nodeA1, nodeB1);
292612
- nodeA.setMask(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE);
292613
- nodeB1.setMask(_Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.NULL_FACE);
292997
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinate(cA, cB, clusterTol)) { // rule out banana
292998
+ _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdge.pinch(nodeA1, nodeB1);
292999
+ nodeA.setMask(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE);
293000
+ nodeB1.setMask(_Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.NULL_FACE);
292614
293001
  unmatchedNullFaceNodes.push(nodeB1);
292615
293002
  }
292616
293003
  }
@@ -292625,7 +293012,7 @@ class HalfEdgeGraphMerge {
292625
293012
  }
292626
293013
  }
292627
293014
  static buildVerticalSweepPriorityQueue(graph) {
292628
- const sweepHeap = new _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_8__.HalfEdgePriorityQueueWithPartnerArray();
293015
+ const sweepHeap = new _HalfEdgePriorityQueue__WEBPACK_IMPORTED_MODULE_9__.HalfEdgePriorityQueueWithPartnerArray();
292629
293016
  for (const p of graph.allHalfEdges) {
292630
293017
  if (HalfEdgeGraphOps.compareNodesYXUp(p, p.faceSuccessor) < 0) {
292631
293018
  sweepHeap.priorityQueue.push(p);
@@ -292633,19 +293020,19 @@ class HalfEdgeGraphMerge {
292633
293020
  }
292634
293021
  return sweepHeap;
292635
293022
  }
292636
- static computeIntersectionFractionsOnEdges(nodeA0, nodeB0, tol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
293023
+ static computeIntersectionFractionsOnEdges(nodeA0, nodeB0, tol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
292637
293024
  const nodeA1 = nodeA0.faceSuccessor;
292638
293025
  const aDir = { x: nodeA1.x - nodeA0.x, y: nodeA1.y - nodeA0.y };
292639
293026
  const nodeB1 = nodeB0.faceSuccessor;
292640
293027
  const bDir = { x: nodeB1.x - nodeB0.x, y: nodeB1.y - nodeB0.y };
292641
- let fractions = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegmentXYUVIntersectionUnbounded(nodeA0, aDir, nodeB0, bDir, tol);
293028
+ let fractions = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_7__.SmallSystem.lineSegmentXYUVIntersectionUnbounded(nodeA0, aDir, nodeB0, bDir, tol);
292642
293029
  if (fractions) {
292643
293030
  const snapFractionToSegment = (fraction, segStart, segEnd) => {
292644
- const x = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(segStart.x, fraction, segEnd.x);
292645
- const y = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(segStart.y, fraction, segEnd.y);
292646
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(x, y, segStart.x, segStart.y, tol))
293031
+ const x = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(segStart.x, fraction, segEnd.x);
293032
+ const y = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(segStart.y, fraction, segEnd.y);
293033
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(x, y, segStart.x, segStart.y, tol))
292647
293034
  return 0.0;
292648
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(x, y, segEnd.x, segEnd.y, tol))
293035
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(x, y, segEnd.x, segEnd.y, tol))
292649
293036
  return 1.0;
292650
293037
  return fraction;
292651
293038
  };
@@ -292655,9 +293042,9 @@ class HalfEdgeGraphMerge {
292655
293042
  fractions.f1.x = snapFractionToSegment(fractions.f1.x, nodeA0, nodeA1);
292656
293043
  fractions.f1.y = snapFractionToSegment(fractions.f1.y, nodeB0, nodeB1);
292657
293044
  }
292658
- if (fractions.f1 && !(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f1.x) && _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f1.y)))
293045
+ if (fractions.f1 && !(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f1.x) && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f1.y)))
292659
293046
  fractions.f1 = undefined; // overlap ends beyond a segment; downgrade to simple intersection
292660
- if (!(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f0.x) && _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isIn01(fractions.f0.y))) {
293047
+ if (!(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f0.x) && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isIn01(fractions.f0.y))) {
292661
293048
  if (fractions.f1) {
292662
293049
  fractions.f0 = fractions.f1; // overlap starts beyond a segment; downgrade to simple intersection
292663
293050
  fractions.f1 = undefined;
@@ -292673,7 +293060,7 @@ class HalfEdgeGraphMerge {
292673
293060
  * * This is a large operation.
292674
293061
  * @param graph
292675
293062
  */
292676
- static splitIntersectingEdges(graph, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, fractionTol = 1.0e-8) {
293063
+ static splitIntersectingEdges(graph, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance, fractionTol = 1.0e-8) {
292677
293064
  const data = new GraphSplitData();
292678
293065
  const sweepHeap = this.buildVerticalSweepPriorityQueue(graph);
292679
293066
  let nodeA0, nodeB1;
@@ -292689,10 +293076,10 @@ class HalfEdgeGraphMerge {
292689
293076
  for (i = 0; i < sweepHeap.activeEdges.length; i++) {
292690
293077
  nodeB0 = sweepHeap.activeEdges[i];
292691
293078
  nodeB1 = nodeB0.faceSuccessor;
292692
- if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(nodeA0.x, nodeA0.y, nodeB0.x, nodeB0.y, distanceTol)) {
293079
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(nodeA0.x, nodeA0.y, nodeB0.x, nodeB0.y, distanceTol)) {
292693
293080
  data.numA0B0++;
292694
293081
  }
292695
- else if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinateXY(nodeB1.x, nodeB1.y, nodeA0.x, nodeA0.y, distanceTol)) {
293082
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSameCoordinateXY(nodeB1.x, nodeB1.y, nodeA0.x, nodeA0.y, distanceTol)) {
292696
293083
  data.numA0B1++;
292697
293084
  }
292698
293085
  else {
@@ -292729,8 +293116,8 @@ class HalfEdgeGraphMerge {
292729
293116
  */
292730
293117
  static formGraphFromSegments(lineSegments) {
292731
293118
  // Structure of an index of the array: { xyTheta: Point3d, node: Node }
292732
- const graph = new _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeGraph();
292733
- HalfEdgeGraphOps.segmentArrayToGraphEdges(lineSegments, graph, _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.BOUNDARY_EDGE);
293119
+ const graph = new _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeGraph();
293120
+ HalfEdgeGraphOps.segmentArrayToGraphEdges(lineSegments, graph, _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.BOUNDARY_EDGE);
292734
293121
  this.splitIntersectingEdges(graph);
292735
293122
  this.clusterAndMergeXYTheta(graph);
292736
293123
  return graph;
@@ -292740,17 +293127,17 @@ class HalfEdgeGraphMerge {
292740
293127
  * * Graph gets full splitEdges, regularize (optional), and triangulate.
292741
293128
  * @returns graph, or undefined if bad data.
292742
293129
  */
292743
- static formGraphFromChains(chains, regularize = true, mask = _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeMask.PRIMARY_EDGE) {
293130
+ static formGraphFromChains(chains, regularize = true, mask = _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeMask.PRIMARY_EDGE) {
292744
293131
  if (chains.length < 1)
292745
293132
  return undefined;
292746
- const graph = new _Graph__WEBPACK_IMPORTED_MODULE_7__.HalfEdgeGraph();
292747
- const chainSeeds = _Triangulation__WEBPACK_IMPORTED_MODULE_10__.Triangulator.directCreateChainsFromCoordinates(graph, chains);
293133
+ const graph = new _Graph__WEBPACK_IMPORTED_MODULE_8__.HalfEdgeGraph();
293134
+ const chainSeeds = _Triangulation__WEBPACK_IMPORTED_MODULE_11__.Triangulator.directCreateChainsFromCoordinates(graph, chains);
292748
293135
  for (const seed of chainSeeds)
292749
293136
  seed.setMaskAroundFace(mask);
292750
293137
  this.splitIntersectingEdges(graph);
292751
293138
  this.clusterAndMergeXYTheta(graph);
292752
293139
  if (regularize) {
292753
- const context = new _RegularizeFace__WEBPACK_IMPORTED_MODULE_9__.RegularizationContext(graph);
293140
+ const context = new _RegularizeFace__WEBPACK_IMPORTED_MODULE_10__.RegularizationContext(graph);
292754
293141
  context.regularizeGraph(true, true);
292755
293142
  }
292756
293143
  return graph;
@@ -295567,23 +295954,9 @@ class ITwinLocalization {
295567
295954
  this.i18next.loadNamespaces(name, (err) => {
295568
295955
  if (!err)
295569
295956
  return resolve();
295570
- // Here we got a non-null err object.
295571
- // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.
295572
- // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.
295573
- // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.
295574
- // 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.
295575
- let locales = this.getLanguageList().map((thisLocale) => `/${thisLocale}/`);
295576
- try {
295577
- for (const thisError of err) {
295578
- if (typeof thisError === "string")
295579
- locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));
295580
- }
295581
- }
295582
- catch {
295583
- locales = [];
295584
- }
295585
- // if we removed every locale from the array, it wasn't loaded.
295586
- if (locales.length === 0)
295957
+ // i18next can return errors from other concurrent namespace loads in this callback.
295958
+ const wasLoaded = this.getLanguageList().some((language) => this.i18next.hasResourceBundle(language, name));
295959
+ if (!wasLoaded)
295587
295960
  _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__.Logger.logError("i18n", `No resources for namespace ${name} could be loaded`);
295588
295961
  resolve();
295589
295962
  });
@@ -336597,7 +336970,7 @@ class WMS {
336597
336970
  (module) {
336598
336971
 
336599
336972
  "use strict";
336600
- 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"}}');
336973
+ 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"}}');
336601
336974
 
336602
336975
  /***/ }
336603
336976