@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.5

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.
Files changed (346) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  3. package/lib/cjs/AnalysisStyle.js.map +1 -1
  4. package/lib/cjs/Atmosphere.js.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  7. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  8. package/lib/cjs/Base64EncodedString.js.map +1 -1
  9. package/lib/cjs/BlobReader.js.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  11. package/lib/cjs/Camera.js.map +1 -1
  12. package/lib/cjs/CatalogIModel.js.map +1 -1
  13. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  14. package/lib/cjs/ChangedElements.js.map +1 -1
  15. package/lib/cjs/ChangedEntities.js.map +1 -1
  16. package/lib/cjs/ChangesetProps.js.map +1 -1
  17. package/lib/cjs/ClipStyle.js.map +1 -1
  18. package/lib/cjs/Code.js.map +1 -1
  19. package/lib/cjs/ColorByName.js.map +1 -1
  20. package/lib/cjs/ColorDef.js.map +1 -1
  21. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  22. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  23. package/lib/cjs/ContextRealityModel.js.map +1 -1
  24. package/lib/cjs/ContourDisplay.js.map +1 -1
  25. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  26. package/lib/cjs/ECSchemaProps.js.map +1 -1
  27. package/lib/cjs/ECSqlReader.js.map +1 -1
  28. package/lib/cjs/ECSqlTypes.js.map +1 -1
  29. package/lib/cjs/ElementMesh.js.map +1 -1
  30. package/lib/cjs/ElementProps.js.map +1 -1
  31. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  32. package/lib/cjs/EntityProps.js.map +1 -1
  33. package/lib/cjs/EntityReference.js.map +1 -1
  34. package/lib/cjs/Environment.js.map +1 -1
  35. package/lib/cjs/FeatureIndex.js.map +1 -1
  36. package/lib/cjs/FeatureSymbology.js.map +1 -1
  37. package/lib/cjs/FeatureTable.js.map +1 -1
  38. package/lib/cjs/Fonts.js.map +1 -1
  39. package/lib/cjs/Frustum.js.map +1 -1
  40. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  41. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  42. package/lib/cjs/GeometryContainment.js.map +1 -1
  43. package/lib/cjs/GeometryParams.js.map +1 -1
  44. package/lib/cjs/GeometrySummary.js.map +1 -1
  45. package/lib/cjs/Gradient.js.map +1 -1
  46. package/lib/cjs/GraphicParams.js.map +1 -1
  47. package/lib/cjs/GroundPlane.js.map +1 -1
  48. package/lib/cjs/HSLColor.js.map +1 -1
  49. package/lib/cjs/HSVColor.js.map +1 -1
  50. package/lib/cjs/HiddenLine.js.map +1 -1
  51. package/lib/cjs/Hilite.js.map +1 -1
  52. package/lib/cjs/IModel.js.map +1 -1
  53. package/lib/cjs/IModelError.js.map +1 -1
  54. package/lib/cjs/IModelVersion.js.map +1 -1
  55. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  56. package/lib/cjs/Image.js.map +1 -1
  57. package/lib/cjs/IpcAppProps.js.map +1 -1
  58. package/lib/cjs/LightSettings.js.map +1 -1
  59. package/lib/cjs/LinePixels.js.map +1 -1
  60. package/lib/cjs/Localization.js.map +1 -1
  61. package/lib/cjs/MapImagerySettings.js.map +1 -1
  62. package/lib/cjs/MapLayerSettings.js.map +1 -1
  63. package/lib/cjs/MassProperties.js.map +1 -1
  64. package/lib/cjs/MaterialProps.js.map +1 -1
  65. package/lib/cjs/ModelClipGroup.js.map +1 -1
  66. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  67. package/lib/cjs/ModelProps.js.map +1 -1
  68. package/lib/cjs/NativeAppProps.js.map +1 -1
  69. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  70. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  71. package/lib/cjs/PlanarClipMask.js.map +1 -1
  72. package/lib/cjs/QPoint.js.map +1 -1
  73. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  74. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  75. package/lib/cjs/RenderMaterial.js.map +1 -1
  76. package/lib/cjs/RenderPolyline.js.map +1 -1
  77. package/lib/cjs/RenderTexture.js.map +1 -1
  78. package/lib/cjs/RgbColor.js.map +1 -1
  79. package/lib/cjs/RpcInterface.js.map +1 -1
  80. package/lib/cjs/RpcManager.js.map +1 -1
  81. package/lib/cjs/SessionProps.js.map +1 -1
  82. package/lib/cjs/SkyBox.js.map +1 -1
  83. package/lib/cjs/SolarCalculate.js.map +1 -1
  84. package/lib/cjs/SolarShadows.js.map +1 -1
  85. package/lib/cjs/SpatialClassification.js.map +1 -1
  86. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  87. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  88. package/lib/cjs/TerrainSettings.js.map +1 -1
  89. package/lib/cjs/TextureMapping.js.map +1 -1
  90. package/lib/cjs/TextureProps.js.map +1 -1
  91. package/lib/cjs/ThematicDisplay.js.map +1 -1
  92. package/lib/cjs/Thumbnail.js.map +1 -1
  93. package/lib/cjs/TileProps.js.map +1 -1
  94. package/lib/cjs/Tween.js.map +1 -1
  95. package/lib/cjs/TxnAction.js.map +1 -1
  96. package/lib/cjs/ViewDetails.js.map +1 -1
  97. package/lib/cjs/ViewFlags.js.map +1 -1
  98. package/lib/cjs/ViewProps.js.map +1 -1
  99. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  100. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  101. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  102. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  103. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  104. package/lib/cjs/annotation/TextField.js.map +1 -1
  105. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  106. package/lib/cjs/core-common.js.map +1 -1
  107. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  108. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  109. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  110. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  111. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  112. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  113. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  114. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  115. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  116. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  117. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  118. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  119. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  120. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  121. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  122. package/lib/cjs/geometry/Placement.js.map +1 -1
  123. package/lib/cjs/geometry/Projection.js.map +1 -1
  124. package/lib/cjs/geometry/TextString.js.map +1 -1
  125. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  126. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  127. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  128. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  129. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  130. package/lib/cjs/internal/Snapping.js.map +1 -1
  131. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
  132. package/lib/cjs/internal/cross-package.js.map +1 -1
  133. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  134. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  135. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  136. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  137. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  138. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  139. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  140. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  141. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  142. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  143. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  144. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  145. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  146. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  147. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  148. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  149. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  151. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  152. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  153. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  154. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  155. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  156. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  157. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  158. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  159. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  160. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  161. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  162. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  163. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  164. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  165. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  166. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  167. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  168. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  169. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  170. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  171. package/lib/cjs/tile/TileIO.js.map +1 -1
  172. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  173. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  174. package/lib/esm/AmbientOcclusion.js.map +1 -1
  175. package/lib/esm/AnalysisStyle.js.map +1 -1
  176. package/lib/esm/Atmosphere.js.map +1 -1
  177. package/lib/esm/AuthorizationClient.js.map +1 -1
  178. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  179. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  180. package/lib/esm/Base64EncodedString.js.map +1 -1
  181. package/lib/esm/BlobReader.js.map +1 -1
  182. package/lib/esm/BriefcaseTypes.js.map +1 -1
  183. package/lib/esm/Camera.js.map +1 -1
  184. package/lib/esm/CatalogIModel.js.map +1 -1
  185. package/lib/esm/CesiumIonAssets.js.map +1 -1
  186. package/lib/esm/ChangedElements.js.map +1 -1
  187. package/lib/esm/ChangedEntities.js.map +1 -1
  188. package/lib/esm/ChangesetProps.js.map +1 -1
  189. package/lib/esm/ClipStyle.js.map +1 -1
  190. package/lib/esm/Code.js.map +1 -1
  191. package/lib/esm/ColorByName.js.map +1 -1
  192. package/lib/esm/ColorDef.js.map +1 -1
  193. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  194. package/lib/esm/ConcurrentQuery.js.map +1 -1
  195. package/lib/esm/ContextRealityModel.js.map +1 -1
  196. package/lib/esm/ContourDisplay.js.map +1 -1
  197. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  198. package/lib/esm/ECSchemaProps.js.map +1 -1
  199. package/lib/esm/ECSqlReader.js.map +1 -1
  200. package/lib/esm/ECSqlTypes.js.map +1 -1
  201. package/lib/esm/ElementMesh.js.map +1 -1
  202. package/lib/esm/ElementProps.js.map +1 -1
  203. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  204. package/lib/esm/EntityProps.js.map +1 -1
  205. package/lib/esm/EntityReference.js.map +1 -1
  206. package/lib/esm/Environment.js.map +1 -1
  207. package/lib/esm/FeatureIndex.js.map +1 -1
  208. package/lib/esm/FeatureSymbology.js.map +1 -1
  209. package/lib/esm/FeatureTable.js.map +1 -1
  210. package/lib/esm/Fonts.js.map +1 -1
  211. package/lib/esm/Frustum.js.map +1 -1
  212. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  213. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  214. package/lib/esm/GeometryContainment.js.map +1 -1
  215. package/lib/esm/GeometryParams.js.map +1 -1
  216. package/lib/esm/GeometrySummary.js.map +1 -1
  217. package/lib/esm/Gradient.js.map +1 -1
  218. package/lib/esm/GraphicParams.js.map +1 -1
  219. package/lib/esm/GroundPlane.js.map +1 -1
  220. package/lib/esm/HSLColor.js.map +1 -1
  221. package/lib/esm/HSVColor.js.map +1 -1
  222. package/lib/esm/HiddenLine.js.map +1 -1
  223. package/lib/esm/Hilite.js.map +1 -1
  224. package/lib/esm/IModel.js.map +1 -1
  225. package/lib/esm/IModelError.js.map +1 -1
  226. package/lib/esm/IModelVersion.js.map +1 -1
  227. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  228. package/lib/esm/Image.js.map +1 -1
  229. package/lib/esm/IpcAppProps.js.map +1 -1
  230. package/lib/esm/LightSettings.js.map +1 -1
  231. package/lib/esm/LinePixels.js.map +1 -1
  232. package/lib/esm/Localization.js.map +1 -1
  233. package/lib/esm/MapImagerySettings.js.map +1 -1
  234. package/lib/esm/MapLayerSettings.js.map +1 -1
  235. package/lib/esm/MassProperties.js.map +1 -1
  236. package/lib/esm/MaterialProps.js.map +1 -1
  237. package/lib/esm/ModelClipGroup.js.map +1 -1
  238. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  239. package/lib/esm/ModelProps.js.map +1 -1
  240. package/lib/esm/NativeAppProps.js.map +1 -1
  241. package/lib/esm/OctEncodedNormal.js.map +1 -1
  242. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  243. package/lib/esm/PlanarClipMask.js.map +1 -1
  244. package/lib/esm/QPoint.js.map +1 -1
  245. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  246. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  247. package/lib/esm/RenderMaterial.js.map +1 -1
  248. package/lib/esm/RenderPolyline.js.map +1 -1
  249. package/lib/esm/RenderTexture.js.map +1 -1
  250. package/lib/esm/RgbColor.js.map +1 -1
  251. package/lib/esm/RpcInterface.js.map +1 -1
  252. package/lib/esm/RpcManager.js.map +1 -1
  253. package/lib/esm/SessionProps.js.map +1 -1
  254. package/lib/esm/SkyBox.js.map +1 -1
  255. package/lib/esm/SolarCalculate.js.map +1 -1
  256. package/lib/esm/SolarShadows.js.map +1 -1
  257. package/lib/esm/SpatialClassification.js.map +1 -1
  258. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  259. package/lib/esm/SubCategoryOverride.js.map +1 -1
  260. package/lib/esm/TerrainSettings.js.map +1 -1
  261. package/lib/esm/TextureMapping.js.map +1 -1
  262. package/lib/esm/TextureProps.js.map +1 -1
  263. package/lib/esm/ThematicDisplay.js.map +1 -1
  264. package/lib/esm/Thumbnail.js.map +1 -1
  265. package/lib/esm/TileProps.js.map +1 -1
  266. package/lib/esm/Tween.js.map +1 -1
  267. package/lib/esm/TxnAction.js.map +1 -1
  268. package/lib/esm/ViewDetails.js.map +1 -1
  269. package/lib/esm/ViewFlags.js.map +1 -1
  270. package/lib/esm/ViewProps.js.map +1 -1
  271. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  272. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  273. package/lib/esm/annotation/TextBlock.js.map +1 -1
  274. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  275. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  276. package/lib/esm/annotation/TextField.js.map +1 -1
  277. package/lib/esm/annotation/TextStyle.js.map +1 -1
  278. package/lib/esm/core-common.js.map +1 -1
  279. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  280. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  281. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  282. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  283. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  284. package/lib/esm/geometry/Cartographic.js.map +1 -1
  285. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  286. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  287. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  288. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  289. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  290. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  291. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  292. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  293. package/lib/esm/geometry/LineStyle.js.map +1 -1
  294. package/lib/esm/geometry/Placement.js.map +1 -1
  295. package/lib/esm/geometry/Projection.js.map +1 -1
  296. package/lib/esm/geometry/TextString.js.map +1 -1
  297. package/lib/esm/internal/BackendTypes.js.map +1 -1
  298. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  299. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  300. package/lib/esm/internal/RenderMesh.js.map +1 -1
  301. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  302. package/lib/esm/internal/Snapping.js.map +1 -1
  303. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
  304. package/lib/esm/internal/cross-package.js.map +1 -1
  305. package/lib/esm/ipc/IpcSession.js.map +1 -1
  306. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  307. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  308. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  309. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  310. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  311. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  312. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  313. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  314. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  315. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  316. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  317. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  318. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  319. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  320. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  321. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  322. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  323. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  324. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  325. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  326. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  327. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  328. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  329. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  330. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  331. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  332. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  333. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  334. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  335. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  336. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  337. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  338. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  339. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  340. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  341. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  342. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  343. package/lib/esm/tile/TileIO.js.map +1 -1
  344. package/lib/esm/tile/TileMetadata.js.map +1 -1
  345. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  346. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicParams.js","sourceRoot":"","sources":["../../src/GraphicParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,MAAM,CAAN,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACnB,cAAc;IACd,yCAAQ,CAAA;IACR,qFAAqF;IACrF,6CAAe,CAAA;IACf,2FAA2F;IAC3F,6CAAe,CAAA;IACf;;;OAGG;IACH,6CAAe,CAAA;IACf,wCAAwC;IACxC,iDAA0B,CAAA;IAC1B,2EAA2E;IAC3E,qDAAmB,CAAA;AACrB,CAAC,EAhBW,SAAS,KAAT,SAAS,QAgBpB;AAED;;;GAGG;AACH,MAAM,OAAO,aAAa;IACxB,yEAAyE;IAClE,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IAClC,oDAAoD;IAC7C,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC;IACrC,gGAAgG;IACzF,WAAW,GAAG,CAAC,CAAC;IACvB,qCAAqC;IAC9B,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC;I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GAAG,UAAU,CAAC;QACtC,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,gBAAgB,CAAC,SAAmB;QAChD,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC7C,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { ColorDef } from \"./ColorDef\";\nimport { Gradient } from \"./Gradient\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RenderMaterial } from \"./RenderMaterial\";\n\n/** Flags indicating whether and how the interiors of closed planar regions is displayed within a view.\n * @public\n * @extensions\n */\nexport enum FillFlags {\n /** No fill */\n None = 0,\n /** Use the element's fill color when fill is enabled in the view's [[ViewFlags]]. */\n ByView = 1 << 0,\n /** Use the element's fill color even when fill is disabled in the view's [[ViewFlags]]. */\n Always = 1 << 1,\n /** Render the fill behind other geometry belonging to the same element.\n * For example if an element's geometry contains text with background fill, the text always renders in front of the fill.\n * @note [GraphicBuilder]($frontend) will not produce edge geometry for shapes with this fill flag. If you want an outline, add it separately.\n */\n Behind = 1 << 2,\n /** Combines Behind and Always flags. */\n Blanking = Behind | Always,\n /** Use the view's background color instead of the element's fill color. */\n Background = 1 << 3,\n}\n\n/** The \"cooked\" material and symbology for a [[RenderGraphic]]. This determines the appearance\n * (e.g. texture, color, width, linestyle, etc.) used to draw Geometry.\n * @public\n */\nexport class GraphicParams {\n /** Describes how fill is applied to planar regions in wireframe mode. */\n public fillFlags = FillFlags.None;\n /** The line pattern applied to curves and edges. */\n public linePixels = LinePixels.Solid;\n /** The width, in pixels, of curves and edges. Values are clamped to [1..31] at display time. */\n public rasterWidth = 1;\n /** The color of curves and edges. */\n public lineColor = ColorDef.black;\n /** The color of surfaces. */\n public fillColor = ColorDef.black;\n /** Material applied to surfaces. */\n public material?: RenderMaterial;\n /** Gradient fill applied to surfaces. */\n public gradient?: Gradient.Symb;\n\n /** Set the transparency of the line color, where 0=fully opaque and 255=full transparent. */\n public setLineTransparency(transparency: number) { this.lineColor = this.lineColor.withTransparency(transparency); }\n\n /** Set the transparency of the fill color, where 0=fully opaque and 255=full transparent. */\n public setFillTransparency(transparency: number) { this.fillColor = this.fillColor.withTransparency(transparency); }\n\n public clone(out?: GraphicParams): GraphicParams {\n out = out ?? new GraphicParams();\n\n out.fillFlags = this.fillFlags;\n out.linePixels = this.linePixels;\n out.rasterWidth = this.rasterWidth;\n out.lineColor = this.lineColor;\n out.fillColor = this.fillColor;\n out.material = this.material;\n out.gradient = this.gradient;\n\n return out;\n }\n\n /** Conveniently create a GraphicParams the most commonly-used properties. */\n public static fromSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid): GraphicParams {\n const graphicParams = new GraphicParams();\n graphicParams.lineColor = lineColor;\n graphicParams.fillColor = fillColor;\n graphicParams.rasterWidth = lineWidth;\n graphicParams.linePixels = linePixels;\n return graphicParams;\n }\n\n /** Create a GraphicParams with blanking fill of the specified color.\n * @see [[FillFlags.Blanking]].\n */\n public static fromBlankingFill(fillColor: ColorDef): GraphicParams {\n const graphicParams = new GraphicParams();\n graphicParams.fillColor = fillColor;\n graphicParams.fillFlags = FillFlags.Blanking;\n return graphicParams;\n }\n}\n"]}
1
+ {"version":3,"file":"GraphicParams.js","sourceRoot":"","sources":["../../src/GraphicParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,MAAM,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,CAAC,SAAS,CAAC;QAC/B,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/B,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE7B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,6EAA6E;IACtE,MAAM,CAAC,aAAa,CAAC,SAAmB,EAAE,SAAmB,EAAE,SAAiB,EAAE,UAAU,GAAG,UAAU,CAAC,KAAK;QACpH,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,WAAW,GAAG,SAAS,CAAC;QACtC,aAAa,CAAC,UAAU,GAAG,UAAU,CAAC;QACtC,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,gBAAgB,CAAC,SAAmB;QAChD,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC7C,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { Gradient } from \"./Gradient\";\r\nimport { LinePixels } from \"./LinePixels\";\r\nimport { RenderMaterial } from \"./RenderMaterial\";\r\n\r\n/** Flags indicating whether and how the interiors of closed planar regions is displayed within a view.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FillFlags {\r\n /** No fill */\r\n None = 0,\r\n /** Use the element's fill color when fill is enabled in the view's [[ViewFlags]]. */\r\n ByView = 1 << 0,\r\n /** Use the element's fill color even when fill is disabled in the view's [[ViewFlags]]. */\r\n Always = 1 << 1,\r\n /** Render the fill behind other geometry belonging to the same element.\r\n * For example if an element's geometry contains text with background fill, the text always renders in front of the fill.\r\n * @note [GraphicBuilder]($frontend) will not produce edge geometry for shapes with this fill flag. If you want an outline, add it separately.\r\n */\r\n Behind = 1 << 2,\r\n /** Combines Behind and Always flags. */\r\n Blanking = Behind | Always,\r\n /** Use the view's background color instead of the element's fill color. */\r\n Background = 1 << 3,\r\n}\r\n\r\n/** The \"cooked\" material and symbology for a [[RenderGraphic]]. This determines the appearance\r\n * (e.g. texture, color, width, linestyle, etc.) used to draw Geometry.\r\n * @public\r\n */\r\nexport class GraphicParams {\r\n /** Describes how fill is applied to planar regions in wireframe mode. */\r\n public fillFlags = FillFlags.None;\r\n /** The line pattern applied to curves and edges. */\r\n public linePixels = LinePixels.Solid;\r\n /** The width, in pixels, of curves and edges. Values are clamped to [1..31] at display time. */\r\n public rasterWidth = 1;\r\n /** The color of curves and edges. */\r\n public lineColor = ColorDef.black;\r\n /** The color of surfaces. */\r\n public fillColor = ColorDef.black;\r\n /** Material applied to surfaces. */\r\n public material?: RenderMaterial;\r\n /** Gradient fill applied to surfaces. */\r\n public gradient?: Gradient.Symb;\r\n\r\n /** Set the transparency of the line color, where 0=fully opaque and 255=full transparent. */\r\n public setLineTransparency(transparency: number) { this.lineColor = this.lineColor.withTransparency(transparency); }\r\n\r\n /** Set the transparency of the fill color, where 0=fully opaque and 255=full transparent. */\r\n public setFillTransparency(transparency: number) { this.fillColor = this.fillColor.withTransparency(transparency); }\r\n\r\n public clone(out?: GraphicParams): GraphicParams {\r\n out = out ?? new GraphicParams();\r\n\r\n out.fillFlags = this.fillFlags;\r\n out.linePixels = this.linePixels;\r\n out.rasterWidth = this.rasterWidth;\r\n out.lineColor = this.lineColor;\r\n out.fillColor = this.fillColor;\r\n out.material = this.material;\r\n out.gradient = this.gradient;\r\n\r\n return out;\r\n }\r\n\r\n /** Conveniently create a GraphicParams the most commonly-used properties. */\r\n public static fromSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid): GraphicParams {\r\n const graphicParams = new GraphicParams();\r\n graphicParams.lineColor = lineColor;\r\n graphicParams.fillColor = fillColor;\r\n graphicParams.rasterWidth = lineWidth;\r\n graphicParams.linePixels = linePixels;\r\n return graphicParams;\r\n }\r\n\r\n /** Create a GraphicParams with blanking fill of the specified color.\r\n * @see [[FillFlags.Blanking]].\r\n */\r\n public static fromBlankingFill(fillColor: ColorDef): GraphicParams {\r\n const graphicParams = new GraphicParams();\r\n graphicParams.fillColor = fillColor;\r\n graphicParams.fillFlags = FillFlags.Blanking;\r\n return graphicParams;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GroundPlane.js","sourceRoot":"","sources":["../../src/GroundPlane.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAwBrD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACnE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,OAAO,WAAW;IACtB,yDAAyD;IACzC,SAAS,CAAS;IAClC,0EAA0E;IAC1D,UAAU,CAAW;IACrC,0EAA0E;IAC1D,UAAU,CAAW;IAErC,YAAsB,KAAqC;QACzD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,iBAAiB,CAAC;QACxD,I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QAEF,IAAI,SAAS,KAAK,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAE1B,OAAO,KAAK,CAAC;IACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\nimport { ColorByName } from \"./ColorByName\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\n\n/** JSON representation of a [[GroundPlane]].\n * @see [[EnvironmentProps.ground]].\n * @public\n * @extensions\n */\nexport interface GroundPlaneProps {\n /** Whether the ground plane should be displayed. Defaults to false. */\n display?: boolean;\n /** The Z height at which to draw the ground plane. */\n elevation?: number;\n /** The color in which to draw the ground plane when viewed from above. */\n aboveColor?: ColorDefProps;\n /** The color in which to draw the ground plane when viewed from below. */\n belowColor?: ColorDefProps;\n}\n\n/** A type containing all of the properties and none of the methods of [[GroundPlane]], with `readonly` modifiers removed.\n * @see [[GroundPlane.create]] and [[GroundPlane.clone]].\n * @public\n */\nexport type GroundPlaneProperties = NonFunctionPropertiesOf<GroundPlane>;\n\nconst defaultAboveColor = ColorDef.fromTbgr(ColorByName.darkGreen);\nconst defaultBelowColor = ColorDef.fromTbgr(ColorByName.darkBrown);\n\n/** A circle drawn at a Z elevation, whose diameter is the the XY diagonal of the project extents, used to represent the ground as a reference point within a spatial view.\n * @see [[Environment.ground]].\n * @public\n */\nexport class GroundPlane {\n /** The Z height in meters at which to draw the plane. */\n public readonly elevation: number;\n /** The color in which to draw the ground plane when viewed from above. */\n public readonly aboveColor: ColorDef;\n /** The color in which to draw the ground plane when viewed from below. */\n public readonly belowColor: ColorDef;\n\n protected constructor(props: Partial<GroundPlaneProperties>) {\n this.elevation = props.elevation ?? -0.01;\n this.aboveColor = props.aboveColor ?? defaultAboveColor;\n this.belowColor = props.belowColor ?? defaultBelowColor;\n }\n\n /** Default settings with a dark green \"above\" color, dark brown \"below\" color, and elevation of -0.01 meters. */\n public static readonly defaults = new GroundPlane({});\n\n /** Create a new GroundPlane. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<GroundPlaneProperties>) {\n return props ? new this(props) : this.defaults;\n }\n\n /** Create a copy of this ground plane, identical except for any properties explicitly specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be initialized to their default values.\n */\n public clone(changedProps?: Partial<GroundPlaneProperties>): GroundPlane {\n if (!changedProps)\n return this;\n\n return GroundPlane.create({ ...this, ...changedProps });\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props?: GroundPlaneProps): GroundPlane {\n if (!props)\n return this.defaults;\n\n return new this({\n elevation: props.elevation,\n aboveColor: undefined !== props.aboveColor ? ColorDef.fromJSON(props.aboveColor) : undefined,\n belowColor: undefined !== props.belowColor ? ColorDef.fromJSON(props.belowColor) : undefined,\n });\n }\n\n /** Convert to JSON representation.\n * @param display If defined, the value to use for [[GroundPlaneProps.display]]; otherwise, that property will be left undefined.\n */\n public toJSON(display?: boolean): GroundPlaneProps {\n const props: GroundPlaneProps = {\n elevation: this.elevation,\n aboveColor: this.aboveColor.toJSON(),\n belowColor: this.belowColor.toJSON(),\n };\n\n if (undefined !== display)\n props.display = display;\n\n return props;\n }\n}\n"]}
1
+ {"version":3,"file":"GroundPlane.js","sourceRoot":"","sources":["../../src/GroundPlane.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAwBrD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACnE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,C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,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;SAC7F,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAAiB;QAC7B,MAAM,KAAK,GAAqB;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;SACrC,CAAC;QAEF,IAAI,SAAS,KAAK,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAE1B,OAAO,KAAK,CAAC;IACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\r\nimport { ColorByName } from \"./ColorByName\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\n\r\n/** JSON representation of a [[GroundPlane]].\r\n * @see [[EnvironmentProps.ground]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GroundPlaneProps {\r\n /** Whether the ground plane should be displayed. Defaults to false. */\r\n display?: boolean;\r\n /** The Z height at which to draw the ground plane. */\r\n elevation?: number;\r\n /** The color in which to draw the ground plane when viewed from above. */\r\n aboveColor?: ColorDefProps;\r\n /** The color in which to draw the ground plane when viewed from below. */\r\n belowColor?: ColorDefProps;\r\n}\r\n\r\n/** A type containing all of the properties and none of the methods of [[GroundPlane]], with `readonly` modifiers removed.\r\n * @see [[GroundPlane.create]] and [[GroundPlane.clone]].\r\n * @public\r\n */\r\nexport type GroundPlaneProperties = NonFunctionPropertiesOf<GroundPlane>;\r\n\r\nconst defaultAboveColor = ColorDef.fromTbgr(ColorByName.darkGreen);\r\nconst defaultBelowColor = ColorDef.fromTbgr(ColorByName.darkBrown);\r\n\r\n/** A circle drawn at a Z elevation, whose diameter is the the XY diagonal of the project extents, used to represent the ground as a reference point within a spatial view.\r\n * @see [[Environment.ground]].\r\n * @public\r\n */\r\nexport class GroundPlane {\r\n /** The Z height in meters at which to draw the plane. */\r\n public readonly elevation: number;\r\n /** The color in which to draw the ground plane when viewed from above. */\r\n public readonly aboveColor: ColorDef;\r\n /** The color in which to draw the ground plane when viewed from below. */\r\n public readonly belowColor: ColorDef;\r\n\r\n protected constructor(props: Partial<GroundPlaneProperties>) {\r\n this.elevation = props.elevation ?? -0.01;\r\n this.aboveColor = props.aboveColor ?? defaultAboveColor;\r\n this.belowColor = props.belowColor ?? defaultBelowColor;\r\n }\r\n\r\n /** Default settings with a dark green \"above\" color, dark brown \"below\" color, and elevation of -0.01 meters. */\r\n public static readonly defaults = new GroundPlane({});\r\n\r\n /** Create a new GroundPlane. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<GroundPlaneProperties>) {\r\n return props ? new this(props) : this.defaults;\r\n }\r\n\r\n /** Create a copy of this ground plane, identical except for any properties explicitly specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be initialized to their default values.\r\n */\r\n public clone(changedProps?: Partial<GroundPlaneProperties>): GroundPlane {\r\n if (!changedProps)\r\n return this;\r\n\r\n return GroundPlane.create({ ...this, ...changedProps });\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props?: GroundPlaneProps): GroundPlane {\r\n if (!props)\r\n return this.defaults;\r\n\r\n return new this({\r\n elevation: props.elevation,\r\n aboveColor: undefined !== props.aboveColor ? ColorDef.fromJSON(props.aboveColor) : undefined,\r\n belowColor: undefined !== props.belowColor ? ColorDef.fromJSON(props.belowColor) : undefined,\r\n });\r\n }\r\n\r\n /** Convert to JSON representation.\r\n * @param display If defined, the value to use for [[GroundPlaneProps.display]]; otherwise, that property will be left undefined.\r\n */\r\n public toJSON(display?: boolean): GroundPlaneProps {\r\n const props: GroundPlaneProps = {\r\n elevation: this.elevation,\r\n aboveColor: this.aboveColor.toJSON(),\r\n belowColor: this.belowColor.toJSON(),\r\n };\r\n\r\n if (undefined !== display)\r\n props.display = display;\r\n\r\n return props;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HSLColor.js","sourceRoot":"","sources":["../../src/HSLColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB,UAAU;IACM,CAAC,CAAS;IAC1B,iBAAiB;IACD,CAAC,CAAS;IAC1B,gBAAgB;IACA,CAAC,CAAS;IAE1B,YAAmB,GAAG,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC;QACvD,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QACb,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,GAAY,EAAE,UAAmB,EAAE,SAAkB;QAChE,OAAO,IAAI,QAAQ,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,UAAU,CAAC,YAAY,GAAG,CAAC;QAChC,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,GAAa;QACtC,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/** An immutable color defined by Hue, Saturation, and Lightness.\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\n * @public\n */\nexport class HSLColor {\n /** Hue */\n public readonly h: number;\n /** Saturation */\n public readonly s: number;\n /** Lightness */\n public readonly l: number;\n\n public constructor(hue = 0, saturation = 0, lightness = 0) {\n this.h = hue;\n this.s = saturation;\n this.l = lightness;\n }\n\n public clone(hue?: number, saturation?: number, lightness?: number): HSLColor {\n return new HSLColor(hue ?? this.h, saturation ?? this.s, lightness ?? this.l);\n }\n\n public toColorDef(transparency = 0): ColorDef {\n return ColorDef.fromHSL(this.h, this.s, this.l, transparency);\n }\n\n public static fromColorDef(val: ColorDef) {\n return val.toHSL();\n }\n}\n"]}
1
+ {"version":3,"file":"HSLColor.js","sourceRoot":"","sources":["../../src/HSLColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB,UAAU;IACM,CAAC,CAAS;IAC1B,iBAAiB;IACD,CAAC,CAAS;IAC1B,gBAAgB;IACA,CAAC,CAAS;IAE1B,YAAmB,GAAG,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC;QACvD,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QACb,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,GAAY,EAAE,UAAmB,EAAE,SAAkB;QAChE,OAAO,IAAI,QAAQ,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,UAAU,CAAC,YAAY,GAAG,CAAC;QAChC,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,GAAa;QACtC,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** An immutable color defined by Hue, Saturation, and Lightness.\r\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\r\n * @public\r\n */\r\nexport class HSLColor {\r\n /** Hue */\r\n public readonly h: number;\r\n /** Saturation */\r\n public readonly s: number;\r\n /** Lightness */\r\n public readonly l: number;\r\n\r\n public constructor(hue = 0, saturation = 0, lightness = 0) {\r\n this.h = hue;\r\n this.s = saturation;\r\n this.l = lightness;\r\n }\r\n\r\n public clone(hue?: number, saturation?: number, lightness?: number): HSLColor {\r\n return new HSLColor(hue ?? this.h, saturation ?? this.s, lightness ?? this.l);\r\n }\r\n\r\n public toColorDef(transparency = 0): ColorDef {\r\n return ColorDef.fromHSL(this.h, this.s, this.l, transparency);\r\n }\r\n\r\n public static fromColorDef(val: ColorDef) {\r\n return val.toHSL();\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HSVColor.js","sourceRoot":"","sources":["../../src/HSVColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,E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,EAAE,IAAI,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;YAE9D,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,CAAC;YAChD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,aAAa,GAAG,KAAK,GAAG,YAAY,CAAC,qBAAqB,CAAC;QAC3D,IAAI,IAAI,CAAC,CAAC,IAAI,aAAa;YACzB,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAE9D,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,CAAC;QAChD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/**\n * @public\n * @extensions\n */\nexport enum HSVConstants {\n VISIBILITY_GOAL = 40,\n HSV_SATURATION_WEIGHT = 4,\n HSV_VALUE_WEIGHT = 2,\n}\n\n/** An immutable color defined by Hue, Saturation, and Value\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\n * @public\n */\nexport class HSVColor {\n /** Hue */\n public readonly h: number;\n /** Saturation */\n public readonly s: number;\n /** Value */\n public readonly v: number;\n\n public constructor(hue = 0, saturation = 0, value = 0) {\n this.h = hue;\n this.s = saturation;\n this.v = value;\n }\n\n public clone(hue?: number, saturation?: number, value?: number): HSVColor {\n return new HSVColor(hue ?? this.h, saturation ?? this.s, value ?? this.v);\n }\n\n public toColorDef(transparency = 0): ColorDef {\n return ColorDef.fromHSV(this, transparency);\n }\n\n public static fromColorDef(val: ColorDef): HSVColor {\n return val.toHSV();\n }\n\n public adjusted(darkenColor: boolean, delta: number): HSVColor {\n let weightedDelta;\n if (darkenColor) {\n weightedDelta = delta * HSVConstants.HSV_VALUE_WEIGHT;\n if (this.v >= weightedDelta)\n return new HSVColor(this.h, this.s, this.v - weightedDelta);\n\n weightedDelta -= this.v;\n const s = Math.min(this.s + weightedDelta, 100);\n return new HSVColor(this.h, s, 0);\n }\n\n weightedDelta = delta * HSVConstants.HSV_SATURATION_WEIGHT;\n if (this.s >= weightedDelta)\n return new HSVColor(this.h, this.s - weightedDelta, this.v);\n\n weightedDelta -= this.s;\n const v = Math.min(this.v + weightedDelta, 100);\n return new HSVColor(this.h, 0, v);\n }\n}\n"]}
1
+ {"version":3,"file":"HSVColor.js","sourceRoot":"","sources":["../../src/HSVColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,sEAAoB,CAAA;IACpB,iFAAyB,CAAA;IACzB,uEAAoB,CAAA;AACtB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB,UAAU;IACM,CAAC,CAAS;IAC1B,iBAAiB;IACD,CAAC,CAAS;IAC1B,YAAY;IACI,CAAC,CAAS;IAE1B,YAAmB,GAAG,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC;QACnD,IAAI,CAAC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AC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAE9D,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,CAAC;QAChD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport enum HSVConstants {\r\n VISIBILITY_GOAL = 40,\r\n HSV_SATURATION_WEIGHT = 4,\r\n HSV_VALUE_WEIGHT = 2,\r\n}\r\n\r\n/** An immutable color defined by Hue, Saturation, and Value\r\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\r\n * @public\r\n */\r\nexport class HSVColor {\r\n /** Hue */\r\n public readonly h: number;\r\n /** Saturation */\r\n public readonly s: number;\r\n /** Value */\r\n public readonly v: number;\r\n\r\n public constructor(hue = 0, saturation = 0, value = 0) {\r\n this.h = hue;\r\n this.s = saturation;\r\n this.v = value;\r\n }\r\n\r\n public clone(hue?: number, saturation?: number, value?: number): HSVColor {\r\n return new HSVColor(hue ?? this.h, saturation ?? this.s, value ?? this.v);\r\n }\r\n\r\n public toColorDef(transparency = 0): ColorDef {\r\n return ColorDef.fromHSV(this, transparency);\r\n }\r\n\r\n public static fromColorDef(val: ColorDef): HSVColor {\r\n return val.toHSV();\r\n }\r\n\r\n public adjusted(darkenColor: boolean, delta: number): HSVColor {\r\n let weightedDelta;\r\n if (darkenColor) {\r\n weightedDelta = delta * HSVConstants.HSV_VALUE_WEIGHT;\r\n if (this.v >= weightedDelta)\r\n return new HSVColor(this.h, this.s, this.v - weightedDelta);\r\n\r\n weightedDelta -= this.v;\r\n const s = Math.min(this.s + weightedDelta, 100);\r\n return new HSVColor(this.h, s, 0);\r\n }\r\n\r\n weightedDelta = delta * HSVConstants.HSV_SATURATION_WEIGHT;\r\n if (this.s >= weightedDelta)\r\n return new HSVColor(this.h, this.s - weightedDelta, this.v);\r\n\r\n weightedDelta -= this.s;\r\n const v = Math.min(this.v + weightedDelta, 100);\r\n return new HSVColor(this.h, 0, v);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HiddenLine.js","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,KAAW,UAAU,CAiO1B;AAjOD,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,IAAW,QAAQ,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,kHAAkH;QAClG,KAAK,CAAY;QACjC,4HAA4H;QAC5G,OAAO,CAAc;QACrC;;WAEG;QACa,KAAK,CAAU;QAE/B,YAAoB,IAAiB,EAAE,MAAa;YAClD,IAAI,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,IAAI,MAAM;oBACR,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC;gBAEvC,OAAO;YACT,CAAC;YAED,IAAI,GAAG,IAAkB,CAAC,CAAC,2CAA2C;YACtE,IAAI,SAAS,KAA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,CAAC;QACL,CAAC;QAEM,MAAM,CAAC,KAAe;YAC3B,IAAI,IAAI,KAAK,KAAK;gBAChB,OAAO,IAAI,CAAC;YAEd,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;mBACpC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;mBAChC,IAAI,CAAC,qBAAqB,KAAK,KAAK,CAAC,qBAAqB,CAAC;QAClE,CAAC;QAED,IAAW,eAAe;YACxB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QAED,YAAoB,IAAmB;YACrC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAChD,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IArEU,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EAjOgB,UAAU,KAAV,UAAU,QAiO1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { LinePixels } from \"./LinePixels\";\n\n/** Namespace containing types controlling how edges and surfaces should be drawn in \"hidden line\" and \"solid fill\" [[RenderMode]]s.\n * @public\n */\nexport namespace HiddenLine {\n /** Describes the symbology with which edges should be drawn.\n * This JSON representation is awkward, but it must match that used in the db.\n * If the JSON came from the db then all members are present and:\n * - color is overridden only if ovrColor = true.\n * - width is overridden only if width != 0\n * - pattern is overridden only if pattern != LinePixels.Invalid\n * The 'public' JSON representation is more sensible:\n * - Color, width, and pattern are each overridden iff they are not undefined.\n * To make this work for both scenarios, the rules are:\n * - color is overridden if color != undefined and ovrColor != false\n * - width is overridden if width != undefined and width != 0\n * - pattern is overridden if pattern != undefined and pattern != LinePixels.Invalid\n */\n export interface StyleProps {\n /** If true, and [[color]] is defined, then the edge color is overridden. */\n ovrColor?: boolean;\n /** If defined, and [[ovrColor]] is not `false`, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n color?: ColorDefProps;\n /** If defined and not equal to [[LinePixels.Invalid]], the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n pattern?: LinePixels;\n /** If defined and non-zero, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n width?: number;\n }\n\n /** Describes the symbology with which edges should be drawn. */\n export class Style {\n public get ovrColor(): boolean { return undefined !== this.color; }\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n public readonly color?: ColorDef;\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n public readonly pattern?: LinePixels;\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n public readonly width?: number;\n\n private constructor(json?: StyleProps, hidden?: true) {\n if (JsonUtils.isEmptyObjectOrUndefined(json)) {\n if (hidden)\n this.pattern = LinePixels.HiddenLine;\n\n return;\n }\n\n json = json as StyleProps; // per JsonUtils.isEmptyObjectOrUndefined()\n if (undefined !== json.color && false !== json.ovrColor)\n this.color = ColorDef.fromJSON(json.color);\n\n if (undefined !== json.pattern) {\n const pattern = JsonUtils.asInt(json.pattern, hidden ? LinePixels.HiddenLine : LinePixels.Invalid);\n if (LinePixels.Invalid !== pattern)\n this.pattern = pattern;\n } else if (hidden) {\n this.pattern = LinePixels.HiddenLine;\n }\n\n if (undefined !== json.width) {\n let width = JsonUtils.asInt(json.width, 0);\n if (0 !== width) {\n width = Math.max(1, width);\n this.width = Math.min(32, width);\n }\n }\n }\n\n public static readonly defaultVisible = new Style({});\n public static readonly defaultHidden = new Style({}, true);\n\n public static fromJSON(json?: StyleProps, hidden?: true): Style {\n if (undefined !== json)\n return new Style(json, hidden);\n\n return hidden ? this.defaultHidden : this.defaultVisible;\n }\n\n /** Create a Style equivalent to this one but with the specified color override. */\n public overrideColor(color: ColorDef | undefined): Style {\n if (undefined === this.color && undefined === color)\n return this;\n\n if (undefined !== this.color && undefined !== color && this.color.equals(color))\n return this;\n\n return Style.fromJSON({\n color: color?.toJSON(),\n ovrColor: undefined !== color,\n pattern: this.pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified pattern override. */\n public overridePattern(pattern: LinePixels | undefined): Style {\n if (pattern === this.pattern)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified width override. */\n public overrideWidth(width: number | undefined): Style {\n if (width === this.width)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern: this.pattern,\n width,\n });\n }\n\n /** Returns true if this Style is equivalent to the supplied Style. */\n public equals(other: Style): boolean {\n if (this === other)\n return true;\n else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)\n return false;\n else if ((undefined === this.color) !== (undefined === other.color))\n return false;\n else\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return undefined === this.color || this.color.equals(other.color!);\n }\n\n public toJSON(): StyleProps {\n return {\n ovrColor: this.ovrColor,\n color: this.color ? this.color.toJSON() : ColorDef.white.toJSON(),\n pattern: undefined !== this.pattern ? this.pattern : LinePixels.Invalid,\n width: undefined !== this.width ? this.width : 0,\n };\n }\n }\n\n /** The JSON representation of a [[HiddenLine.Settings]]. */\n export interface SettingsProps {\n /** See [[HiddenLine.Settings.visible]]. */\n visible?: StyleProps;\n /** See [[HiddenLine.Settings.hidden]]. */\n hidden?: StyleProps;\n /** See [[HiddenLine.Settings.transparencyThreshold. */\n transThreshold?: number;\n }\n\n /** Describes how visible and hidden edges and transparent surfaces should be rendered in \"hidden line\" and \"solid fill\" [[RenderMode]]s. */\n export class Settings {\n /** Describes how visible edges (those unobscured by other geometry) should be displayed. */\n public readonly visible: Style;\n /** Describes how hidden edges (those obscured by other geometry) should be displayed. */\n public readonly hidden: Style;\n /** A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn.\n * A value of 0.0 indicates any surface that is not 100% opaque should not be drawn.\n * A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn.\n * A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.\n * @note values will be clamped to the range [0.0, 1.0].\n * @note Defaults to 1.0.\n */\n public readonly transparencyThreshold: number;\n\n /** An alias for [[transparencyThreshold]]. */\n public get transThreshold(): number { return this.transparencyThreshold; }\n\n /** The default display settings. */\n public static defaults = new Settings({});\n\n /** Create a DisplaySettings from its JSON representation. */\n public static fromJSON(json?: SettingsProps): Settings {\n if (!JsonUtils.isNonEmptyObject(json))\n return this.defaults;\n else if (json instanceof Settings)\n return json;\n else\n return new Settings(json);\n }\n\n public toJSON(): SettingsProps {\n const props: SettingsProps = {\n visible: this.visible.toJSON(),\n hidden: this.hidden.toJSON(),\n transThreshold: this.transThreshold,\n };\n\n return props;\n }\n\n /** Create a Settings equivalent to this one with the exception of those properties defined in the supplied JSON. */\n public override(props: SettingsProps): Settings {\n const visible = props.visible;\n const hidden = props.hidden;\n const transparencyThreshold = props.transThreshold;\n return Settings.fromJSON({\n visible: undefined !== visible ? visible : this.visible.toJSON(),\n hidden: undefined !== hidden ? hidden : this.hidden.toJSON(),\n transThreshold: undefined !== transparencyThreshold ? transparencyThreshold : this.transparencyThreshold,\n });\n }\n\n public equals(other: Settings): boolean {\n if (this === other)\n return true;\n\n return this.visible.equals(other.visible)\n && this.hidden.equals(other.hidden)\n && this.transparencyThreshold === other.transparencyThreshold;\n }\n\n public get matchesDefaults(): boolean {\n return this.equals(Settings.defaults);\n }\n\n private constructor(json: SettingsProps) {\n this.visible = Style.fromJSON(json.visible);\n this.hidden = Style.fromJSON(json.hidden, true);\n this.transparencyThreshold = JsonUtils.asDouble(json.transThreshold, 1.0);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"HiddenLine.js","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,KAAW,UAAU,CAiO1B;AAjOD,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,IAAW,QAAQ,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,kHAAkH;QAClG,KAAK,CAAY;QACjC,4HAA4H;QAC5G,OAAO,CAAc;QACrC;;WAEG;QACa,KAAK,CAAU;QAE/B,YAAoB,IAAiB,EAAE,MAAa;YAClD,IAAI,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,IAAI,MAAM;oBACR,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC;gBAEvC,OAAO;YACT,CAAC;YAED,IAAI,GAAG,IAAkB,CAAC,CAAC,2CAA2C;YACtE,IAAI,SAAS,KAAK,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,CAAC,QAAQ;gBACrD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,K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CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;mBACpC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;mBAChC,IAAI,CAAC,qBAAqB,KAAK,KAAK,CAAC,qBAAqB,CAAC;QAClE,CAAC;QAED,IAAW,eAAe;YACxB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QAED,YAAoB,IAAmB;YACrC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAChD,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IArEU,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EAjOgB,UAAU,KAAV,UAAU,QAiO1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { JsonUtils } from \"@itwin/core-bentley\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { LinePixels } from \"./LinePixels\";\r\n\r\n/** Namespace containing types controlling how edges and surfaces should be drawn in \"hidden line\" and \"solid fill\" [[RenderMode]]s.\r\n * @public\r\n */\r\nexport namespace HiddenLine {\r\n /** Describes the symbology with which edges should be drawn.\r\n * This JSON representation is awkward, but it must match that used in the db.\r\n * If the JSON came from the db then all members are present and:\r\n * - color is overridden only if ovrColor = true.\r\n * - width is overridden only if width != 0\r\n * - pattern is overridden only if pattern != LinePixels.Invalid\r\n * The 'public' JSON representation is more sensible:\r\n * - Color, width, and pattern are each overridden iff they are not undefined.\r\n * To make this work for both scenarios, the rules are:\r\n * - color is overridden if color != undefined and ovrColor != false\r\n * - width is overridden if width != undefined and width != 0\r\n * - pattern is overridden if pattern != undefined and pattern != LinePixels.Invalid\r\n */\r\n export interface StyleProps {\r\n /** If true, and [[color]] is defined, then the edge color is overridden. */\r\n ovrColor?: boolean;\r\n /** If defined, and [[ovrColor]] is not `false`, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\r\n color?: ColorDefProps;\r\n /** If defined and not equal to [[LinePixels.Invalid]], the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\r\n pattern?: LinePixels;\r\n /** If defined and non-zero, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\r\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\r\n */\r\n width?: number;\r\n }\r\n\r\n /** Describes the symbology with which edges should be drawn. */\r\n export class Style {\r\n public get ovrColor(): boolean { return undefined !== this.color; }\r\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\r\n public readonly color?: ColorDef;\r\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\r\n public readonly pattern?: LinePixels;\r\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\r\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\r\n */\r\n public readonly width?: number;\r\n\r\n private constructor(json?: StyleProps, hidden?: true) {\r\n if (JsonUtils.isEmptyObjectOrUndefined(json)) {\r\n if (hidden)\r\n this.pattern = LinePixels.HiddenLine;\r\n\r\n return;\r\n }\r\n\r\n json = json as StyleProps; // per JsonUtils.isEmptyObjectOrUndefined()\r\n if (undefined !== json.color && false !== json.ovrColor)\r\n this.color = ColorDef.fromJSON(json.color);\r\n\r\n if (undefined !== json.pattern) {\r\n const pattern = JsonUtils.asInt(json.pattern, hidden ? LinePixels.HiddenLine : LinePixels.Invalid);\r\n if (LinePixels.Invalid !== pattern)\r\n this.pattern = pattern;\r\n } else if (hidden) {\r\n this.pattern = LinePixels.HiddenLine;\r\n }\r\n\r\n if (undefined !== json.width) {\r\n let width = JsonUtils.asInt(json.width, 0);\r\n if (0 !== width) {\r\n width = Math.max(1, width);\r\n this.width = Math.min(32, width);\r\n }\r\n }\r\n }\r\n\r\n public static readonly defaultVisible = new Style({});\r\n public static readonly defaultHidden = new Style({}, true);\r\n\r\n public static fromJSON(json?: StyleProps, hidden?: true): Style {\r\n if (undefined !== json)\r\n return new Style(json, hidden);\r\n\r\n return hidden ? this.defaultHidden : this.defaultVisible;\r\n }\r\n\r\n /** Create a Style equivalent to this one but with the specified color override. */\r\n public overrideColor(color: ColorDef | undefined): Style {\r\n if (undefined === this.color && undefined === color)\r\n return this;\r\n\r\n if (undefined !== this.color && undefined !== color && this.color.equals(color))\r\n return this;\r\n\r\n return Style.fromJSON({\r\n color: color?.toJSON(),\r\n ovrColor: undefined !== color,\r\n pattern: this.pattern,\r\n width: this.width,\r\n });\r\n }\r\n\r\n /** Create a Style equivalent to this one but with the specified pattern override. */\r\n public overridePattern(pattern: LinePixels | undefined): Style {\r\n if (pattern === this.pattern)\r\n return this;\r\n\r\n return Style.fromJSON({\r\n color: this.color?.toJSON(),\r\n ovrColor: this.ovrColor,\r\n pattern,\r\n width: this.width,\r\n });\r\n }\r\n\r\n /** Create a Style equivalent to this one but with the specified width override. */\r\n public overrideWidth(width: number | undefined): Style {\r\n if (width === this.width)\r\n return this;\r\n\r\n return Style.fromJSON({\r\n color: this.color?.toJSON(),\r\n ovrColor: this.ovrColor,\r\n pattern: this.pattern,\r\n width,\r\n });\r\n }\r\n\r\n /** Returns true if this Style is equivalent to the supplied Style. */\r\n public equals(other: Style): boolean {\r\n if (this === other)\r\n return true;\r\n else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)\r\n return false;\r\n else if ((undefined === this.color) !== (undefined === other.color))\r\n return false;\r\n else\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n return undefined === this.color || this.color.equals(other.color!);\r\n }\r\n\r\n public toJSON(): StyleProps {\r\n return {\r\n ovrColor: this.ovrColor,\r\n color: this.color ? this.color.toJSON() : ColorDef.white.toJSON(),\r\n pattern: undefined !== this.pattern ? this.pattern : LinePixels.Invalid,\r\n width: undefined !== this.width ? this.width : 0,\r\n };\r\n }\r\n }\r\n\r\n /** The JSON representation of a [[HiddenLine.Settings]]. */\r\n export interface SettingsProps {\r\n /** See [[HiddenLine.Settings.visible]]. */\r\n visible?: StyleProps;\r\n /** See [[HiddenLine.Settings.hidden]]. */\r\n hidden?: StyleProps;\r\n /** See [[HiddenLine.Settings.transparencyThreshold. */\r\n transThreshold?: number;\r\n }\r\n\r\n /** Describes how visible and hidden edges and transparent surfaces should be rendered in \"hidden line\" and \"solid fill\" [[RenderMode]]s. */\r\n export class Settings {\r\n /** Describes how visible edges (those unobscured by other geometry) should be displayed. */\r\n public readonly visible: Style;\r\n /** Describes how hidden edges (those obscured by other geometry) should be displayed. */\r\n public readonly hidden: Style;\r\n /** A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn.\r\n * A value of 0.0 indicates any surface that is not 100% opaque should not be drawn.\r\n * A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn.\r\n * A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.\r\n * @note values will be clamped to the range [0.0, 1.0].\r\n * @note Defaults to 1.0.\r\n */\r\n public readonly transparencyThreshold: number;\r\n\r\n /** An alias for [[transparencyThreshold]]. */\r\n public get transThreshold(): number { return this.transparencyThreshold; }\r\n\r\n /** The default display settings. */\r\n public static defaults = new Settings({});\r\n\r\n /** Create a DisplaySettings from its JSON representation. */\r\n public static fromJSON(json?: SettingsProps): Settings {\r\n if (!JsonUtils.isNonEmptyObject(json))\r\n return this.defaults;\r\n else if (json instanceof Settings)\r\n return json;\r\n else\r\n return new Settings(json);\r\n }\r\n\r\n public toJSON(): SettingsProps {\r\n const props: SettingsProps = {\r\n visible: this.visible.toJSON(),\r\n hidden: this.hidden.toJSON(),\r\n transThreshold: this.transThreshold,\r\n };\r\n\r\n return props;\r\n }\r\n\r\n /** Create a Settings equivalent to this one with the exception of those properties defined in the supplied JSON. */\r\n public override(props: SettingsProps): Settings {\r\n const visible = props.visible;\r\n const hidden = props.hidden;\r\n const transparencyThreshold = props.transThreshold;\r\n return Settings.fromJSON({\r\n visible: undefined !== visible ? visible : this.visible.toJSON(),\r\n hidden: undefined !== hidden ? hidden : this.hidden.toJSON(),\r\n transThreshold: undefined !== transparencyThreshold ? transparencyThreshold : this.transparencyThreshold,\r\n });\r\n }\r\n\r\n public equals(other: Settings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.visible.equals(other.visible)\r\n && this.hidden.equals(other.hidden)\r\n && this.transparencyThreshold === other.transparencyThreshold;\r\n }\r\n\r\n public get matchesDefaults(): boolean {\r\n return this.equals(Settings.defaults);\r\n }\r\n\r\n private constructor(json: SettingsProps) {\r\n this.visible = Style.fromJSON(json.visible);\r\n this.hidden = Style.fromJSON(json.hidden, true);\r\n this.transparencyThreshold = JsonUtils.asDouble(json.transThreshold, 1.0);\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Hilite.js","sourceRoot":"","sources":["../../src/Hilite.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,KAAW,MAAM,CA2DtB;AA3DD,WAAiB,MAAM;IACrB;;OAEG;IACH,IAAY,UAOX;IAPD,WAAY,UAAU;QACpB,kBAAkB;QAClB,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,6CAAK,CAAA;IACP,CAAC,EAPW,UAAU,GAAV,iBAAU,KAAV,iBAAU,QAOrB;IAED;;;;;;;;;;;OAWG;IACH,MAAa,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UAAU,CAAC,CAAC;IACxG,CAAC;IAFe,oBAAa,gBAE5B,CAAA;AACH,CAAC,EA3DgB,MAAM,KAAN,MAAM,QA2DtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/** Contains types related to display of hilited elements within a [[Viewport]].\n * @public\n */\nexport namespace Hilite {\n /** Describes the width of the outline applied to hilited geometry. The outline is drawn around the union of all hilited geometry and is visible behind non-hilited geometry.\n * @see [[Hilite.Settings]]\n */\n export enum Silhouette {\n /** No outline. */\n None,\n /** 1-pixel-wide outline. */\n Thin,\n /** 2-pixel-wide outline. */\n Thick,\n }\n\n /**\n * Describes how the hilite effect is applied to elements within a [[Viewport]].\n * The hilite effect is applied to elements contained in the [[IModelConnection]]'s [[SelectionSet]].\n * It is designed to draw attention to those elements. The effect is produced as follows:\n * 1. All hilited elements are drawn as normal, except that their element color is mixed with the hilite color.\n * 2. The union of the regions of the screen corresponding to hilited elements is computed.\n * 3. A silhouette is drawn using the hilite color around the boundaries of the hilited region. This silhouette is visible behind other geometry.\n * 4. The hilite color is mixed with the color of each pixel within the hilited region. This enables surfaces of hilited geometry to be visible behind other geometry.\n *\n * The Settings allow an application to customize how this effect is applied.\n * @see [[Viewport.hilite]]\n */\n export class Settings {\n /** The color that is used to draw the outline and which is mixed with element color. */\n public readonly color: ColorDef;\n /** The ratio of hilite color to element color used when drawing unobscured portions of hilited geometry, in the range [0, 1].\n * A ratio of 0.0 uses only the element color. A ratio of 1.0 uses only the hilite color. A ratio of 0.5 mixes the hilite color and element color evenly.\n */\n public readonly visibleRatio: number;\n /** The ratio of hilite color to screen color used when drawing the hilited region overtop of the screen contents, in the range [0, 1]. */\n public readonly hiddenRatio: number;\n /** The type of outline to be drawn around the boundaries of the hilited region. */\n public silhouette: Silhouette;\n\n private static clamp(value: number) { return Math.min(1.0, Math.max(0.0, value)); }\n\n public constructor(color = ColorDef.from(0x23, 0xbb, 0xfc), visibleRatio = 0.25, hiddenRatio = 0.0, silhouette = Silhouette.Thin) {\n this.color = color;\n this.silhouette = silhouette;\n this.visibleRatio = Settings.clamp(visibleRatio);\n this.hiddenRatio = Settings.clamp(hiddenRatio);\n }\n }\n\n /** Compare two Settings objects for equivalence. */\n export function equalSettings(lhs: Settings, rhs: Settings): boolean {\n return lhs.color.equals(rhs.color)\n && lhs.visibleRatio === rhs.visibleRatio\n && lhs.hiddenRatio === rhs.hiddenRatio\n && lhs.silhouette === rhs.silhouette;\n }\n\n /** Create a copy of a Settings object. */\n export function cloneSettings(settings: Settings): Settings {\n return new Settings(settings.color, settings.visibleRatio, settings.hiddenRatio, settings.silhouette);\n }\n}\n"]}
1
+ {"version":3,"file":"Hilite.js","sourceRoot":"","sources":["../../src/Hilite.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,KAAW,MAAM,CA2DtB;AA3DD,WAAiB,MAAM;IACrB;;OAEG;IACH,IAAY,UAOX;IAPD,WAAY,UAAU;QACpB,kBAAkB;QAClB,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,6CAAK,CAAA;IACP,CAAC,EAPW,UAAU,GAAV,iBAAU,KAAV,iBAAU,QAOrB;IAED;;;;;;;;;;;OAWG;IACH,MAAa,QAAQ;QACnB,wFAAwF;QACxE,KAAK,CAAW;QAChC;;WAEG;QACa,YAAY,CAAS;QACrC,0IAA0I;QAC1H,WAAW,CAAS;QACpC,mFAAmF;QAC5E,UAAU,CAAa;QAEtB,MAAM,CAAC,KAAK,CAAC,KAAa,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEnF,YAAmB,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,WAAW,GAAG,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC,IAAI;YAC9H,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YACjD,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjD,CAAC;KACF;IApBY,eAAQ,WAoBpB,CAAA;IAED,oDAAoD;IACpD,SAAgB,aAAa,CAAC,GAAa,EAAE,GAAa;QACxD,OAAO,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;eAC7B,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY;eACrC,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC,WAAW;eACnC,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,UAAU,CAAC;IACzC,CAAC;IALe,oBAAa,gBAK5B,CAAA;IAED,0CAA0C;IAC1C,SAAgB,aAAa,CAAC,QAAkB;QAC9C,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACxG,CAAC;IAFe,oBAAa,gBAE5B,CAAA;AACH,CAAC,EA3DgB,MAAM,KAAN,MAAM,QA2DtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** Contains types related to display of hilited elements within a [[Viewport]].\r\n * @public\r\n */\r\nexport namespace Hilite {\r\n /** Describes the width of the outline applied to hilited geometry. The outline is drawn around the union of all hilited geometry and is visible behind non-hilited geometry.\r\n * @see [[Hilite.Settings]]\r\n */\r\n export enum Silhouette {\r\n /** No outline. */\r\n None,\r\n /** 1-pixel-wide outline. */\r\n Thin,\r\n /** 2-pixel-wide outline. */\r\n Thick,\r\n }\r\n\r\n /**\r\n * Describes how the hilite effect is applied to elements within a [[Viewport]].\r\n * The hilite effect is applied to elements contained in the [[IModelConnection]]'s [[SelectionSet]].\r\n * It is designed to draw attention to those elements. The effect is produced as follows:\r\n * 1. All hilited elements are drawn as normal, except that their element color is mixed with the hilite color.\r\n * 2. The union of the regions of the screen corresponding to hilited elements is computed.\r\n * 3. A silhouette is drawn using the hilite color around the boundaries of the hilited region. This silhouette is visible behind other geometry.\r\n * 4. The hilite color is mixed with the color of each pixel within the hilited region. This enables surfaces of hilited geometry to be visible behind other geometry.\r\n *\r\n * The Settings allow an application to customize how this effect is applied.\r\n * @see [[Viewport.hilite]]\r\n */\r\n export class Settings {\r\n /** The color that is used to draw the outline and which is mixed with element color. */\r\n public readonly color: ColorDef;\r\n /** The ratio of hilite color to element color used when drawing unobscured portions of hilited geometry, in the range [0, 1].\r\n * A ratio of 0.0 uses only the element color. A ratio of 1.0 uses only the hilite color. A ratio of 0.5 mixes the hilite color and element color evenly.\r\n */\r\n public readonly visibleRatio: number;\r\n /** The ratio of hilite color to screen color used when drawing the hilited region overtop of the screen contents, in the range [0, 1]. */\r\n public readonly hiddenRatio: number;\r\n /** The type of outline to be drawn around the boundaries of the hilited region. */\r\n public silhouette: Silhouette;\r\n\r\n private static clamp(value: number) { return Math.min(1.0, Math.max(0.0, value)); }\r\n\r\n public constructor(color = ColorDef.from(0x23, 0xbb, 0xfc), visibleRatio = 0.25, hiddenRatio = 0.0, silhouette = Silhouette.Thin) {\r\n this.color = color;\r\n this.silhouette = silhouette;\r\n this.visibleRatio = Settings.clamp(visibleRatio);\r\n this.hiddenRatio = Settings.clamp(hiddenRatio);\r\n }\r\n }\r\n\r\n /** Compare two Settings objects for equivalence. */\r\n export function equalSettings(lhs: Settings, rhs: Settings): boolean {\r\n return lhs.color.equals(rhs.color)\r\n && lhs.visibleRatio === rhs.visibleRatio\r\n && lhs.hiddenRatio === rhs.hiddenRatio\r\n && lhs.silhouette === rhs.silhouette;\r\n }\r\n\r\n /** Create a copy of a Settings object. */\r\n export function cloneSettings(settings: Settings): Settings {\r\n return new Settings(settings.color, settings.visibleRatio, settings.hiddenRatio, settings.silhouette);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAc,IAAI,EAAc,YAAY,EAAW,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtJ,OAAO,EACE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAgB,SAAS,EAAkB,QAAQ,EAC9H,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAsB,MAAM,sCAAsC,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAyM5C;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACvB,wCAAwC;IACxB,MAAM,CAAU;IAChC,4CAA4C;IAC5B,WAAW,CAAqB;IAChD,wFAAwF;IACxE,kBAAkB,CAAgB;IAClD,8HAA8H;IAC9G,OAAO,CAAY;IACnC,8HAA8H;I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IAAI,CAAC,aAAa;YAClC,MAAM,IAAI,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,OAAe,EAAE,MAAgB,IAAa,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAErI;;;;;;OAMG;IACI,aAAa,CAAC,IAAY,EAAE,MAAgB,IAAa,OAAO,aAAa,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAErJ;;;;;OAKG;IACI,6BAA6B,CAAC,OAAe,EAAE,MAAqB,IAAkB,OAAO,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhL;;;;;;OAMG;IACI,6BAA6B,CAAC,YAA0B,EAAE,MAAgB,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { assert, BeEvent, expectDefined, GeoServiceStatus, GuidString, Id64, Id64String, IModelStatus, Mutable, OpenMode } from \"@itwin/core-bentley\";\nimport {\n Angle, AxisIndex, AxisOrder, Constant, Geometry, Matrix3d, Point3d, Range3d, Range3dProps, Transform, TransformProps, Vector3d, XYAndZ, XYZProps,\n YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ChangesetIdWithIndex } from \"./ChangesetProps\";\nimport { Cartographic, CartographicProps } from \"./geometry/Cartographic\";\nimport { GeographicCRS, GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { AxisAlignedBox3d } from \"./geometry/Placement\";\nimport { IModelError } from \"./IModelError\";\nimport { ThumbnailProps } from \"./Thumbnail\";\n\n/** The properties to open a connection to an iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcOpenProps {\n /** The iTwin in which the iModel exists - must be defined for briefcases that are synchronized with iModelHub. */\n readonly iTwinId?: GuidString;\n /** Guid of the iModel. */\n readonly iModelId?: GuidString;\n\n /** Id of the last Changeset that was applied to the iModel - must be defined for briefcases that are synchronized with iModelHub.\n * @note Changeset Ids are string hash values based on the content and parent.\n */\n readonly changeset?: ChangesetIdWithIndex;\n}\n\n/** The properties that identify an opened iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcProps extends IModelRpcOpenProps {\n /** Unique key used for identifying the iModel between the frontend and the backend */\n readonly key: string;\n}\n\n/** Properties that position an iModel on the earth via [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * The origin is specified as an ECEF coordinate. The cartographicOrigin property contains the latitude, longitude and elevation above the WGS84 ellipsoid\n * of the origin property. This cartographicOrigin is offered as a convenient pre-calculated value representing the location of the ECEF origin.\n * The 3D coordinate system this class represents is positioned at specified origin and the axis positioned according to\n * the other properties.\n * If transform property is defined then it will not be computed from other properties.\n * If the xVector and yVector properties are defined (and transform is not defined) then they take precedence over the YawPitchRoll orientation property. The xVector and yVector\n * represent the direction and scale of the X and Y axes. The Z axis is always perpendicular (according to the right hand rule) to these X-Y axes.\n * The scaling in the Z direction is always unity. The scale of the X and Y axes is represented by the size of the vector length.\n * If the xVector and yVector are not present then the YawPitchRoll properties indicates the angles for all tree axes. Scaling in that case\n * is unity in all three directions.\n * Note that the present class is intended to represent geolocated 3D coordinate systems that are normally tangent to the WGS84 ellipsoid\n * possibly offset in altitude by the terrain elevation above the ellipsoid but other general 3D coordinate systems\n * can be defined.\n * @public\n * @extensions\n */\nexport interface EcefLocationProps {\n /** The Origin of an iModel on the earth in ECEF coordinates */\n readonly origin: XYZProps;\n /** The [orientation](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion) of an iModel on the earth. */\n readonly orientation: YawPitchRollProps;\n /** Optional position on the earth used to establish the ECEF coordinates. */\n readonly cartographicOrigin?: CartographicProps;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly xVector?: XYZProps;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly yVector?: XYZProps;\n /** Optional potentially non-rigid transform defining the ECEF location.\n * @note If this property is supplied, the other properties are ignored.\n */\n readonly transform?: TransformProps;\n}\n\n/** Properties of the [Root Subject]($docs/bis/guide/references/glossary#subject-root).\n * @public\n * @extensions\n */\nexport interface RootSubjectProps {\n /** The name of the root subject. */\n readonly name: string;\n /** Description of the root subject (optional). */\n readonly description?: string;\n}\n\n/** Properties of an iModel that are always held in memory whenever one is opened, both on the frontend and on the backend .\n * @public\n */\nexport interface IModelProps {\n /** The name and description of the root subject of this iModel */\n readonly rootSubject: RootSubjectProps;\n /** The volume of the entire project, in spatial coordinates */\n readonly projectExtents?: Range3dProps;\n /** An offset to be applied to all spatial coordinates. This is normally used to transform spatial coordinates into the Cartesian coordinate system of a Geographic Coordinate System. */\n readonly globalOrigin?: XYZProps;\n /** The location of the iModel in Earth Centered Earth Fixed coordinates. iModel units are always meters */\n readonly ecefLocation?: EcefLocationProps;\n /** The Geographic Coordinate Reference System indicating the projection and datum used. */\n readonly geographicCoordinateSystem?: GeographicCRSProps;\n /** The name of the iModel. */\n readonly name?: string;\n}\n\n/** The properties returned by the backend when creating a new [[IModelConnection]] from the frontend, either with Rpc or with Ipc.\n * These properties describe the iModel held on the backend for thew newly formed connection and are used to construct a new\n * [[IModelConnection]] instance on the frontend to access it.\n * @public\n */\nexport type IModelConnectionProps = IModelProps & IModelRpcProps;\n\n/** The properties that can be supplied when creating a *new* iModel.\n * @public\n */\nexport interface CreateIModelProps extends IModelProps {\n /** The GUID of new iModel. If not present, a GUID will be generated. */\n readonly guid?: GuidString;\n /** Client name for new iModel */\n readonly client?: string;\n /** Thumbnail for new iModel\n * @alpha\n */\n readonly thumbnail?: ThumbnailProps;\n}\n\n/**\n * Sqlite options.\n * @public\n */\nexport interface OpenSqliteArgs {\n /**\n * Specify timeout after which SQLite stop retrying to acquire lock to database file and throw SQLITE_BUSY error.\n * Timeout is specified in milliseconds.\n * For more information https://www.sqlite.org/c3ref/busy_timeout.html.\n * */\n readonly busyTimeout?: number;\n}\n\n/**\n * A key used to identify an opened [IModelDb]($backend) between the frontend and backend for Rpc and Ipc communications.\n * Keys must be unique - that is there can never be two IModelDbs opened with the same key at any given time.\n * If no key is supplied in a call to open an IModelDb, one is generated and returned.\n * It is only necessary to supply a key if you have some reason to assign a specific value to identify an IModelDb.\n * If you don't supply the key, you must use the returned value for Rpc and Ipc communications.\n * @public\n */\nexport interface OpenDbKey {\n readonly key?: string;\n}\n\n/** @beta TODO documentation */\nexport interface CloudContainerUri {\n readonly uriParams: string;\n}\n\n/** Options to open a [SnapshotDb]($backend).\n * @public\n */\nexport interface SnapshotOpenOptions extends OpenDbKey {\n /**\n * The \"base\" name that can be used for creating temporary files related to this Db.\n * The string should be a name related to the current Db filename using some known pattern so that all files named \"baseName*\" can be deleted externally during cleanup.\n * It must be the name of a file (that may or may not exist) in a writable directory.\n * If not present, the baseName will default to the database's file name (including the path).\n * @internal\n */\n readonly tempFileBase?: string;\n}\n\n/** Options to open a [StandaloneDb]($backend) via [StandaloneDb.openFile]($backend) from the backend,\n * or [BriefcaseConnection.openStandalone]($frontend) from the frontend.\n * @public\n */\nexport type StandaloneOpenOptions = OpenDbKey;\n\n/** Options that can be supplied when creating snapshot iModels.\n * @public\n */\nexport interface CreateSnapshotIModelProps {\n /** If true, then create SQLite views for Model, Element, ElementAspect, and Relationship classes.\n * These database views can often be useful for interoperability workflows.\n */\n readonly createClassViews?: boolean;\n}\n\n/** The options that can be specified when creating an *empty* snapshot iModel.\n * @see [SnapshotDb.createEmpty]($backend)\n * @public\n */\nexport type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotIModelProps;\n\n/** Options that can be supplied when creating standalone iModels.\n * @public\n */\nexport interface CreateStandaloneIModelProps {\n /** If present, file will allow local editing, but cannot be used to create changesets */\n readonly allowEdit?: string;\n}\n\n/** The options that can be specified when creating an *empty* standalone iModel.\n * @see [StandaloneDb.createEmpty]($backend)\n * @public\n */\nexport type CreateEmptyStandaloneIModelProps = CreateIModelProps & CreateStandaloneIModelProps;\n\n/**\n * @public\n * @extensions\n */\nexport interface FilePropertyProps {\n readonly namespace: string;\n readonly name: string;\n id?: number | string;\n subId?: number | string;\n}\n\n/** The position and orientation of an iModel on the earth in [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * @note This is an immutable type - all of its properties are frozen.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport class EcefLocation implements EcefLocationProps {\n /** The origin of the ECEF transform. */\n public readonly origin: Point3d;\n /** The orientation of the ECEF transform */\n public readonly orientation: YawPitchRollAngles;\n /** Optional position on the earth used to establish the ECEF origin and orientation. */\n public readonly cartographicOrigin?: Cartographic;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly xVector?: Vector3d;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly yVector?: Vector3d;\n /** The transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n private readonly _transform: Transform = Transform.createIdentity();\n\n /** Get the transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n public getTransform(): Transform { return this._transform; }\n\n /** Construct a new EcefLocation. Once constructed, it is frozen and cannot be modified. */\n constructor(props: EcefLocationProps) {\n this.origin = Point3d.fromJSON(props.origin).freeze();\n this.orientation = YawPitchRollAngles.fromJSON(props.orientation).freeze();\n if (props.cartographicOrigin)\n this.cartographicOrigin = Cartographic.fromRadians({ longitude: props.cartographicOrigin.longitude, latitude: props.cartographicOrigin.latitude, height: props.cartographicOrigin.height }).freeze();\n if (props.xVector && props.yVector) {\n this.xVector = Vector3d.fromJSON(props.xVector).freeze();\n this.yVector = Vector3d.fromJSON(props.yVector).freeze();\n }\n if (props.transform) {\n this._transform.setFromJSON(props.transform);\n this._transform.freeze();\n } else {\n let matrix;\n if (this.xVector && this.yVector) {\n const zVector = this.xVector.crossProduct(this.yVector);\n if (zVector.normalizeInPlace())\n matrix = Matrix3d.createColumns(this.xVector, this.yVector, zVector);\n }\n if (!matrix)\n matrix = this.orientation.toMatrix3d();\n\n this._transform = Transform.createOriginAndMatrix(this.origin, matrix);\n this._transform.freeze();\n }\n }\n\n /** Returns true if this EcefLocation is not located at the center of the Earth.\n * @alpha are locations very close to the center considered valid? What are the specific criteria?\n */\n public get isValid(): boolean {\n return !this.origin.isZero;\n }\n\n /** Construct ECEF Location from cartographic origin with optional known point and angle. */\n public static createFromCartographicOrigin(origin: Cartographic, point?: Point3d, angle?: Angle) {\n const ecefOrigin = origin.toEcef();\n const deltaRadians = 10 / Constant.earthRadiusWGS84.polar;\n const northCarto = Cartographic.fromRadians({ longitude: origin.longitude, latitude: origin.latitude + deltaRadians, height: origin.height });\n const eastCarto = Cartographic.fromRadians({ longitude: origin.longitude + deltaRadians, latitude: origin.latitude, height: origin.height });\n const ecefNorth = northCarto.toEcef();\n const ecefEast = eastCarto.toEcef();\n const xVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize());\n const yVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize());\n const matrix = expectDefined(Matrix3d.createRigidFromColumns(xVector, yVector, AxisOrder.XYZ));\n if (angle !== undefined) {\n const north = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, angle);\n matrix.multiplyMatrixMatrix(north, matrix);\n }\n if (point !== undefined) {\n const delta = matrix.multiplyVector(Vector3d.create(-point.x, -point.y, -point.z));\n ecefOrigin.addInPlace(delta);\n }\n\n return new EcefLocation({ origin: ecefOrigin, orientation: expectDefined(YawPitchRollAngles.createFromMatrix3d(matrix)), cartographicOrigin: origin });\n }\n\n /** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */\n public static createFromTransform(transform: Transform): EcefLocation {\n const ecefOrigin = transform.getOrigin();\n const angleFromInput = YawPitchRollAngles.createDegrees(0, 0, 0);\n const locationOrientationFromInputT = YawPitchRollAngles.createFromMatrix3d(transform.getMatrix(), angleFromInput);\n const transformProps = transform.toJSON();\n\n return new EcefLocation({ origin: ecefOrigin, orientation: locationOrientationFromInputT ?? angleFromInput, transform: transformProps });\n }\n\n /** Get the location center of the earth in the iModel coordinate system. */\n public get earthCenter(): Point3d {\n const matrix = this.orientation.toMatrix3d();\n return Point3d.createFrom(matrix.multiplyTransposeXYZ(-this.origin.x, -this.origin.y, -this.origin.z));\n }\n\n /** Return true if this location is equivalent to another location within a small tolerance. */\n public isAlmostEqual(other: EcefLocation): boolean {\n if (!this.origin.isAlmostEqual(other.origin) || !this.orientation.isAlmostEqual(other.orientation))\n return false;\n\n if ((this.xVector === undefined) !== (other.xVector === undefined) || (this.yVector === undefined) !== (other.yVector === undefined))\n return false;\n\n if (this.xVector !== undefined && other.xVector !== undefined && !this.xVector.isAlmostEqual(other.xVector))\n return false;\n\n if (this.yVector !== undefined && other.yVector !== undefined && !this.yVector.isAlmostEqual(other.yVector))\n return false;\n\n if (!this.getTransform().isAlmostEqual(other.getTransform()))\n return false;\n\n const thisCarto = this.cartographicOrigin;\n const otherCarto = other.cartographicOrigin;\n if (undefined === thisCarto || undefined === otherCarto)\n return undefined === thisCarto && undefined === otherCarto;\n\n return thisCarto.equalsEpsilon(otherCarto, Geometry.smallMetricDistance);\n }\n\n public toJSON(): EcefLocationProps {\n const props: Mutable<EcefLocationProps> = {\n origin: this.origin.toJSON(),\n orientation: this.orientation.toJSON(),\n transform: this.getTransform().toJSON(),\n };\n\n if (this.cartographicOrigin)\n props.cartographicOrigin = this.cartographicOrigin.toJSON();\n\n if (this.xVector)\n props.xVector = this.xVector.toJSON();\n\n if (this.yVector)\n props.yVector = this.yVector.toJSON();\n\n return props;\n }\n}\n\n/** Represents an iModel in JavaScript.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport abstract class IModel implements IModelProps {\n private _projectExtents?: AxisAlignedBox3d;\n private _name?: string;\n private _rootSubject?: RootSubjectProps;\n private _globalOrigin?: Point3d;\n private _ecefLocation?: EcefLocation;\n private _geographicCoordinateSystem?: GeographicCRS;\n private _iModelId?: GuidString;\n private _changeset: ChangesetIdWithIndex;\n\n /** The Id of the repository model. */\n public static readonly repositoryModelId: Id64String = \"0x1\";\n /** The Id of the root subject element. */\n public static readonly rootSubjectId: Id64String = \"0x1\";\n /** The Id of the dictionary model. */\n public static readonly dictionaryId: Id64String = \"0x10\";\n\n /** Event raised after [[name]] changes. */\n public readonly onNameChanged = new BeEvent<(previousName: string) => void>();\n /** Event raised after [[rootSubject]] changes. */\n public readonly onRootSubjectChanged = new BeEvent<(previousSubject: RootSubjectProps) => void>();\n /** Event raised after [[projectExtents]] changes. */\n public readonly onProjectExtentsChanged = new BeEvent<(previousExtents: AxisAlignedBox3d) => void>();\n /** Event raised after [[globalOrigin]] changes. */\n public readonly onGlobalOriginChanged = new BeEvent<(previousOrigin: Point3d) => void>();\n /** Event raised after [[ecefLocation]] changes. */\n public readonly onEcefLocationChanged = new BeEvent<(previousLocation: EcefLocation | undefined) => void>();\n /** Event raised after [[geographicCoordinateSystem]] changes. */\n public readonly onGeographicCoordinateSystemChanged = new BeEvent<(previousGCS: GeographicCRS | undefined) => void>();\n /** Event raised after [[changeset]] changes. */\n public readonly onChangesetChanged = new BeEvent<(previousChangeset: ChangesetIdWithIndex) => void>();\n\n /** Name of the iModel */\n public get name(): string {\n assert(this._name !== undefined);\n return this._name;\n }\n public set name(name: string) {\n if (name !== this._name) {\n const old = this._name;\n this._name = name;\n if (undefined !== old)\n this.onNameChanged.raiseEvent(old);\n }\n }\n\n /** The name and description of the root subject of this iModel */\n public get rootSubject(): RootSubjectProps {\n assert(this._rootSubject !== undefined);\n return this._rootSubject;\n }\n public set rootSubject(subject: RootSubjectProps) {\n if (undefined === this._rootSubject || this._rootSubject.name !== subject.name || this._rootSubject.description !== subject.description) {\n const old = this._rootSubject;\n this._rootSubject = subject;\n if (old)\n this.onRootSubjectChanged.raiseEvent(old);\n }\n }\n\n /** Returns `true` if this is a snapshot iModel. */\n public abstract get isSnapshot(): boolean;\n /** Returns `true` if this is a briefcase copy of an iModel that is synchronized with iModelHub. */\n public abstract get isBriefcase(): boolean;\n\n public abstract get isOpen(): boolean;\n\n /**\n * The volume, in spatial coordinates, inside which the entire project is contained.\n * @note The object returned from this method is frozen. You *must* make a copy before you do anything that might attempt to modify it.\n */\n public get projectExtents() {\n assert(undefined !== this._projectExtents);\n return this._projectExtents;\n }\n public set projectExtents(extents: AxisAlignedBox3d) {\n // Don't allow any axis of the project extents to be less than 1 meter.\n const projectExtents = extents.clone();\n projectExtents.ensureMinLengths(1.0);\n if (!this._projectExtents || !this._projectExtents.isAlmostEqual(projectExtents)) {\n const old = this._projectExtents;\n projectExtents.freeze();\n this._projectExtents = projectExtents;\n if (old)\n this.onProjectExtentsChanged.raiseEvent(old);\n }\n }\n\n /** An offset to be applied to all spatial coordinates. */\n public get globalOrigin(): Point3d {\n assert(this._globalOrigin !== undefined);\n return this._globalOrigin;\n }\n public set globalOrigin(org: Point3d) {\n if (!this._globalOrigin || !this._globalOrigin.isAlmostEqual(org)) {\n const old = this._globalOrigin;\n org.freeze();\n this._globalOrigin = org;\n if (old)\n this.onGlobalOriginChanged.raiseEvent(old);\n }\n }\n\n /** The [EcefLocation]($docs/learning/glossary#ecefLocation) of the iModel in Earth Centered Earth Fixed coordinates.\n * If the iModel property geographicCoordinateSystem is not defined then the ecefLocation provides a geolocation by defining a\n * 3D coordinate system relative to the Earth model WGS84. Refer to additional documentation for details. If the geographicCoordinateSystem\n * property is defined then the ecefLocation must be used with care. When the geographicCoordinateSystem is defined it indicates the\n * iModel cartesian space is the result of a cartographic projection. This implies a flattening of the Earth surface process that\n * results in scale, angular or area distortion. The ecefLocation is then an approximation calculated at the center of the project extent.\n * If the project is more than 2 kilometer in size, the ecefLocation may represent a poor approximation of the effective\n * cartographic projection used and a linear transformation should then be calculated at the exact origin of the data\n * it must position.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n */\n public get ecefLocation(): EcefLocation | undefined {\n return this._ecefLocation;\n }\n public set ecefLocation(ecefLocation: EcefLocation | undefined) {\n const old = this._ecefLocation;\n if (!old && !ecefLocation)\n return;\n else if (old && ecefLocation && old.isAlmostEqual(ecefLocation))\n return;\n\n this._ecefLocation = ecefLocation;\n this.onEcefLocationChanged.raiseEvent(old);\n }\n\n /** Set the [EcefLocation]($docs/learning/glossary#ecefLocation) for this iModel. */\n public setEcefLocation(ecef: EcefLocationProps): void {\n this.ecefLocation = new EcefLocation(ecef);\n }\n\n /** The geographic coordinate reference system of the iModel. */\n public get geographicCoordinateSystem(): GeographicCRS | undefined {\n return this._geographicCoordinateSystem;\n }\n public set geographicCoordinateSystem(geoCRS: GeographicCRS | undefined) {\n const old = this._geographicCoordinateSystem;\n if (!old && !geoCRS)\n return;\n else if (old && geoCRS && old.equals(geoCRS))\n return;\n\n this._geographicCoordinateSystem = geoCRS;\n this.onGeographicCoordinateSystemChanged.raiseEvent(old);\n }\n\n /** Sets the geographic coordinate reference system from GeographicCRSProps. */\n public setGeographicCoordinateSystem(geoCRS: GeographicCRSProps) {\n this.geographicCoordinateSystem = new GeographicCRS(geoCRS);\n }\n\n /** @internal */\n public getConnectionProps(): IModelConnectionProps {\n return {\n name: this.name,\n rootSubject: this.rootSubject,\n projectExtents: this.projectExtents.toJSON(),\n globalOrigin: this.globalOrigin.toJSON(),\n ecefLocation: this.ecefLocation,\n geographicCoordinateSystem: this.geographicCoordinateSystem?.toJSON(),\n ...this._getRpcProps(),\n };\n }\n\n /** Convert this iModel to a JSON representation. */\n public toJSON(): IModelConnectionProps {\n return this.getConnectionProps();\n }\n\n /** A key used to identify this iModel in RPC calls from frontend to backend.\n * @internal\n */\n protected _fileKey: string;\n /** Get the key that was used to open this iModel. This is the value used for Rpc and Ipc communications. */\n public get key(): string { return this._fileKey; }\n\n /** @internal */\n protected _iTwinId?: GuidString;\n /** The Guid that identifies the iTwin that owns this iModel. */\n public get iTwinId(): GuidString | undefined { return this._iTwinId; }\n\n /** The Guid that identifies this iModel. */\n public get iModelId(): GuidString | undefined { return this._iModelId; }\n\n /** @public */\n public get changeset(): ChangesetIdWithIndex {\n return { ...this._changeset };\n }\n public set changeset(changeset: ChangesetIdWithIndex) {\n const prev = this._changeset;\n if (prev.id !== changeset.id || prev.index !== changeset.index) {\n this._changeset = { id: changeset.id, index: changeset.index };\n this.onChangesetChanged.raiseEvent(prev);\n }\n }\n\n protected _openMode = OpenMode.Readonly;\n /** The [[OpenMode]] used for this IModel. */\n public get openMode(): OpenMode { return this._openMode; }\n\n /** Return a token for RPC operations.\n * @throws IModelError if the iModel is not open.\n */\n public getRpcProps(): IModelRpcProps {\n if (!this.isOpen)\n throw new IModelError(IModelStatus.BadRequest, \"IModel is not open for rpc\");\n\n return this._getRpcProps();\n }\n\n /** Returns the iModel's RPC properties.\n * @note It is an error to attempt to use these properties as a token for RPC operations if the iModel is not open.\n * @internal\n */\n protected _getRpcProps(): IModelRpcProps {\n return {\n key: this._fileKey,\n iTwinId: this.iTwinId,\n iModelId: this.iModelId,\n changeset: this.changeset,\n };\n }\n\n /** @internal */\n protected constructor(tokenProps?: IModelRpcProps) {\n this._changeset = tokenProps?.changeset ?? { id: \"\", index: 0 };\n this._fileKey = \"\";\n if (tokenProps) {\n this._fileKey = tokenProps.key;\n this._iTwinId = tokenProps.iTwinId;\n this._iModelId = tokenProps.iModelId;\n }\n }\n\n /** @internal */\n protected initialize(name: string, props: IModelProps) {\n this.name = name;\n this.rootSubject = props.rootSubject;\n this.projectExtents = Range3d.fromJSON(props.projectExtents);\n this.globalOrigin = Point3d.fromJSON(props.globalOrigin);\n\n const ecefLocation = props.ecefLocation ? new EcefLocation(props.ecefLocation) : undefined;\n this.ecefLocation = ecefLocation?.isValid ? ecefLocation : undefined;\n\n this.geographicCoordinateSystem = props.geographicCoordinateSystem ? new GeographicCRS(props.geographicCoordinateSystem) : undefined;\n }\n\n /** Get the default subCategoryId for the supplied categoryId */\n public static getDefaultSubCategoryId(categoryId: Id64String): Id64String {\n return Id64.isValid(categoryId) ? Id64.fromLocalAndBriefcaseIds(Id64.getLocalId(categoryId) + 1, Id64.getBriefcaseId(categoryId)) : Id64.invalid;\n }\n\n /** True if this iModel has an [EcefLocation]($docs/learning/glossary#ecefLocation). */\n public get isGeoLocated() { return undefined !== this._ecefLocation; }\n\n /** Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its [[IModel.ecefLocation]].\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public getEcefTransform(): Transform {\n if (undefined === this._ecefLocation)\n throw new IModelError(GeoServiceStatus.NoGeoLocation, \"iModel is not GeoLocated\");\n return this._ecefLocation.getTransform();\n }\n\n /** Convert a point in this iModel's Spatial coordinates to an ECEF point using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in ECEF coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyPoint3d(spatial, result); }\n\n /** Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its [[ecefLocation]].\n * @param ecef A point in ECEF coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public ecefToSpatial(ecef: XYAndZ, result?: Point3d): Point3d { return expectDefined(this.getEcefTransform().multiplyInversePoint3d(ecef, result)); }\n\n /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Cartographic location\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic { return expectDefined(Cartographic.fromEcef(this.spatialToEcef(spatial), result)); }\n\n /** Convert a [[Cartographic]] to a point in this iModel's Spatial coordinates using its [[IModel.ecefLocation]].\n * @param cartographic A cartographic location\n * @param result If defined, use this for output\n * @returns A point in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d) { return this.ecefToSpatial(cartographic.toEcef(result), result); }\n}\n"]}
1
+ {"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAc,IAAI,EAAc,YAAY,EAAW,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtJ,OAAO,EACE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAgB,SAAS,EAAkB,QAAQ,EAC9H,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAsB,MAAM,sCAAsC,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAyM5C;;;;GAIG;AACH,MAAM,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O,CAAC;IACnJ,CAAC;IAED,uFAAuF;IACvF,IAAW,YAAY,KAAK,OAAO,SAAS,KAAK,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAEtE;;OAEG;IACI,gBAAgB;QACrB,IAAI,SAAS,KAAK,IAAI,CAAC,aAAa;YAClC,MAAM,IAAI,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,OAAe,EAAE,MAAgB,IAAa,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAErI;;;;;;OAMG;IACI,aAAa,CAAC,IAAY,EAAE,MAAgB,IAAa,OAAO,aAAa,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAErJ;;;;;OAKG;IACI,6BAA6B,CAAC,OAAe,EAAE,MAAqB,IAAkB,OAAO,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhL;;;;;;OAMG;IACI,6BAA6B,CAAC,YAA0B,EAAE,MAAgB,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { assert, BeEvent, expectDefined, GeoServiceStatus, GuidString, Id64, Id64String, IModelStatus, Mutable, OpenMode } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, AxisIndex, AxisOrder, Constant, Geometry, Matrix3d, Point3d, Range3d, Range3dProps, Transform, TransformProps, Vector3d, XYAndZ, XYZProps,\r\n YawPitchRollAngles, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { ChangesetIdWithIndex } from \"./ChangesetProps\";\r\nimport { Cartographic, CartographicProps } from \"./geometry/Cartographic\";\r\nimport { GeographicCRS, GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\nimport { AxisAlignedBox3d } from \"./geometry/Placement\";\r\nimport { IModelError } from \"./IModelError\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\n\r\n/** The properties to open a connection to an iModel for RPC operations.\r\n * @public\r\n */\r\nexport interface IModelRpcOpenProps {\r\n /** The iTwin in which the iModel exists - must be defined for briefcases that are synchronized with iModelHub. */\r\n readonly iTwinId?: GuidString;\r\n /** Guid of the iModel. */\r\n readonly iModelId?: GuidString;\r\n\r\n /** Id of the last Changeset that was applied to the iModel - must be defined for briefcases that are synchronized with iModelHub.\r\n * @note Changeset Ids are string hash values based on the content and parent.\r\n */\r\n readonly changeset?: ChangesetIdWithIndex;\r\n}\r\n\r\n/** The properties that identify an opened iModel for RPC operations.\r\n * @public\r\n */\r\nexport interface IModelRpcProps extends IModelRpcOpenProps {\r\n /** Unique key used for identifying the iModel between the frontend and the backend */\r\n readonly key: string;\r\n}\r\n\r\n/** Properties that position an iModel on the earth via [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\r\n * The origin is specified as an ECEF coordinate. The cartographicOrigin property contains the latitude, longitude and elevation above the WGS84 ellipsoid\r\n * of the origin property. This cartographicOrigin is offered as a convenient pre-calculated value representing the location of the ECEF origin.\r\n * The 3D coordinate system this class represents is positioned at specified origin and the axis positioned according to\r\n * the other properties.\r\n * If transform property is defined then it will not be computed from other properties.\r\n * If the xVector and yVector properties are defined (and transform is not defined) then they take precedence over the YawPitchRoll orientation property. The xVector and yVector\r\n * represent the direction and scale of the X and Y axes. The Z axis is always perpendicular (according to the right hand rule) to these X-Y axes.\r\n * The scaling in the Z direction is always unity. The scale of the X and Y axes is represented by the size of the vector length.\r\n * If the xVector and yVector are not present then the YawPitchRoll properties indicates the angles for all tree axes. Scaling in that case\r\n * is unity in all three directions.\r\n * Note that the present class is intended to represent geolocated 3D coordinate systems that are normally tangent to the WGS84 ellipsoid\r\n * possibly offset in altitude by the terrain elevation above the ellipsoid but other general 3D coordinate systems\r\n * can be defined.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EcefLocationProps {\r\n /** The Origin of an iModel on the earth in ECEF coordinates */\r\n readonly origin: XYZProps;\r\n /** The [orientation](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion) of an iModel on the earth. */\r\n readonly orientation: YawPitchRollProps;\r\n /** Optional position on the earth used to establish the ECEF coordinates. */\r\n readonly cartographicOrigin?: CartographicProps;\r\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n readonly xVector?: XYZProps;\r\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n readonly yVector?: XYZProps;\r\n /** Optional potentially non-rigid transform defining the ECEF location.\r\n * @note If this property is supplied, the other properties are ignored.\r\n */\r\n readonly transform?: TransformProps;\r\n}\r\n\r\n/** Properties of the [Root Subject]($docs/bis/guide/references/glossary#subject-root).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RootSubjectProps {\r\n /** The name of the root subject. */\r\n readonly name: string;\r\n /** Description of the root subject (optional). */\r\n readonly description?: string;\r\n}\r\n\r\n/** Properties of an iModel that are always held in memory whenever one is opened, both on the frontend and on the backend .\r\n * @public\r\n */\r\nexport interface IModelProps {\r\n /** The name and description of the root subject of this iModel */\r\n readonly rootSubject: RootSubjectProps;\r\n /** The volume of the entire project, in spatial coordinates */\r\n readonly projectExtents?: Range3dProps;\r\n /** An offset to be applied to all spatial coordinates. This is normally used to transform spatial coordinates into the Cartesian coordinate system of a Geographic Coordinate System. */\r\n readonly globalOrigin?: XYZProps;\r\n /** The location of the iModel in Earth Centered Earth Fixed coordinates. iModel units are always meters */\r\n readonly ecefLocation?: EcefLocationProps;\r\n /** The Geographic Coordinate Reference System indicating the projection and datum used. */\r\n readonly geographicCoordinateSystem?: GeographicCRSProps;\r\n /** The name of the iModel. */\r\n readonly name?: string;\r\n}\r\n\r\n/** The properties returned by the backend when creating a new [[IModelConnection]] from the frontend, either with Rpc or with Ipc.\r\n * These properties describe the iModel held on the backend for thew newly formed connection and are used to construct a new\r\n * [[IModelConnection]] instance on the frontend to access it.\r\n * @public\r\n */\r\nexport type IModelConnectionProps = IModelProps & IModelRpcProps;\r\n\r\n/** The properties that can be supplied when creating a *new* iModel.\r\n * @public\r\n */\r\nexport interface CreateIModelProps extends IModelProps {\r\n /** The GUID of new iModel. If not present, a GUID will be generated. */\r\n readonly guid?: GuidString;\r\n /** Client name for new iModel */\r\n readonly client?: string;\r\n /** Thumbnail for new iModel\r\n * @alpha\r\n */\r\n readonly thumbnail?: ThumbnailProps;\r\n}\r\n\r\n/**\r\n * Sqlite options.\r\n * @public\r\n */\r\nexport interface OpenSqliteArgs {\r\n /**\r\n * Specify timeout after which SQLite stop retrying to acquire lock to database file and throw SQLITE_BUSY error.\r\n * Timeout is specified in milliseconds.\r\n * For more information https://www.sqlite.org/c3ref/busy_timeout.html.\r\n * */\r\n readonly busyTimeout?: number;\r\n}\r\n\r\n/**\r\n * A key used to identify an opened [IModelDb]($backend) between the frontend and backend for Rpc and Ipc communications.\r\n * Keys must be unique - that is there can never be two IModelDbs opened with the same key at any given time.\r\n * If no key is supplied in a call to open an IModelDb, one is generated and returned.\r\n * It is only necessary to supply a key if you have some reason to assign a specific value to identify an IModelDb.\r\n * If you don't supply the key, you must use the returned value for Rpc and Ipc communications.\r\n * @public\r\n */\r\nexport interface OpenDbKey {\r\n readonly key?: string;\r\n}\r\n\r\n/** @beta TODO documentation */\r\nexport interface CloudContainerUri {\r\n readonly uriParams: string;\r\n}\r\n\r\n/** Options to open a [SnapshotDb]($backend).\r\n * @public\r\n */\r\nexport interface SnapshotOpenOptions extends OpenDbKey {\r\n /**\r\n * The \"base\" name that can be used for creating temporary files related to this Db.\r\n * The string should be a name related to the current Db filename using some known pattern so that all files named \"baseName*\" can be deleted externally during cleanup.\r\n * It must be the name of a file (that may or may not exist) in a writable directory.\r\n * If not present, the baseName will default to the database's file name (including the path).\r\n * @internal\r\n */\r\n readonly tempFileBase?: string;\r\n}\r\n\r\n/** Options to open a [StandaloneDb]($backend) via [StandaloneDb.openFile]($backend) from the backend,\r\n * or [BriefcaseConnection.openStandalone]($frontend) from the frontend.\r\n * @public\r\n */\r\nexport type StandaloneOpenOptions = OpenDbKey;\r\n\r\n/** Options that can be supplied when creating snapshot iModels.\r\n * @public\r\n */\r\nexport interface CreateSnapshotIModelProps {\r\n /** If true, then create SQLite views for Model, Element, ElementAspect, and Relationship classes.\r\n * These database views can often be useful for interoperability workflows.\r\n */\r\n readonly createClassViews?: boolean;\r\n}\r\n\r\n/** The options that can be specified when creating an *empty* snapshot iModel.\r\n * @see [SnapshotDb.createEmpty]($backend)\r\n * @public\r\n */\r\nexport type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotIModelProps;\r\n\r\n/** Options that can be supplied when creating standalone iModels.\r\n * @public\r\n */\r\nexport interface CreateStandaloneIModelProps {\r\n /** If present, file will allow local editing, but cannot be used to create changesets */\r\n readonly allowEdit?: string;\r\n}\r\n\r\n/** The options that can be specified when creating an *empty* standalone iModel.\r\n * @see [StandaloneDb.createEmpty]($backend)\r\n * @public\r\n */\r\nexport type CreateEmptyStandaloneIModelProps = CreateIModelProps & CreateStandaloneIModelProps;\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FilePropertyProps {\r\n readonly namespace: string;\r\n readonly name: string;\r\n id?: number | string;\r\n subId?: number | string;\r\n}\r\n\r\n/** The position and orientation of an iModel on the earth in [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\r\n * @note This is an immutable type - all of its properties are frozen.\r\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\r\n * @public\r\n */\r\nexport class EcefLocation implements EcefLocationProps {\r\n /** The origin of the ECEF transform. */\r\n public readonly origin: Point3d;\r\n /** The orientation of the ECEF transform */\r\n public readonly orientation: YawPitchRollAngles;\r\n /** Optional position on the earth used to establish the ECEF origin and orientation. */\r\n public readonly cartographicOrigin?: Cartographic;\r\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n public readonly xVector?: Vector3d;\r\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n public readonly yVector?: Vector3d;\r\n /** The transform from iModel Spatial coordinates to ECEF from this EcefLocation */\r\n private readonly _transform: Transform = Transform.createIdentity();\r\n\r\n /** Get the transform from iModel Spatial coordinates to ECEF from this EcefLocation */\r\n public getTransform(): Transform { return this._transform; }\r\n\r\n /** Construct a new EcefLocation. Once constructed, it is frozen and cannot be modified. */\r\n constructor(props: EcefLocationProps) {\r\n this.origin = Point3d.fromJSON(props.origin).freeze();\r\n this.orientation = YawPitchRollAngles.fromJSON(props.orientation).freeze();\r\n if (props.cartographicOrigin)\r\n this.cartographicOrigin = Cartographic.fromRadians({ longitude: props.cartographicOrigin.longitude, latitude: props.cartographicOrigin.latitude, height: props.cartographicOrigin.height }).freeze();\r\n if (props.xVector && props.yVector) {\r\n this.xVector = Vector3d.fromJSON(props.xVector).freeze();\r\n this.yVector = Vector3d.fromJSON(props.yVector).freeze();\r\n }\r\n if (props.transform) {\r\n this._transform.setFromJSON(props.transform);\r\n this._transform.freeze();\r\n } else {\r\n let matrix;\r\n if (this.xVector && this.yVector) {\r\n const zVector = this.xVector.crossProduct(this.yVector);\r\n if (zVector.normalizeInPlace())\r\n matrix = Matrix3d.createColumns(this.xVector, this.yVector, zVector);\r\n }\r\n if (!matrix)\r\n matrix = this.orientation.toMatrix3d();\r\n\r\n this._transform = Transform.createOriginAndMatrix(this.origin, matrix);\r\n this._transform.freeze();\r\n }\r\n }\r\n\r\n /** Returns true if this EcefLocation is not located at the center of the Earth.\r\n * @alpha are locations very close to the center considered valid? What are the specific criteria?\r\n */\r\n public get isValid(): boolean {\r\n return !this.origin.isZero;\r\n }\r\n\r\n /** Construct ECEF Location from cartographic origin with optional known point and angle. */\r\n public static createFromCartographicOrigin(origin: Cartographic, point?: Point3d, angle?: Angle) {\r\n const ecefOrigin = origin.toEcef();\r\n const deltaRadians = 10 / Constant.earthRadiusWGS84.polar;\r\n const northCarto = Cartographic.fromRadians({ longitude: origin.longitude, latitude: origin.latitude + deltaRadians, height: origin.height });\r\n const eastCarto = Cartographic.fromRadians({ longitude: origin.longitude + deltaRadians, latitude: origin.latitude, height: origin.height });\r\n const ecefNorth = northCarto.toEcef();\r\n const ecefEast = eastCarto.toEcef();\r\n const xVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize());\r\n const yVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize());\r\n const matrix = expectDefined(Matrix3d.createRigidFromColumns(xVector, yVector, AxisOrder.XYZ));\r\n if (angle !== undefined) {\r\n const north = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, angle);\r\n matrix.multiplyMatrixMatrix(north, matrix);\r\n }\r\n if (point !== undefined) {\r\n const delta = matrix.multiplyVector(Vector3d.create(-point.x, -point.y, -point.z));\r\n ecefOrigin.addInPlace(delta);\r\n }\r\n\r\n return new EcefLocation({ origin: ecefOrigin, orientation: expectDefined(YawPitchRollAngles.createFromMatrix3d(matrix)), cartographicOrigin: origin });\r\n }\r\n\r\n /** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */\r\n public static createFromTransform(transform: Transform): EcefLocation {\r\n const ecefOrigin = transform.getOrigin();\r\n const angleFromInput = YawPitchRollAngles.createDegrees(0, 0, 0);\r\n const locationOrientationFromInputT = YawPitchRollAngles.createFromMatrix3d(transform.getMatrix(), angleFromInput);\r\n const transformProps = transform.toJSON();\r\n\r\n return new EcefLocation({ origin: ecefOrigin, orientation: locationOrientationFromInputT ?? angleFromInput, transform: transformProps });\r\n }\r\n\r\n /** Get the location center of the earth in the iModel coordinate system. */\r\n public get earthCenter(): Point3d {\r\n const matrix = this.orientation.toMatrix3d();\r\n return Point3d.createFrom(matrix.multiplyTransposeXYZ(-this.origin.x, -this.origin.y, -this.origin.z));\r\n }\r\n\r\n /** Return true if this location is equivalent to another location within a small tolerance. */\r\n public isAlmostEqual(other: EcefLocation): boolean {\r\n if (!this.origin.isAlmostEqual(other.origin) || !this.orientation.isAlmostEqual(other.orientation))\r\n return false;\r\n\r\n if ((this.xVector === undefined) !== (other.xVector === undefined) || (this.yVector === undefined) !== (other.yVector === undefined))\r\n return false;\r\n\r\n if (this.xVector !== undefined && other.xVector !== undefined && !this.xVector.isAlmostEqual(other.xVector))\r\n return false;\r\n\r\n if (this.yVector !== undefined && other.yVector !== undefined && !this.yVector.isAlmostEqual(other.yVector))\r\n return false;\r\n\r\n if (!this.getTransform().isAlmostEqual(other.getTransform()))\r\n return false;\r\n\r\n const thisCarto = this.cartographicOrigin;\r\n const otherCarto = other.cartographicOrigin;\r\n if (undefined === thisCarto || undefined === otherCarto)\r\n return undefined === thisCarto && undefined === otherCarto;\r\n\r\n return thisCarto.equalsEpsilon(otherCarto, Geometry.smallMetricDistance);\r\n }\r\n\r\n public toJSON(): EcefLocationProps {\r\n const props: Mutable<EcefLocationProps> = {\r\n origin: this.origin.toJSON(),\r\n orientation: this.orientation.toJSON(),\r\n transform: this.getTransform().toJSON(),\r\n };\r\n\r\n if (this.cartographicOrigin)\r\n props.cartographicOrigin = this.cartographicOrigin.toJSON();\r\n\r\n if (this.xVector)\r\n props.xVector = this.xVector.toJSON();\r\n\r\n if (this.yVector)\r\n props.yVector = this.yVector.toJSON();\r\n\r\n return props;\r\n }\r\n}\r\n\r\n/** Represents an iModel in JavaScript.\r\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\r\n * @public\r\n */\r\nexport abstract class IModel implements IModelProps {\r\n private _projectExtents?: AxisAlignedBox3d;\r\n private _name?: string;\r\n private _rootSubject?: RootSubjectProps;\r\n private _globalOrigin?: Point3d;\r\n private _ecefLocation?: EcefLocation;\r\n private _geographicCoordinateSystem?: GeographicCRS;\r\n private _iModelId?: GuidString;\r\n private _changeset: ChangesetIdWithIndex;\r\n\r\n /** The Id of the repository model. */\r\n public static readonly repositoryModelId: Id64String = \"0x1\";\r\n /** The Id of the root subject element. */\r\n public static readonly rootSubjectId: Id64String = \"0x1\";\r\n /** The Id of the dictionary model. */\r\n public static readonly dictionaryId: Id64String = \"0x10\";\r\n\r\n /** Event raised after [[name]] changes. */\r\n public readonly onNameChanged = new BeEvent<(previousName: string) => void>();\r\n /** Event raised after [[rootSubject]] changes. */\r\n public readonly onRootSubjectChanged = new BeEvent<(previousSubject: RootSubjectProps) => void>();\r\n /** Event raised after [[projectExtents]] changes. */\r\n public readonly onProjectExtentsChanged = new BeEvent<(previousExtents: AxisAlignedBox3d) => void>();\r\n /** Event raised after [[globalOrigin]] changes. */\r\n public readonly onGlobalOriginChanged = new BeEvent<(previousOrigin: Point3d) => void>();\r\n /** Event raised after [[ecefLocation]] changes. */\r\n public readonly onEcefLocationChanged = new BeEvent<(previousLocation: EcefLocation | undefined) => void>();\r\n /** Event raised after [[geographicCoordinateSystem]] changes. */\r\n public readonly onGeographicCoordinateSystemChanged = new BeEvent<(previousGCS: GeographicCRS | undefined) => void>();\r\n /** Event raised after [[changeset]] changes. */\r\n public readonly onChangesetChanged = new BeEvent<(previousChangeset: ChangesetIdWithIndex) => void>();\r\n\r\n /** Name of the iModel */\r\n public get name(): string {\r\n assert(this._name !== undefined);\r\n return this._name;\r\n }\r\n public set name(name: string) {\r\n if (name !== this._name) {\r\n const old = this._name;\r\n this._name = name;\r\n if (undefined !== old)\r\n this.onNameChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** The name and description of the root subject of this iModel */\r\n public get rootSubject(): RootSubjectProps {\r\n assert(this._rootSubject !== undefined);\r\n return this._rootSubject;\r\n }\r\n public set rootSubject(subject: RootSubjectProps) {\r\n if (undefined === this._rootSubject || this._rootSubject.name !== subject.name || this._rootSubject.description !== subject.description) {\r\n const old = this._rootSubject;\r\n this._rootSubject = subject;\r\n if (old)\r\n this.onRootSubjectChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** Returns `true` if this is a snapshot iModel. */\r\n public abstract get isSnapshot(): boolean;\r\n /** Returns `true` if this is a briefcase copy of an iModel that is synchronized with iModelHub. */\r\n public abstract get isBriefcase(): boolean;\r\n\r\n public abstract get isOpen(): boolean;\r\n\r\n /**\r\n * The volume, in spatial coordinates, inside which the entire project is contained.\r\n * @note The object returned from this method is frozen. You *must* make a copy before you do anything that might attempt to modify it.\r\n */\r\n public get projectExtents() {\r\n assert(undefined !== this._projectExtents);\r\n return this._projectExtents;\r\n }\r\n public set projectExtents(extents: AxisAlignedBox3d) {\r\n // Don't allow any axis of the project extents to be less than 1 meter.\r\n const projectExtents = extents.clone();\r\n projectExtents.ensureMinLengths(1.0);\r\n if (!this._projectExtents || !this._projectExtents.isAlmostEqual(projectExtents)) {\r\n const old = this._projectExtents;\r\n projectExtents.freeze();\r\n this._projectExtents = projectExtents;\r\n if (old)\r\n this.onProjectExtentsChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** An offset to be applied to all spatial coordinates. */\r\n public get globalOrigin(): Point3d {\r\n assert(this._globalOrigin !== undefined);\r\n return this._globalOrigin;\r\n }\r\n public set globalOrigin(org: Point3d) {\r\n if (!this._globalOrigin || !this._globalOrigin.isAlmostEqual(org)) {\r\n const old = this._globalOrigin;\r\n org.freeze();\r\n this._globalOrigin = org;\r\n if (old)\r\n this.onGlobalOriginChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** The [EcefLocation]($docs/learning/glossary#ecefLocation) of the iModel in Earth Centered Earth Fixed coordinates.\r\n * If the iModel property geographicCoordinateSystem is not defined then the ecefLocation provides a geolocation by defining a\r\n * 3D coordinate system relative to the Earth model WGS84. Refer to additional documentation for details. If the geographicCoordinateSystem\r\n * property is defined then the ecefLocation must be used with care. When the geographicCoordinateSystem is defined it indicates the\r\n * iModel cartesian space is the result of a cartographic projection. This implies a flattening of the Earth surface process that\r\n * results in scale, angular or area distortion. The ecefLocation is then an approximation calculated at the center of the project extent.\r\n * If the project is more than 2 kilometer in size, the ecefLocation may represent a poor approximation of the effective\r\n * cartographic projection used and a linear transformation should then be calculated at the exact origin of the data\r\n * it must position.\r\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\r\n */\r\n public get ecefLocation(): EcefLocation | undefined {\r\n return this._ecefLocation;\r\n }\r\n public set ecefLocation(ecefLocation: EcefLocation | undefined) {\r\n const old = this._ecefLocation;\r\n if (!old && !ecefLocation)\r\n return;\r\n else if (old && ecefLocation && old.isAlmostEqual(ecefLocation))\r\n return;\r\n\r\n this._ecefLocation = ecefLocation;\r\n this.onEcefLocationChanged.raiseEvent(old);\r\n }\r\n\r\n /** Set the [EcefLocation]($docs/learning/glossary#ecefLocation) for this iModel. */\r\n public setEcefLocation(ecef: EcefLocationProps): void {\r\n this.ecefLocation = new EcefLocation(ecef);\r\n }\r\n\r\n /** The geographic coordinate reference system of the iModel. */\r\n public get geographicCoordinateSystem(): GeographicCRS | undefined {\r\n return this._geographicCoordinateSystem;\r\n }\r\n public set geographicCoordinateSystem(geoCRS: GeographicCRS | undefined) {\r\n const old = this._geographicCoordinateSystem;\r\n if (!old && !geoCRS)\r\n return;\r\n else if (old && geoCRS && old.equals(geoCRS))\r\n return;\r\n\r\n this._geographicCoordinateSystem = geoCRS;\r\n this.onGeographicCoordinateSystemChanged.raiseEvent(old);\r\n }\r\n\r\n /** Sets the geographic coordinate reference system from GeographicCRSProps. */\r\n public setGeographicCoordinateSystem(geoCRS: GeographicCRSProps) {\r\n this.geographicCoordinateSystem = new GeographicCRS(geoCRS);\r\n }\r\n\r\n /** @internal */\r\n public getConnectionProps(): IModelConnectionProps {\r\n return {\r\n name: this.name,\r\n rootSubject: this.rootSubject,\r\n projectExtents: this.projectExtents.toJSON(),\r\n globalOrigin: this.globalOrigin.toJSON(),\r\n ecefLocation: this.ecefLocation,\r\n geographicCoordinateSystem: this.geographicCoordinateSystem?.toJSON(),\r\n ...this._getRpcProps(),\r\n };\r\n }\r\n\r\n /** Convert this iModel to a JSON representation. */\r\n public toJSON(): IModelConnectionProps {\r\n return this.getConnectionProps();\r\n }\r\n\r\n /** A key used to identify this iModel in RPC calls from frontend to backend.\r\n * @internal\r\n */\r\n protected _fileKey: string;\r\n /** Get the key that was used to open this iModel. This is the value used for Rpc and Ipc communications. */\r\n public get key(): string { return this._fileKey; }\r\n\r\n /** @internal */\r\n protected _iTwinId?: GuidString;\r\n /** The Guid that identifies the iTwin that owns this iModel. */\r\n public get iTwinId(): GuidString | undefined { return this._iTwinId; }\r\n\r\n /** The Guid that identifies this iModel. */\r\n public get iModelId(): GuidString | undefined { return this._iModelId; }\r\n\r\n /** @public */\r\n public get changeset(): ChangesetIdWithIndex {\r\n return { ...this._changeset };\r\n }\r\n public set changeset(changeset: ChangesetIdWithIndex) {\r\n const prev = this._changeset;\r\n if (prev.id !== changeset.id || prev.index !== changeset.index) {\r\n this._changeset = { id: changeset.id, index: changeset.index };\r\n this.onChangesetChanged.raiseEvent(prev);\r\n }\r\n }\r\n\r\n protected _openMode = OpenMode.Readonly;\r\n /** The [[OpenMode]] used for this IModel. */\r\n public get openMode(): OpenMode { return this._openMode; }\r\n\r\n /** Return a token for RPC operations.\r\n * @throws IModelError if the iModel is not open.\r\n */\r\n public getRpcProps(): IModelRpcProps {\r\n if (!this.isOpen)\r\n throw new IModelError(IModelStatus.BadRequest, \"IModel is not open for rpc\");\r\n\r\n return this._getRpcProps();\r\n }\r\n\r\n /** Returns the iModel's RPC properties.\r\n * @note It is an error to attempt to use these properties as a token for RPC operations if the iModel is not open.\r\n * @internal\r\n */\r\n protected _getRpcProps(): IModelRpcProps {\r\n return {\r\n key: this._fileKey,\r\n iTwinId: this.iTwinId,\r\n iModelId: this.iModelId,\r\n changeset: this.changeset,\r\n };\r\n }\r\n\r\n /** @internal */\r\n protected constructor(tokenProps?: IModelRpcProps) {\r\n this._changeset = tokenProps?.changeset ?? { id: \"\", index: 0 };\r\n this._fileKey = \"\";\r\n if (tokenProps) {\r\n this._fileKey = tokenProps.key;\r\n this._iTwinId = tokenProps.iTwinId;\r\n this._iModelId = tokenProps.iModelId;\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected initialize(name: string, props: IModelProps) {\r\n this.name = name;\r\n this.rootSubject = props.rootSubject;\r\n this.projectExtents = Range3d.fromJSON(props.projectExtents);\r\n this.globalOrigin = Point3d.fromJSON(props.globalOrigin);\r\n\r\n const ecefLocation = props.ecefLocation ? new EcefLocation(props.ecefLocation) : undefined;\r\n this.ecefLocation = ecefLocation?.isValid ? ecefLocation : undefined;\r\n\r\n this.geographicCoordinateSystem = props.geographicCoordinateSystem ? new GeographicCRS(props.geographicCoordinateSystem) : undefined;\r\n }\r\n\r\n /** Get the default subCategoryId for the supplied categoryId */\r\n public static getDefaultSubCategoryId(categoryId: Id64String): Id64String {\r\n return Id64.isValid(categoryId) ? Id64.fromLocalAndBriefcaseIds(Id64.getLocalId(categoryId) + 1, Id64.getBriefcaseId(categoryId)) : Id64.invalid;\r\n }\r\n\r\n /** True if this iModel has an [EcefLocation]($docs/learning/glossary#ecefLocation). */\r\n public get isGeoLocated() { return undefined !== this._ecefLocation; }\r\n\r\n /** Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its [[IModel.ecefLocation]].\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n */\r\n public getEcefTransform(): Transform {\r\n if (undefined === this._ecefLocation)\r\n throw new IModelError(GeoServiceStatus.NoGeoLocation, \"iModel is not GeoLocated\");\r\n return this._ecefLocation.getTransform();\r\n }\r\n\r\n /** Convert a point in this iModel's Spatial coordinates to an ECEF point using its [[IModel.ecefLocation]].\r\n * @param spatial A point in the iModel's spatial coordinates\r\n * @param result If defined, use this for output\r\n * @returns A Point3d in ECEF coordinates\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n */\r\n public spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyPoint3d(spatial, result); }\r\n\r\n /** Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its [[ecefLocation]].\r\n * @param ecef A point in ECEF coordinates\r\n * @param result If defined, use this for output\r\n * @returns A Point3d in this iModel's spatial coordinates\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\r\n */\r\n public ecefToSpatial(ecef: XYAndZ, result?: Point3d): Point3d { return expectDefined(this.getEcefTransform().multiplyInversePoint3d(ecef, result)); }\r\n\r\n /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using its [[IModel.ecefLocation]].\r\n * @param spatial A point in the iModel's spatial coordinates\r\n * @param result If defined, use this for output\r\n * @returns A Cartographic location\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n */\r\n public spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic { return expectDefined(Cartographic.fromEcef(this.spatialToEcef(spatial), result)); }\r\n\r\n /** Convert a [[Cartographic]] to a point in this iModel's Spatial coordinates using its [[IModel.ecefLocation]].\r\n * @param cartographic A cartographic location\r\n * @param result If defined, use this for output\r\n * @returns A point in this iModel's spatial coordinates\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\r\n */\r\n public cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d) { return this.ecefToSpatial(cartographic.toEcef(result), result); }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IModelError.js","sourceRoot":"","s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E,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport {\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData,\n} from \"@itwin/core-bentley\";\n\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\n * @public\n */\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\n\n/** The error type thrown by this module.\n * @see [[ITwinError]]\n * @see [[IModelErrorNumber]] for commonly-used error codes.\n * @public\n */\nexport class IModelError extends BentleyError {\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\n}\n\n/** Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @public\n*/\nexport interface ConflictingLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: number[];\n}\n\n/**\n * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since\n * the exception may be marshalled across process boundaries and the class will not survive.\n * @see ConflictingLocksError.isError\n * @beta\n */\nexport interface ConflictingLocks extends LegacyITwinErrorWithNumber {\n conflictingLocks?: ConflictingLock[];\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @public\n*/\nexport class ConflictingLocksError extends IModelError { // implements ConflictingLocks, but that's @beta\n public conflictingLocks?: ConflictingLock[];\n\n /** @beta */\n public static override isError<T extends ConflictingLocks>(error: any): error is T {\n return BentleyError.isError(error, IModelHubStatus.LockOwnedByAnotherBriefcase);\n }\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\n this.conflictingLocks = conflictingLocks;\n }\n}\n\n/** @public */\nexport class ServerError extends IModelError {\n public constructor(errorNumber: number, message: string) {\n super(errorNumber, message);\n this.name = `Server error (${errorNumber})`;\n }\n}\n\n/** @public */\nexport class ServerTimeoutError extends ServerError {\n public constructor(message: string) {\n super(IModelStatus.ServerTimeout, message);\n this.name = \"Server timeout error\";\n }\n}\n\n/** @public */\nexport class BackendError extends IModelError {\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n this.name = name;\n }\n}\n\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\n * @public\n */\nexport class NoContentError extends IModelError {\n public constructor() {\n super(IModelStatus.NoContent, \"No Content\");\n }\n}\n"]}
1
+ {"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,YAAY,EAA6D,eAAe,EAAE,YAAY,GACvG,MAAM,qBAAqB,CAAC;AAQ7B;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,YAAmB,WAAuC,EAAE,OAAe,EAAE,WAA6B;QACxG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB;AA4BD;;;;EAIE;AACF,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IAC7C,gBAAgB,CAAqB;IAE5C,YAAY;IACL,MAAM,CAAU,OAAO,CAA6B,KAAU;QACnE,OAAO,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,2BAA2B,CAAC,CAAC;IAClF,CAAC;IACD,YAAY,OAAe,EAAE,WAA6B,EAAE,gBAAoC;QAC9F,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport {\r\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData,\r\n} from \"@itwin/core-bentley\";\r\n\r\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\r\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\r\n * @public\r\n */\r\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\r\n\r\n/** The error type thrown by this module.\r\n * @see [[ITwinError]]\r\n * @see [[IModelErrorNumber]] for commonly-used error codes.\r\n * @public\r\n */\r\nexport class IModelError extends BentleyError {\r\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\r\n super(errorNumber, message, getMetaData);\r\n }\r\n}\r\n\r\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\r\n * @public\r\n */\r\nexport enum LockState {\r\n /** The element is not locked */\r\n None = 0,\r\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\r\n Shared = 1,\r\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\r\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\r\n */\r\n Exclusive = 2,\r\n}\r\n\r\n/** Detailed information about a particular object Lock that is causing the Lock update conflict.\r\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\r\n * @public\r\n*/\r\nexport interface ConflictingLock {\r\n /** Id of the object that is causing conflict. */\r\n objectId: string;\r\n /**\r\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\r\n * See {@link LockState}.\r\n */\r\n state: LockState;\r\n /** An array of Briefcase ids that hold this lock. */\r\n briefcaseIds: number[];\r\n}\r\n\r\n/**\r\n * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since\r\n * the exception may be marshalled across process boundaries and the class will not survive.\r\n * @see ConflictingLocksError.isError\r\n * @beta\r\n */\r\nexport interface ConflictingLocks extends LegacyITwinErrorWithNumber {\r\n conflictingLocks?: ConflictingLock[];\r\n}\r\n\r\n/**\r\n * An error raised when there is a lock conflict detected.\r\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\r\n * @public\r\n*/\r\nexport class ConflictingLocksError extends IModelError { // implements ConflictingLocks, but that's @beta\r\n public conflictingLocks?: ConflictingLock[];\r\n\r\n /** @beta */\r\n public static override isError<T extends ConflictingLocks>(error: any): error is T {\r\n return BentleyError.isError(error, IModelHubStatus.LockOwnedByAnotherBriefcase);\r\n }\r\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\r\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\r\n this.conflictingLocks = conflictingLocks;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerError extends IModelError {\r\n public constructor(errorNumber: number, message: string) {\r\n super(errorNumber, message);\r\n this.name = `Server error (${errorNumber})`;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerTimeoutError extends ServerError {\r\n public constructor(message: string) {\r\n super(IModelStatus.ServerTimeout, message);\r\n this.name = \"Server timeout error\";\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class BackendError extends IModelError {\r\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\r\n super(errorNumber, message, getMetaData);\r\n this.name = name;\r\n }\r\n}\r\n\r\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\r\n * @public\r\n */\r\nexport class NoContentError extends IModelError {\r\n public constructor() {\r\n super(IModelStatus.NoContent, \"No Content\");\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IModelVersion.js","sourceRoot":"","sources":["../../src/IModelVersion.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,MAAM,CAAW;IACjB,OAAO,CAAW;IAClB,iBAAiB,CAAU;IAC3B,YAAY,CAAU;IAE9B,gBAAwB,CAAC;IAEzB,gDAAgD;IACzC,MAAM,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;QACpC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,kDAAkD;IAC3C,MAAM,CAAC,MAAM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AAC,MAAM,CAAC;QAC9B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,uDAAuD;IACvD,IAAW,OAAO,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEvD,wDAAwD;IACxD,IAAW,QAAQ,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzD;;;;;OAKG;IACI,gBAAgB,KAA8B,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAErF,sFAAsF;IAC/E,OAAO,KAAyB,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;CACnE","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { ChangesetId } from \"./ChangesetProps\";\n\n/** Properties for IModelVersion\n * @public\n */\nexport type IModelVersionProps =\n { first: true, latest?: never, afterChangeSetId?: never, versionName?: never } |\n { latest: true, first?: never, afterChangeSetId?: never, versionName?: never } |\n { afterChangeSetId: string, first?: never, latest?: never, versionName?: never } |\n { versionName: string, first?: never, latest?: never, afterChangeSetId?: never };\n\n/** Option to specify the version of the iModel to be acquired and used\n * @public\n */\nexport class IModelVersion {\n private _first?: boolean;\n private _latest?: boolean;\n private _afterChangeSetId?: string;\n private _versionName?: string;\n\n private constructor() { }\n\n /** Describes the first version of the iModel */\n public static first(): IModelVersion {\n const version = new IModelVersion();\n version._first = true;\n return version;\n }\n\n /** Describes the latest version of the iModel */\n public static latest(): IModelVersion {\n const version = new IModelVersion();\n version._latest = true;\n return version;\n }\n\n /** Describes a version of the iModel by the last change set that needs\n * to be applied or merged to the iModel.\n * Note that all ChangeSets up to and and including the specified ChangeSet\n * needs to be applied.\n * If the changesetId is an empty string, it is assumed to be the first version\n * before any change sets have been applied.\n */\n public static asOfChangeSet(changesetId: string): IModelVersion {\n const version = new IModelVersion();\n\n if (changesetId === \"\") {\n version._first = true;\n return version;\n }\n\n version._afterChangeSetId = changesetId;\n return version;\n }\n\n /** Describes a version of the iModel with the specified version name */\n public static named(versionName: string): IModelVersion {\n const version = new IModelVersion();\n version._versionName = versionName;\n return version;\n }\n\n public toJSON(): IModelVersionProps {\n return this._versionName ? { versionName: this._versionName } :\n this._afterChangeSetId ? { afterChangeSetId: this._afterChangeSetId } :\n this._first ? { first: this._first } :\n { latest: true };\n }\n\n /** Creates a version from an IModelVersionProps */\n public static fromJSON(json: IModelVersionProps): IModelVersion {\n const version = new IModelVersion();\n version._first = json.first;\n version._afterChangeSetId = json.afterChangeSetId;\n version._latest = json.latest;\n version._versionName = json.versionName;\n return version;\n }\n\n /** Returns true if this describes the first version */\n public get isFirst(): boolean { return !!this._first; }\n\n /** Returns true if this describes the latest version */\n public get isLatest(): boolean { return !!this._latest; }\n\n /** Returns the last change set id to be applied to the iModel\n * to get to this specified version. @see asOfChangeSet().\n * Note that this method does not attempt to resolve the change set\n * if this describes the first version, last version, named version, etc.\n * @see evaluateChangeSet() for those use cases.\n */\n public getAsOfChangeSet(): ChangesetId | undefined { return this._afterChangeSetId; }\n\n /** Returns the name of the version if this describes a named version. @see named() */\n public getName(): string | undefined { return this._versionName; }\n}\n"]}
1
+ {"version":3,"file":"IModelVersion.js","sourceRoot":"","sources":["../../src/IModelVersion.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,MAAM,CAAW;IACjB,OAAO,CAAW;IAClB,iBAAiB,CAAU;IAC3B,YAAY,CAAU;IAE9B,gBAAwB,CAAC;IAEzB,gDAAgD;IACzC,MAAM,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;QACpC,OAAO,CAAC,MAAM,GAA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AO,CAAC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClD,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,uDAAuD;IACvD,IAAW,OAAO,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEvD,wDAAwD;IACxD,IAAW,QAAQ,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzD;;;;;OAKG;IACI,gBAAgB,KAA8B,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAErF,sFAAsF;IAC/E,OAAO,KAAyB,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;CACnE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { ChangesetId } from \"./ChangesetProps\";\r\n\r\n/** Properties for IModelVersion\r\n * @public\r\n */\r\nexport type IModelVersionProps =\r\n { first: true, latest?: never, afterChangeSetId?: never, versionName?: never } |\r\n { latest: true, first?: never, afterChangeSetId?: never, versionName?: never } |\r\n { afterChangeSetId: string, first?: never, latest?: never, versionName?: never } |\r\n { versionName: string, first?: never, latest?: never, afterChangeSetId?: never };\r\n\r\n/** Option to specify the version of the iModel to be acquired and used\r\n * @public\r\n */\r\nexport class IModelVersion {\r\n private _first?: boolean;\r\n private _latest?: boolean;\r\n private _afterChangeSetId?: string;\r\n private _versionName?: string;\r\n\r\n private constructor() { }\r\n\r\n /** Describes the first version of the iModel */\r\n public static first(): IModelVersion {\r\n const version = new IModelVersion();\r\n version._first = true;\r\n return version;\r\n }\r\n\r\n /** Describes the latest version of the iModel */\r\n public static latest(): IModelVersion {\r\n const version = new IModelVersion();\r\n version._latest = true;\r\n return version;\r\n }\r\n\r\n /** Describes a version of the iModel by the last change set that needs\r\n * to be applied or merged to the iModel.\r\n * Note that all ChangeSets up to and and including the specified ChangeSet\r\n * needs to be applied.\r\n * If the changesetId is an empty string, it is assumed to be the first version\r\n * before any change sets have been applied.\r\n */\r\n public static asOfChangeSet(changesetId: string): IModelVersion {\r\n const version = new IModelVersion();\r\n\r\n if (changesetId === \"\") {\r\n version._first = true;\r\n return version;\r\n }\r\n\r\n version._afterChangeSetId = changesetId;\r\n return version;\r\n }\r\n\r\n /** Describes a version of the iModel with the specified version name */\r\n public static named(versionName: string): IModelVersion {\r\n const version = new IModelVersion();\r\n version._versionName = versionName;\r\n return version;\r\n }\r\n\r\n public toJSON(): IModelVersionProps {\r\n return this._versionName ? { versionName: this._versionName } :\r\n this._afterChangeSetId ? { afterChangeSetId: this._afterChangeSetId } :\r\n this._first ? { first: this._first } :\r\n { latest: true };\r\n }\r\n\r\n /** Creates a version from an IModelVersionProps */\r\n public static fromJSON(json: IModelVersionProps): IModelVersion {\r\n const version = new IModelVersion();\r\n version._first = json.first;\r\n version._afterChangeSetId = json.afterChangeSetId;\r\n version._latest = json.latest;\r\n version._versionName = json.versionName;\r\n return version;\r\n }\r\n\r\n /** Returns true if this describes the first version */\r\n public get isFirst(): boolean { return !!this._first; }\r\n\r\n /** Returns true if this describes the latest version */\r\n public get isLatest(): boolean { return !!this._latest; }\r\n\r\n /** Returns the last change set id to be applied to the iModel\r\n * to get to this specified version. @see asOfChangeSet().\r\n * Note that this method does not attempt to resolve the change set\r\n * if this describes the first version, last version, named version, etc.\r\n * @see evaluateChangeSet() for those use cases.\r\n */\r\n public getAsOfChangeSet(): ChangesetId | undefined { return this._afterChangeSetId; }\r\n\r\n /** Returns the name of the version if this describes a named version. @see named() */\r\n public getName(): string | undefined { return this._versionName; }\r\n}\r\n"]}
@@ -1 +1 @@
1
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,YAAY;AACZ,MAAM,KAAW,mBAAmB,CAqBnC;AArBD,WAAiB,mBAAmB;IAClC,uDAAuD;IAC1C,yBAAK,GAAG,sBAAsB,CAAC;IAW5C,kDAAkD;IAClD,SAAgB,UAAU,CAAC,GAAQ,EAAE,OAAe,EAAE,UAAkB;QACtE,UAAU,CAAC,UAAU,CAAsB,EAAE,YAAY,EAAE,EAAE,KAAK,EAAL,oBAAA,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;IACpG,CAAC;IAFe,8BAAU,aAEzB,CAAA;IACD,iEAAiE;IACjE,SAAgB,OAAO,CAAC,KAAc,EAAE,GAAS;QAC/C,OAAO,UAAU,CAAC,OAAO,CAAsB,KAAK,EAAE,oBAAA,KAAK,EAAE,GAAG,CAAC,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;IAC5G,CAAC;IAFe,2BAAO,UAEtB,CAAA;AACH,CAAC,EArBgB,mBAAmB,KAAnB,mBAAmB,QAqBnC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { ITwinError } from \"@itwin/core-bentley\";\n\n/**\n * An error originating from the [SQLiteDb]($backend) API.\n * @beta\n */\nexport interface SqliteError extends ITwinError {\n /** The name of the database for this problem. */\n dbName: string;\n}\n\n/** @beta */\nexport namespace SqliteError {\n export const scope = \"itwin-Sqlite\";\n export type Key =\n \"already-open\" |\n \"incompatible-version\" |\n \"invalid-versions-property\" |\n \"readonly\";\n\n /** Determine whether an error object is a SqliteError */\n export function isError(error: unknown, key?: Key): error is SqliteError {\n return ITwinError.isError<SqliteError>(error, scope, key) && typeof error.dbName === \"string\";\n }\n\n /** Instantiate and throw a SqliteError */\n export function throwError(key: Key, message: string, dbName: string): never {\n ITwinError.throwError<SqliteError>({ iTwinErrorId: { scope, key }, message, dbName });\n }\n}\n\n/**\n * An error originating from the [CloudSqlite]($backend) API.\n * @beta\n */\nexport interface CloudSqliteError extends ITwinError {\n /** The name of the database that generated the error */\n readonly dbName?: string;\n /** The name of the container associated with the error */\n readonly containerId?: string;\n}\n\n/** @beta */\nexport namespace CloudSqliteError {\n export const scope = \"itwin-CloudSqlite\";\n export type Key =\n \"already-published\" |\n \"copy-error\" |\n \"invalid-name\" |\n \"no-version-available\" |\n \"not-a-function\" |\n \"service-not-available\" |\n /** The write lock cannot be acquired because it is currently held by somebody else.\n * @see WriteLockHeld for details\n */\n \"write-lock-held\" |\n /** The write lock on a container is not held, but is required for this operation */\n \"write-lock-not-held\";\n\n /** thrown when an attempt to acquire the write lock for a container fails because the lock is already held by somebody else (\"write-lock-held\"). */\n export interface WriteLockHeld extends CloudSqliteError {\n /** @internal */\n errorNumber: number;\n /** moniker of user currently holding container's lock */\n lockedBy: string;\n /** time the lock expires */\n expires: string;\n }\n\n /** Determine whether an error object is a CloudSqliteError */\n export function isError<T extends CloudSqliteError>(error: unknown, key?: Key): error is T {\n return ITwinError.isError<T>(error, scope, key);\n }\n\n /** Instantiate and throw a CloudSqliteError */\n export function throwError<T extends CloudSqliteError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\n ITwinError.throwError<CloudSqliteError>({ ...e, iTwinErrorId: { scope, key } });\n }\n}\n\n/** Errors thrown by the [ViewStore]($backend) API.\n * @beta\n */\nexport interface ViewStoreError extends ITwinError {\n /** The name of the ViewStore that generated the error */\n viewStoreName?: string;\n}\n\n/** @beta */\nexport namespace ViewStoreError {\n export const scope = \"itwin-ViewStore\";\n export type Key =\n \"invalid-value\" |\n \"invalid-member\" |\n \"no-owner\" |\n \"not-found\" |\n \"not-unique\" |\n \"no-viewstore\" |\n \"group-error\";\n\n /** Determine whether an error object is a ViewStoreError */\n export function isError<T extends ViewStoreError>(error: unknown, key?: Key): error is T {\n return ITwinError.isError<T>(error, scope, key);\n }\n\n /** Instantiate and throw a ViewStoreError */\n export function throwError<T extends ViewStoreError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\n ITwinError.throwError<ViewStoreError>({ ...e, iTwinErrorId: { scope, key } });\n }\n}\n\n/**\n * Errors thrown by the [Workspace]($backend) APIs.\n * @beta\n */\nexport namespace WorkspaceError {\n export const scope = \"itwin-Workspace\";\n export type Key =\n \"already-exists\" |\n \"container-exists\" |\n \"does-not-exist\" |\n \"invalid-name\" |\n \"no-cloud-container\" |\n \"load-error\" |\n \"load-errors\" |\n \"resource-exists\" |\n \"too-large\" |\n \"write-error\";\n\n /** Determine whether an error object is a WorkspaceError */\n export function isError<T extends ITwinError>(error: unknown, key?: Key): error is T {\n return ITwinError.isError<T>(error, scope, key);\n }\n\n export function throwError<T extends ITwinError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\n ITwinError.throwError<ITwinError>({ ...e, iTwinErrorId: { key, scope } });\n }\n}\n\n\n/** Errors originating from the [ChannelControl]($backend) interface.\n * @beta\n */\nexport interface ChannelControlError extends ITwinError {\n /** The channel key that caused the error. */\n readonly channelKey: string;\n}\n\n/** @beta */\nexport namespace ChannelControlError {\n /** the ITwinError scope for `ChannelControlError`s. */\n export const scope = \"itwin-ChannelControl\";\n\n /** Keys that identify `ChannelControlError`s */\n export type Key =\n /** an attempt to create a channel within an existing channel */\n \"may-not-nest\" |\n /** an attempt to use a channel that was not \"allowed\" */\n \"not-allowed\" |\n /** the root channel already exists */\n \"root-exists\";\n\n /** Instantiate and throw a ChannelControlError */\n export function throwError(key: Key, message: string, channelKey: string): never {\n ITwinError.throwError<ChannelControlError>({ iTwinErrorId: { scope, key }, message, channelKey });\n }\n /** Determine whether an error object is a ChannelControlError */\n export function isError(error: unknown, key?: Key): error is ChannelControlError {\n return ITwinError.isError<ChannelControlError>(error, scope, key) && typeof error.channelKey === \"string\";\n }\n}\n"]}
1
+ {"version":3,"file":"ITwinCoreErrors.js","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AmB,CAqBnC;AArBD,WAAiB,mBAAmB;IAClC,uDAAuD;IAC1C,yBAAK,GAAG,sBAAsB,CAAC;IAW5C,kDAAkD;IAClD,SAAgB,UAAU,CAAC,GAAQ,EAAE,OAAe,EAAE,UAAkB;QACtE,UAAU,CAAC,UAAU,CAAsB,EAAE,YAAY,EAAE,EAAE,KAAK,EAAL,oBAAA,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;IACpG,CAAC;IAFe,8BAAU,aAEzB,CAAA;IACD,iEAAiE;IACjE,SAAgB,OAAO,CAAC,KAAc,EAAE,GAAS;QAC/C,OAAO,UAAU,CAAC,OAAO,CAAsB,KAAK,EAAE,oBAAA,KAAK,EAAE,GAAG,CAAC,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;IAC5G,CAAC;IAFe,2BAAO,UAEtB,CAAA;AACH,CAAC,EArBgB,mBAAmB,KAAnB,mBAAmB,QAqBnC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { ITwinError } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * An error originating from the [SQLiteDb]($backend) API.\r\n * @beta\r\n */\r\nexport interface SqliteError extends ITwinError {\r\n /** The name of the database for this problem. */\r\n dbName: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace SqliteError {\r\n export const scope = \"itwin-Sqlite\";\r\n export type Key =\r\n \"already-open\" |\r\n \"incompatible-version\" |\r\n \"invalid-versions-property\" |\r\n \"readonly\";\r\n\r\n /** Determine whether an error object is a SqliteError */\r\n export function isError(error: unknown, key?: Key): error is SqliteError {\r\n return ITwinError.isError<SqliteError>(error, scope, key) && typeof error.dbName === \"string\";\r\n }\r\n\r\n /** Instantiate and throw a SqliteError */\r\n export function throwError(key: Key, message: string, dbName: string): never {\r\n ITwinError.throwError<SqliteError>({ iTwinErrorId: { scope, key }, message, dbName });\r\n }\r\n}\r\n\r\n/**\r\n * An error originating from the [CloudSqlite]($backend) API.\r\n * @beta\r\n */\r\nexport interface CloudSqliteError extends ITwinError {\r\n /** The name of the database that generated the error */\r\n readonly dbName?: string;\r\n /** The name of the container associated with the error */\r\n readonly containerId?: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace CloudSqliteError {\r\n export const scope = \"itwin-CloudSqlite\";\r\n export type Key =\r\n \"already-published\" |\r\n \"copy-error\" |\r\n \"invalid-name\" |\r\n \"no-version-available\" |\r\n \"not-a-function\" |\r\n \"service-not-available\" |\r\n /** The write lock cannot be acquired because it is currently held by somebody else.\r\n * @see WriteLockHeld for details\r\n */\r\n \"write-lock-held\" |\r\n /** The write lock on a container is not held, but is required for this operation */\r\n \"write-lock-not-held\";\r\n\r\n /** thrown when an attempt to acquire the write lock for a container fails because the lock is already held by somebody else (\"write-lock-held\"). */\r\n export interface WriteLockHeld extends CloudSqliteError {\r\n /** @internal */\r\n errorNumber: number;\r\n /** moniker of user currently holding container's lock */\r\n lockedBy: string;\r\n /** time the lock expires */\r\n expires: string;\r\n }\r\n\r\n /** Determine whether an error object is a CloudSqliteError */\r\n export function isError<T extends CloudSqliteError>(error: unknown, key?: Key): error is T {\r\n return ITwinError.isError<T>(error, scope, key);\r\n }\r\n\r\n /** Instantiate and throw a CloudSqliteError */\r\n export function throwError<T extends CloudSqliteError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\r\n ITwinError.throwError<CloudSqliteError>({ ...e, iTwinErrorId: { scope, key } });\r\n }\r\n}\r\n\r\n/** Errors thrown by the [ViewStore]($backend) API.\r\n * @beta\r\n */\r\nexport interface ViewStoreError extends ITwinError {\r\n /** The name of the ViewStore that generated the error */\r\n viewStoreName?: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace ViewStoreError {\r\n export const scope = \"itwin-ViewStore\";\r\n export type Key =\r\n \"invalid-value\" |\r\n \"invalid-member\" |\r\n \"no-owner\" |\r\n \"not-found\" |\r\n \"not-unique\" |\r\n \"no-viewstore\" |\r\n \"group-error\";\r\n\r\n /** Determine whether an error object is a ViewStoreError */\r\n export function isError<T extends ViewStoreError>(error: unknown, key?: Key): error is T {\r\n return ITwinError.isError<T>(error, scope, key);\r\n }\r\n\r\n /** Instantiate and throw a ViewStoreError */\r\n export function throwError<T extends ViewStoreError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\r\n ITwinError.throwError<ViewStoreError>({ ...e, iTwinErrorId: { scope, key } });\r\n }\r\n}\r\n\r\n/**\r\n * Errors thrown by the [Workspace]($backend) APIs.\r\n * @beta\r\n */\r\nexport namespace WorkspaceError {\r\n export const scope = \"itwin-Workspace\";\r\n export type Key =\r\n \"already-exists\" |\r\n \"container-exists\" |\r\n \"does-not-exist\" |\r\n \"invalid-name\" |\r\n \"no-cloud-container\" |\r\n \"load-error\" |\r\n \"load-errors\" |\r\n \"resource-exists\" |\r\n \"too-large\" |\r\n \"write-error\";\r\n\r\n /** Determine whether an error object is a WorkspaceError */\r\n export function isError<T extends ITwinError>(error: unknown, key?: Key): error is T {\r\n return ITwinError.isError<T>(error, scope, key);\r\n }\r\n\r\n export function throwError<T extends ITwinError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\r\n ITwinError.throwError<ITwinError>({ ...e, iTwinErrorId: { key, scope } });\r\n }\r\n}\r\n\r\n\r\n/** Errors originating from the [ChannelControl]($backend) interface.\r\n * @beta\r\n */\r\nexport interface ChannelControlError extends ITwinError {\r\n /** The channel key that caused the error. */\r\n readonly channelKey: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace ChannelControlError {\r\n /** the ITwinError scope for `ChannelControlError`s. */\r\n export const scope = \"itwin-ChannelControl\";\r\n\r\n /** Keys that identify `ChannelControlError`s */\r\n export type Key =\r\n /** an attempt to create a channel within an existing channel */\r\n \"may-not-nest\" |\r\n /** an attempt to use a channel that was not \"allowed\" */\r\n \"not-allowed\" |\r\n /** the root channel already exists */\r\n \"root-exists\";\r\n\r\n /** Instantiate and throw a ChannelControlError */\r\n export function throwError(key: Key, message: string, channelKey: string): never {\r\n ITwinError.throwError<ChannelControlError>({ iTwinErrorId: { scope, key }, message, channelKey });\r\n }\r\n /** Determine whether an error object is a ChannelControlError */\r\n export function isError(error: unknown, key?: Key): error is ChannelControlError {\r\n return ITwinError.isError<ChannelControlError>(error, scope, key) && typeof error.channelKey === \"string\";\r\n }\r\n}\r\n"]}